CEntityTouchManager::FrameUpdatePostEntityThink
0x0067d870 · 577 bytes · __thiscall
_ZN19CEntityTouchManager26FrameUpdatePostEntityThinkEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CEntityTouchManager::FrameUpdatePostEntityThink() */
void __thiscall CEntityTouchManager::FrameUpdatePostEntityThink(CEntityTouchManager *this)
{
int iVar1;
undefined4 uVar2;
int iVar3;
code *pcVar4;
char cVar5;
int iVar6;
int iVar7;
int *piVar8;
int in_GS_OFFSET;
undefined4 uStackY_70;
int local_30 [4];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_30[0] = 0;
if (___atan2f_finite == 0) {
local_30[3] = 0;
}
else {
uStackY_70 = 0x67d8ff;
(**(code **)(___atan2f_finite + 0x50))();
local_30[3] = ___atan2f_finite;
}
iVar1 = _DAT_0105db00;
local_30[2] = local_30[0];
local_30[1] = 0;
if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
/* try { // try from 0067da0e to 0067da5c has its CatchHandler @ 0067dae9 */
uStackY_70 = 0x67da13;
iVar6 = ThreadGetCurrentId();
if (iVar1 == iVar6) {
if ((char *)*_DAT_0105d15c != "CEntityTouchManager::FrameUpdatePostEntityThink") {
uStackY_70 = 0x67da50;
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc78374,(char *)0x1,0xbfafa1);
}
uStackY_70 = 0x67da5d;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
}
iVar1 = *(int *)(this + 0x10);
piVar8 = (int *)&stack0xffffff94;
if (iVar1 != 0) {
iVar6 = -((iVar1 * 4 + 0xfU & 0xfffffff0) + 0x10);
uVar2 = *(undefined4 *)(this + 4);
*(int *)(&stack0xffffff9c + iVar6) = iVar1 * 4;
*(int *)(&stack0xffffff94 + iVar6) = (int)local_30 + iVar6;
*(undefined4 *)(&stack0xffffff98 + iVar6) = uVar2;
*(undefined4 *)((int)&uStackY_70 + iVar6) = 0x67d962;
memcpy(*(void **)(&stack0xffffff94 + iVar6),*(void **)(&stack0xffffff98 + iVar6),
*(size_t *)(&stack0xffffff9c + iVar6));
*(undefined4 *)(this + 0x10) = 0;
piVar8 = (int *)(&stack0xffffff94 + iVar6);
if (0 < iVar1) {
iVar7 = 0;
do {
while (iVar3 = *(int *)((int)local_30 + iVar6 + iVar7 * 4),
(*(byte *)(iVar3 + 0x14f) & 1) == 0) {
iVar7 = iVar7 + 1;
piVar8 = (int *)(&stack0xffffff94 + iVar6);
if (iVar7 == iVar1) goto LAB_0067d9a0;
}
*(int *)(&stack0xffffff94 + iVar6) = iVar3;
/* try { // try from 0067d98e to 0067d992 has its CatchHandler @ 0067dac3 */
*(undefined4 *)((int)&uStackY_70 + iVar6) = 0x67d993;
CBaseEntity::PhysicsCheckForEntityUntouch(*(CBaseEntity **)(&stack0xffffff94 + iVar6));
iVar7 = iVar7 + 1;
piVar8 = (int *)(&stack0xffffff94 + iVar6);
} while (iVar7 != iVar1);
}
}
LAB_0067d9a0:
iVar1 = _DAT_0105db00;
if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
piVar8[-1] = 0x67da7b;
iVar6 = ThreadGetCurrentId();
if (iVar1 == iVar6) {
*piVar8 = (int)_DAT_0105d15c;
piVar8[-1] = 0x67da90;
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
}
iVar6 = local_30[3];
iVar1 = local_30[1];
if (local_30[3] != 0) {
piVar8[5] = 0;
iVar7 = local_30[2];
piVar8[4] = 0;
piVar8[3] = 0;
*piVar8 = iVar6;
piVar8[1] = iVar1;
piVar8[2] = iVar7;
pcVar4 = *(code **)(iVar6 + 0x54);
piVar8[-1] = 0x67d9ed;
(*pcVar4)();
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
piVar8[-1] = (int)&LAB_0067dae9;
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.