CDmxSerializer::SaveElementDict
0x00be8d60 · 480 bytes · __thiscall
_ZN14CDmxSerializer15SaveElementDictER10CUtlBufferP15CUtlSymbolTableP11CDmxElement
Decompiled
undefined (4 params)
/* CDmxSerializer::SaveElementDict(CUtlBuffer&, CUtlSymbolTable*, CDmxElement*) */
bool __thiscall
CDmxSerializer::SaveElementDict
(CDmxSerializer *this,CUtlBuffer *param_1,CUtlSymbolTable *param_2,CDmxElement *param_3)
{
short sVar1;
char cVar2;
void *pvVar3;
int iVar4;
undefined1 local_22;
undefined1 uStack_21;
undefined1 local_20;
undefined1 uStack_1f;
undefined2 local_1e;
CDmxElement::GetTypeString(param_3);
CUtlSymbolTable::Find((char *)&local_1e);
sVar1 = local_1e;
if (local_1e != -1) {
if (((byte)param_1[0x15] & 1) == 0) {
cVar2 = CUtlBuffer::CheckPut(param_1,2);
if (cVar2 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
sVar1;
iVar4 = *(int *)(param_1 + 0x10);
}
else {
iVar4 = *(int *)(param_1 + 0x10);
pvVar3 = (void *)((iVar4 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar3 != (void *)0x0) {
uStack_21 = (undefined1)((ushort)sVar1 >> 8);
local_22 = (undefined1)sVar1;
local_1e = CONCAT11(local_22,uStack_21);
_V_memcpy(pvVar3,&local_1e,2);
iVar4 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar4 + 2;
CUtlBuffer::AddNullTermination(param_1);
}
}
else {
CUtlBuffer::Printf(param_1,"%d",(int)local_1e);
}
CDmxElement::GetName(param_3);
CUtlSymbolTable::Find((char *)&local_1e);
sVar1 = local_1e;
if (local_1e != -1) {
if (((byte)param_1[0x15] & 1) == 0) {
cVar2 = CUtlBuffer::CheckPut(param_1,2);
if (cVar2 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
sVar1;
iVar4 = *(int *)(param_1 + 0x10);
}
else {
iVar4 = *(int *)(param_1 + 0x10);
pvVar3 = (void *)((iVar4 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar3 != (void *)0x0) {
uStack_1f = (undefined1)((ushort)sVar1 >> 8);
local_20 = (undefined1)sVar1;
local_1e = CONCAT11(local_20,uStack_1f);
_V_memcpy(pvVar3,&local_1e,2);
iVar4 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar4 + 2;
CUtlBuffer::AddNullTermination(param_1);
}
}
else {
CUtlBuffer::Printf(param_1,"%d",(int)local_1e);
}
pvVar3 = (void *)CDmxElement::GetId(param_3);
CUtlBuffer::Put(param_1,pvVar3,0x10);
return param_1[0x14] == (CUtlBuffer)0x0;
}
}
return false;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.