Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.55 KB

readme.md

File metadata and controls

45 lines (32 loc) · 1.55 KB

Matic Hook

This is a simple and minimal hooking library that uses syscalls. It was made to bypass anticheat hooks (e.g., NtProtectVirtualMemory, VirtualProtect) that block access to changing the assembly, rendering libraries like MinHook unusable.

You could also use the .asm file provided in this project to update minhook to work. (VirtualProtect in Minhook)

UC thread: https://www.unknowncheats.me/forum/combat-master/663786-hooks.html

Assembly

(The function is an standard get fov for unity)

Not hooked Not Hook Diagram

Hooked Not Hook Diagram

How to use

void WINAPI hk_weapon_sway_update(void* thisptr) {
    if (modules::noSwayEnabled) {
        //stop weapon sway
        return;
    }

    //return normal function
    return original_weapon_sway_update(thisptr);
}


void main(){
    //init library
    maticHook::init()
    
    //make hook
    lpTarget = (LPVOID)(CombatMaster::GameAssembly + Offsets::WeaponSwayUpdate);
    maticHook::create(lpTarget, hk_weapon_sway_update, reinterpret_cast<void*&>(original_weapon_sway_update));
}

References