Jump to content

6 posts in this topic

Recommended Posts

Posted

Lately quite few people asked about branching, so I figured I make a little write up about it. 

It is not as advanced as it seems, if you understand the code flow and how branches manipulate that.

 

Think about it this way. Branches will break the code flow and execute whatever is at the address where it points to. Similar to water, as it runs in rivers, or turns to a different direction, maybe a new path opens up... Code flow is similar, but we can use conditions ?

Take a good look at this image. 

p88bAVu.png

 

So what we see in there kinda explains what branches are and what they mean. I normally ignore conditional branches as "CBZ, CBNZ, TBZ, TBNZ" as I can get the same effect with a simple unconditional branch "B" to the right loc or a NOP. You can play with them, as you change them around, you'd get the opposite effect "CBZ to CBNZ" and so on.

I'd stick with "B and BL" for now and some examples behind the logic.

 

B - unconditional branching

 

Branch hex value somehow looks like this:

05 00 00 14 

05 00 00 - This is the distance between the start offset and target offset.

14 - branch's opcode. 

1 - unconditional b

4 - branching to a forward address in binary

So basically we branching 5 instructions (or call it 5 lines) forward (underneath if you look at it in ida).

If it looked like this:

05 00 00 17 

7 - branching to a backwards address in the binary.

 

Some examples (note that this is most useful in binaries with symbols):

That word hack game I hacked the other day. Developer left debug functions in the game so I hooked up existing menu buttons with those functions with simple unconditional branching. 

you find the debug function:

BuyGem 100289D20

then find a button to hook it too. I normally search for "click, press" or if it has social media buttons you can search those.

InboxButtonClicked 100074DF8

From here on its pretty straight forward. Load up armconverter.com go to branch tab and add the offsets:

Current offset:  100074DF8 // inbox button

Instruction to write: B #0x100074DF8 // unconditionally branches to BuyGem

you get a hex value. Set that to first line of inbox button. 

 

Other example.

look at this image

AOgmijp.png

 

so we have two options. premium and premium plus. If we want to force premium, we can use branch but if you take a look the offsets, you see we'd have to branch 1 line under so we can just simply NOP the instruction. if we want to get premium + we'd have to branch to that loc address instead. This way we can manipulate the code to flow the way we want it to without conditionals.

 

BL - Branch with link

 

This one works slightly differently. It takes the code flow to another function, executes that and flow returns to the original one and carries on.

80 F6 4B 94

80 F6 4B - distance between the two address

94 - Branch with Link's opcode

9 - Branch with link

4 - branching forward

same as "B" if it was 97 it would branch backwards.

Example:

You find a game with cool down.

BL StartCooldown

Then you see this function: ResetCooldown

Change it to

BL ResetCooldown

What happens in game? When it should execute the function that starts the cool down, it will reset it instead.

 

 

 

  • Like 4
  • Winner 2
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Hungry Hearts Restaurant +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/
      • 8 replies
    • Gordian Quest +6 Jailed Cheats [ Full Game Unlocked ]
      Modded/Hacked App: Gordian Quest By AETHER SKY OU
      Bundle ID: com.aethersky.com.gordianquest
      iTunes Store Link: https://apps.apple.com/us/app/gordian-quest/id6736658756?uo=4

       


      🤩 Hack Features

      - Add Currencies -> Pause the game and tap on Options.*
      - Add XP -> Pause the game and tap on Options.*
      - Add Skill Points -> Pause the game and tap on Options.*
      - Add Respec Points -> Pause the game and tap on Options.*
      - Auto Win -> Pause the game and tap on Options.*
      -- Full Game Unlocked

      * - Only 1 feature can be enabled at once.
      • 14 replies
    • Secret Puzzle Society +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Secret Puzzle Society By Wildlife Studios, Inc
      Bundle ID: com.arizonags.puzzlesocietyalpha
      iTunes Store Link: https://apps.apple.com/us/app/secret-puzzle-society/id6449197556?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Clues -> Earn or spend some.
      - Unlimited Lives -> Earn or spend some.
      - Auto Win -> Use a move.


      Jailbreak required hack(s): [Mod Menu Hack] Secret Puzzle Society v1.6.3 +4 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 18 replies
    • SushiMon Defense +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: SushiMon Defense By Dreamplaygames Inc.
      Bundle ID: com.dreamplay.sushimonster.apple
      App Store Link: https://apps.apple.com/us/app/sushimon-defense/id6741675759?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 6 replies
    • Tsuki's Odyssey +1 Jailed Cheat [ Unlimited Carrots ]
      Modded/Hacked App: Tsuki's Odyssey By HyperBeard Inc.
      Bundle ID: com.hyperbeard.odyssey
      iTunes Store Link: https://apps.apple.com/us/app/tsukis-odyssey/id1564146071
       

      Hack Features:
      - Unlimited Carrots -> Earn some.


      Jailbreak required hack(s): [Mod Menu Hack] Tsuki's Odyssey v1.2.61 +1 Cheat [ Unlimited Carrots ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 100 replies
    • Family Life! +3++ Jailed Cheats [ Cheat Menu ]
      Modded/Hacked App: Family Life! By SUPERSONIC STUDIOS LTD
      Bundle ID: com.xia.familylife
      iTunes Store Link: https://apps.apple.com/us/app/family-life/id6449919224?uo=4


      Hack Features:
      - Cheat Menu -> Head over to Settings and toggle the Privacy button.
      -- Life Pass Purchased
      -- No Ads


      Jailbreak required hack(s): [Mod Menu Hack] Family Life! v1.0.32 +2++ Cheats [ Cheat Menu ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 292 replies
    • RENT A HERO Z +2 Mods [ Damage + More ]
      Mod APK Game Name: RENT A HERO Z By LINE NEXT Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.linenext.rhz.aos

       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      • 1 reply
    • Undying Hero: Idle RPG +3 Mods [ Damage + More ]
      Mod APK Game Name: Undying Hero: Idle RPG By SUPERBOX Inc
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.superpixel.undyinghero

       

      🤩 Hack Features

      - Damage Multiplier
      - One-Hit Kill
      - Freeze Currencies
      • 0 replies
    • Project Requiem: Survival +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Project Requiem: Survival By Black Ice Software
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.Filip.Rudzinski.ProjectRequiem

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Project Requiem +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Project Requiem By Filip Rudzinski
      Bundle ID: com.Filip.Rudzinski.Project-Requiem
      App Store Link: https://apps.apple.com/us/app/project-requiem/id6773917070?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Steelborn: Tank Idle RPG +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Steelborn: Tank Idle RPG By SayGames LTD
      Bundle ID: com.playbrew.tanks
      App Store Link: https://apps.apple.com/us/app/steelborn-tank-idle-rpg/id6768921423?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      -- AutoCraft Speedup Enabled
      • 2 replies
    • All in Hole: Black Hole Games +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: All in Hole: Black Hole Games By HOMA GAMES
      Bundle ID: com.homagames.studio.allinhole
      App Store Link: https://apps.apple.com/us/app/all-in-hole-black-hole-games/id6503284107?uo=4

       
       

      🤩 Hack Features

      - Unlimited Coins -> Earn some.
      - Unlimited Lives
      • 32 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