Jump to content

Some questions with reversing asm via ida


Go to solution Solved by Theo1357,

11 posts in this topic

Recommended Posts

Posted

Got a few questions, Still new to decompiling stuff and reversing so yeah.

I will list them below.

 

1.

When I am reversing a function and it calls the CityBalance$$GetUpgradePrice then (I am guessing) it stores the returned value in D8 from D0 right? 

image.png

 

2.

When decompiling functions I sometimes see var_whateverhere = 0xwhateverHere but it isnt a field offset of anykind, what do they do and how can I understand them? (I included some of the start asm of that function to help you understand if needed)

image.png

 

3.

When wanting to hook onto functions, to modify the field offset (in this case we will use 0x10 = int Coins) would I do something like FunctionOffset + 0x10 to get the fieldoffest variable to then read/write toward that pointed to object?

 

Like I said I am still new to decompiling stuff and reversing, please excuse me if this is easy for you. 

  • Solution
Posted

1. Yes
2. I gusse it is offset in stack, skip it
3. No, you must use pointer class + 0x10

void (*old_PersistentPlayerUpdate)(void* _this) = nil;
void PersistentPlayerUpdate(void* _this) {
   old_PersistentPlayerUpdate(_this);
   if ([menu isSwitchWithIdentifierActive:@"currency"]) {
     void *playerData = *(void **)((uint64_t)_this + 0x18);
     void *Container = *(void **)((uint64_t)playerData + 0x30);
     void *Player = *(void **)((uint64_t)Container + 0x10);
     void *player = *(void **)((uint64_t)Player + 0x10);
    *(int *)((uint64_t)player + 0x134) = 999999999;
    *(int *)((uint64_t)player + 0x138) = 999999999;
    *(int *)((uint64_t)player + 0x13C) = 999999999;
    *(int *)((uint64_t)player + 0x140) = 999999999;
  }
}

MSHookFunction((void *)getRealOffset(APEncryptHex(0x013BE034)), (void *)PersistentPlayerUpdate, (void **)&old_PersistentPlayerUpdate);

  • Like 2
Posted
4 minutes ago, tien0246 said:

1. Yes
2. I gusse it is offset in stack, skip it
3. No, you must use pointer class + 0x10

void (*old_PersistentPlayerUpdate)(void* _this) = nil;
void PersistentPlayerUpdate(void* _this) {
   old_PersistentPlayerUpdate(_this);
   if ([menu isSwitchWithIdentifierActive:@"currency"]) {
     void *playerData = *(void **)((uint64_t)_this + 0x18);
     void *Container = *(void **)((uint64_t)playerData + 0x30);
     void *Player = *(void **)((uint64_t)Container + 0x10);
     void *player = *(void **)((uint64_t)Player + 0x10);
    *(int *)((uint64_t)player + 0x134) = 999999999;
    *(int *)((uint64_t)player + 0x138) = 999999999;
    *(int *)((uint64_t)player + 0x13C) = 999999999;
    *(int *)((uint64_t)player + 0x140) = 999999999;
  }
}

MSHookFunction((void *)getRealOffset(APEncryptHex(0x013BE034)), (void *)PersistentPlayerUpdate, (void **)&old_PersistentPlayerUpdate);

Thank you and thank you alot more for providing a code sample. 

Posted
On 6/2/2024 at 9:55 AM, tien0246 said:

3. No, you must use pointer class + 0x10

Just to be 100% sure:

The offset of the class would be the pointer class in this case correct?
image.png

So 0x32B87DC 0x14 (example)

Posted
38 minutes ago, carpoa said:

Just to be 100% sure:

The offset of the class would be the pointer class in this case correct?
image.png

So 0x32B87DC 0x14 (example)

Nope, pointer not offset.

If you wanna hack field in ida, try find somewhere like

