CResponseSystemSaveRestoreOps::Save
0x005c02b0 · 401 bytes · __thiscall
_ZN29CResponseSystemSaveRestoreOps4SaveERK22SaveRestoreFieldInfo_tP5ISave
Decompiled
undefined (3 params)
/* CResponseSystemSaveRestoreOps::Save(SaveRestoreFieldInfo_t const&, ISave*) */
void __thiscall
CResponseSystemSaveRestoreOps::Save
(CResponseSystemSaveRestoreOps *this,SaveRestoreFieldInfo_t *param_1,ISave *param_2)
{
undefined4 *puVar1;
code *pcVar2;
ushort uVar3;
undefined1 *puVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
uint local_38;
uint local_28;
undefined4 local_24 [5];
puVar1 = (undefined4 *)**(undefined4 **)param_1;
if ((puVar1 != (undefined4 *)0x0) && (puVar1 != &defaultresponsesytem)) {
local_28 = (uint)*(ushort *)((int)puVar1 + 0x1e);
(**(code **)(*(int *)param_2 + 0x2c))(param_2,&local_28,1);
local_38 = 0;
if (0 < (int)local_28) {
do {
(**(code **)(*(int *)param_2 + 0x1c))(param_2,"ResponseGroup");
pcVar2 = *(code **)(*(int *)param_2 + 0x3c);
iVar7 = (local_38 & 0xffff) * 0x20;
local_24[0] = *(undefined4 *)(puVar1[4] + 8 + iVar7);
uVar3 = CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Find((CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)(puVar1 + 10),(Node_t *)local_24);
if (uVar3 == 0xffff) {
puVar4 = &DAT_00d539c2;
}
else {
puVar4 = *(undefined1 **)((uint)uVar3 * 0x10 + puVar1[0xb] + 0xc);
}
(*pcVar2)(param_2,puVar4);
iVar7 = iVar7 + puVar1[4];
(**(code **)(*(int *)param_2 + 0x14))(param_2,iVar7 + 0xc,ResponseGroup::m_DataMap);
local_24[0] = CONCAT22(local_24[0]._2_2_,(short)*(undefined4 *)(iVar7 + 0x14));
iVar8 = 0;
(**(code **)(*(int *)param_2 + 0x28))(param_2,local_24,1);
iVar5 = 0;
if (0 < (short)local_24[0]) {
do {
iVar6 = *(int *)(iVar7 + 0xc);
(**(code **)(*(int *)param_2 + 0x1c))(param_2,"Response");
iVar6 = iVar6 + iVar8;
iVar8 = iVar8 + 0x50;
(**(code **)(*(int *)param_2 + 0x3c))(param_2,*(undefined4 *)(iVar6 + 0x28));
(**(code **)(*(int *)param_2 + 0x14))(param_2,iVar6,Response::m_DataMap);
(**(code **)(*(int *)param_2 + 0x24))(param_2);
iVar5 = iVar5 + 1;
} while (iVar5 < (short)local_24[0]);
}
(**(code **)(*(int *)param_2 + 0x24))(param_2);
local_38 = local_38 + 1;
} while ((int)local_38 < (int)local_28);
}
}
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.