Jump to content

How to call the function? (iOS jailbreak)


nngot44
Go to solution Solved by Saitama,

10 posts in this topic

Recommended Posts

Hi I'm trying to call a function in the game Hide N Seek : Mini Games.

Here is my code, (I just need to call any function):

function dump:

//RVA: 0x11FE288 Offset: 0x11FE288 VA: 0x11FE288
   private void Update() { }


#include <unistd.h>
#include <dispatch/dispatch.h>
#include <mach-o/dyld.h>

uintptr_t getExecAddr(uintptr_t addr)
{
 const struct mach_header* header = _dyld_get_image_header(341); // this is the library index, it's so big because I'm              using a debugger so far.
 if (header == NULL){return 0;}

 uintptr_t libLoadAddr = (uintptr_t)header;
 uintptr_t exec_addr = libLoadAddr + addr;

 return exec_addr;
}

void (*Update)();

%ctor { 

 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

  sleep(15); // wait for all libraries to load

  Update = (void(*)())getExecAddr(0x11FE288);

  Update();

 });
 
}

The game crashes when the moment comes to call the function. What am I doing wrong? :(

Link to comment
Share on other sites

Keep It Simple - using this one


u dont need header index etc
u need library name
 

[menu setFrameworkName:"UnityFramework"];


next is

void (*Update)(void *inst) = (void(*)(void *))getRealOffset(0x11FE288);

and call of this is

Update(inst);


Why inst?
Because its not static function - and this function is called from some class
*inst is a class that has this function and the first arg is for call

  • Informative 1
Link to comment
Share on other sites

20 hours ago, nngot44 said:

Thanks for the answer! but i did not understand where to call the function, if this is done in the same place where the pointer is declared, the compiler will gile the error "use of undeclared identifier 'inst'' for Update(inst);

because u dont declare this variable and dont get the pointer of object created by this class

also dont know why u need to call exact this function 
in Unity games this function basically called automatically each frame (if the class inherits MonoBehaviour class)
 

Link to comment
Share on other sites

  • Solution

the main logic is
var someClass = new SomeClass(); //or other c# initialisation 
someClass.SomeMethod();

SomeMethod() cant be called from no where

Example #1

public class SomeClass : MonoBehaviour 
{
	// Fields
	...

	// Properties
	...

	// Methods
	...
	// RVA: 0x100400 Offset: 0x100400 VA: 0x100400
	public static SomeClass get_Instance() { }

	// RVA: 0x100500 Offset: 0x100500 VA: 0x100500
	public void SomeMethod() // address 0x100500

	// RVA: 0x100600 Offset: 0x100600 VA: 0x100600
	public static void SomeStaticMethod() // address 0x100600
	...
}

 

void* (*SomeClass$$get_Instance)() = (void(*)())getRealOffset(0x100400);
void (*SomeClass$$SomeMethod)(void *SomeClass) = (void(*)(void *))getRealOffset(0x100500);

void* SomeClassInstance = SomeClass$$get_Instance();
SomeClass$$SomeMethod(SomeClassInstance);

 

void (*SomeClass$$SomeStaticMethod)() = (void(*)())getRealOffset(0x100600);

SomeClass$$SomeStaticMethod();

Example #2

public class SomeOtherClass : MonoBehaviour 
{
	// Fields
	...

	// Properties
	...

	// Methods
	...
	// RVA: 0x100300 Offset: 0x100300 VA: 0x100300
	public void InitWithSomeClass(SomeClass someClassInstance) { }
	...
}

 

void* SomeClassInstance = NULL;
void (*SomeOtherClass$$InitWithSomeClass_original)(void *SomeOtherClassInstance, void* someClassInstance);
void _SomeOtherClass$$InitWithSomeClass_hook(void *SomeOtherClassInstance, void* someClassInstance) 
{
	SomeClassInstance = someClassInstance;
	SomeOtherClass$$InitWithSomeClass_original(SomeOtherClassInstance, someClassInstance);
}

HOOK(0x100300, _SomeOtherClass$$InitWithSomeClass_hook, SomeOtherClass$$InitWithSomeClass_original);

 

Updated by Saitama
  • Winner 1
Link to comment
Share on other sites

Example #3

public class SomeThirdClass : MonoBehaviour 
{
	// Fields
	...
	public SomeClass SomeClassField // 0x100
	...

	// Properties
	...

	// Methods
	...
	// RVA: 0x100200 Offset: 0x100200 VA: 0x100200
	public void Update() { }
	...
}

 

void* SomeClassInstance = NULL;
void (*SomeThirdClass$$Update_original)(void *SomeThirdClassInstance);
void _SomeThirdClass$$Update_hook(void *SomeThirdClassInstance) 
{
	void* someClassInstance = *(void **)((uint64_t)SomeThirdClassInstance + 0x100);
	if(someClassInstance != NULL)
    {
		SomeClassInstance = someClassInstance;
    }
	SomeThirdClass$$Update_hook(SomeThirdClassInstance);
}

HOOK(0x100200, _SomeThirdClass$$Update_hook, SomeThirdClass$$Update_original);

 

 

Updated by Saitama
  • Winner 1
Link to comment
Share on other sites

I used your advice and wrote this code (i hope my method returns the correct address) :

#include <unistd.h>
#include <dispatch/dispatch.h>
#include <mach-o/dyld.h>

uintptr_t getExecAddr(uintptr_t addr)
{
    const struct mach_header* header = _dyld_get_image_header(341);
    if (header == NULL){return 0;}

    uintptr_t libLoadAddr = (uintptr_t)header;
    uintptr_t exec_addr = libLoadAddr + addr;

    return exec_addr;
}

%ctor 
{

	dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

		sleep(150);

		void* (*VELights$$get_Instance)() = (void* (*)())getExecAddr(0x12FD104);
		void (*VELights$$ResetMainSunLightAngle)(void *VELights) = (void(*)(void *))getExecAddr(0x12FD4B8);

		void* VELightsInstance = VELights$$get_Instance();
		VELights$$ResetMainSunLightAngle(VELightsInstance);
		
	});	

}	

 

