Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/191.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 钩子Roblox上的函数崩溃。MSHOOK函数_Android_C++_Java Native Interface_Roblox_Ida - Fatal编程技术网

Android 钩子Roblox上的函数崩溃。MSHOOK函数

Android 钩子Roblox上的函数崩溃。MSHOOK函数,android,c++,java-native-interface,roblox,ida,Android,C++,Java Native Interface,Roblox,Ida,我有一些问题 当我挂接所有lua函数时,Roblox崩溃,除了重新调用器 什么是重新呼叫? // attributes: thunk int __fastcall sub_1534F83(int a1) { return sub_154B4BC(a1);//Calls the function that i want to hook. } 如果我调用/hooksub_154B4BCall崩溃。 但是,如果我调用/hooksub_1534F83,所有操作都不会出现任何问题 sub_154B4

我有一些问题

当我挂接所有lua函数时,Roblox崩溃,除了重新调用器

什么是重新呼叫?

// attributes: thunk
int __fastcall sub_1534F83(int a1)
{
  return sub_154B4BC(a1);//Calls the function that i want to hook.
}
如果我调用/hook
sub_154B4BC
all崩溃。 但是,如果我调用/hook
sub_1534F83
,所有操作都不会出现任何问题

sub_154B4BC伪码:

int __fastcall sub_154B4BC(int a1)
{
  return (*(_DWORD *)(a1 + 12) - *(_DWORD *)(a1 + 16)) >> 4;
}
这是我的钩法

uintptr_t (*old_sub_154B4BC)(uintptr_t a1);
uintptr_t sub_154B4BC(uinptr_t a1)
{
LOG("I hooked the function!"); //never gets called, it crashes before of the call...
return old_sub_154B4BC(a1);
}
MSHookFunction((void *) getAbsoluteAddress(targetLibName,
                           string2Offset(OBFUSCATE_KEY("0x154B4BC", '?'))),
                          (void *) sub_154B4BC, (void **) &old_sub_154B4BC);
请帮忙