Serialize
0x00bf1fa0 · 200 bytes · __cdecl
_Z9SerializeR10CUtlBufferRKi
Decompiled
undefined (2 params)
/* Serialize(CUtlBuffer&, int const&) */
bool Serialize(CUtlBuffer *param_1,int *param_2)
{
int iVar1;
char cVar2;
int iVar3;
void *pvVar4;
undefined1 local_14;
undefined1 uStack_13;
undefined1 uStack_12;
undefined1 uStack_11;
undefined1 local_10;
undefined1 local_f;
undefined1 local_e;
undefined1 local_d;
if (((byte)param_1[0x15] & 1) == 0) {
iVar1 = *param_2;
cVar2 = CUtlBuffer::CheckPut(param_1,4);
if (cVar2 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(int *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = iVar1;
iVar3 = *(int *)(param_1 + 0x10);
}
else {
iVar3 = *(int *)(param_1 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar4 != (void *)0x0) {
uStack_11 = (undefined1)((uint)iVar1 >> 0x18);
local_10 = uStack_11;
uStack_12 = (undefined1)((uint)iVar1 >> 0x10);
local_f = uStack_12;
uStack_13 = (undefined1)((uint)iVar1 >> 8);
local_e = uStack_13;
local_14 = (undefined1)iVar1;
local_d = local_14;
_V_memcpy(pvVar4,&local_10,4);
iVar3 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(param_1);
}
return param_1[0x14] == (CUtlBuffer)0x0;
}
CUtlBuffer::Printf(param_1,"%d",*param_2);
return param_1[0x14] == (CUtlBuffer)0x0;
}
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.