str w9, [x19, #0x10]
register w9 hold your coin, find at the top somewhere write the value in w9

Posted
1 minute ago, tien0246 said:

Nope, pointer not offset.

If you wanna hack field in ida, try find somewhere like

str w9, [x19, #0x10]
register w9 hold your coin, find at the top somewhere write the value in w9

ic mk. Could you just explain using pointers and getting them please? Thanks for your help :thankyou:

Posted
31 minutes ago, carpoa said:

ic mk. Could you just explain using pointers and getting them please? Thanks for your help :thankyou:

 

On 6/2/2024 at 3:55 PM, tien0246 said:

1. Yes
2. I gusse it is offset in stack, skip it
3. No, you must use pointer class + 0x10

void (*old_PersistentPlayerUpdate)(void* _this) = nil;
void PersistentPlayerUpdate(void* _this) {
   old_PersistentPlayerUpdate(_this);
   if ([menu isSwitchWithIdentifierActive:@"currency"]) {
     void *playerData = *(void **)((uint64_t)_this + 0x18);
     void *Container = *(void **)((uint64_t)playerData + 0x30);
     void *Player = *(void **)((uint64_t)Container + 0x10);
     void *player = *(void **)((uint64_t)Player + 0x10);
    *(int *)((uint64_t)player + 0x134) = 999999999;
    *(int *)((uint64_t)player + 0x138) = 999999999;
    *(int *)((uint64_t)player + 0x13C) = 999999999;
    *(int *)((uint64_t)player + 0x140) = 999999999;
  }
}

MSHookFunction((void *)getRealOffset(APEncryptHex(0x013BE034)), (void *)PersistentPlayerUpdate, (void **)&old_PersistentPlayerUpdate);

Using hook like it

  • Like 1
Posted
3 minutes ago, tien0246 said:

 

Using hook like it

ohh ok gotcha.

Reading the code I'm assuming _this is the pointer (I guess you could say that) for the class it is within right? I just want to be sure.

Posted
9 minutes ago, carpoa said:

ohh ok gotcha.

Reading the code I'm assuming _this is the pointer (I guess you could say that) for the class it is within right? I just want to be sure.

_this is poiter class

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

    • Nickelodeon Card Clash v1.5.0 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Nickelodeon Card Clash By Monumental, LLC
      Bundle ID: io.monumental.cardclash
      iTunes Store Link: https://apps.apple.com/us/app/nickelodeon-card-clash/id6503707285?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Gems


      Jailbreak required hack(s): [Mod Menu Hack] Nickelodeon Card Clash v1.0.3 +2 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/
        • Informative
        • Agree
        • Like
      • 8 replies
    • Nickelodeon Card Clash v1.5.0 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Nickelodeon Card Clash By Monumental, LLC
      Bundle ID: io.monumental.cardclash
      iTunes Store Link: https://apps.apple.com/us/app/nickelodeon-card-clash/id6503707285?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Gems


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Nickelodeon Card Clash v1.0.3 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
        • Thanks
        • Winner
        • Like
      • 23 replies
    • Kitty’s Kitchen Diary v1.0.8 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Kitty’s Kitchen Diary By SuperPlanet corp.
      Bundle ID: com.superplanet.catrecipe
      iTunes Store Link: https://apps.apple.com/us/app/kittys-kitchen-diary/id6496345774?uo=4

       


      🤩 Hack Features

      - Unlimited Currencies -> Head into Settings and toggle the Notifications button.
      - Unlock All -> Head into Settings and toggle the Nightly Notifications button.
      - Freeze Diamonds
      • 4 replies
    • Kitty’s Kitchen Diary v1.0.8 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Kitty’s Kitchen Diary By SuperPlanet corp.
      Bundle ID: com.superplanet.catrecipe
      iTunes Store Link: https://apps.apple.com/us/app/kittys-kitchen-diary/id6496345774?uo=4

       


      🤩 Hack Features

      - Unlimited Currencies -> Head into Settings and toggle the Notifications button.
      - Unlock All -> Head into Settings and toggle the Nightly Notifications button.
      - Freeze Diamonds
        • Thanks
        • Like
      • 8 replies
    • Perfect Kick 2 v2.0.61 [ +4 Cheats ] AI Freeze
      Modded/Hacked App: Perfect Kick 2 By Gamegou Limited
      Bundle ID: com.gamegou.perfectkick2
      iTunes Store Link: https://apps.apple.com/us/app/perfect-kick-2/id1475459866?uo=4
       

      🤩 Hack Features

      - Auto ADS OFF
      - Ball Speed 999x
      - AI Freeze
      - No Wind Effect
      • 0 replies
    • Perfect Kick 2 v2.0.61 [ +4 Jailed ] AI Freeze
      Modded/Hacked App: Perfect Kick 2 By Gamegou Limited
      Bundle ID: com.gamegou.perfectkick2
      iTunes Store Link: https://apps.apple.com/us/app/perfect-kick-2/id1475459866?uo=4


      🤩 Hack Features

      - Auto ADS OFF
      - Ball Speed 999x
      - AI Freeze
      - No Wind Effect
      • 1 reply
    • Nightfall: Kingdom Frontier TD v1.0.350 +8 Jailed Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Jailbreak required hack(s): [Mod Menu Hack] Nightfall: Kingdom Frontier TD v1.0.41 +8 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 79 replies
    • Nightfall: Kingdom Frontier TD v1.0.350 +8 Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Nightfall: Kingdom Frontier TD v1.0.41 +8 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 94 replies
    • Longleaf Valley v1.32.22 +1++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Longleaf Valley: Merge & Match By TreesPlease Games Ltd
      Bundle ID: com.treespleasegames.merge1
      iTunes Store Link: https://apps.apple.com/us/app/longleaf-valley-merge-match/id1573565989?uo=4


      Hack Features:
      - Unlimited Currencies -> Spend some.


      Jailbreak required hack(s): [Mod Menu Hack] Longleaf Valley: Merge & Plant ( All Versions ) +1++ 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/
        • Informative
        • Agree
        • Haha
        • Winner
        • Like
      • 32 replies
    • Longleaf Valley v1.32.22 +1++ Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Longleaf Valley: Merge & Match By TreesPlease Games Ltd
      Bundle ID: com.treespleasegames.merge1
      iTunes Store Link: https://apps.apple.com/us/app/longleaf-valley-merge-match/id1573565989?uo=4


      Hack Features:
      - Unlimited Currencies -> Spend some.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Longleaf Valley: Merge & Plant v1.10.48 +1++ Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 15 replies
    • Dinosaur Universe v39.0.0 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Dinosaur Universe By Supercent Inc.
      Bundle ID: io.supercent.ageofdinosaurs
      iTunes Store Link: https://apps.apple.com/us/app/dinosaur-universe/id6448496802?uo=4

       


      🤩 Hack Features

      - Unlimited Currencies
      - Damage Multiplier
      - God Mode
      - Free In-App Purchases
        • Like
      • 0 replies
    • Dinosaur Universe v39.0.0 +4 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Dinosaur Universe By Supercent Inc.
      Bundle ID: io.supercent.ageofdinosaurs
      iTunes Store Link: https://apps.apple.com/us/app/dinosaur-universe/id6448496802?uo=4

       
       

      🤩 Hack Features

      - Unlimited Currencies
      - Damage Multiplier
      - God Mode
      - Free In-App Purchases
        • Agree
      • 3 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