SpewLinks
0x00475330 · 419 bytes · unknown
_Z9SpewLinksv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* SpewLinks() */
void SpewLinks(void)
{
uint *puVar1;
uint uVar2;
CBaseEntity *this;
uint *puVar3;
undefined4 uVar4;
undefined1 *puVar5;
undefined *puVar6;
int iVar7;
int iVar8;
undefined1 *puVar9;
int local_28;
this = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0)
;
local_28 = 0;
do {
if (this == (CBaseEntity *)0x0) {
return;
}
puVar3 = (uint *)CBaseEntity::GetDataObject(this,1);
if (puVar3 != (uint *)0x0) {
for (puVar1 = (uint *)puVar3[2]; puVar3 != puVar1; puVar1 = (uint *)puVar1[2]) {
iVar8 = 0;
local_28 = local_28 + 1;
uVar2 = *puVar1;
if (((uVar2 != 0xffffffff) &&
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar6 + 8) == uVar2 >> 0xc)) {
iVar8 = *(int *)(puVar6 + 4);
}
puVar5 = *(undefined1 **)(iVar8 + 0x7c);
if (puVar5 == (undefined1 *)0x0) {
puVar5 = &DAT_00d539c2;
}
if (((uVar2 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar2 >> 0xc)) {
iVar8 = _DAT_00000030;
if (_DAT_00000030 != 0) goto LAB_004753da;
LAB_004754b0:
iVar8 = 0;
}
else {
iVar8 = *(int *)(*(int *)(puVar6 + 4) + 0x30);
if (iVar8 == 0) goto LAB_004754b0;
LAB_004753da:
iVar8 = iVar8 - *(int *)(gpGlobals + 0x58) >> 4;
}
puVar9 = *(undefined1 **)(this + 0x7c);
if (puVar9 == (undefined1 *)0x0) {
puVar9 = &DAT_00d539c2;
}
if (*(int *)(this + 0x30) == 0) {
iVar7 = 0;
}
else {
iVar7 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
uVar4 = CBaseEntity::IsDormant(this);
Msg("[%d] (%d) Link %d (%s) -> %d (%s)\n",local_28,uVar4,iVar7,puVar9,iVar8,puVar5);
}
}
this = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,this);
} while( true );
}
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.