CUtlBuffer::GetType<int>
0x002147c0 · 199 bytes · __thiscall
_ZN10CUtlBuffer7GetTypeIiEEvRT_PKc
Decompiled
void (3 params)
/* void CUtlBuffer::GetType<int>(int&, char const*) */
void __thiscall CUtlBuffer::GetType<int>(CUtlBuffer *this,int *param_1,char *param_2)
{
char cVar1;
int *piVar2;
int iVar3;
undefined1 local_10;
undefined1 uStack_f;
undefined1 uStack_e;
undefined1 uStack_d;
if (((byte)this[0x15] & 1) != 0) {
*param_1 = 0;
Scanf(this,param_2,param_1);
return;
}
cVar1 = CheckGet(this,4);
if (cVar1 != '\0') {
if (((byte)this[0x34] & 1) == 0) {
*param_1 = *(int *)(*(int *)this + (*(int *)(this + 0xc) - *(int *)(this + 0x20)));
iVar3 = *(int *)(this + 0xc);
}
else {
iVar3 = *(int *)(this + 0xc);
piVar2 = (int *)((iVar3 - *(int *)(this + 0x20)) + *(int *)this);
if (param_1 != (int *)0x0) {
if (piVar2 == (int *)0x0) {
piVar2 = param_1;
}
_local_10 = CONCAT13((char)*piVar2,
CONCAT12(*(undefined1 *)((int)piVar2 + 1),
CONCAT11(*(undefined1 *)((int)piVar2 + 2),
*(undefined1 *)((int)piVar2 + 3))));
_V_memcpy(param_1,&local_10,4);
iVar3 = *(int *)(this + 0xc);
}
}
*(int *)(this + 0xc) = iVar3 + 4;
return;
}
*param_1 = 0;
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.