int __stdcall growthAccumulation(LoHook* h, HookContext* c) { _Dwelling_* dw = (_Dwelling_*)(*(int*)(c->ebp - 8) - 28); if(dw->owner_ix >= 0) { *(_word_*)c->edi = *(_word_*)c->edi + (_word_)c->ecx; c->eax = *(int*)c->esi; return NO_EXEC_DEFAULT; } return EXEC_DEFAULT; } ... _PI->WriteLoHook(0x4B87A0, growthAccumulation);