Advertisement
SirMeme

HOW TO USE RETCHECK BYPASS EXAMPLE

Sep 27th, 2020
860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. Retcheck::init(); // call this once before anything...to initialise it
  2.  
  3.  
  4. // Use Retcheck::call to call your functions like
  5. // normal; just make sure to supply its Calling convention
  6.  
  7. auto r_lua_newthread = reinterpret_cast<void*>(aslr(0x13D8FB0)); // or cast it to its typedef
  8.  
  9. auto new_rL = std::get<0>(Retcheck::call(r_lua_newthread, "cdecl", { rL }));
  10.  
  11.  
  12.  
  13. // explanation:
  14. auto return_data = Retcheck::call(function, convention, { arg1, arg2, arg3 . . . });
  15.  
  16. // if the function returns a 32-bit value(byte/short/int/dword/float/etc.) do:
  17. auto small_value = std::get<0>(return_data); // cast it to whatever you need
  18.  
  19. // if it returns a 64-bit value(__int64/double) do:
  20. auto large_value = std::get<1>(return_data);
  21.  
  22. // yes ik could've made this part much fancier
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement