CRestore::ReadBasicField
0x004a9240 · 554 bytes · __thiscall
_ZN8CRestore14ReadBasicFieldERK25SaveRestoreRecordHeader_tPvP9datamap_tP17typedescription_t
Decompiled
undefined (5 params)
/* CRestore::ReadBasicField(SaveRestoreRecordHeader_t const&, void*, datamap_t*, typedescription_t*)
*/
void __thiscall
CRestore::ReadBasicField
(CRestore *this,SaveRestoreRecordHeader_t *param_1,void *param_2,datamap_t *param_3,
typedescription_t *param_4)
{
ushort uVar1;
code *pcVar2;
int iVar3;
uint uVar4;
void *local_28;
int local_24;
typedescription_t *local_20;
switch(*(undefined4 *)param_4) {
default:
Warning("Bad field type\n");
break;
case 1:
(**(code **)(*(int *)this + 0x44))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 2:
(**(code **)(*(int *)this + 0x50))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 3:
(**(code **)(*(int *)this + 0x58))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 4:
(**(code **)(*(int *)this + 0x60))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 5:
case 9:
(**(code **)(*(int *)this + 0x38))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
return;
case 6:
(**(code **)(*(int *)this + 0x40))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 7:
(**(code **)(*(int *)this + 0x34))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 8:
(**(code **)(*(int *)this + 0x48))
(this,param_2,*(undefined2 *)(param_4 + 0xc),*(undefined2 *)param_1);
break;
case 10:
if ((((byte)param_4[0xe] & 0x40) == 0) || (param_2 = *(void **)param_2, param_2 != (void *)0x0))
{
uVar4 = (uint)*(ushort *)(param_4 + 0xc);
while (uVar4 = uVar4 - 1, uVar4 != 0xffffffff) {
(**(code **)(*(int *)this + 8))(this,param_2,*(undefined4 *)(param_4 + 0x20));
param_2 = (void *)((int)param_2 + *(int *)(param_4 + 0x24));
}
}
else {
pcVar2 = (code *)(*(undefined4 **)this)[1];
iVar3 = (*(code *)**(undefined4 **)this)(this);
(*pcVar2)(this,iVar3 + (uint)*(ushort *)param_1);
Warning("Attempted to restore FIELD_EMBEDDEDBYREF %s but there is no destination memory\n",
*(undefined4 *)(param_4 + 4));
}
break;
case 0xb:
iVar3 = (*(code *)**(undefined4 **)this)(this);
local_20 = param_4;
uVar1 = *(ushort *)param_1;
local_28 = param_2;
local_24 = (int)param_2 - *(int *)(param_4 + 8);
(**(code **)(**(int **)(param_4 + 0x14) + 4))(*(int **)(param_4 + 0x14),&local_28,this);
(**(code **)(*(int *)this + 4))(this,iVar3 + (uint)uVar1);
break;
case 0x1d:
break;
}
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.