Jump to content

ARM64 Unity String Function Hooking LGL Menu


xxbatman9898

1 post in this topic

Recommended Posts

Hooking string functions for libil2cpp games is a little different than hooking int or bool functions because unity uses a different type of string.

Create a header file e.g. Strings.h

#include "Includes/Utils.h"
typedef struct _monoString {
    void *klass;
    void *monitor;
    int length;
    char chars[1];

    int getLength() {
        return length;
    }

    char *getChars() {
        return chars;
    }
} monoString;

REOWW8M.png

Paste this code into it. This is a typedef so we can handle mono string types.

Now inside of your Main.cpp include this header

#include "Includes/Strings.h" // location relative to Main.cpp if its in a higher hiarchy use "../"

Now inside Main.cpp create your function pointers I put mine just below the My_Patches struct.

monoString *(*String_CreateString)(void *_this, const char *str);
void (*get_StringInstance);

d1jkQs4.png

 

Now inside your hackthread function assign your String_CreateString and get_StringInstance.

String_CreateString = (monoString*(*)(void *,const char *))getAbsoluteAddress(targetLibName, 0x1646CA0);
   get_StringInstance  = (void (*))getAbsoluteAddress(targetLibName,0x1646CA0);

To find the offsets Search in your dump.cs for a createstring method, which takes in only one variable called sbyte* value.

1vWFEJZ.png

put that offset in both get_StringInstance and String_CreateString.


now you can hook string functions.

here is a hook for function.

First we hook the update function in the playercontroller class.
then inside that class is a function Debug_MoveToPointImmediate which takes a monostring parameter.

void (*Debug_MoveToPointImmediate)(void *instance, monoString * PointID);
bool MoveToCastle = false;
bool MoveToHome = false;
void(* old_UpdateMap)(void * instance);
void UpdateMap(void*instance) {
    if(instance != NULL ) {
       if(MoveToCastle) {
           MoveToCastle = false;
           Debug_MoveToPointImmediate(instance,String_CreateString(get_StringInstance,"castle"));
       }
        if(MoveToHome) {
            MoveToHome = false;
            Debug_MoveToPointImmediate(instance,String_CreateString(get_StringInstance,"home"));
        }

    }
    old_UpdateMap(instance);
}

when passing the string into the parameter use String_CreateString(get_StringInstance,"string you want to pass")

now we assign the pointer function and hook the player update inside the hackthread.

A64HookFunction((void*)getAbsoluteAddress(targetLibName, 0x19DDDD4),  (void*)UpdateMap, (void**)&old_UpdateMap);
Debug_MoveToPointImmediate = (void (*)(void *,monoString *))getAbsoluteAddress(targetLibName, 0x19E07A4);

kqpDZP8.png

and your done. You can use the String_CreateString(get_StringInstance,"string you want to pass") in any function which takes a string. If its a string returning function you could use
return String_CreateString(get_StringInstance,"string you want to return").

connecting to a button is simple.

add the features :

oEsNtKb.png

add the cases:

ie8EPny.png

Because the function is in a update that is called 60 times per second, we set it to true when the button is clicked and then inside the update function set it to false once it is run. This is so it isn't called more than once. you would do this differently if it was a function you want to keep being called like a toggle function.