In the debugger, I always get rather strange errors, for example, from the libobjc.A.dylib'objc_retain library. 

I thought it would be easier for me if it was possible to disable ASLR for this game. Is it possible to do this on iOS 13?

 

Updated by nngot44
Link to comment
Share on other sites

basically start from doing some easier things
for example change values from 
public int get_someGold();
and setter
public void set_someGold(int goldVal);

its will be easier to understand that call some function

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

    • Crown Rumble: Idle Kingdoms v1.5.8 +3 Cheats
      Modded/Hacked App: Crown Rumble: Idle Kingdoms By AlohaFactory
      Bundle ID: kr.co.alohacorp.idlekingdoms
      iTunes Store Link: https://apps.apple.com/us/app/crown-rumble-idle-kingdoms/id6470770555?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Unlimited Currencies -> Increase When Use


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 9 replies
    • Fortias Saga: Action Adventure v1.0.39 +5 Cheats
      Modded/Hacked App: Fortias Saga: Action Adventure By ONDI TECHNOLOGY JOINT STOCK COMPANY
      Bundle ID: com.ondi.fortias.saga
      iTunes Store Link: https://apps.apple.com/us/app/fortias-saga-action-adventure/id6475805032?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Shards & Items Multiplier*
      - Freeze Resources
      - No Ads
      *Turn Off When You Get Enough So It Don't Go Negative


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 91 replies
    • Astral Survivor v1.0.105 +2 Cheats
      Modded/Hacked App: Astral Survivor By Firedog Creative Company Limited
      Bundle ID: com.firedogstudio.astralsurvivor
      iTunes Store Link: https://apps.apple.com/us/app/astral-survivor/id6475716603?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Never Die
      - Unlimited Gold


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Agree
        • Thanks
        • Like
      • 3 replies
    • Love Island: The Game v1.5.1 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Island: The Game By Fusebox Games
      Bundle ID: com.fuseboxgames.loveisland2
      iTunes Store Link: https://apps.apple.com/us/app/love-island-the-game/id1522699215
       

      Hack Features:
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.


      Jailbreak required hack(s): https://iosgods.com/topic/169224-love-island-the-game-all-versions-2-cheats-unlimited-currencies/
      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
      • 132 replies
    • Love Island: The Game v1.5.1 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Island: The Game By Fusebox Games
      Bundle ID: com.fuseboxgames.loveisland2
      iTunes Store Link: https://apps.apple.com/us/app/love-island-the-game/id1522699215
       

      Hack Features:
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      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
      • 42 replies
    • Grow Shooter : Survivor RPG v1.0.18 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Grow Shooter : Survivor RPG By DongSik Moon
      Bundle ID: com.eastmoon.growshooterlive
      iTunes Store Link: https://apps.apple.com/us/app/grow-shooter-survivor-rpg/id6480362458?uo=4


      Hack Features:
      - Unlimited Coins -> Will not decrease.
      - Unlimited Rubies -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Grow Shooter : Survivor RPG v1.0.10 +4 Cheats [ Damage ] - 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
        • Thanks
        • Winner
        • Like
      • 25 replies
    • Grow Shooter : Survivor RPG v1.0.18 +4 Cheats [ Damage ]
      Modded/Hacked App: Grow Shooter : Survivor RPG By DongSik Moon
      Bundle ID: com.eastmoon.growshooterlive
      iTunes Store Link: https://apps.apple.com/us/app/grow-shooter-survivor-rpg/id6480362458?uo=4


      Hack Features:
      - Damage Multiplier
      - Move Speed Multiplier
      - Unlimited Coins -> Will not decrease.
      - Unlimited Rubies -> Will not decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Grow Shooter : Survivor RPG v1.0.10 +2 Jailed Cheats [ Unlimited Currencies ] - 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/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 30 replies
    • Supermarket Manager Simulator v1.0.47 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Supermarket Manager Simulator By Digital Melody S.A.
      Bundle ID: com.dmg.supermarket.simulator
      iTunes Store Link: https://apps.apple.com/us/app/supermarket-manager-simulator/id6479982512?uo=4


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      - No Ads


      Jailbreak required hack(s): [Mod Menu Hack] Supermarket Manager Simulator v1.0.6 +3 Cheats [ Unlimited Currencies ] - 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
      • 79 replies
    • Supermarket Manager Simulator v1.0.47 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Supermarket Manager Simulator By Digital Melody S.A.
      Bundle ID: com.dmg.supermarket.simulator
      iTunes Store Link: https://apps.apple.com/us/app/supermarket-manager-simulator/id6479982512?uo=4


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      -- No Ads


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Supermarket Manager Simulator v1.0.6 +3 Jailed Cheats [ Unlimited Currencies ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 31 replies
    • Good Pizza, Great Pizza v5.13.0 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Good Pizza, Great Pizza By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.pizzabusiness
      iTunes Store Link: https://apps.apple.com/us/app/good-pizza-great-pizza/id911121200?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Diamonds


      Jailbreak required hack(s): [Mod Menu Hack] Good Pizza, Great Pizza v5.5.6 +2 Cheats [ Unlimited Currencies ] - 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
      • 78 replies
    • Good Pizza, Great Pizza v5.13.0 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Good Pizza, Great Pizza By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.pizzabusiness
      iTunes Store Link: https://apps.apple.com/us/app/good-pizza-great-pizza/id911121200?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Diamonds


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Good Pizza, Great Pizza v5.5.6 +2 Jailed Cheats [ Unlimited Currencies ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 51 replies
    • Soul Light: Idle RPG War v71 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Jailbreak required hack(s): [Mod Menu Hack] Soul Light: Idle RPG War v1.6.2 +4 Cheats [ Unlimited Currencies ] - 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/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 52 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