CDmxSerializer::SerializeElementIndex
0x00be8570 · 329 bytes · __thiscall
_ZN14CDmxSerializer21SerializeElementIndexER10CUtlBufferR27CDmxSerializationDictionaryP11CDmxElement
Decompiled
undefined (4 params)
/* CDmxSerializer::SerializeElementIndex(CUtlBuffer&, CDmxSerializationDictionary&, CDmxElement*) */
void __thiscall
CDmxSerializer::SerializeElementIndex
(CDmxSerializer *this,CUtlBuffer *param_1,CDmxSerializationDictionary *param_2,
CDmxElement *param_3)
{
char cVar1;
undefined4 uVar2;
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 (param_3 == (CDmxElement *)0x0) {
if (((byte)param_1[0x15] & 1) != 0) {
CUtlBuffer::Printf(param_1,"%d",0xffffffff);
return;
}
cVar1 = CUtlBuffer::CheckPut(param_1,4);
if (cVar1 == '\0') {
return;
}
if (((byte)param_1[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
0xffffffff;
iVar3 = *(int *)(param_1 + 0x10);
goto LAB_00be85eb;
}
iVar3 = *(int *)(param_1 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar4 == (void *)0x0) goto LAB_00be85eb;
local_10 = 0xff;
local_f = 0xff;
local_e = 0xff;
local_d = 0xff;
}
else {
uVar2 = CDmxSerializationDictionary::Find(param_2,param_3);
if (((byte)param_1[0x15] & 1) != 0) {
CUtlBuffer::Printf(param_1,"%d",uVar2);
return;
}
cVar1 = CUtlBuffer::CheckPut(param_1,4);
if (cVar1 == '\0') {
return;
}
if (((byte)param_1[0x34] & 1) == 0) {
*(undefined4 *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
uVar2;
iVar3 = *(int *)(param_1 + 0x10);
goto LAB_00be85eb;
}
iVar3 = *(int *)(param_1 + 0x10);
pvVar4 = (void *)((iVar3 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar4 == (void *)0x0) goto LAB_00be85eb;
uStack_11 = (undefined1)((uint)uVar2 >> 0x18);
local_10 = uStack_11;
uStack_12 = (undefined1)((uint)uVar2 >> 0x10);
local_f = uStack_12;
uStack_13 = (undefined1)((uint)uVar2 >> 8);
local_e = uStack_13;
local_14 = (undefined1)uVar2;
local_d = local_14;
}
_V_memcpy(pvVar4,&local_10,4);
iVar3 = *(int *)(param_1 + 0x10);
LAB_00be85eb:
*(int *)(param_1 + 0x10) = iVar3 + 4;
CUtlBuffer::AddNullTermination(param_1);
return;
}
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.