CDeltaBitsWriter::~CDeltaBitsWriter
0x00140df0 · 288 bytes · __thiscall
_ZN16CDeltaBitsWriterD2Ev
Decompiled
undefined (1 param)
/* CDeltaBitsWriter::~CDeltaBitsWriter() */
void __thiscall CDeltaBitsWriter::~CDeltaBitsWriter(CDeltaBitsWriter *this)
{
int *piVar1;
uint uVar2;
int iVar3;
int iVar4;
uint *puVar5;
byte *pbVar6;
piVar1 = *(int **)this;
if (this[8] == (CDeltaBitsWriter)0x0) {
LAB_00140e08:
uVar2 = piVar1[3];
iVar3 = piVar1[2];
}
else {
iVar3 = piVar1[3];
if (iVar3 < piVar1[2]) {
if ((char)piVar1[4] == '\0') {
pbVar6 = (byte *)((iVar3 >> 3) + *piVar1);
*pbVar6 = *pbVar6 & ~(byte)(1 << ((byte)iVar3 & 7));
piVar1[3] = piVar1[3] + 1;
goto LAB_00140ec9;
}
}
else {
*(undefined1 *)(piVar1 + 4) = 1;
LAB_00140ec9:
piVar1 = *(int **)this;
if (this[8] == (CDeltaBitsWriter)0x0) goto LAB_00140e08;
}
uVar2 = piVar1[3];
iVar3 = piVar1[2];
if ((int)uVar2 < iVar3) {
if ((char)piVar1[4] == '\0') {
pbVar6 = (byte *)(((int)uVar2 >> 3) + *piVar1);
*pbVar6 = *pbVar6 & ~(byte)(1 << ((byte)uVar2 & 7));
iVar3 = piVar1[2];
uVar2 = piVar1[3] + 1;
piVar1[3] = uVar2;
}
}
else {
*(undefined1 *)(piVar1 + 4) = 1;
}
}
if ((int)(uVar2 + 0xe) <= iVar3) {
iVar3 = ((int)uVar2 >> 5) * 4;
uVar2 = uVar2 & 0x1f;
puVar5 = (uint *)(*piVar1 + iVar3);
*puVar5 = *puVar5 & *(uint *)(&DAT_003f2dd8 + uVar2 * 0x84) | 0x3fff << (sbyte)uVar2;
iVar4 = 0x20 - uVar2;
if (iVar4 < 0xe) {
puVar5 = (uint *)(*piVar1 + 4 + iVar3);
*puVar5 = (&g_BitWriteMasks)[0xe - iVar4] & *puVar5 | 0x3fffU >> ((byte)iVar4 & 0x1f);
}
piVar1[3] = piVar1[3] + 0xe;
return;
}
piVar1[3] = iVar3;
*(undefined1 *)(piVar1 + 4) = 1;
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.