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; 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); 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. 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); 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 : add the cases: 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.
from iOSGods RSS Feed https://ift.tt/3qaEquX
Subscribe to:
Post Comments (Atom)
-
Yubo Yoti bypass Requirements: Yubo app Jailbroken iPhone Apps Manager Brain Steps: Open Apps Manager Locate Yubo in Apps Manager and open i...
-
Modded/Hacked App: Simply Guitar by JoyTunes by JoyTunes Bundle ID: com.joytunes.SimplyGuitar iTunes Store Link: https://ift.tt/2ANDd7d Mod ...
-
I don't know how this happened, i was trying to install Kinemaster modded version on my iPhone 7 running iOS 14.0.1, maybe it's beca...
-
Hey everyone I am running Ipad 6th generation running ios 14.0 32 gb capacity with 19.1 gb left I used sideloadly yesterday to install an ap...
-
Hello! I am using this for practice using a dummy Snapchat account I've made and created a My Eyes Only tab. Now, if you don't know ...
-
Hello, does anyone know why I cannot use my Apple password or password from apple servers? Sideloadly version 0.16.1 Checking iOS version......
-
As the title says upon installing Last Day on Earth with sideloadly i get this error ERROR: Guru Meditation 6020bc@89:f11511 Call to np_clie...
-
Hello friends, So I have a problem with Sideloadly, I installed it on my (32x bit Windows 7) laptop (SONY) and tried opening it, but when I ...
-
Hello, I am currently running with an iPhone XR on IOS 12.2. I am trying to install ipa files through cydia impactor but keep receiving this...
-
Netflix is now offering users a chance to win a free subscription for 83 years. The company calls it the “immortal” Netflix account. T...
No comments:
Post a Comment