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

    • Ball in! Pinball Defense v1.0.5 [ +5 APK MOD ] Currency Max
      Mod APK Game Name: Ball in! Pinball Defense
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.nep.tr.hybrid.pinballdefense&hl=en

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Card Exp
      - ATK MAX
      • 0 replies
    • Ball in! Pinball Defense v1.0.5 [ +6 Jailed ] Currency Max
      Modded/Hacked App: Ball in! Pinball Defense By Neptune Company
      Bundle ID: com.nep.tr.hybrid.pinballdefense
      App Store Link: https://apps.apple.com/us/app/ball-in-pinball-defense/id6767486424?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Card Exp
      - ATK MAX
      - Skill Active / 1 Hit
      • 0 replies
    • Ball in! Pinball Defense v1.0.5 [ +6 Cheats ] Currency Max
      Modded/Hacked App: Ball in! Pinball Defense By Neptune Company
      Bundle ID: com.nep.tr.hybrid.pinballdefense
      App Store Link: https://apps.apple.com/us/app/ball-in-pinball-defense/id6767486424?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Card Exp
      - ATK MAX
      - Skill Active / 1 Hit
      • 0 replies
    • Brick Fight v2.1.7 [ +9 APK MOD ] Currency Max
      Mod APK Game Name: Brick Fight
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.yuyue.guardminingsite&hl=en

      🤩 Hack Features

      - Unlimited Skill Card Exp
      - Brick Freeze
      Talents Stats
      - ATK MAX
      - HP MAX
      - POWER MAX
      • 0 replies
    • Brick Fight v2.1.7 [ +9 Cheats ] Currency Max
      Modded/Hacked App: Brick Fight By Voodoo
      Bundle ID: com.yuyue.guardminingsite
      App Store Link: https://apps.apple.com/us/app/brick-fight/id6738034364?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Keys +3
      - Unlimited Skill Card Exp
      - Brick Freeze
      Talents Stats
      - ATK MAX
      - HP MAX
      - POWER MAX
      • 1 reply
    • Brick Fight v2.1.7 [ +9 Jailed ] Currency Max
      Modded/Hacked App: Brick Fight By Voodoo
      Bundle ID: com.yuyue.guardminingsite
      App Store Link: https://apps.apple.com/us/app/brick-fight/id6738034364?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Keys +3
      - Unlimited Skill Card Exp
      - Brick Freeze
      Talents Stats
      - ATK MAX
      - HP MAX
      - POWER MAX
      • 1 reply
    • Lost Twins 2 +2 Jailed Cheats [ Full Game Unlocked ]
      Modded/Hacked App: Lost Twins 2 By PLAYDEW PRIVATE LIMITED
      Bundle ID: com.playdew.losttwins2
      App Store Link: https://apps.apple.com/us/app/lost-twins-2/id6757780210?uo=4

       

      🤩 Hack Features

      - Unlock Full Game -> Head into the shop, press on the Unlock Game purchase, then cancel the in-app purchase.*
      - Unlock x10 Coins -> Head into the shop, press on the x10 Coins purchase, then cancel the in-app purchase.*

      * - Only enable 1 feature at a time.
      • 1 reply
    • Astra Squad +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Astra Squad By MEGAGIGA GAMES BILISIM AS
      Bundle ID: com.astra.squad
      App Store Link: https://apps.apple.com/us/app/astra-squad/id6779563769?uo=4

       


      🤩 Hack Features

      - Currency Modifier -> Earn some.
      - Tool Damage Multiplier
      - No Tool Level Requirement
      • 4 replies
    • DIGIMON UP JP ( デジモンUP ) +3 Mods [ Damage & Defence ]
      Mod APK Game Name: デジモンUP By Bandai Namco Entertainment Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.bandainamcoent.dgup_jp

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 7 replies
    • DIGIMON UP +3 Mods [ Damage & Defence ]
      Mod APK Game Name: DIGIMON UP By Bandai Namco Entertainment Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.bandainamcoent.dgup_ww

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 22 replies
    • DIGIMON UP JP ( デジモンUP ) +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: デジモンUP By Bandai Namco Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0452
      App Store Link: https://apps.apple.com/jp/app/%E3%83%87%E3%82%B8%E3%83%A2%E3%83%B3up/id6756247422?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 1 reply
    • DIGIMON UP +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: DIGIMON UP By Bandai Namco Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0442
      App Store Link: https://apps.apple.com/us/app/digimon-up/id6756247787?uo=4

       

      🤩 Hack Features

      - Damage Multiplier 
      - Defence Multiplier
      - God Mode
      • 5 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