Jump to content

[IDA Tutorial] How to Disable Memory Checks


1,029 posts in this topic

Recommended Posts

When developers make a game, sometimes they include memory checks to make things harder to hack. But what are memory checks? Memory checks are checks to make sure that a certain value, for example, money has been hacked. If it has been hacked, the memory check will kick in and set it back to its original, unhacked value. This is why when you test in iGameGuardian, GDB, LLDB, etc. your hack will not work. But we want our hacks to work, so here is how to disable them :snoop: This is also only an example function :snoop:

Hidden Content

    General background info: R0 holds your previous value of money. R5 holds the cost. R10 holds the new value of money after you bought something. The IDA offset for money will be 0xA99F8: STR R10, [R6, #32].

    Here is the example function that I came up with:

    0xA99C0 CMP R0, R10 //compare R10 with R0
    0xA99C4 BLE 0xA99E8 //branch to 0xA99E8 if it is less than or equal to
    0xA99C8 LDR R0, [R6, #32] //load R6+32 into R0
    0xA99CC SUB R5, R0, R10 //subtract R0 (previous money value) with R5 (cost) and put that value into R10
    0xA99D0 MOV R0, R6 //move R6 into R0
    0xA99D4 BL 0x30E7B0 //branch with link to 0x30E7B0
    0xA99D8 ADD R1, R0, R5 //add R0 with R1 and put that value into R5
    0xA99DC MOV R0, R6 //move R6 into R0
    0xA99E0 BL 0x30E7C0 //branch with link to 0x30E7C0
    0xA99E4 MOV R0, R6 //move R6 into R0
    0xA99E8 BL 0x30E7D0 //branch with link to 0x30E7D0
    0xA99EC ADD R1, R0, R5 //add R0 with R1 and put that value into R5
    0xA99F0 MOV R0, R6 //move R6 into R0
    0xA99F8 STR R10, [R6, #32] //IDA offset, store R10 (new money value) into R6+32
    

              I'm sure you know that the equivalent of spending in a game is subtracting. Knowing that, logically you would change 0xA99CC to MOV R10, R7. And you are right for thinking that (y), but it won't work because of the memory check. Earlier you read that R0 holds the previous value of money, R5 holds cost, and R10 holds the new value after spending.

              So you want to look for a "CMP" (compare) instruction that compares the previous value of money with the new value of money that is followed by a branch to somewhere. If the branch is BGT (branch if greater than), BLT (branch if less than), BNE (branch if not equal), or BLE (branch if less than or equal to), you usually have found the memory check. And there is one, at the beginning of the function: 0xA99C0: CMP R0, R10 followed by 0xA99C4: BLE 0xA99F8, or our IDA offset. That is telling the game to compare R10 with R0 and branch to 0xA99C4, or our IDA offset, and store the unhacked money value into R6+32 if R10 is less than or equal to R0.

              To defeat the memory check, you can NOP the branch to 0xA99F8 (our IDA offset) or change CMP R0, R10 to CMP R0, R0 or CMP R10, R10 so that the memory check (the CMP R0, R10) occurs but has no effect because the branch is NOP'ed or it is comparing itself to itself. And now you can change the SUB R5, R0, R10 (0xA99CC) to MOV R10, R7, and it will work! :)

    Recap:
    - R0 holds our previous value of money, R5 holds cost, and R10 holds the new value of money.
    - Our IDA offset is 0xA99F8, STR R10, [R6, #32].
    - Memory checks usually compare an old value of something with a new value of something, followed by a branch. They usually are BNE's (branch if not equal), BGT's (branch if greater than), BLT (branch if less than), or BLE's (branch if less than or equal to)
    - You can NOP the branch after the CMP to disable memory checks, or you can change CMP RX, RY to CMP RX, RX or CMP RY, RY to compare values to itself rather than comparing values to another value.

    Extra info:
    - Never NOP a CMP before a branch because a branch is literally a true or false type of instruction, and by doing that it the game will write both true and false, which will result in a crash.
    - Breakpoints really help with memory checks, if you set a breakpoint on what you think is a memory check, you will know if you got it if it hits or not.
    - If a breakpoint for what you think is a memory check hits, type "info r" for GDB or "reg re" in LLDB. That will let you see what registers hold what, and you can determine if you found the memory check or not. For example, if what you think you've found the memory check for a CMP R0, R3 followed by a BNE (branch if not equal), and the registers R0 and R3 are equal to each other, you have probably found the memory check.
    - This only applies to you if NOP'ing the branch does not work, or if you just decide to hack the CMP. Always check if the CMP is in ARM or thumb, and patch accordingly. If you patch a thumb instruction with an ARM instruction the game will crash. But how will you know if it is in thumb or in ARM? What you have to do it highlight the hex in IDA then go to "Hex View 1". If the hex is like this:

    00 00 00 00
    

    it is in ARM, but if the hex is like this:

    00 00
    

    it is in thumb. Think of it like this: an arm is longer than a thumb, so logically hex in ARM will be longer than hex in thumb.



I hope this helped! Also be sure to ask any questions if you have any :)

Updated by Guest
Link to comment
https://iosgods.com/topic/6995-ida-tutorial-how-to-disable-memory-checks/
Share on other sites

let me see (y)

 

e ...

 

0xA99C0 CMP R0, R10 //compare R10 with R0
0xA99C4 BLE 0xA99E8 //branch to 0xA99E8 if it is less than or equal to

 

 

 

if R10 less or eq  R0,then branch to 0xA99E8..

so why you wrote 0xA99F8

 

is it wrong ?

Updated by zzmutu
  • Like 2
  • Thanks 3
  • Agree 2
  • Informative 1

let me see (y)

 

e ...

 

0xA99C0 CMP R0, R10 //compare R10 with R0

0xA99C4 BLE 0xA99E8 //branch to 0xA99E8 if it is less than or equal to

 

 

 

if R10 less or eq  R0,then branch to 0xA99E8..

so why you wrote 0xA99F8

 

is it wrong ?

It's not wrong, it should be like that :) 

 

You don't always have to branch to a function, you can also branch directily to offsets. 

lets see what took you over 1 hour to patch  :wallbash:


cant see any checks but anyway there are 3 ways to do what you want:

rGpKGk8.png

change cost to 0 

change your money on the load 

change the final money

Updated by iOSv64

lets see what took you over 1 hour to patch :wallbash:

cant see any checks but anyway there are 3 ways to do what you want:

rGpKGk8.png

change cost to 0

change your money on the load

change the final money

Well it took me an hour because I was doing x/i in GDB because my SSH is screwed up, and yeah I knew that. I just wanted to hack the SUB because it was quicker

 

edit: actually, as a challenge for myself I could time myself and see how long it takes me to make the cost 0, thanks for that idea :)

Updated by Guest

Well it took me an hour because I was doing x/i in GDB because my SSH is screwed up, and yeah I knew that. I just wanted to hack the SUB because it was quicker

 

edit: actually, as a challenge for myself I could time myself and see how long it takes me to make the cost 0, thanks for that idea :)

there is also a 4th solution , just mov r0 #0 bx lr the whole function ahah
  • Like 1
  • Agree 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Sneaky Sasquatch Cheats v2.0.5 +3
      Modded/Hacked App: Sneaky Sasquatch By RAC7 Games
      Bundle ID: com.rac7.SneakySasquatch
      iTunes Store Link: https://apps.apple.com/us/app/sneaky-sasquatch/id1098342019?uo=4


      Hack Features:
      - Infinite Gold
      - Unlock All
      - No Hunger


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/148262-sneaky-sasquatch-v172-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/148261-sneaky-sasquatch-cheats-v172-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 171 replies
    • Jetpack Joyride 2 v3.4.10 Jailed Cheats +1
      Modded/Hacked App: Jetpack Joyride 2 By Halfbrick
      Bundle ID: com.halfbrick.jetpackjoyride2
      iTunes Store Link: https://apps.apple.com/us/app/jetpack-joyride-2/id1598096399?uo=4


      Hack Features:
      - Infinite Currencies


      iOS Hack Download Link: https://iosgods.com/topic/141408-jetpack-joyride-2-v3410-jailed-cheats-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 201 replies
    • Asphalt 8: Airborne+ Cheats v2.3.0 +4 [ Apple Arcade ]
      Modded/Hacked App: Asphalt 8: Airborne+ By Gameloft
      Bundle ID: com.gameloft.asphalt8arcade
      iTunes Store Link: https://apps.apple.com/us/app/asphalt-8-airborne/id1563005359?uo=4


      Hack Features:
      - No Car Crash
      - Infinite Nitro
      - Unlock All Cars
      - No Speed Limit


      iOS Hack Download Link: https://iosgods.com/topic/148777-asphalt-8-airborne-cheats-v101-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 391 replies
    • My Cafe — Restaurant game Cheats v2024130.3.633 +3
      Modded/Hacked App: My Cafe — Restaurant game by Melsoft
      Bundle ID: com.Melesta.MyCafe
      iTunes Store Link: https://apps.apple.com/us/app/my-cafe-restaurant-game/id1068204657?uo=4&at=1010lce4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Unlimited Gems
      - VIP Level 7 (probably visual)


      Notes:
      - To get unlimited gems, just get some gems from the customers.
      - If you purchase using gems from certain places like the VIP Store, it will cause you to restart the game
      - If you have "a lot" gems, you can turn off cheats to see if it works without the hax.
      - "a lot" means a lot of gems 

      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using iFile or Filza, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will then need to press on 'Installer' or 'Install' from the options on your screen.
      STEP 5: Let iFile / Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: Now open your iDevice settings and scroll down until you see the settings for this cheat and tap on it. If the hack is a Mod Menu, the cheat features can be toggled in-game.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Zahir


      Cheat Video/Screenshots:
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 632 replies
    • Township: Farm & City Building v24.0.0 Jailed Cheats +2
      Modded/Hacked App: Township by PLR Worldwide Sales Limited
      Bundle ID: com.playrix.township-ios
      iTunes Store Link: https://apps.apple.com/us/app/township/id638689075?uo=4&at=1010lce4


      Hack Features:
      - Freeze Currencies

      EDIT: Please be aware that this maybe cause your account banned, please use with caution and don’t abuse


      iOS Hack Download Link: https://iosgods.com/topic/116584-arm64-township-farm-city-building-v852-jailed-cheats-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,614 replies
    • (Resonance Solstice China) 雷索纳斯 v1.4.0 +2 Jailed Cheats
      Modded/Hacked App: 雷索纳斯 By Shanghai Leiyu Network Technology Co.,Ltd.
      Bundle ID: com.shanghaileiyu.lsns
      iTunes Store Link: https://apps.apple.com/cn/app/%E9%9B%B7%E7%B4%A2%E7%BA%B3%E6%96%AF/id6466783172?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Jailbreak required hack(s): 


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App








      PC Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see this tutorial topic.
      STEP 3: Download Sideloadly and install it on your PC.
      STEP 4: Open/Run Sideloadly on your computer, connect your iOS Device, and wait until your device name shows up.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Sideloadly application.
      STEP 6: You will now have to enter your iTunes/Apple ID email login, press "Start" & then you will be asked to enter your password. Go ahead and enter the required information.
      STEP 7: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles/VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. Jailbroken iDevices can also use Sideloadly/Filza/IPA Installer to normally install the IPA with AppSync. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Thanks
      • 3 replies
    • (Resonance Solstice China) 雷索纳斯 v1.4.0 +2 Cheats
      Modded/Hacked App: 雷索纳斯 By Shanghai Leiyu Network Technology Co.,Ltd.
      Bundle ID: com.shanghaileiyu.lsns
      iTunes Store Link: https://apps.apple.com/cn/app/%E9%9B%B7%E7%B4%A2%E7%BA%B3%E6%96%AF/id6466783172?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): 


      iOS Hack Download Link:

      Hidden Content

      Download Hack








      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 2 replies
    • Cat Snack Bar Cheats v1.0.153 +1
      Modded/Hacked App: Cat Snack Bar By treeplla Inc.
      Bundle ID: com.tree.idle.catsnackbar
      iTunes Store Link: https://apps.apple.com/us/app/cat-snack-bar/id6443895159?uo=4


      Hack Features:
      - Freeze Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/170232-cat-snack-bar-v1036-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/170233-cat-snack-bar-cheats-v1036-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 66 replies
    • Cats & Soup Cheats v2.59.1 +2
      Modded/Hacked App: Cats & Soup By HIDEA Co.,Ltd
      Bundle ID: com.hidea.cat
      iTunes Store Link: https://apps.apple.com/us/app/cats-soup/id1581431235?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/157486-cats-soup-v196-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/157484-cats-soup-cheats-v196-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 277 replies
    • Toca Boca World Modded v1.100.1 +1
      Modded/Hacked App: Toca Boca World By Toca Boca AB
      Bundle ID: com.tocaboca.tocalifeworld
      iTunes Store Link: https://apps.apple.com/us/app/toca-boca-world/id1208138685?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Everything Purchased


      Non-Jailbroken & No Jailbreak required hack(s): 


      Hack Download Link:

      Hidden Content

      Download Hack








      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using iFile or Filza, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will then need to press on 'Installer' or 'Install' from the options on your screen.
      STEP 5: Let iFile / Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: Now open your iDevice settings and scroll down until you see the settings for this cheat and tap on it. If the hack is a Mod Menu, the cheat features can be toggled in-game.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Laxus


      Cheat Video/Screenshots:

      N/A

       
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,324 replies
    • Alien Invasion: RPG Idle Space Cheats v4.01.00 +2
      Modded/Hacked App: Alien Invasion: RPG Idle Space By MULTICAST GAMES LIMITED
      Bundle ID: com.multicastgames.venomSurvive
      iTunes Store Link: https://apps.apple.com/us/app/alien-invasion-rpg-idle-space/id6443697602?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/167591-alien-invasion-rpg-idle-space-v204-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/167589-alien-invasion-rpg-idle-space-cheats-v204-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 383 replies
    • Idle MoonRabbit: AFK RPG Cheats v1.109.2 +4
      Modded/Hacked App: Idle MoonRabbit: AFK RPG By Able Games Co. ,Ltd.
      Bundle ID: com.TheAbleGames.DalToKi
      iTunes Store Link: https://apps.apple.com/us/app/idle-moonrabbit-afk-rpg/id1599684924?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Multiply Stats
      - Instant Kill


      iOS Hack Download Link: https://iosgods.com/topic/167497-idle-moonrabbit-afk-rpg-cheats-v1629-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 214 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines