PuddinDev

Locating Offsets - Unity

Aug 27th, 2023
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. Guide on how to locate offsets for games
  2.  
  3. - Download the game you want to hack from armconverter decrypted appstore
  4. - Open the new downloaded IPA in WinRAR & open the Data folder
  5. -- If no Data folder exists, game = Non-Unity. Harder to hack & requires IDA OR debug to hack it.
  6. - Drag the global-metadata to desktop and head back to main directory (where Data folder is)
  7. - Look for a folder called Frameworks
  8. -- If no Frameworks exists, binary file will be the LARGEST (usually) file in the main directory
  9. - Drag that binary to your desktop too. Now you should have the binary file & global-metadata file
  10.  
  11. - Open il2cppDumper and locate the binary file THEN the global-metadata file and let the game be dumped
  12. - Open the dump.cs file in Notepad++ or vscode and start searching!
  13.  
  14. -- Look for things like coins, softcurrency, hardcurrency, premiumcurrecy, health, damage, gold, gems
  15. -- Make sure as well to look for get_ or get functions. Usually, coins/whatever will start with these.
  16. -- Also search in public classes too. Examples - class Currency (Big one), class Wallet, class Currencies, class Player, class User etc.
  17. -- Please note, this is all trial & error. I don't go into hacking a game expecting to hack the shit out of it because idk what I will find until I TEST.
  18.  
  19. -- You have an offset you want to test? Brilliant. Make sure the game is sideloaded via Sideloadly & make sure JIT is enabled!
  20.  
  21. - Load the game & in offset, type in the offset you want to test & in patch, type in C0035FD6 (RET. This returns the function, making it end instantly.)
  22.  
  23. -- If nothing happens with C0035FD6, try with E0031D2AC0035FD6 (Mov w0, w29 + RET. This starts the function off with 1.8b value then instantly ends it.)
  24. -- If nothing happens again, try a different offset. Make sure to try and change the value of whatever you're testing first to see if it's done anything.
  25.  
  26. Why do we use mov w0, w29 then RET?
  27. - Mov w0, w29 + RET starts the function with 1.8b then instantly ends it like I mentioned above. This is useful especially when testing get_Coins, or get_Health.
  28. - We only use RET IF we're editing the first address of the function. If you try using RET after the first line or mid-way through a function, the game will just crash. All the offsets in the dump.cs are the first address of that function.
  29. - If you locate the offset in IDA, you will see that. If you've found a function called void AddCoins(int coin) or some shit, locate the offset and look for ADD/FADD.
  30.  
  31. -- Use armconverter and type in MOV w0, w29 (1.8b val), Mov w0, #0 (0 value or false parameter), Mov w0, #1 (1 value or true parameter). You can also do MOV w0, #1-65000 (value 1 all the way to 65000. Example - Mov w0, #6969)
Advertisement
Add Comment
Please, Sign In to add comment