Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Function(void)
- {
- MessageBoxA(0, "Leet hacks!", "Leet hacks!", 0);
- }
- _declspec(naked) void FunctionCallerStub()
- {
- __asm
- {
- pushfd ;store flags
- pushad ;store registers
- call Function
- popad ;restore registers
- popfd ;restore flags
- jnz 0x0042E280
- }
- }
- void InstallHook(void)
- {
- unsigned char *overwriteptr = (unsigned char*)0x0042E1AC;
- *overwriteptr = 0xE9; *((DWORD*)(overwriteptr + 1)) = (DWORD)&FunctionCallerStub;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement