Note: I'm a beginner and I'm Japanese. I've only used C++ a little.
I looked at various sample codes and threads, But eventually it crashes
Target function
[Address(RVA = "0x18E60AC", Offset = "0x18E60AC", VA = "0x18E60AC")]
public void Jump(){}
the code I made
#include <And64InlineHook/And64InlineHook.hpp>
void (*old_alwaysjump)(void *instance);
void alwaysjump(void* instance) {
if (instance != NULL) {
alwaysjumpbtn = instance; // It could be some functions are missing in this line.
}
return old_alwaysjump(instance); // *return* is missing here.
}
jobjectArray GetFeatureList(JNIEnv *env, jobject context) {
do {
sleep(1);
} while (!isLibraryLoaded(targetLibName));
A64HookFunction((void*)getAbsoluteAddress("libil2cpp.so", 0x18E60AC), (void*)alwaysjump, (void **)&old_alwaysjump);
const char *features[] = {
OBFUSCATE("Button_test1")
};
void Changes(JNIEnv *env, jclass clazz, jobject obj,
jint featNum, jstring featName, jint value,
jboolean boolean, jstring str) {
switch (featNum) {
case 0:
if (alwaysjump != NULL)
old_alwaysjump(alwaysjumpbtn);
break;
}
Thread referenced