TZip::AddCentral
0x000eee30 · 242 bytes · __thiscall
_ZN4TZip10AddCentralEv
Decompiled
undefined (1 param)
/* TZip::AddCentral() */
undefined4 __thiscall TZip::AddCentral(TZip *this)
{
zlist *pzVar1;
int iVar2;
ulong uVar3;
int iVar4;
zlist *pzVar5;
bool bVar6;
int local_24;
iVar4 = *(int *)(this + 0x10);
if (*(zlist **)(this + 0x28) == (zlist *)0x0) {
local_24 = 0;
uVar3 = 0;
}
else {
bVar6 = true;
local_24 = 0;
pzVar5 = *(zlist **)(this + 0x28);
do {
if (bVar6) {
iVar2 = putcentral(pzVar5,swrite,this);
bVar6 = iVar2 == 0;
}
local_24 = local_24 + 1;
*(int *)(this + 0x10) =
*(int *)(this + 0x10) + *(int *)(pzVar5 + 0x18) + 0x2e + *(int *)(pzVar5 + 0x20) +
*(int *)(pzVar5 + 0x24);
pzVar1 = *(zlist **)(pzVar5 + 0x35c);
if (*(void **)(pzVar5 + 0x140) != (void *)0x0) {
operator_delete__(*(void **)(pzVar5 + 0x140));
}
operator_delete(pzVar5);
pzVar5 = pzVar1;
} while (pzVar1 != (zlist *)0x0);
if (!bVar6) {
return 0x400;
}
uVar3 = *(int *)(this + 0x10) - iVar4;
}
iVar4 = putend(local_24,uVar3,iVar4 + *(int *)(this + 8),0,(char *)0x0,swrite,this);
*(int *)(this + 0x10) = *(int *)(this + 0x10) + 0x16;
if (iVar4 != 0) {
return 0x400;
}
return 0;
}
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.