UnserializeDMX
0x00beae70 · 323 bytes · __cdecl
_Z14UnserializeDMXPKcS0_bPP11CDmxElement
Decompiled
undefined (4 params)
/* UnserializeDMX(char const*, char const*, bool, CDmxElement**) */
undefined4 UnserializeDMX(char *param_1,char *param_2,bool param_3,CDmxElement **param_4)
{
char cVar1;
undefined4 uVar2;
char *pcVar3;
int in_GS_OFFSET;
CUtlStreamBuffer local_270 [20];
char local_25c;
char local_228 [260];
char local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar1 = V_IsAbsolutePath(param_1);
pcVar3 = param_1;
if ((cVar1 == '\0') && (param_2 == (char *)0x0)) {
cVar1 = (**(code **)(*g_pFullFileSystem + 0x90))(g_pFullFileSystem,local_124,0x104);
if (cVar1 != '\0') {
pcVar3 = local_228;
V_ComposeFileName(local_124,param_1,local_228,0x104);
V_RemoveDotSlashes(local_228,'/');
}
}
CUtlStreamBuffer::CUtlStreamBuffer(local_270,pcVar3,param_2,9 - (uint)!param_3,false,0);
if (local_25c == '\0') {
uVar2 = UnserializeDMX((CUtlBuffer *)local_270,param_4,pcVar3);
}
else {
/* try { // try from 00beaef3 to 00beaf35 has its CatchHandler @ 00beafba */
Warning("UnserializeDMX: Unable to open file \"%s\"\n",pcVar3);
uVar2 = 0;
}
CUtlStreamBuffer::~CUtlStreamBuffer(local_270);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.