Advertisement
colddddda

Untitled

Dec 23rd, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #define RReturnCheckFunction_address rbxaddy(0x5465A6)
  2. #define RReturnFlag1_address rbxaddy(0x147AF28)
  3. #define RReturnFlag2_address rbxaddy(0x14A358C4)
  4.  
  5. namespace RetcheckDisablers {
  6. namespace ret {
  7. auto Retcheck() {
  8. int rccheck_function = RReturnCheckFunction_address;
  9. int flag1 = RReturnFlag1_address;
  10. int flag2 = RReturnFlag2_address;
  11.  
  12. int flag1_val = *(int*)(flag1);
  13. int flag2_val = *(int*)(flag2);
  14. DWORD nOldProtect;
  15. BYTE OldJump = *(BYTE*)(rccheck_function);
  16. VirtualProtect((LPVOID)(rccheck_function), 1, PAGE_EXECUTE_READWRITE, &nOldProtect);
  17. *(BYTE*)(rccheck_function) = 0xC3;
  18. return [&]() {
  19. *(int*)flag1 = flag1_val;
  20. *(int*)flag2 = flag2_val;
  21. *(BYTE*)(rccheck_function) = OldJump;
  22. VirtualProtect((PVOID)(rccheck_function), 1, nOldProtect, &nOldProtect);
  23. };
  24. }
  25. }
  26. }
  27.  
  28. void HookRet()
  29. {
  30. auto lmao = RetcheckDisablers::ret::Retcheck();
  31. lmao();
  32. MessageBoxA(0, "Retcheck Hooked into Memory! You may now enjoy your unlimited Lua C API Functions!);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement