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

    • Knights & Dragons - RPG v1.72.8 +2
      Modded/Hacked App: Knights & Dragons - RPG By Deca Games EOOD
      Bundle ID: jp.gree.greeapp3179
      iTunes Store Link: https://apps.apple.com/us/app/knights-dragons-rpg/id539793374?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

      - God Mode (Linked with Enemy PvP)
      - Multiply Attack (PvE Only)

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/153444-knights-dragons-rpg-v1728-2/
      • 175 replies
    • Dragons: Rise of Berk v1.95.20 +5 Cheats
      Modded/Hacked App: Dragons: Rise of Berk By Jam City, Inc.
      Bundle ID: com.ludia.dragons
      iTunes Store Link: https://apps.apple.com/us/app/dragons-rise-of-berk/id667461862?uo=4


      Hack Features:
      - Free Shopping (shows original cost but able to purchase regardless)
      - Free Skipping
      - Free Odin's Market Shopping
      - Odin's Market Packs Never Reduce
      - Currency Hack [Spend to Gain - reverts to zero on next launch]
      - Enable Rider's Club


      Non-Jailbroken & No Jailbreak required hack(s):  https://iosgods.com/topic/79228-dragons-rise-of-berk-v1794-4-cheats-for-jailed-idevices/


      iOS Hack Download Link: https://iosgods.com/topic/139612-dragons-rise-of-berk-v1794-6-cheats/
        • Like
      • 671 replies
    • Cafeland - World Kitchen Cheats v2.45.7 +1
      Modded/Hacked App: Cafeland - World Kitchen by Gamegos Internet Teknolojileri Ltd Sti.
      Bundle ID: com.gamegos.mobile.cafeland
      iTunes Store Link: https://apps.apple.com/us/app/cafeland-world-kitchen/id1147665432?uo=4&at=1010lce4



      Hack Features:
      - Freeze Currencies


      iOS Hack Download Link: https://iosgods.com/topic/100701-arm64-cafeland-world-kitchen-cheats-v2023-1/
        • Agree
      • 406 replies
    • My Cafe — Restaurant game Cheats v2025040.3.731 +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/
      • 653 replies
    • Hollywood Story: Fashion Star Cheats v13.0 +4
      Modded/Hacked App: Hollywood Story®: Fashion Star By Nanobit d.o.o.
      Bundle ID: com.nanobitsoftware.hollywoodstory
      iTunes Store Link: https://apps.apple.com/us/app/hollywood-story-fashion-star/id876656488?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 Cash
      - Infinite Gems
      - Infinite Golden Tickets
      - Infinite Stars Point

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/73408-hollywood-story-fashion-star-cheats-v1211-4/
        • Agree
      • 784 replies
    • My Talking Angela 2 Cheats v25.1.2 +2
      Modded/Hacked App: My Talking Angela 2 By Outfit7 Limited
      Bundle ID: com.outfit7.mytalkingangela2
      iTunes Store Link: https://apps.apple.com/us/app/my-talking-angela-2/id1536584509?uo=4


      Hack Features:
      - Infinite Currencies
      - No Ads


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/147072-my-talking-angela-2-v1013-jailed-cheats-2/


      iOS Hack Download Link: https://iosgods.com/topic/147070-my-talking-angela-2-cheats-all-versions-2/
      • 110 replies
    • PewDiePie's Tuber Simulator Cheats v2.49.0 +3
      Modded/Hacked App: PewDiePie's Tuber Simulator By Outerminds Inc.
      Bundle ID: com.outerminds.tubular
      iTunes Store Link: https://apps.apple.com/us/app/pewdiepies-tuber-simulator/id1093190533?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 Subscriber
      - Infinite Views
      - Infinite Bux

      NOTE: Please complete tutorial first before enabling the hacks otherwise it won't work

      NOTe 2: Please make a youtube video to get some views first (without hack) then before enable infinite views

       

      Non-Jailbroken Hack: https://iosgods.com/topic/86411-pewdiepies-tuber-simulator-v2450-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/86366-pewdiepies-tuber-simulator-cheats-v2460-3/
        • Agree
      • 1,147 replies
    • AdVenture Communist v6.45.0 +2 Cheats
      Modded/Hacked App: AdVenture Communist By Hyper Hippo Publishing Ltd.
      Bundle ID: com.kongregate.mobile.adventurecommunist
      iTunes Store Link: https://apps.apple.com/us/app/adventure-communist/id1225683141?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

      - Freeze Currencies
      - Unlimited Cards [Get Some]

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/149902-adventure-communist-v6430-2-cheats/
      • 128 replies
    • Into The Dead 2 Cheats v1.77.2 +11
      Modded/Hacked App: Into the Dead 2 By Prodigy Design Limited T/A Sidhe Interactive
      Bundle ID: com.pikpok.dr2.iosstore
      iTunes Store Link: https://itunes.apple.com/us/app/into-the-dead-2/id1151220243?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Ammo
      - No Reload
      - One Shot Kill
      - Infinite Grenade
      - No Grenade Cooldown
      - Insane Explotion Radius after Throw Grenade
      - No Collision (God Mode)
      - Infinite Stamnia
      - ViP Services
      - Infinite Silver
      - Infinite Gold


      Hack Download Link: https://iosgods.com/topic/73337-arm64-into-the-dead-2-cheats-v1141-11/
      • 1,574 replies
    • Nonstop Knight 2 Cheats v3.2.6 +7 [ God Mode & More ]
      Modded/Hacked App: Nonstop Knight 2 - Action RPG By Flaregames GmbH
      Bundle ID: com.koplagames.kopla02
      iTunes Store Link: https://apps.apple.com/us/app/nonstop-knight-2-action-rpg/id1444887980?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

      - God Mode
      - One Hit Kill
      - Custom Move Speed
      - Custom Attack Speed
      - Custom Attack Range
      - Instant Skill
      - Infinite MP

       

      Non-Jailbroken Hack: https://iosgods.com/topic/99785-nonstop-knight-2-v323-jailed-cheats-2/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/99783-nonstop-knight-2-cheats-v324-7-god-mode-more/
      • 1,602 replies
    • Fruit Ninja 2 Cheats v2.45.0 +4
      Modded/Hacked App: Fruit Ninja 2 By Halfbrick
      Bundle ID: com.halfbrick.fruitninjax
      iTunes Store Link: https://apps.apple.com/us/app/fruit-ninja-2/id1330898775?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 Store
      - All Skins Purchased
      - All Avatars Purchased
      - All Blades Purchased

       

      Non-Jailbroken Hack: https://iosgods.com/topic/136081-fruit-ninja-2-v2450-jailed-cheats-4/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/136078-fruit-ninja-2-cheats-v2450-4/
      • 413 replies
    • Fruit Ninja Cheats v3.80.0 +4
      Modded/Hacked App: Fruit Ninja® By Halfbrick
      Bundle ID: com.halfbrick.FruitNinjaLite
      iTunes Store Link: https://apps.apple.com/us/app/fruit-ninja/id403858572?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

      - No Bomb
      - Freeze StarFruits
      - Freeze Frenzy, Double Points in Aracade Mode
      - Infinite Boosters

       

      Non-Jailbroken Hack: https://iosgods.com/topic/86031-fruit-ninja-v3800-jailed-cheats-6/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/85983-fruit-ninja-cheats-v3800-4/
      • 455 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