L L4D2node

CDmxSerializer::SerializeElementArrayAttribute

0x00be8710 · 399 bytes · __thiscall

_ZN14CDmxSerializer30SerializeElementArrayAttributeER10CUtlBufferR27CDmxSerializationDictionaryP13CDmxAttribute

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CDmxSerializer::SerializeElementArrayAttribute(CUtlBuffer&, CDmxSerializationDictionary&,
   CDmxAttribute*) */

void __thiscall
CDmxSerializer::SerializeElementArrayAttribute
          (CDmxSerializer *this,CUtlBuffer *param_1,CDmxSerializationDictionary *param_2,
          CDmxAttribute *param_3)

{
  int iVar1;
  char cVar2;
  int iVar3;
  void *pvVar4;
  int iVar5;
  int *piVar6;
  undefined1 local_24;
  undefined1 uStack_23;
  undefined1 uStack_22;
  undefined1 uStack_21;
  undefined1 local_20;
  undefined1 local_1f;
  undefined1 local_1e;
  undefined1 local_1d;
  
  if (*(int *)param_3 == 0xf) {
    piVar6 = *(int **)(param_3 + 8);
  }
  else {
    if (CDmxAttribute::GetArray<CDmxElement*>()::defaultArray == '\0') {
      iVar3 = __cxa_guard_acquire(&CDmxAttribute::GetArray<CDmxElement*>()::defaultArray);
      if (iVar3 != 0) {
        CDmxAttribute::GetArray<CDmxElement*>()::defaultArray = 0;
        _DAT_0105b0f0 = 0;
        _DAT_0105b0f4 = 0;
        DAT_0105b0f8 = 0;
        _DAT_0105b0fc = 0;
        __cxa_guard_release(&CDmxAttribute::GetArray<CDmxElement*>()::defaultArray);
        __cxa_atexit(CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>>::~CUtlVector,
                     &CDmxAttribute::GetArray<CDmxElement*>()::defaultArray,&__dso_handle);
      }
    }
    piVar6 = &CDmxAttribute::GetArray<CDmxElement*>()::defaultArray;
  }
  iVar3 = piVar6[3];
  if (((byte)param_1[0x15] & 1) == 0) {
    cVar2 = CUtlBuffer::CheckPut(param_1,4);
    if (cVar2 != '\0') {
      if (((byte)param_1[0x34] & 1) == 0) {
        *(int *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) = iVar3;
        iVar5 = *(int *)(param_1 + 0x10);
      }
      else {
        iVar5 = *(int *)(param_1 + 0x10);
        pvVar4 = (void *)((iVar5 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
        if (pvVar4 != (void *)0x0) {
          uStack_21 = (undefined1)((uint)iVar3 >> 0x18);
          local_20 = uStack_21;
          uStack_22 = (undefined1)((uint)iVar3 >> 0x10);
          local_1f = uStack_22;
          uStack_23 = (undefined1)((uint)iVar3 >> 8);
          local_1e = uStack_23;
          local_24 = (undefined1)iVar3;
          local_1d = local_24;
          _V_memcpy(pvVar4,&local_20,4);
          iVar5 = *(int *)(param_1 + 0x10);
        }
      }
      *(int *)(param_1 + 0x10) = iVar5 + 4;
      CUtlBuffer::AddNullTermination(param_1);
    }
  }
  else {
    CUtlBuffer::Printf(param_1,"%d",iVar3);
  }
  if (0 < iVar3) {
    iVar5 = 0;
    do {
      iVar1 = iVar5 * 4;
      iVar5 = iVar5 + 1;
      SerializeElementIndex(this,param_1,param_2,*(CDmxElement **)(*piVar6 + iVar1));
    } while (iVar5 != iVar3);
  }
  return;
}

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)