### Install Replacement Hook at Function Pointer Source: https://github.com/shadowninja108/exlaunch/wiki/Hooking Installs the HookClass replacement hook by hooking a provided function pointer. The callback function's signature must match the hooked function to preserve ABI. ```cpp HookClass::InstallAtFuncPtr(nn::oe::SetCopyrightVisibility); ``` -------------------------------- ### Install Replacement Hook at Address Source: https://github.com/shadowninja108/exlaunch/wiki/Hooking Installs the HookClass replacement hook at a specific absolute memory address. This must be called at runtime. ```cpp HookClass::InstallAtPtr(calculated_address); ``` -------------------------------- ### Install Replacement Hook at Offset Source: https://github.com/shadowninja108/exlaunch/wiki/Hooking Installs the HookClass replacement hook at a specific memory offset within the main executable. This must be called at runtime. ```cpp HookClass::InstallAtOffset(0x420420); ``` -------------------------------- ### Define a Replacement Hook Source: https://github.com/shadowninja108/exlaunch/wiki/Hooking Declares a replacement hook named HookClass. The callback function replaces the original function entirely. Arguments are passed directly to the callback. ```cpp HOOK_DEFINE_REPLACE(HookClass) { static int Callback(int arg1, int arg2) { return arg1 + arg2; } }; ``` -------------------------------- ### Define a Trampoline Hook Source: https://github.com/shadowninja108/exlaunch/wiki/Hooking Declares a trampoline hook named HookClass. The original function is preserved and can be called via the 'Orig' alias within the callback. ```cpp HOOK_DEFINE_TRAMPOLINE(HookClass) { static int Callback(int arg1, int arg2) { return Orig(4, 20) + 6 + 9; } }; ``` -------------------------------- ### Define an Inline Hook Source: https://github.com/shadowninja108/exlaunch/wiki/Hooking Declares an inline hook named HookClass. This hook allows access to and modification of caller registers via an exl::hook::InlineCtx pointer. ```cpp HOOK_DEFINE_INLINE(HookClass) { static void Callback(exl::hook::InlineCtx* ctx) { char buf[100]; for(int i = 0; i < 29; i++) { LOG("X%d: %lx", i, ctx->X[i]); } LOG("FP: %lx", ctx->X[29]); LOG("LR: %lx", ctx->X[30]); } }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.