I'm writing a hack for Point Blank/Project Blackout, but I have something that doesn't work and I need your help..
I found the pointer and offset and try to change the first two bytes of the specified address. My function looks like this:
Code:
void MEMwrite(void *adr, void *ptr, int size)
{
DWORD OldProtection;
VirtualProtect(adr,size,PAGE_EXECUTE_READWRITE, &OldProtection);
memcpy(adr,ptr,size);
VirtualProtect(adr,size,OldProtection, &OldProtection);
}
DWORD WINAPI HACKthread( LPVOID param )
{
HMODULE Module = GetModuleHandle("PointBlank.i3exec");
DWORD Pointer = (DWORD)Module + 0x123456;
while (1)
{
if(Novice == 1)
{
MessageBeep(0);
MEMwrite((void *)(Pointer + 0x1234),(void *)(PBYTE)"\x93\x93" , 2);
}
}
return 0;
}
For some reason it doesn't work, but I can't understand what is my mistake..
And I have another question, so as not to create a new topic, ask it here ..
I need to freeze the bytes of the specified address, is it possible and if so, how I can do it? I need a source code for freezing the fifth and sixth bytes..
Sorry for my English, I used a translator..