Help! Help Hooking IL2CPP Methods

RedXen

Awesome Active Platinian
Hi, everyone. I'm trying to hook an il2cpp method, i.e. Call it, but I'm unsure about how to do that.

For example, there is a method as shown:
demon1.png


What I would like to do is call the method 'AddRuby()' but I don't know how to call il2cpp methods. Can anyone help me out? Thanks!

The second example of a method, this time with parameters:
demon2.png
 
to call this function just set a function pointer:
C++:
void (*AddRuby)(void *instance) = (void (*)(void*))reBase(address);

Make sure to define the address only when the library is loaded.
So i suggest you to split the definition of the pointer.
 
to call this function just set a function pointer:
C++:
void (*AddRuby)(void *instance) = (void (*)(void*))reBase(address);

Make sure to define the address only when the library is loaded.
So i suggest you to split the definition of the pointer.
Thanks for the reply! Appreciate it. Although, I haven’t really dabbled much in C++ yet, and I’m fairly new to hooking, so how would I go about loading this hook when a game is loaded? I’m more of a C# / Windows reverser myself.
 
Thanks for the reply! Appreciate it. Although, I haven’t really dabbled much in C++ yet, and I’m fairly new to hooking, so how would I go about loading this hook when a game is loaded? I’m more of a C# / Windows reverser myself.
to check if a library is loaded just:
1) Create a new thread
2) inside the new thread just sleep until it doesn't find a new library. (Use the function provided from KittyMemory)
C++:
do {
    sleep(1);
} while(!isLibraryLoaded("libil2cpp.so"));
or use
C++:
while (!isLibraryLoaded("libil2cpp.so")) {
    sleep(1);
}
 
I’m fairly new to hooking, so how would I go about loading this hook when a game is loaded?
Very sad so many tutorials in this website but ppl never actually read or explore them
 
Very sad so many tutorials in this website but ppl never actually read or explore them
That’s very well and great until half of the steps of the tutorial are missing, and they reference libraries that aren’t even named. Yeah, thanks. Also, if you’re gonna be like that, don’t bother
 
What u mean missing? All there same like LGL template, its not just 1 link i send, alot more on tutorial sections. How abt u try use LGL template first and try error? You never know until u start using it
I’ve actually tried the LGL template before but for some reason the gradle build always fails? I’ve installed Android Studio and all required packages too
 
I’ve actually tried the LGL template before but for some reason the gradle build always fails? I’ve installed Android Studio and all required packages too
Try template 2.9(my current one, didnt bother to use latest it just same anyway) or latest

AS sometime can be annoying, use cmd compile is much better
 
If you noob and dont know what to say, please dont say shit message
Noob ? So u assume i dont have "approve modder" tag means i dk shit ? Ive been releasing mod since 2018 and I dont have to post here bcs most of them share mod public here alrd shared it for me. Okay i admit im noob, knowledge is vast still learning until now

"Dont using this shit set player nickname by parameters, use CreateString."
Why dont u explain your statement here ? To do a mod with monoString ofcz u will need createstring for function pointers , it also can be done to any function type return or param
 
to check if a library is loaded just:
1) Create a new thread
2) inside the new thread just sleep until it doesn't find a new library. (Use the function provided from KittyMemory)
C++:
do {
    sleep(1);
} while(!isLibraryLoaded("libil2cpp.so"));
or use
C++:
while (!isLibraryLoaded("libil2cpp.so")) {
    sleep(1);
}
How can i call multiple lib thread for kittymemory ?
 
Back
Top Bottom