Advertisement
Krampus1025

Hook

Mar 5th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. __declspec(naked) void hkwglSwapBuffers()
  2. {
  3.     //Take care of the bytes we wrote over with a jmp
  4.     __asm
  5.     {
  6.         mov edi, edi
  7.         push ebp
  8.         mov ebp, esp;
  9.     }
  10.  
  11.     //Do our drawing and stuff here
  12.  
  13.     __asm jmp 0x18EB5E26
  14. }
  15.  
  16. Hook hkwglSwapBuffs((BYTE*)0x18EB5E21, (DWORD)hkwglSwapBuffers, 0x5);
  17.  
  18. //Somewhere in main
  19. hkwglSwapBuffs.ToggleHook();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement