Jump to content

Some questions with reversing asm via ida


Go to solution Solved by Theo1357,

11 posts in this topic

Recommended Posts

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. 

Link to comment
https://iosgods.com/topic/182681-some-questions-with-reversing-asm-via-ida/
Share on other sites

  • Solution

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
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. 

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)

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

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:

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
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.

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

    • Golden Desire: Fantasy Romance v1.0.2 +1 Jailed Cheat [ Free Premium Choices ]
      Modded/Hacked App: Golden Desire: Fantasy Romance By Storytaco.inc
      Bundle ID: com.storytaco.c20client
      iTunes Store Link: https://apps.apple.com/us/app/golden-desire-fantasy-romance/id6738368127?uo=4


      Hack Features:
      - Free Premium Choices


      Jailbreak required hack(s): [Mod Menu Hack] Golden Desire: Fantasy Romance v1.0.2 +1 Cheat [ Free Premium Choices ] - 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/
      • 0 replies
    • Golden Desire: Fantasy Romance v1.0.2 +1 Cheat [ Free Premium Choices ]
      Modded/Hacked App: Golden Desire: Fantasy Romance By Storytaco.inc
      Bundle ID: com.storytaco.c20client
      iTunes Store Link: https://apps.apple.com/us/app/golden-desire-fantasy-romance/id6738368127?uo=4


      Hack Features:
      - Free Premium Choices


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Golden Desire: Fantasy Romance v1.0.2 +1 Jailed Cheat [ Free Premium Choices ] - 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/
      • 0 replies
    • Darts Club v5.8.6 +28 Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Darts Club By BoomBit, Inc.
      Bundle ID: com.boombitgames.DartsClub
      iTunes Store Link: https://apps.apple.com/us/app/darts-club/id1389760587?uo=4


      Hack Features:
      - Unlimited Currencies
      - Debug Menu -> Head into Settings and toggle the DEBUG button. [ VIP ]
      -> Add Soft
      -> Add Hard
      -> Add Trophies
      -> Unlock All Parts/Emotes/Vanities/Wild Items
      + More!


      Jailbreak required hack(s): [Mod Menu Hack] Darts Club v5.8.6 +28 Cheats [ Debug 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/
        • Like
      • 0 replies
    • Darts Club v5.8.6 +28 Cheats [ Debug Menu ]
      Modded/Hacked App: Darts Club By BoomBit, Inc.
      Bundle ID: com.boombitgames.DartsClub
      iTunes Store Link: https://apps.apple.com/us/app/darts-club/id1389760587?uo=4


      Hack Features:
      - Unlimited Currencies
      - Debug Menu -> Head into Settings and toggle the DEBUG button. [ VIP ]
      -> Add Soft
      -> Add Hard
      -> Add Trophies
      -> Unlock All Parts/Emotes/Vanities/Wild Items
      + More!


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Darts Club v5.8.6 +28 Jailed Cheats [ Debug Menu ] - 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/
        • Agree
        • Winner
        • Like
      • 6 replies
    • Strongest Knight Cheats v1.07 +4
      Modded/Hacked App: Strongest Knight By Superlink Ltd.
      Bundle ID: com.idlemaster.hero
      iTunes Store Link: https://apps.apple.com/us/app/strongest-knight/id6738113239?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Freeze Currencies
      - No Ads (Don't use the deb cheat unless you complete tutorial -- Finish use 4 ads boost quest)
       


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/190406-strongest-knight-v106-jailed-cheats-4/


      iOS Hack Download Link: https://iosgods.com/topic/190404-strongest-knight-cheats-v106-4/
        • Agree
        • Thanks
        • Winner
        • Like
      • 7 replies
    • [ GrandChase TW] 永恆冒險 Cheats v1.85.1 +3
      Modded/Hacked App: 永恆冒險 By HaoPlay Limited
      Bundle ID: tw.txwy.ios.grandchase
      iTunes Store Link: https://apps.apple.com/tw/app/%E6%B0%B8%E6%81%86%E5%86%92%E9%9A%AA/id1434266148?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Instant Skills
      - Weak Enemies


      ViP Non-Jailbroken Hack: https://iosgods.com/topic/167594-grandchase-tw-%E6%B0%B8%E6%81%86%E5%86%92%E9%9A%AA-v1744-jailed-cheats-2/


      iOS Hack Download Link: https://iosgods.com/topic/144913-grandchase-tw-%E6%B0%B8%E6%81%86%E5%86%92%E9%9A%AA-cheats-v1812-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 147 replies
    • GrandChase Cheats v1.85.1 +4 [ Multiply Attack & More ]
      Modded/Hacked App: GrandChase By KOG co., Ltd
      Bundle ID: com.kog.grandchaseglobal
      iTunes Store Link: https://itunes.apple.com/us/app/grandchase/id1385904294?mt=8&uo=4&at=1010lce4

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - x Player Damage - x1 - 100
      - x Player HP - x1 - 100
      - Auto-Win
      - Unlimited Skills

      All features are unlinked and only for player, you!

      This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app. This hack works on the latest x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,440 replies
    • Cat Snack Bar Cheats v1.0.155 +1
      Modded/Hacked App: Cat Snack Bar By treeplla Inc.
      Bundle ID: com.tree.idle.catsnackbar
      iTunes Store Link: https://apps.apple.com/us/app/cat-snack-bar/id6443895159?uo=4


      Hack Features:
      - Freeze Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/170232-cat-snack-bar-v1036-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/170233-cat-snack-bar-cheats-v1036-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 67 replies
    • Temple Run 2 Cheats v1.117.1 +8
      Modded/Hacked App: Temple Run 2 by Imangi Studios, LLC
      Bundle ID: com.imangi.templerun2
      iTunes Store Link: https://apps.apple.com/us/app/temple-run-2/id572395608?uo=4&at=1010lce4


      Hack Features:
      - No Ads Enabled
      - x2 Coin Enabled
      - Infinite Coin (Spend some)
      - Infinite Gem (Spend some)
      - All Characters Unlocked
      - Free iAP (Turn off all iap hacks before using this, also if itunes popup don't show then run ldrestart in terminal -- This is an issue with the jailbreak not the hack)
      - Auto Run
      - Coin Magnet


      iOS Hack Download Link: https://iosgods.com/topic/132609-arm64-temple-run-2-cheats-v1691-8/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 297 replies
    • CodyCross: Crossword Puzzles Cheats v2.0.3 +3
      Modded/Hacked App: CodyCross: Crossword Puzzles by Fanatee, Inc.
      Bundle ID: com.fanatee.cody
      iTunes Store Link: https://apps.apple.com/us/app/codycross-crossword-puzzles/id1092689152?uo=4&at=1010lce4


      Hack Features:
      - Infinite Tokens
      - Infinite Boosters
      - PREMIUM


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/87156-arm64-codycross-crossword-puzzles-v1220-jailed-cheats-1/


      Hack Download Link: https://iosgods.com/topic/87091-arm64-codycross-crossword-puzzles-cheats-all-versions-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 161 replies
    • MARVEL Contest of Champions v48.1.0 +11++ Amazing Cheats!
      Modded/Hacked App: MARVEL Contest of Champions By Kabam
      Bundle ID: com.kabam.marvelbattle
      iTunes Link: https://itunes.apple.com/us/app/marvel-contest-of-champions/id896112560?mt=8&uo=4&at=1010lce4


      Hack Features
      - Enemy/AI Doesn't Attack
      - Special Attack/Skill Always Available
      - No Knockbacks When Hit
      - No Knockdowns When Hit
      - Enemy Doesn't Block
      - Auto Win - Whoever Attacks first, loses. Disable AI Doesn't Attack for this to work.
      - One Hit Kill / High Damage - Linked. Attack first or use with Enemy Doesn't Attack.

      Non-Jailbroken version of this hack: https://iosgods.com/topic/44075-marvel-contest-of-champions-v1311-2-cheats-for-jailed-devices/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 3,425 replies
    • Royal Match v26455 +10 Jailed Cheats [ Coins + More ]
      Modded/Hacked App: Royal Match By Dream Games Teknoloji Anonim Sirketi
      Bundle ID: com.dreamgames.royalmatch
      iTunes Store Link: https://apps.apple.com/us/app/royal-match/id1482155847?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Freeze Coins
      - Freeze Lives
      - Freeze Stars
      - Freeze Boosters
      - Freeze Time
      - Freeze Moves
      - Unlock VIP Badges
      - Unlock VIP Name Styles
      - Unlock VIP Frames
      - Auto Win -> Quit the level.


      Jailbreak required hack(s): [Mod Menu Hack] Royal Match v26455 +11 Cheats [ Unlimited Coins + More ] - 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
      • 292 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