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.
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 ?
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;
}

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 ?