From d84e1f49ce5d9f6a9931f5802ecadd59efb4667e Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 18 Apr 2021 09:03:20 +0200 Subject: Fixed GetNativeFnc --- src/tools/bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/bridge.c b/src/tools/bridge.c index fb349ccf..4bcdee0f 100755 --- a/src/tools/bridge.c +++ b/src/tools/bridge.c @@ -178,8 +178,8 @@ void* GetNativeFnc(uintptr_t fnc) // check if it's an indirect jump #define PK(a) *(uint8_t*)(fnc+a) #define PK32(a) *(uint32_t*)(fnc+a) - if(PK(0)==0xff && PK(1)==0x25) { // absolute jump, maybe the GOT - uintptr_t a1 = (PK32(2)); // need to add a check to see if the address is from the GOT ! + if(PK(0)==0xff && PK(1)==0x25) { // "absolute" jump, maybe the GOT (it's a RIP+relative in fact) + uintptr_t a1 = fnc+6+(PK32(2)); // need to add a check to see if the address is from the GOT ! a1 = *(uintptr_t*)a1; if(a1 && a1>0x10000) { a1 = (uintptr_t)GetNativeFnc(a1); -- cgit 1.4.1