This release ships 12 new hooks across three layers of the engine.
In-DLL EIP Sampling Profiler
The project's biggest blind spot has been not knowing what is actually hot at runtime — static xref counts measure call sites, not call frequency. A new background thread (THREAD_PRIORITY_IDLE) samples the main thread's EIP every 1ms, buckets each sample to the nearest known function from a 53-entry verified address table, and dumps a top-50 list to Logs\wow_optimize.log on shutdown. Read-only: no hooks into WoW code, no memory writes. Every future optimization is now data-driven instead of a guess.
Render State Deduplication (functional)
The old module initialized a 256-slot cache but never hooked anything. It is now a 3-step MinHook chain: intercept d3d9.dll's Direct3DCreate9, read the IDirect3D9 vtable at runtime to hook CreateDevice, then read the IDirect3DDevice9 vtable to hook the actual SetRenderState function pointer. MinHook patches function prologues, not vtables, so this works identically for native D3D9, DXVK Vulkan wrappers, and d3d9-to-OpenGL stacks. Redundant SetRenderState calls with unchanged values are skipped.
10 New Lua C-API Fast Paths
- lua_gettop at 0x84DBD0 — the engine computes (L->top - L->base) >> 4. Inlined directly with pointer validation and a sanity cap.
- 8 stack push/query hooks in lua_stack_fast.cpp: lua_pushnil, lua_pushinteger, lua_pushboolean, lua_pushlightuserdata, lua_type, lua_isfunction, lua_isstring, lua_tothread. Each resolves plain positive/negative stack indices inline without calling index2adr; pseudo-indices (registry, upvalues) defer to the engine. All are SEH-guarded and check for teardown state. Gated behind TEST_DISABLE_LUA_STACK_FAST.
Event Dispatch Cache (fixed)
sub_81AB60 was hooked with __cdecl and crashed. It is a __thiscall function (verified). Fixed with a __fastcall thunk — the EDX dummy parameter is unused by the original but aligns the calling convention for MinHook. Stats-only pass-through tracking list resize frequency.