mirror of
https://gitea.tendokyu.moe/TeamTofuShop/capnhook.git
synced 2026-10-10 16:28:15 +03:00
Fix GetProcAddress issue on ARM64 (#5)
See [TeamTofuShop/segatools/issues/20](https://gitea.tendokyu.moe/TeamTofuShop/segatools/issues/20). This PR adds `pe_is_arm64` for detecting ARM64 systems and `pe_get_arm64_real_proc` for retrieving the real thread address. I'm still getting familiar with the project, so I’d really appreciate any feedback, suggestions, or corrections. Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/capnhook/pulls/5 Co-authored-by: oldkingOK <oldkingok@qq.com> Co-committed-by: oldkingOK <oldkingok@qq.com>
This commit is contained in:
@@ -73,6 +73,9 @@ static HRESULT process_hijack_try_thread(
|
||||
|
||||
exe_entry = pe_get_entry_point(exe);
|
||||
ntstart = GetProcAddress(ntdll, "RtlUserThreadStart");
|
||||
if (pe_is_arm64()) {
|
||||
ntstart = pe_thunk_resolve(ntstart);
|
||||
}
|
||||
|
||||
if (ntstart == NULL) {
|
||||
/* TODO Deal with WinXP, for the poor souls still stuck on that OS.
|
||||
|
||||
Reference in New Issue
Block a user