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) { }
1668458767977.png

1668458813144.png
 
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.
 
What u say its literally called hex patching


C++:
case 0:
toggle_1
    if (toggle_1)
    {
        PATCH("0x123456", "01 00 A0 E1 1E FF 2F E1");
    } else {
        PATCH("0x123456", "XX XX XX XX"); <--- original value
    }
break:

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
 
LOL şimdi ne demek istediğini anlıyorum, mov r0, r1 / bx lr deyip duruyorsun kafamı karıştırıyor.

bu paramdan erişmek istiyorsanız diziyi kullanın ve bu skinid'i günlüğe kaydeder
[/ALINTI]


Is there an Instagram or an address where I can reach you?
 
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
}
 
Back
Top Bottom