L L4D2node

SerializeDMX

0x00bea2c0 · 321 bytes · __cdecl

_Z12SerializeDMXPKcS0_bP11CDmxElement

Decompiled

undefined (4 params)

/* SerializeDMX(char const*, char const*, bool, CDmxElement*) */

undefined4 SerializeDMX(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,(uint)param_3,false,0);
  if (local_25c == '\0') {
    uVar2 = SerializeDMX((CUtlBuffer *)local_270,param_4,pcVar3);
  }
  else {
                    /* try { // try from 00bea33e to 00bea385 has its CatchHandler @ 00bea40a */
    Warning("SerializeDMX: Unable to open file \"%s\"\n",pcVar3);
    uVar2 = 1;
  }
  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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)