L L4D2node

CDmxSerializer::SaveElementDict

0x00be8d60 · 480 bytes · __thiscall

_ZN14CDmxSerializer15SaveElementDictER10CUtlBufferP15CUtlSymbolTableP11CDmxElement

Decompiled

undefined (4 params)

/* CDmxSerializer::SaveElementDict(CUtlBuffer&, CUtlSymbolTable*, CDmxElement*) */

bool __thiscall
CDmxSerializer::SaveElementDict
          (CDmxSerializer *this,CUtlBuffer *param_1,CUtlSymbolTable *param_2,CDmxElement *param_3)

{
  short sVar1;
  char cVar2;
  void *pvVar3;
  int iVar4;
  undefined1 local_22;
  undefined1 uStack_21;
  undefined1 local_20;
  undefined1 uStack_1f;
  undefined2 local_1e;
  
  CDmxElement::GetTypeString(param_3);
  CUtlSymbolTable::Find((char *)&local_1e);
  sVar1 = local_1e;
  if (local_1e != -1) {
    if (((byte)param_1[0x15] & 1) == 0) {
      cVar2 = CUtlBuffer::CheckPut(param_1,2);
      if (cVar2 != '\0') {
        if (((byte)param_1[0x34] & 1) == 0) {
          *(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
               sVar1;
          iVar4 = *(int *)(param_1 + 0x10);
        }
        else {
          iVar4 = *(int *)(param_1 + 0x10);
          pvVar3 = (void *)((iVar4 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
          if (pvVar3 != (void *)0x0) {
            uStack_21 = (undefined1)((ushort)sVar1 >> 8);
            local_22 = (undefined1)sVar1;
            local_1e = CONCAT11(local_22,uStack_21);
            _V_memcpy(pvVar3,&local_1e,2);
            iVar4 = *(int *)(param_1 + 0x10);
          }
        }
        *(int *)(param_1 + 0x10) = iVar4 + 2;
        CUtlBuffer::AddNullTermination(param_1);
      }
    }
    else {
      CUtlBuffer::Printf(param_1,"%d",(int)local_1e);
    }
    CDmxElement::GetName(param_3);
    CUtlSymbolTable::Find((char *)&local_1e);
    sVar1 = local_1e;
    if (local_1e != -1) {
      if (((byte)param_1[0x15] & 1) == 0) {
        cVar2 = CUtlBuffer::CheckPut(param_1,2);
        if (cVar2 != '\0') {
          if (((byte)param_1[0x34] & 1) == 0) {
            *(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
                 sVar1;
            iVar4 = *(int *)(param_1 + 0x10);
          }
          else {
            iVar4 = *(int *)(param_1 + 0x10);
            pvVar3 = (void *)((iVar4 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
            if (pvVar3 != (void *)0x0) {
              uStack_1f = (undefined1)((ushort)sVar1 >> 8);
              local_20 = (undefined1)sVar1;
              local_1e = CONCAT11(local_20,uStack_1f);
              _V_memcpy(pvVar3,&local_1e,2);
              iVar4 = *(int *)(param_1 + 0x10);
            }
          }
          *(int *)(param_1 + 0x10) = iVar4 + 2;
          CUtlBuffer::AddNullTermination(param_1);
        }
      }
      else {
        CUtlBuffer::Printf(param_1,"%d",(int)local_1e);
      }
      pvVar3 = (void *)CDmxElement::GetId(param_3);
      CUtlBuffer::Put(param_1,pvVar3,0x10);
      return param_1[0x14] == (CUtlBuffer)0x0;
    }
  }
  return false;
}

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)