My old Midfunction Hook
This is my old midfunction hook that I used for Combat Arms, all you have to do is update the addresses. It shouldn't be too hard. This is not copy & paste shit. I am releasing this because I am done with CA. I play legit now. I will not be answering questions about this. Naked ftw? Credits are at bottom.
Globals
Present
Reset
Credits
btw, once you update the addresses, your gonna wanna detour your Reset and Present addies. :P
Globals
Code:
DWORD dwES_HOOK = 0x57341E; DWORD dwES_RESTORE = dwES_HOOK+0x5; DWORD dwRES_HOOK = 0x570E4E; DWORD dwRES_RESTORE = dwRES_HOOK+0x7; DWORD dwPRES_HOOK = 0x65B316; DWORD dwPRES_RESTORE = dwPRES_HOOK+0x5;
Code:
__declspec( naked ) void Present_Hook( )
{
_asm
{
MOV ECX, DWORD PTR DS:[EAX]
MOV EDX, DWORD PTR DS:[ECX+0x44]
PUSHAD
}
//call your shit here
_asm
{
POPAD
JMP[ dwPRES_RESTORE ]
}
}
Code:
_declspec( naked ) void Reset_Hook( )
{
_asm
{
MOV ECX, DWORD PTR DS:[EAX]
MOV EDX, DWORD PTR DS:[ECX+0x40]
PUSHAD
}
main->OnLostDevice( );
_asm
{
POPAD
CALL EDX
PUSHAD
}
main->OnResetDevice( );
_asm
{
POPAD
JMP[ dwRES_RESTORE ]
}
}
Code:
Stephen Gellin S0biet Shad0w_


