CDemoFile::ReadUserCmd
0x001314c0 · 255 bytes · __thiscall
_ZN9CDemoFile11ReadUserCmdEPcRi
Decompiled
undefined (3 params)
/* CDemoFile::ReadUserCmd(char*, int&) */
undefined4 __thiscall CDemoFile::ReadUserCmd(CDemoFile *this,char *param_1,int *param_2)
{
char cVar1;
int iVar2;
undefined4 *puVar3;
undefined4 uVar4;
undefined4 local_24;
undefined4 local_20;
if (((byte)this[0x549] & 1) == 0) {
uVar4 = 0;
cVar1 = CUtlBuffer::CheckGet((CUtlBuffer *)(this + 0x534),4);
if (cVar1 != '\0') {
if (((byte)this[0x568] & 1) == 0) {
iVar2 = *(int *)(this + 0x540);
uVar4 = *(undefined4 *)(*(int *)(this + 0x534) + (iVar2 - *(int *)(this + 0x554)));
}
else {
puVar3 = (undefined4 *)
((*(int *)(this + 0x540) - *(int *)(this + 0x554)) + *(int *)(this + 0x534));
if (puVar3 == (undefined4 *)0x0) {
puVar3 = &local_24;
}
local_20 = local_24;
local_20 = CONCAT31((int3)((uint)local_24 >> 8),*(undefined1 *)((int)puVar3 + 3));
local_20._2_2_ = (undefined2)((uint)local_24 >> 0x10);
local_20._0_2_ = CONCAT11(*(undefined1 *)((int)puVar3 + 2),*(undefined1 *)((int)puVar3 + 3))
;
local_20._3_1_ = (undefined1)((uint)local_24 >> 0x18);
local_20._0_3_ = CONCAT12(*(undefined1 *)((int)puVar3 + 1),(undefined2)local_20);
local_20 = CONCAT13(*(undefined1 *)puVar3,(undefined3)local_20);
_V_memcpy(&local_24,&local_20,4);
iVar2 = *(int *)(this + 0x540);
uVar4 = local_24;
}
*(int *)(this + 0x540) = iVar2 + 4;
}
}
else {
local_24 = 0;
CUtlBuffer::Scanf((CUtlBuffer *)(this + 0x534),"%d",&local_24);
uVar4 = local_24;
}
iVar2 = ReadRawData(this,param_1,*param_2);
*param_2 = iVar2;
return uVar4;
}
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.