TZip::read
0x000ee310 · 116 bytes · __thiscall
_ZN4TZip4readEPcj
Decompiled
undefined (3 params)
/* TZip::read(char*, unsigned int) */
uint __thiscall TZip::read(TZip *this,char *param_1,uint param_2)
{
uint uVar1;
uint __n;
undefined4 uVar2;
if (*(int *)(this + 0x58) != 0) {
uVar1 = *(uint *)(this + 0x60);
__n = 0;
if (uVar1 < *(uint *)(this + 0x5c)) {
__n = *(uint *)(this + 0x5c) - uVar1;
if (param_2 <= __n) {
__n = param_2;
}
memcpy(param_1,(void *)(uVar1 + *(int *)(this + 0x58)),__n);
*(uint *)(this + 0x60) = *(int *)(this + 0x60) + __n;
*(uint *)(this + 0x48) = *(int *)(this + 0x48) + __n;
uVar2 = crc32(*(ulong *)(this + 0x4c),(uchar *)param_1,__n);
*(undefined4 *)(this + 0x4c) = uVar2;
}
return __n;
}
*(undefined4 *)(this + 0xc) = 0x1000000;
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.