Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. //0x136B7F
  2. typedef int(__stdcall *object_set_position)(int dataum, int a2, int a3, int a4, int a5);
  3. object_set_position object_set_position_method;
  4.  
  5. DWORD afterJmpAddr;
  6. int dataum, upAngles, positionPtr, forwardPtr, a5;
  7.  
  8. void cave() {
  9. TRACE_GAME("hooked, dataum=%d, positionPtr=%d", dataum, positionPtr);
  10. }
  11. __declspec(naked) void objectSetPosition() {
  12. afterJmpAddr = (DWORD)(h2mod->GetBase() + 0x136B87);
  13. __asm{
  14. mov eax, [esp+0x4]
  15. mov dataum, eax
  16. mov ecx, [esp+0x18]
  17. mov positionPtr, ecx
  18. }
  19. cave();
  20. __asm {
  21. mov eax, [esp+0x14]
  22. mov ecx, [esp+0x8]
  23. jmp afterJmpAddr
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement