This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! I'm Learning to Hook. (HELP)

GODOFMLBB

Platinian
Hello friends. What Can I Use To Hook This Offset? No Update Function.


Offset: 0x2A35C20
public static CmdHeroSkin GetHeroSkin(List<CmdHeroSkin> m_heroskins, uint skinid) { }

 
Last edited:
bool(*oldIsForbidSkin)(void* obj);
bool IsForbidSkin(void* obj){
if(obj != nullptr && UnlockForbidSkin){
return true;
}
oldIsForbidSkin(obj);
}

HOOK("0x2A35C20", IsForbidSkin, oldIsForbidSkin);

Use the newest LGL version.
 
bool(*oldIsForbidSkin)(void* obj);
bool IsForbidSkin(void* obj){
if(obj != nullptr && UnlockForbidSkin){
return true;
}
oldIsForbidSkin(obj);
}

HOOK("0x2A35C20", IsForbidSkin, oldIsForbidSkin);

Use the newest LGL version.

no. i already did that. the code in the picture is already correct and working. I know the code for true false. I wanted to say. How can I hook the arm code to be mov r0, r1 / bx lr.
 

no. i already did that. the code in the picture is already correct and working. I know the code for true false. I wanted to say. How can I hook the arm code to be mov r0, r1 / bx lr.
 
Whats the goal to do that ? Its literally the same, not quite sure if able to do what u mention or write your own library then

dude i did the hex patch method and it worked. like i said i need to do this with hook method. In short, I need to put fields or other things to open the get hero skin offset. yes it is more difficult but i want to learn this method.
 
LOL now i understand what u mean, u keep saying mov r0, r1 / bx lr make me confused.

if u want access from that param use array and logs those skinid
 
 
You patch using assembly.

True = mov r0, #1
False = mov r0, #0

Arm64:
True = mov x0, #1
False = mov x0, #0
dude i did the hex patch method and it worked. like i said i need to do this with hook method. In short, I need to put fields or other things to open the get hero skin offset. yes it is more difficult but i want to learn this method.
 
C++:
void(*orig_Update)(void *instance);
void Update(void* instance) {

if (instance != nullptr)
     {
        if (hack2)
          return true;
        } else { 
          return false;
        }

     }

     orig_Update(instance); // dont use return on void function
}