Jump to content

[IDA Tutorial] How to Disable Memory Checks


1,054 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 3
  • 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
  • Like 1

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 2
  • 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

    • Clusterduck v1.24 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Clusterduck By Prodigy Design Limited T/A Sidhe Interactive
      Bundle ID: com.pikpok.wtd.iosstore
      iTunes Store Link: https://apps.apple.com/us/app/clusterduck/id1531250914?uo=4

       
       

      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      -- No Ads
      -- 4th Nest Purchased
        • Like
      • 1 reply
    • Clusterduck v1.24 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Clusterduck By Prodigy Design Limited T/A Sidhe Interactive
      Bundle ID: com.pikpok.wtd.iosstore
      iTunes Store Link: https://apps.apple.com/us/app/clusterduck/id1531250914?uo=4

       
       

      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      -- No Ads
      -- 4th Nest Purchased
        • Like
      • 0 replies
    • Hungry Hearts Restaurant v1.0.8 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Hungry Hearts Restaurant By GAGEX Co.,Ltd.
      Bundle ID: jp.co.gagex.rigel
      iTunes Store Link: https://apps.apple.com/us/app/hungry-hearts-restaurant/id6504782640?uo=4

       
       

      🤩 Hack Features

      - Unlimited Coins -> Spend some.
      - Unlimited Hearts -> Will not decrease.


      🍏 Jailbreak iOS hacks: [Mod Menu Hack] Hungry Hearts Restaurant v1.0.7 +2 Cheats [ Unlimited Currencies ] - Free Jailbreak Cheats - iOSGods
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Like
      • 4 replies
    • Hungry Hearts Restaurant v1.0.8 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Hungry Hearts Restaurant By GAGEX Co.,Ltd.
      Bundle ID: jp.co.gagex.rigel
      iTunes Store Link: https://apps.apple.com/us/app/hungry-hearts-restaurant/id6504782640?uo=4

       


      🤩 Hack Features

      - Unlimited Coins -> Spend some.
      - Unlimited Hearts -> Will not decrease.


      🍏 For Non-Jailbroken & No Jailbreak required hacks: [IPA Mod Menu] Hungry Hearts Restaurant v1.0.7 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Agree
        • Thanks
        • Winner
      • 4 replies
    • Goodwill Tiles: Match & Rescue v0.3.3 +1 Jailed Cheat [ Debug Menu ]
      Modded/Hacked App: Goodwill Tiles: Match & Rescue By libra teknoloji anonim sirketi
      Bundle ID: com.librasoftworks.tilematch
      iTunes Store Link: https://apps.apple.com/us/app/goodwill-tiles-match-rescue/id6717585856?uo=4

       


      🤩 Hack Features

      - Debug Menu -> Head to Settings and toggle the Contact Us button. Restart the game to close the menu.
      • 0 replies
    • Goodwill Tiles: Match & Rescue v0.3.3 +1 Cheat [ Debug Menu ]
      Modded/Hacked App: Goodwill Tiles: Match & Rescue By libra teknoloji anonim sirketi
      Bundle ID: com.librasoftworks.tilematch
      iTunes Store Link: https://apps.apple.com/us/app/goodwill-tiles-match-rescue/id6717585856?uo=4

       
       

      🤩 Hack Features

      - Debug Menu -> Head into Settings and toggle the Contact Us button. Restart the game to close the menu.
        • Haha
      • 0 replies
    • Modded/Hacked App: 城の戦争防衛 By MOBIRIX
      Bundle ID: com.mobirix.dfpt
      iTunes Store Link: https://apps.apple.com/jp/app/%E5%9F%8E%E3%81%AE%E6%88%A6%E4%BA%89%E9%98%B2%E8%A1%9B/id6654911232?uo=4

      🤩 Hack Features

      - Currency [ Earn Some After Disable Hack ]

      - Units Unlocked

      - Unit Cost 0

      - Unit CD

      - Unit Limit No Unlimited Deploy [ Use Only When Enter The Battle ]

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack
        • Thanks
        • Like
      • 4 replies
    • Castle War Defense 城の戦争防衛 v1.2.0 [ +5 Jailed ] Currency Max
      Modded/Hacked App: 城の戦争防衛 By MOBIRIX
      Bundle ID: com.mobirix.dfpt
      iTunes Store Link: https://apps.apple.com/jp/app/%E5%9F%8E%E3%81%AE%E6%88%A6%E4%BA%89%E9%98%B2%E8%A1%9B/id6654911232?uo=4
       
      🤩 Hack Features

      - Currency [ Earn Some After Disable Hack ]

      - Units Unlocked

      - Unit Cost 0

      - Unit CD

      - Unit Limit No Unlimited Deploy [ Use Only When Enter The Battle ]

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
        • Like
      • 2 replies
    • Modded/Hacked App: Sweet Cube Blast By Puzzle1Studio,inc.
      Bundle ID: com.puzzle1studio.ap.sweetcubesmatchblast
      iTunes Store Link: https://apps.apple.com/us/app/sweet-cube-blast/id6444350503?uo=4


      🤩 Hack Features

      - Coins

      - Lives

      - Stars No Need [ Task ]

      - Booster

      - Auto Win

       

      ⬇️ iOS Hack Download IPA Link
        • Like
      • 0 replies
    • Sweet Cube Blast v25.0124.00 [ +5 Cheats ] Auto Win
      Modded/Hacked App: Sweet Cube Blast By Puzzle1Studio,inc.
      Bundle ID: com.puzzle1studio.ap.sweetcubesmatchblast
      iTunes Store Link: https://apps.apple.com/us/app/sweet-cube-blast/id6444350503?uo=4 

      🤩 Hack Features

      - Coins

      - Lives

      - Stars No Need [ Task ]

      - Booster

      - Auto Win

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack
        • Like
      • 3 replies
    • Frost & Flame: King of Avalon Cheats v20.7 +2
      Modded/Hacked App: Frost & Flame: King of Avalon By FunPlus International AG
      Bundle ID: com.diandian.kingofavalon
      iTunes Store Link: https://apps.apple.com/us/app/frost-flame-king-of-avalon/id1084930849?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense

      NOTE: Cheat maybe buggy so make sure you have both features on. Don't ask me why cuz I have no idea

       

      Free Non-Jailbroken Hack: https://iosgods.com/topic/188621-frost-flame-king-of-avalon-v1990-jailed-cheats-2/


      iOS Hack Download Link: https://iosgods.com/topic/188620-frost-flame-king-of-avalon-cheats-v2000-2/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 42 replies
    • Dream League Soccer 2024 v12.110 +12 Cheats
      Modded/Hacked App: Dream League Soccer 2024 By First Touch Games Ltd.
      Bundle ID: com.firsttouch.dls7
      iTunes Store Link: https://apps.apple.com/us/app/dream-league-soccer-2024/id1462911602?uo=4


      Hack Features:
      - Stupid AI
      - No Foul
      - No Injuries
      - No Offside
      - Freeze Stamina
      - No Substitutions Limit
      - No Forfeit Penalty
      - Custom Logo Unlocked
      - Custom Kit Unlocked
      - Unlock Customizations
      - Throw In to End Current Half
      - Freeze Match Clock

      Notes: Play offline if you get kicked out of match.


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

      iOS Hack Download Link: https://iosgods.com/topic/138633-dream-league-soccer-2024-v11230-12-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,096 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