-
Notifications
You must be signed in to change notification settings - Fork 0
Hook Catalog
cybersnakeh edited this page Apr 22, 2026
·
2 revisions
This page lists every MinHook detour ZeusMod installs inside
IcarusInternal.dll, along with its target resolution path, calling
convention, and the reason it exists. Use it as a map when reading
Trainer.cpp, TrainerFreeCraft.cpp, and TrainerGiveItem.cpp.
Every hook installation goes through three stages:
-
Resolve the target address. For UFunctions, this is
UObjectLookup::FindNativeFunction(className, funcName)— it walks the UE reflection graph, finds theUFunction, reads itsFuncpointer (the Kismet thunk) and then walks the thunk to the real C++execbody. -
Register the detour with MinHook.
MH_STATUS s = MH_CreateHook(target, &DetourFn, &g_origFn); if (s != MH_OK) return; MH_EnableHook(target);
- Log the hook so the in-game console shows the target address and the detour symbol, for post-mortem analysis.
A dedicated InstallXHook() function lives next to each cheat's
Trainer::X bool. It is idempotent — safe to call again if the cheat
is toggled off and back on.
Legend:
- Cheat — the UI toggle / wire command that owns the hook.
- Target — the function we replace.
- Resolution — how we find it at runtime.
- Installed at — when the detour goes in.
| Field | Value |
|---|---|
| Cheat | godmode |
| Target signature | void SurvivalCharacter::SetHealth(float NewHealth) |
| Resolution | FindNativeFunction("SurvivalCharacter", "SetHealth") |
| Installed at | First time godmode:1 is received |
| Detour behaviour | Ignores the incoming value, keeps the character at MaxHealth. |
| Field | Value |
|---|---|
| Cheat | weight |
| Target signature | bool IcarusFunctionLibrary::AddModifierState(UObject* Parent, FModifierStateRowHandle InModifier, UObject* Causer, UObject* Instigator, float Effectiveness) |
| Resolution | FindNativeFunction("IcarusFunctionLibrary", "AddModifierState") |
| Installed at | First time weight:1 is received |
| Detour behaviour | Reads InModifier +0x08 (RowName FName ComparisonIndex). If the resolved string is "Overburdened" and Trainer::NoWeight == true, returns false without calling the original. Otherwise forwards to g_origAddModifierState. |
| Notes | Replaces the earlier MaxWalkSpeed clamp + ExpireOverburdenedModifier pair, which caused a PhysX-tick AV. Hooking at the source is both correct and stable. |
| Field | Value |
|---|---|
| Cheat | craft |
| Target signature | bool UCraftingSystem::CanQueueItem(UInventory* Inventory, FRecipeQuery Query) |
| Resolution | FindNativeFunction("CraftingSystem", "CanQueueItem") |
| Installed at | First time craft:1 is received |
| Detour behaviour | If Inventory is the local player's own backpack, returns true without evaluating the recipe. Deployable inventories (benches, processors) fall through to the original. |
| Field | Value |
|---|---|
| Cheat | craft |
| Target signature |
bool UCraftingSystem::HasSufficientResource(...) / UCraftingSystem::GetResourceRecipeValidity(...)
|
| Resolution | By name, same class as above. |
| Installed at | First time craft:1 is received |
| Detour behaviour | Returns the "yes" branch when the inventory is player-owned. |
| Field | Value |
|---|---|
| Cheat | craft |
| Target signature | bool UCraftingSystem::CanSatisfyRecipeQueryInput(...) |
| Resolution | By name. |
| Installed at | First time craft:1 is received |
| Detour behaviour | Same as above — short-circuits the last remaining validator. |
| Field | Value |
|---|---|
| Cheat | craft |
| Target | UCraftingSystem::AddProcessingRecipe(...) |
| Resolution | By name. |
| Installed at | First time craft:1 is received |
| Detour behaviour | After the game's own ValidateQueueItem runs, the detour walks the unreflected DeployableTickSubsystem +0x60 active-processor TArray and injects a valid FWeakObjectPtr{ObjectIndex, SerialNumber} referring to the queued recipe, so the Process tick can pick it up. Also pre-populates ProcessingItem +0x1C0 with the queued slot so Process advances progress from frame 1. |
| Field | Value |
|---|---|
| Cheat | items |
| Target signature | void UInventory::ConsumeItem(int32 Slot, int32 Amount) |
| Resolution | FindNativeFunction("Inventory", "ConsumeItem") |
| Installed at | First time items:1 is received |
| Detour behaviour | For the local player's inventory, returns immediately without decrementing. Deployables fall through. |
| Field | Value |
|---|---|
| Cheat | (was part of early Infinite Items before we had the player-owned-inventory filter) |
| Status |
No longer hooked. Kept in UObjectLookup resolution as reference symbols but not detoured. |
| Field | Value |
|---|---|
| Cheat | (infrastructure — always installed) |
| Target |
IDXGISwapChain::Present slot in the D3D11 swap-chain vtable |
| Resolution | D3D11 device enumeration + vtable read (no UE reflection involved) |
| Installed at | Trainer boot |
| Detour behaviour | Runs ImGui's NewFrame / EndFrame / RenderDrawData around the real Present to draw the in-game menu. Captures input via a WindowProc hook. |
- Toggle every cheat off (releases any tick-scoped allocations).
-
MH_DisableHook(MH_ALL_HOOKS)— restore the original bytes. -
MH_Uninitialize()— release the MinHook trampoline pool. - Tear down the ImGui overlay (Present / WndProc).
- Close the named-pipe servers.
-
FreeLibraryreturns — the game process keeps running exactly as it would have without the trainer.
- Add a resolution symbol in
TrainerResolve.cppnext to the existingFindNativeFunctioncalls, so the target is located at boot even if the cheat is off by default. - Add a detour function in the matching cheat file (
Trainer.cpp,TrainerFreeCraft.cpp, orTrainerGiveItem.cpp). Keep the detour minimal — if you need to construct C++ objects, put the SEH probe in a separate helper (C2712 rule). - Register an
InstallXHook()function alongside the existing ones, and call it from the cheat-toggle path when the bool flips on. - Update Hook Catalog and Feature Reference.
-
Reflection Internals — how
FindNativeFunctionwalks thunks. -
Memory Layout — struct offsets referenced above (
FModifierStateRowHandle,DeployableTickSubsystem +0x60, etc.). - Feature Reference — player-visible effect for each hook.