L L4D2node

CDmxElementDictionary::HookUpElementArrayAttributes

0x00becf60 · 235 bytes · __thiscall

_ZN21CDmxElementDictionary28HookUpElementArrayAttributesEv

Decompiled

undefined (1 param)

/* CDmxElementDictionary::HookUpElementArrayAttributes() */

void __thiscall CDmxElementDictionary::HookUpElementArrayAttributes(CDmxElementDictionary *this)

{
  int iVar1;
  CDmxAttribute *pCVar2;
  CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> *this_00;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  CDmxElement *local_20 [4];
  
  iVar6 = 0;
  iVar5 = 0;
  iVar1 = *(int *)(this + 0x34);
  if (0 < iVar1) {
    do {
      puVar3 = (undefined4 *)(*(int *)(this + 0x28) + iVar5);
      pCVar2 = (CDmxAttribute *)*puVar3;
      if (*(int *)pCVar2 == 0xf) {
        this_00 = *(CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> **)(pCVar2 + 8);
        if (*(char *)(puVar3 + 1) != '\0') goto LAB_00bed02a;
LAB_00becfd7:
        iVar4 = puVar3[2];
      }
      else {
        CDmxAttribute::AllocateDataMemory(pCVar2,0xf);
        puVar3 = *(undefined4 **)(pCVar2 + 8);
        this_00 = (CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> *)0x0;
        if (puVar3 != (undefined4 *)0x0) {
          *puVar3 = 0;
          puVar3[1] = 0;
          puVar3[2] = 0;
          puVar3[3] = 0;
          puVar3[4] = 0;
          this_00 = *(CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> **)(pCVar2 + 8);
        }
        puVar3 = (undefined4 *)(*(int *)(this + 0x28) + iVar5);
        if (*(char *)(puVar3 + 1) == '\0') goto LAB_00becfd7;
LAB_00bed02a:
        iVar4 = FindElement(this,(UniqueId_t *)(puVar3 + 2));
      }
      local_20[0] = (CDmxElement *)0x0;
      if (iVar4 != -1) {
        local_20[0] = *(CDmxElement **)(*(int *)this + iVar4 * 0x14);
      }
      iVar6 = iVar6 + 1;
      iVar5 = iVar5 + 0x18;
      CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>>::InsertBefore
                (this_00,*(int *)(this_00 + 0xc),local_20);
    } while (iVar6 != iVar1);
  }
  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)