Jump to content

Some questions with reversing asm via ida


Go to solution Solved by tien0246,

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
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
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

    • Rumble Heroes : Adventure RPG Cheats v2.1.041 +4
      Modded/Hacked App: Rumble Heroes : Adventure RPG By playhard Inc.,
      Bundle ID: com.playhardlab.heroes
      iTunes Store Link: https://apps.apple.com/us/app/rumble-heroes-adventure-rpg/id6443603223?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Always Drop x5 Loot
      - Freeze Currencies


      DO NOT BUY VIP FOR JUST THIS CHEAT. REMOVE ANY JB BYPASS FOR THE GAME


      iOS Hack Download Link: https://iosgods.com/topic/186304-rumble-heroes-adventure-rpg-cheats-v20091-4/
      • 42 replies
    • UNKILLED - Zombie Online FPS Cheats v2.3.5 +5
      Modded/Hacked App: UNKILLED - Zombie Online FPS By MADFINGER Games, a.s.
      Bundle ID: com.madfingergames.unkilled
      iTunes Store Link: https://itunes.apple.com/us/app/unkilled-zombie-online-fps/id969488951?mt=8&uo=4&at=1010lce4


      Hack Features:
      - OHK / Huge Damage*
      - God Mode*
      - Kill All Enemies with One tap
      - Infinite Ammo
      - Infinite Items

      * Works Online PvP


      Hack Download Link: https://iosgods.com/topic/71989-arm64-unkilled-zombie-online-fps-cheats-v107-5/


      Credits:
      - @Laxus
      • 1,317 replies
    • Airport City Cheats v8.34.00 +1
      Modded/Hacked App: Airport City by Game Insight UAB
      Bundle ID: com.gameinsight.airportcity
      iTunes Store Link: https://apps.apple.com/us/app/airport-city/id495637457?uo=4&at=1010lce4


      Hack Features:
      - Free Store


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/126716-arm64-airport-city-v717-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/126714-arm64-airport-city-cheats-v717-1/
      • 741 replies
    • [ Seven Deadly Sins KR ] 일곱 개의 대죄: GRAND CROSS Cheats v8.6.50 +5
      Modded/Hacked App: 일곱 개의 대죄: GRAND CROSS By Netmarble Corporation
      Bundle ID: com.netmarble.nanakr
      iTunes Store Link: https://apps.apple.com/kr/app/%EC%9D%BC%EA%B3%B1-%EA%B0%9C%EC%9D%98-%EB%8C%80%EC%A3%84-grand-cross/id1449552940?uo=4


      Hack Features:
      - God Mode
      - One Hit Kill
      - Multiply Attack
      - Multiply Defense
      - Make Enemies God Mode for some quests


      iOS Hack Download Link: https://iosgods.com/topic/154899-seven-deadly-sins-kr-%EC%9D%BC%EA%B3%B1-%EA%B0%9C%EC%9D%98-%EB%8C%80%EC%A3%84-grand-cross-cheats-v750-5/
      • 140 replies
    • Slayer Legend Cheats v500.9.1 +3
      Modded/Hacked App: Slayer Legend By GEAR2
      Bundle ID: com.gear2.growslayer
      iTunes Store Link: https://apps.apple.com/us/app/slayer-legend/id1635712706?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Freeze Currencies


      iOS Hack Download Link: https://iosgods.com/topic/186299-slayer-legend-cheats-v50084-3/
      • 51 replies
    • Chapters: Interactive Stories v2.0.2 +1 Cheats
      Modded/Hacked App: Chapters: Interactive Stories By Crazy Maple Studio, Inc.
      Bundle ID: com.mars.avgchapters
      iTunes Store Link: https://apps.apple.com/us/app/chapters-interactive-stories/id1277029359?uo=4



      Hack Features:
      - Freeze Tickets [read chapter for free]


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/138328-chapters-interactive-stories-v193-1-cheats-for-jailed-idevices/


      iOS Hack Download Link: https://iosgods.com/topic/137489-chapters-interactive-stories-v193-1-cheats/
      • 340 replies
    • Gran Saga Idle:KNIGHTSxKNIGHTS Cheats v1.16.0 +2
      Modded/Hacked App: Gran Saga Idle:KNIGHTSxKNIGHTS By Kakao Games Corp.
      Bundle ID: com.piedpixels.gransagaidle
      iTunes Store Link: https://apps.apple.com/us/app/gran-saga-idle-knightsxknights/id6482985104?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense


      iOS Hack Download Link: https://iosgods.com/topic/182761-gran-saga-idleknightsxknights-cheats-v101-2/
      • 218 replies
    • Episode - Choose Your Story v25.71 +3 Cheats for Jailed iDevices!
      Modded/Hacked App: Episode - Choose Your Story By Episode Interactive, LLC
      Bundle ID: com.neonfun.catalog
      iTunes Store Link: https://apps.apple.com/us/app/episode-choose-your-story/id656971078?uo=4


      Hack Features:
      - Free Premium Choices
      - Freeze Passes
      - Debug Menu


      iOS Hack Download Link: https://iosgods.com/topic/158140-episode-choose-your-story-v2490-3-cheats-for-jailed-idevices/
      • 247 replies
    • Family Life! v1.46.1 +2++ Jailed Cheats [ Cheat Menu ]
      Modded/Hacked App: Family Life! By SUPERSONIC STUDIOS LTD
      Bundle ID: com.xia.familylife
      iTunes Store Link: https://apps.apple.com/us/app/family-life/id6449919224?uo=4


      Hack Features:
      - Cheat Menu -> Head over to Settings and toggle the Privacy button.
      -- Life Pass Purchased


      Jailbreak required hack(s): [Mod Menu Hack] Family Life! v1.0.32 +2++ Cheats [ Cheat 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/
      • 235 replies
    • Family Life! v1.46.1 +2++ Cheats [ Cheat Menu ]
      Modded/Hacked App: Family Life! By SUPERSONIC STUDIOS LTD
      Bundle ID: com.xia.familylife
      iTunes Store Link: https://apps.apple.com/us/app/family-life/id6449919224?uo=4


      Hack Features:
      - Cheat Menu -> Head over to Settings and toggle the Privacy button.
      -- Life Pass Purchased


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Family Life! v1.0.32 +2++ Jailed Cheats [ Cheat 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/
      • 93 replies
    • MONOPOLY: The Board Game v1.13.11 +1 Jailed Cheat [ Everything Owned ]
      Modded/Hacked App: MONOPOLY: The Board Game By Marmalade Game Studio Limited
      Bundle ID: com.marmalade.monopoly
      iTunes Store Link: https://apps.apple.com/us/app/monopoly-the-board-game/id1477966166?uo=4


      Hack Features:
      - Everything Owned -> All packs, themes, boards, tokens, all purchased and owned.


      Jailbreak required hack(s): https://iosgods.com/topic/169254-monopoly-classic-board-game-all-versions-1-cheat-everything-owned/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 364 replies
    • MONOPOLY: The Board Game v1.13.11 +1 Cheat [ Everything Owned ]
      Modded/Hacked App: MONOPOLY: The Board Game By Marmalade Game Studio Limited
      Bundle ID: com.marmalade.monopoly
      iTunes Store Link: https://apps.apple.com/us/app/monopoly-the-board-game/id1477966166?uo=4


      Hack Features:
      - Everything Owned -> All packs, themes, boards, tokens, all purchased and owned.


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/169256-monopoly-classic-board-game-v189-1-jailed-cheat-everything-owned/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 182 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