CSave::WriteBasicField
0x004a7b50 · 524 bytes · __thiscall
_ZN5CSave15WriteBasicFieldEPKcPvP9datamap_tP17typedescription_t
Decompiled
undefined (5 params)
/* CSave::WriteBasicField(char const*, void*, datamap_t*, typedescription_t*) */
undefined4 __thiscall
CSave::WriteBasicField
(CSave *this,char *param_1,void *param_2,datamap_t *param_3,typedescription_t *param_4)
{
int iVar1;
undefined4 uVar2;
uint uVar3;
void *local_28;
int local_24;
typedescription_t *local_20;
switch(*(undefined4 *)param_4) {
default:
Warning("Bad field type\n");
uVar2 = 0;
break;
case 1:
(**(code **)(*(int *)this + 0x60))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar2 = 1;
break;
case 2:
(**(code **)(*(int *)this + 0x6c))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar2 = 1;
break;
case 3:
(**(code **)(*(int *)this + 0x74))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar2 = 1;
break;
case 4:
(**(code **)(*(int *)this + 0x7c))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar2 = 1;
break;
case 5:
(**(code **)(*(int *)this + 0x58))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar2 = 1;
break;
case 6:
(**(code **)(*(int *)this + 0x5c))
(this,*(undefined4 *)(param_4 + 4),param_2,*(undefined2 *)(param_4 + 0xc));
uVar2 = 1;
break;
case 7:
iVar1 = *(int *)this;
uVar3 = (uint)*(ushort *)(param_4 + 0xc) * 2;
goto LAB_004a7c8c;
case 8:
iVar1 = *(int *)this;
uVar3 = (uint)*(ushort *)(param_4 + 0xc);
goto LAB_004a7c8c;
case 9:
iVar1 = *(int *)this;
uVar3 = (uint)*(ushort *)(param_4 + 0xc) << 2;
LAB_004a7c8c:
(**(code **)(iVar1 + 100))(this,*(undefined4 *)(param_4 + 4),uVar3,param_2);
return 1;
case 10:
uVar3 = (uint)*(ushort *)(param_4 + 0xc);
if (((byte)param_4[0xe] & 0x40) != 0) {
param_2 = *(void **)param_2;
}
(**(code **)(*(int *)this + 0x1c))(this,*(undefined4 *)(param_4 + 4));
while (uVar3 = uVar3 - 1, uVar3 != 0xffffffff) {
(**(code **)(*(int *)this + 0x14))(this,param_2,*(undefined4 *)(param_4 + 0x20));
param_2 = (void *)((int)param_2 + *(int *)(param_4 + 0x24));
}
goto LAB_004a7d66;
case 0xb:
(**(code **)(*(int *)this + 0x1c))(this,*(undefined4 *)(param_4 + 4));
local_20 = param_4;
local_28 = param_2;
local_24 = (int)param_2 - *(int *)(param_4 + 8);
(**(code **)**(undefined4 **)(param_4 + 0x14))(*(undefined4 **)(param_4 + 0x14),&local_28,this);
LAB_004a7d66:
(**(code **)(*(int *)this + 0x24))(this);
return 1;
case 0x1d:
uVar2 = 1;
}
return uVar2;
}
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.