DONE.

  • Like 1
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

    • Last Survivor : Shootout v1.4.8 Cheats +2
      Modded/Hacked App: Last Survivor : Shootout By Voodoo
      Bundle ID: com.minigamelab.lastsurvivor
      iTunes Store Link: https://apps.apple.com/us/app/last-survivor-shootout/id6447337525?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Premium: Setting -> Restore Purchase -> Float icon -> In-App Purchase -> VoodooPremium
      - Debug: Setting -> Your Data -> Type 1082 -> Enable -> Options
      • 0 replies
    • Last Survivor : Shootout v1.4.8 Cheats +2
      Modded/Hacked App: Last Survivor : Shootout By Voodoo
      Bundle ID: com.minigamelab.lastsurvivor
      iTunes Store Link: https://apps.apple.com/us/app/last-survivor-shootout/id6447337525?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:
      - Premium: Setting -> Restore Purchase -> Float icon -> In-App Purchase -> VoodooPremium
      - Debug: Setting -> Your Data -> Type 1082 -> Enable -> Options
      • 0 replies
    • Cannon Attack v6.6.0 Cheats +2
      Modded/Hacked App: Cannon Attack By Voodoo
      Bundle ID: com.xiuyou.ios.CannonAttack
      iTunes Store Link: https://apps.apple.com/us/app/cannon-attack/id6447845553?uo=4

       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Premium: Setting -> Privacy Policy -> Crash -> Reopen -> Float icon -> In-App Purchase -> VoodooPremium
      - Add Gold & Unlock All (Click Restore Purchases)
      • 0 replies
    • Cannon Attack v6.6.0 Cheats +2
      Modded/Hacked App: Cannon Attack By Voodoo
      Bundle ID: com.xiuyou.ios.CannonAttack
      iTunes Store Link: https://apps.apple.com/us/app/cannon-attack/id6447845553?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:
      - Premium: Setting -> Privacy Policy -> Crash -> Reopen -> Float icon -> In-App Purchase -> VoodooPremium
      - Add Gold & Unlock All (Click Restore Purchases)
      • 0 replies
    • Beach Volley Clash v1.88 Cheats +2
      Modded/Hacked App: Beach Volley Clash By Voodoo
      Bundle ID: com.slowmo.twinvolley
      iTunes Store Link: https://apps.apple.com/us/app/beach-volley-clash/id6448185657?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Debug Menu: Setting -> Privacy Policy -> Float icon -> Progression controls
      - Premium: Setting -> Privacy Policy -> Float icon -> In-App Purchase -> VoodooPremium
      • 0 replies
    • Beach Volley Clash v1.88 Cheats +2
      Modded/Hacked App: Beach Volley Clash By Voodoo
      Bundle ID: com.slowmo.twinvolley
      iTunes Store Link: https://apps.apple.com/us/app/beach-volley-clash/id6448185657?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:
      - Debug Menu: Setting -> Privacy Policy -> Float icon -> Progression controls
      - Premium: Setting -> Privacy Policy -> Float icon -> In-App Purchase -> VoodooPremium
      • 0 replies
    • Pegher.io: Zombie Survivor v1.1.0 Cheats +3
      Modded/Hacked App: Pegher.io: Zombie Survivor By Voodoo
      Bundle ID: com.hotyetistudio.pegherio
      iTunes Store Link: https://apps.apple.com/us/app/pegher-io-zombie-survivor/id6448869405?uo=4

       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Premium: Setting -> SFX -> Float icon -> In-App Purchase -> VoodooPremium
      - OHK
      - God mode
      • 0 replies
    • Pegher.io: Zombie Survivor v1.1.0 Cheats +3
      Modded/Hacked App: Pegher.io: Zombie Survivor By Voodoo
      Bundle ID: com.hotyetistudio.pegherio
      iTunes Store Link: https://apps.apple.com/us/app/pegher-io-zombie-survivor/id6448869405?uo=4

       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Premium: Setting -> SFX -> Float icon -> In-App Purchase -> VoodooPremium
      - OHK
      - God mode
      • 0 replies
    • Pegher.io: Zombie Survivor v1.1.0 Cheats +3
      Modded/Hacked App: Pegher.io: Zombie Survivor By Voodoo
      Bundle ID: com.hotyetistudio.pegherio
      iTunes Store Link: https://apps.apple.com/us/app/pegher-io-zombie-survivor/id6448869405?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:
      - Premium: Setting -> SFX -> Float icon -> In-App Purchase -> VoodooPremium
      - OHK
      - God mode
      • 0 replies
    • Walkers Attack v1.7.0 Cheats +2
      Modded/Hacked App: Walkers Attack By Voodoo
      Bundle ID: com.homiebearstudio.walkersattack
      iTunes Store Link: https://apps.apple.com/us/app/walkers-attack/id6450046960?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Debug Menu: Setting -> Restore Purchases -> Float icon -> Cheats
      - Premium: Setting -> Restore Purchases -> Float icon -> In-App Purchase -> VoodooPremium
      • 0 replies
    • Walkers Attack v1.7.0 Cheats +2
      Modded/Hacked App: Walkers Attack By Voodoo
      Bundle ID: com.homiebearstudio.walkersattack
      iTunes Store Link: https://apps.apple.com/us/app/walkers-attack/id6450046960?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:
      - Debug Menu: Setting -> Restore Purchases -> Float icon -> Cheats
      - Premium: Setting -> Restore Purchases -> Float icon -> In-App Purchase -> VoodooPremium
      • 0 replies
    • Sniper Siege: Defend & Destroy v3.53 Cheats +6
      Modded/Hacked App: Sniper Siege: Defend & Destroy By Voodoo
      Bundle ID: com.tapped.sniperdefense
      iTunes Store Link: https://apps.apple.com/us/app/sniper-siege-defend-destroy/id6449642802?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Premium: Setting -> About ->Float Icon -> In-App Purchase
      - Not Spend Energy
      - Stupid Enemies
      - Unlimited steel
      - Unlock premium weapons
      - Unlimited currencies
      • 0 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