Register for your free account! | Forgot your password?

You last visited: Today at 02:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



memset

Discussion on memset within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
memset

hi,
i made a smal proxy-dll, which patches some adresses.
but it crashes my game.
if i run it in a debugger it tells me.
"Access violation when writing to [007E245E] -use Shift....."
the adress is correct.
does this access violation is due to the anti hack shield?
or was it my fault?.

here are the important parts of my code
PHP Code:
BYTE g_JMP =0xEB;
unsigned long Mutex2 0x007E245E;
memset((VOID*)Mutex2,g_JMP,1); 
RunzelEier is offline  
Old 02/19/2011, 00:37   #2
 
black0utCpp's Avatar
 
elite*gold: 0
Join Date: Oct 2010
Posts: 381
Received Thanks: 210
sorry didn t read close enough i guess it s something with the anti hack shield
black0utCpp is offline  
Old 02/19/2011, 00:57   #3
 
elite*gold: 150
Join Date: Dec 2010
Posts: 112
Received Thanks: 159
check the access rights of the page, e.g. in Ollydbg. Press f3 to load the game, then alt+m

[IMG] Uploaded with [/IMG]

R = Read
W = Write
E = Execute
5769854332 is offline  
Thanks
2 Users
Old 02/19/2011, 01:39   #4
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
i used the dbghelp.dll as my proxy
i should have all rights.
any other suggestions?

Edit: ahh sry, thats the problem thx
any suggestions how i can fix it?
setdebugprivileg?

i will try it that way

Editē: i adjusted the debug privileges, but still the game crashes.
i used this function:
and olly tells me that i still can only read the process.
Attached Images
File Type: jpg Untitled.jpg (23.2 KB, 4 views)
RunzelEier is offline  
Old 02/19/2011, 02:19   #5
 
elite*gold: 150
Join Date: Dec 2010
Posts: 112
Received Thanks: 159
VirtualQuery
VirtualProtect

google them or use msdn hp.

edit:
btw your screen doesnt show the access rights of the address 007E245E.
5769854332 is offline  
Thanks
1 User
Old 02/19/2011, 02:38   #6
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
ahh i thought my dll has not the right rights.
i will try it that way.

Edit:
Thank you,
i love you.
works like a shame!

i now use this function
PHP Code:
LPVOID memsetEx (void lpDestinationint lpSourceint nLen)
{
    
DWORD dwOldDestProt 0;
    
DWORD dwOldSrcProt    0;
    
    
VirtualProtect    (lpDestinationnLenPAGE_EXECUTE_READWRITE, &dwOldDestProt);
    
memset            (lpDestinationlpSourcenLen);
    
VirtualProtect    (lpDestinationnLendwOldDestProtNULL);

    return 
lpDestination;

RunzelEier is offline  
Reply




All times are GMT +1. The time now is 02:07.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.