Jump to content

 Something great is coming! 🚀

Stay tuned for the big reveal happening here on iOSGods on the 17th of December!

The countdown has finished!

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

    • Deep Rock Galactic: Survivor v1.0.8 Jailed Cheats +5
      Modded/Hacked App: Deep Rock Galactic: Survivor By Ghost Ship Publishing ApS
      Bundle ID: com.ghostshippublishing.deeprockgalacticsurvivor
      App Store Link: https://apps.apple.com/us/app/deep-rock-galactic-survivor/id6742194903?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - Multiply Attack
      - Weak Enemies
      - Free Store
      - PREMIUM

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/202065-deep-rock-galactic-survivor-v103-jailed-cheats-5/
      • 35 replies
    • Matchington Mansion Cheats v1.193.0 +5
      Modded/Hacked App: Matchington Mansion By Magic Tavern, Inc.
      Bundle ID: com.matchington.mansion
      iTunes Store Link: https://apps.apple.com/us/app/matchington-mansion/id1216575026?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

      - Infinite Moves
      - Infinite Lives
      - Infinite Booster
      - Infinite Coin (Spend some/ Get some)
      - Infinite Stars (Complete task without needing Stars)

       

      Non-Jailbroken Hack: https://iosgods.com/topic/75130-matchington-mansion-v11750-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/75127-matchington-mansion-cheats-v11770-5/
      • 818 replies
    • CSR 2 Drag Racing Car Games v6.2.1 +4 Jailed Cheats
      Modded/Hacked App: CSR 2 Drag Racing Car Games By Zynga Inc.
      Bundle ID: com.naturalmotion.customstreetracer2
      iTunes Store Link: https://apps.apple.com/us/app/csr-2-drag-racing-car-games/id887947640?uo=4


      Hack Features:
      - Buy Anything for 1 Gold
      - Buy Anything for 1 Cash
      - Instant Car Delivery
      - Instant Part Delivery


      Jailbreak required hack(s): https://iosgods.com/topic/73095-csr-2-drag-racing-car-games-v431-gold-cash-keys-more/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 889 replies
    • Swordash v2.2.5 Jailed Cheats +2
      Modded/Hacked App: Swordash By Fattoy Game Technology Co., Ltd.
      Bundle ID: com.fattoy.swordash.ios
      App Store Link: https://apps.apple.com/us/app/swordash/id6443986363?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - Multiply Attack
       

      Jailbroken Hack: https://iosgods.com/topic/203255-swordash-cheats-v225-2/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/203254-swordash-v225-jailed-cheats-2/
      • 0 replies
    • Merge Stories: Drama & Choice v22511.0.0 +4 Jailed Cheats [ Unlimited Cash ]
      Modded/Hacked App: Merge Stories: Drama & Choice By VIZOR APPS LTD
      Bundle ID: com.vizor-apps.MergeStories
      App Store Link: https://apps.apple.com/ph/app/merge-stories-drama-choice/id6753975851?uo=4

       


      🤩 Hack Features

      - Freeze Merge Energy
      - Freeze Cash

      VIP
      - Unlimited Merge Energy -> Spend some then restart the game.
      - Unlimited Cash -> Spend some then restart the game.
      • 0 replies
    • Merge Stories: Drama & Choice v22511.0.0 +4 Cheats [ Unlimited Cash ]
      Modded/Hacked App: Merge Stories: Drama & Choice By VIZOR APPS LTD
      Bundle ID: com.vizor-apps.MergeStories
      App Store Link: https://apps.apple.com/ph/app/merge-stories-drama-choice/id6753975851?uo=4

       


      🤩 Hack Features

      - Freeze Merge Energy
      - Freeze Cash

      VIP
      - Unlimited Merge Energy -> Spend some then restart the game.
      - Unlimited Cash -> Spend some then restart the game.
      • 0 replies
    • OnceWorld v0.9.4 +2 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: OnceWorld By PONIX LLC
      Bundle ID: work.ponix.onceworld
      App Store Link: https://apps.apple.com/us/app/onceworld/id6753948618?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      • 4 replies
    • OnceWorld v0.9.4 +2 Cheats [ Damage + More ]
      Modded/Hacked App: OnceWorld By PONIX LLC
      Bundle ID: work.ponix.onceworld
      App Store Link: https://apps.apple.com/us/app/onceworld/id6753948618?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - God Mode 
      • 1 reply
    • Love Eden: Chapters of Romance v1.9.18 +10++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Love Eden: Chapters of Romance By NODERNO LIMITED
      Bundle ID: com.noderno.loveeden
      App Store Link: https://apps.apple.com/us/app/love-eden-chapters-of-romance/id6471411677?uo=4

       


      🤩 Hack Features

      - Debug Menu -> Head over to your profile and then tap on Settings.
      • 2 replies
    • The Kingdom: Medieval Tales v1.1.3.18 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: The Kingdom: Medieval Tales By BoomBit, Inc.
      Bundle ID: com.stratospheregames.The.Kingdom.Medieval.Tales.Strategy.Building.Games
      App Store Link: https://apps.apple.com/us/app/the-kingdom-medieval-tales/id6744967226?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 25 replies
    • Love Eden: Chapters of Romance v1.9.18 +10++ Cheats [ Debug Menu ]
      Modded/Hacked App: Love Eden: Chapters of Romance By NODERNO LIMITED
      Bundle ID: com.noderno.loveeden
      App Store Link: https://apps.apple.com/us/app/love-eden-chapters-of-romance/id6471411677?uo=4

       


      🤩 Hack Features

      - Debug Menu -> Head over to your profile and then tap on Settings.
      • 1 reply
    • The Kingdom: Medieval Tales v1.1.3.18 +3 Cheats [ Damage & Defence ]
      Modded/Hacked App: The Kingdom: Medieval Tales By BoomBit, Inc.
      Bundle ID: com.stratospheregames.The.Kingdom.Medieval.Tales.Strategy.Building.Games
      App Store Link: https://apps.apple.com/us/app/the-kingdom-medieval-tales/id6744967226?uo=4

       
       

      🤩 Hack Features

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