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

    • Merge Beach : Gossip & Mystery v0.3.3 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Merge Beach : Gossip & Mystery By 1GRAM
      Bundle ID: com.ongram.merge.beach.gossip.mystery
      App Store Link: https://apps.apple.com/us/app/merge-beach-gossip-mystery/id6746242808?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
        • Like
      • 5 replies
    • Merge Beach : Gossip & Mystery v0.3.3 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Merge Beach : Gossip & Mystery By 1GRAM
      Bundle ID: com.ongram.merge.beach.gossip.mystery
      App Store Link: https://apps.apple.com/us/app/merge-beach-gossip-mystery/id6746242808?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coin
      - Unlimited Energy
        • Agree
        • Thanks
        • Like
      • 7 replies
    • Meow Tower - Nonogram Puzzle v3.4.301 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Meow Tower - Nonogram Puzzle By HyperBeard Inc.
      Bundle ID: com.grapetree.meowtower
      iTunes Store Link: https://apps.apple.com/us/app/meow-tower-nonogram-puzzle/id1579122980?uo=4


      🚀 Hack Features

      - ADS NO
      - Gold CANS
      - Pencil Max 
      - Hints Max
        • Agree
        • Thanks
        • Like
      • 18 replies
    • Meow Tower - Nonogram Puzzle v3.4.301 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Meow Tower - Nonogram Puzzle By HyperBeard Inc.
      Bundle ID: com.grapetree.meowtower
      iTunes Store Link: https://apps.apple.com/us/app/meow-tower-nonogram-puzzle/id1579122980?uo=4
       

      🚀 Hack Features

      - ADS NO
      - Gold CANS
      - Pencil Max 
      - Hints Max 
        • Winner
        • Like
      • 26 replies
    • Warventure: Stickman Clash v1.0.190 [ +14 Jailed ] Currency Max
      Modded/Hacked App: Warventure: Stickman Clash By Pusilung HK Limited
      Bundle ID: com.thp020.stickman.casual.war.game
      App Store Link: https://apps.apple.com/ph/app/warventure-stickman-clash/id6753664361?uo=4

      🤩 Hack Features

      - ADS No / Rewards Free
      - Speed 2X Active
      - Unlimited Gems
      - Unlimited Ruby / Hero & Pet Up
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Silver Keys
      - Unlimited Golden Keys
      - Unlimited Legendry Keys
      - Premium Pass Active +4
      - ATK / Equip
      - HP / Equip
      - DEF / Equip
      - iGG Speed / Faster Skip Wave

      Note:- Currency & Resources Visual But Works
        • Winner
        • Like
      • 7 replies
    • Warventure: Stickman Clash v1.0.190 [ +14 Cheats ] Currency Max
      Modded/Hacked App: Warventure: Stickman Clash By Pusilung HK Limited
      Bundle ID: com.thp020.stickman.casual.war.game
      App Store Link: https://apps.apple.com/ph/app/warventure-stickman-clash/id6753664361?uo=4

      🤩 Hack Features

      - ADS No / Rewards Free
      - Speed 2X Active
      - Unlimited Gems
      - Unlimited Ruby / Hero & Pet Up
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Silver Keys
      - Unlimited Golden Keys
      - Unlimited Legendry Keys
      - Premium Pass Active +4
      - ATK / Equip
      - HP / Equip
      - DEF / Equip
      - iGG Speed / Faster Skip Wave

      Note:- Currency & Resources Visual But Works
        • Winner
        • Like
      • 2 replies
    • Portal Survivor v1.2.0 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Portal Survivor By ESC Games Yazilim Anonim Sirketi
      Bundle ID: com.escape.portalsurvivor
      App Store Link: https://apps.apple.com/ph/app/portal-survivor/id6754314383?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Energy
      - Unlimited HP
        • Informative
        • Like
      • 5 replies
    • Portal Survivor v1.2.0 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Portal Survivor By ESC Games Yazilim Anonim Sirketi
      Bundle ID: com.escape.portalsurvivor
      App Store Link: https://apps.apple.com/ph/app/portal-survivor/id6754314383?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Energy
      - Unlimited HP
        • Informative
        • Like
      • 10 replies
    • Dice Lords v1.2.9 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Dice Lords By Voodoo
      Bundle ID: com.oxvgames.dicelords
      App Store Link: https://apps.apple.com/us/app/dice-lords/id6743435206?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Unlimited Gems Green
      - Unlimited Gems Red
      - Unlimited Coins
      - DMG / Roll Dice
        • Like
      • 13 replies
    • Dice Lords v1.2.9 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Dice Lords By Voodoo
      Bundle ID: com.oxvgames.dicelords
      App Store Link: https://apps.apple.com/us/app/dice-lords/id6743435206?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Unlimited Gems Green
      - Unlimited Gems Red
      - Unlimited Coins
      - DMG / Roll Dice
        • Thanks
        • Winner
        • Like
      • 12 replies
    • Beauty Sort : Makeover Story v1.5.7 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Beauty Sort : Makeover Story By Rosecrab Limited
      Bundle ID: ios.beauty.love.sort.match.stylist.story
      App Store Link: https://apps.apple.com/us/app/beauty-sort-makeover-story/id6752563587?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Booster
      - Unlimited Lives
        • Like
      • 2 replies
    • Beauty Sort : Makeover Story v1.5.7 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Beauty Sort : Makeover Story By Rosecrab Limited
      Bundle ID: ios.beauty.love.sort.match.stylist.story
      App Store Link: https://apps.apple.com/us/app/beauty-sort-makeover-story/id6752563587?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Booster
      - Unlimited Lives
        • Like
      • 2 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