CThinkContextsSaveDataOps::Restore
0x00618170 · 317 bytes · __thiscall
_ZN25CThinkContextsSaveDataOps7RestoreERK22SaveRestoreFieldInfo_tP8IRestore
Decompiled
undefined (3 params)
/* CThinkContextsSaveDataOps::Restore(SaveRestoreFieldInfo_t const&, IRestore*) */
void __thiscall
CThinkContextsSaveDataOps::Restore
(CThinkContextsSaveDataOps *this,SaveRestoreFieldInfo_t *param_1,IRestore *param_2)
{
undefined4 *puVar1;
int *piVar2;
int *piVar3;
code *pcVar4;
undefined4 uVar5;
uint uVar6;
int iVar7;
char local_29;
int *local_28;
undefined4 local_24;
undefined4 local_20;
piVar2 = *(int **)param_1;
if ((CUtlVectorDataopsInstantiator<10>::
GetDataOps<CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>>(CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>*)
::ops == '\0') &&
(iVar7 = __cxa_guard_acquire(&CUtlVectorDataopsInstantiator<10>::
GetDataOps<CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>>(CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>*)
::ops), iVar7 != 0)) {
CUtlVectorDataopsInstantiator<10>::
GetDataOps<CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>>(CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>*)
::ops = &PTR_Save_00c60d38;
__cxa_guard_release(&CUtlVectorDataopsInstantiator<10>::
GetDataOps<CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>>(CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>*)
::ops);
}
local_24 = 0;
local_20 = 0;
local_28 = piVar2;
(*(code *)CUtlVectorDataopsInstantiator<10>::
GetDataOps<CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>>(CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>*)
::ops[1])(&CUtlVectorDataopsInstantiator<10>::
GetDataOps<CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>>(CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>*)
::ops,&local_28,param_2);
piVar3 = *(int **)(param_1 + 4);
iVar7 = 0;
(**(code **)(*(int *)param_2 + 0x1c))(param_2);
if (0 < piVar2[3]) {
do {
while( true ) {
(**(code **)(*(int *)param_2 + 0x40))(param_2,&local_29,1,0);
puVar1 = (undefined4 *)(*piVar2 + iVar7 * 0x14);
if (local_29 == '\0') break;
iVar7 = iVar7 + 1;
(**(code **)(*(int *)param_2 + 0x24))(param_2,&local_28);
uVar6 = (uint)local_28 & 0xffff;
pcVar4 = *(code **)(*(int *)param_2 + 0x74);
uVar5 = (**(code **)(*piVar3 + 0x30))(piVar3);
(*pcVar4)(param_2,uVar5,puVar1,1,uVar6);
if (piVar2[3] <= iVar7) goto LAB_00618271;
}
*puVar1 = 0;
iVar7 = iVar7 + 1;
} while (iVar7 < piVar2[3]);
}
LAB_00618271:
(**(code **)(*(int *)param_2 + 0x20))(param_2);
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.