/maticHook

An fork of inthook (Simple hooking library based on interrupt exceptions) with bypass to VirtualProtect/NtProtectVirtualMemory failing using syscalls

Primary LanguageC++MIT LicenseMIT

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
    inthook::init()
    
    //make hook
    lpTarget = (LPVOID)(CombatMaster::GameAssembly + Offsets::WeaponSwayUpdate);
    maticHook::create(lpTarget, hk_weapon_sway_update, reinterpret_cast<void*&>(original_weapon_sway_update));
}

References