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

Posted
1 minute ago, tien0246 said:

_this is poiter class

gotcha right that makes sense thank you.

  • Like 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 HomeTown: Merge Games v15 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Merge HomeTown: Merge Games By AppGuruz
      Bundle ID: com.gt.hometown.mergegame
      App Store Link: https://apps.apple.com/us/app/merge-hometown-merge-games/id6450775072?uo=4


      Hack Feature

      - Cash

      - Gold

      - Keys

      - Energy

      - ADS Ticket
      • 1 reply
    • World Chef Cheats v3.1.0 +4
      Modded/Hacked App: World Chef By Socialpoint
      Bundle ID: worldchef
      iTunes Store Link: https://apps.apple.com/us/app/world-chef/id1010677881?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Instant Cooking
      - Instant Eating
      - Free Missing Ingredients/Food Cost
      - Free Storage Upgrade Cost

       

      Non-Jailbroken Hack: https://iosgods.com/topic/163932-world-chef-v307-jailed-cheats-4/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/163904-world-chef-cheats-v307-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 62 replies
    • MuseDash Cheats v5.6.1 +3
      Modded/Hacked App: Muse Dash 喵斯快跑-跑酷游戏 By X.D. Network Inc.
      Bundle ID: com.xd.musedash
      iTunes Store Link: https://apps.apple.com/us/app/muse-dash-%E5%96%B5%E6%96%AF%E5%BF%AB%E8%B7%91-%E8%B7%91%E9%85%B7%E6%B8%B8%E6%88%8F/id1361473095?uo=4


      Hack Features:
      - All Songs Owned (It display Locked but you still can play it)
      - God Mode
      - Auto Dance

       
      Free Non-Jailbroken Hacks: https://iosgods.com/topic/88380-muse-dash-%E5%96%B5%E6%96%AF%E5%BF%AB%E8%B7%91-%E8%B7%91%E9%85%B7%E6%B8%B8%E6%88%8F-v153-jailed-cheats-2/

       
      Hack Download Link: https://iosgods.com/topic/71374-muse-dash-%E5%96%B5%E6%96%AF%E5%BF%AB%E8%B7%91-%E8%B7%91%E9%85%B7%E6%B8%B8%E6%88%8F-cheats-v153-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 339 replies
    • Adventure Chef v1.52.360 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Adventure Chef By Futurewave Games LLC
      Bundle ID: com.adventurechef
      App Store Link: https://apps.apple.com/us/app/adventure-chef/id6717580048?uo=4

       
      🤩 Hack Features

      - IAP FREE [ Buy Anything ] ADS
      - Gems
      - Cash
        • Like
      • 2 replies
    • Adventure Chef v1.52.360 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Adventure Chef By Futurewave Games LLC
      Bundle ID: com.adventurechef
      App Store Link: https://apps.apple.com/us/app/adventure-chef/id6717580048?uo=4


      🤩 Hack Features

      - IAP FREE [ Buy Anything ] ADS
      - Gems
      - Cash
        • Like
      • 5 replies
    • Only Grind: Loot & Fight v1.3.1 [ +11 Cheats ] Currency Max
      Modded/Hacked App: Only Grind: Loot & Fight By Chi Ngo
      Bundle ID: io.onlychads.onlygrind
      App Store Link: https://apps.apple.com/us/app/only-grind-loot-fight/id6499444042?uo=4

       
      🤩 Hack Features

      - IAP FREE [ Buy Anything ] ADS

      - Gems [ Earn Then Get ]

      - Success Rate Gems [ UP Then Get ]

      - Chest +5

      - Gold [ Sell Then Get ]

      - Gold [ Merge Gems Then Get ]

      - Gold [ Up Then Get ]

      - HP

      - DEF

      - ATK

      - Criti DMG
        • Like
      • 4 replies
    • Only Grind: Loot & Fight v1.3.1 [ +11 Jailed ] Currency Max
      Modded/Hacked App: Only Grind: Loot & Fight By Chi Ngo
      Bundle ID: io.onlychads.onlygrind
      App Store Link: https://apps.apple.com/us/app/only-grind-loot-fight/id6499444042?uo=4
       

      🤩 Hack Features

      - IAP FREE [ Buy Anything ] ADS

      - Gems [ Earn Then Get ]

      - Success Rate Gems [ UP Then Get ]

      - Chest +5

      - Gold [ Sell Then Get ]

      - Gold [ Merge Gems Then Get ]

      - Gold [ Up Then Get ]

      - HP

      - DEF

      - ATK

      - Criti DMG
        • Like
      • 0 replies
    • My Cafe — Restaurant game Cheats v2025081.1.761 +3
      Modded/Hacked App: My Cafe — Restaurant Game By Melsoft
      Bundle ID: com.Melesta.MyCafe
      iTunes Store Link: https://apps.apple.com/us/app/my-cafe-restaurant-game/id1068204657?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Increase Game Speed
      - No Timer to Buy Energy
      - Custom Dice Value


      Notes:
      - DO NOT BUY VIP FOR OTHER FEATURES, IT HAS BEEN PATCHED AND NO LONGER WORK

       

      Non-Jailbroken Hack: https://iosgods.com/topic/134272-my-cafe-%E2%80%94-restaurant-game-v20250205684-3-cheats/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/130634-my-cafe-%E2%80%94-restaurant-game-cheats-v20250300691-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 659 replies
    • Simply Piano: Learn Piano Fast Modded v9.10.24 +1
      Modded/Hacked App: Simply Piano: Learn Piano Fast By Simply Ltd
      Bundle ID: com.joytunes.asla
      iTunes Store Link: https://apps.apple.com/us/app/simply-piano-learn-piano-fast/id1019442026?uo=4


      Hack Features:
      - PREMIUM
       

      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/68652-simply-piano-v975-jailed-mod-1/


      Hack Download Link: https://iosgods.com/topic/83369-simply-piano-learn-piano-fast-modded-all-versions-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,542 replies
    • Magic Tiles 3: Piano Game Cheats v12.081.002 +5
      Modded/Hacked App: Magic Tiles 3 by AMANOTES JOINT STOCK COMPANY
      Bundle ID: com.amazingmusic.pianoidol
      iTunes Store Link: https://itunes.apple.com/us/app/magic-tiles-3/id1145692161?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Currencies
      - No Ads
      - Infinite Lives
      - All Songs Owned
      - ViP


      Hack Download Link: https://iosgods.com/topic/82441-arm64-magic-tiles-3-cheats-v67047-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,029 replies
    • Dungeon of Gods Cheats v1.6.3 +3
      Modded/Hacked App: Dungeon of Gods By SuperPlanet corp.
      Bundle ID: com.superplanet.goddungeon
      App Store Link: https://apps.apple.com/us/app/dungeon-of-gods/id1611319102?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Multiply Attack
      - Multiply Defense
      - God Mode

       

      Non-Jailbroken Hack: https://app.iosgods.com/store/appdetails/5865-dungeon-of-gods-hack

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/157059-dungeon-of-gods-cheats-v163-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 266 replies
    • The Secret of Cat Island Cheats v1.5.3 +2
      Modded/Hacked App: The Secret of Cat Island By LikeItGames Co., Ltd.
      Bundle ID: com.likeitgames.iOSAfterRain2
      App Store Link: https://apps.apple.com/us/app/the-secret-of-cat-island/id1599990384?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Free Currencies
      - Unlock All Skins

       

      Non-Jailbroken Hack: https://iosgods.com/topic/155394-the-secret-of-cat-island-v153-jailed-cheats-1/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/155392-the-secret-of-cat-island-cheats-v153-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 35 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