CDmxSerializer::GetStringOffsetTable
0x00be91c0 · 153 bytes · __thiscall
_ZN14CDmxSerializer20GetStringOffsetTableER10CUtlBufferPii
Decompiled
undefined (4 params)
/* CDmxSerializer::GetStringOffsetTable(CUtlBuffer&, int*, int) */
int __thiscall
CDmxSerializer::GetStringOffsetTable
(CDmxSerializer *this,CUtlBuffer *param_1,int *param_2,int param_3)
{
char cVar1;
char *pcVar2;
char *pcVar3;
int iVar4;
int local_20;
local_20 = *(int *)(param_1 + 0x1c) - *(int *)(param_1 + 0xc);
pcVar2 = (char *)((*(int *)(param_1 + 0xc) - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (param_3 < 1) {
return 0;
}
iVar4 = 0;
pcVar3 = pcVar2;
do {
param_2[iVar4] = (int)pcVar3 - (int)pcVar2;
do {
if ((int)pcVar3 - (int)pcVar2 < local_20) {
cVar1 = *pcVar3;
}
else {
pcVar2 = (char *)CUtlBuffer::PeekGet(param_1,local_20 + 1,0);
if (pcVar2 == (char *)0x0) {
return 0;
}
pcVar3 = pcVar2 + local_20;
local_20 = *(int *)(param_1 + 0x1c) - *(int *)(param_1 + 0xc);
cVar1 = *pcVar3;
}
pcVar3 = pcVar3 + 1;
} while (cVar1 != '\0');
iVar4 = iVar4 + 1;
} while (iVar4 != param_3);
return (int)pcVar3 - (int)pcVar2;
}
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.