Hooking with exeption handling...

Posts 1–4 of 4 · Page 1 of 1
Hooking with exeption handling...
Hello guys,
I ma tired of byte patching and MID hooking everytime there is a patch i have to make a new hook... so i tired making an exeption handling hook. I got a problem - after i fix the modded bytes and i am trying to get back to the place i was. i am making the game to call 00000000. and my exeption handler is called but when "return EXCEPTION_CONTINUE_EXECUTION;" it is executed again. this is what i am doing.

Code:
//this is other func
*(BYTE*)dw_GoBackwards = modded bytes1;
*(BYTE*)dw_GoBackwards + 1 = modded bytes2;
*(BYTE*)dw_GoBackwards + 2 = modded bytes3;
//this is other func


LONG CALLBACK ExceptionHandler(PEXCEPTION_POINTERS pException)
{
	BYTE originalBytes[] = { 0x52,0x57,0x50};
	pException->ContextRecord->Eip = (DWORD)dw_GoBackwards;
	for(int i=0;i<3;i++)
    {
        *(DWORD*)(dw_GoBackwards + i) = originalBytes[i];
    }
    return EXCEPTION_CONTINUE_EXECUTION;
}
even when i restore the bytes and go back to them i got exeption again

the problem is that in the modded bytess i make the after that called address to 0 and cannot return it to the original :|
so the game keeps calling 0

any idea how to get back the address i need to call ?
return EXCEPTION_CONTINUE_EXECUTION;

to:

return EXCEPTION_CONTINUE_SEARCH;
you should never restore the original bytes .. the exception will not occur anymore and therefore you wont break again.
1. You're still byte patching, thus defeating the whole point of this. 2. Exception based hooks are ridiculously slow & especially on functions called more than one per frame and there is multiple frames per second, as you could imagine this adds up fast... 3. I would either recommend learning the actual art which is hooking or learning bypassing the targeted anticheat, good luck sir.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us