L L4D2node

CUtlRBTree<CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::Node_t,unsigned_short,CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert

0x001ac510 · 560 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIN18CNetworkStringDict10CTableItemE23CNetworkStringTableItemtE6Node_tEtNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_tEtEE6InsertERKS5_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<CNetworkStringDict::CTableItem, CNetworkStringTableItem, unsigned
   short>::Node_t, unsigned short, CUtlMap<CNetworkStringDict::CTableItem, CNetworkStringTableItem,
   unsigned short>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<CNetworkStringDict::CTableItem,
   CNetworkStringTableItem, unsigned short>::Node_t, unsigned short>, unsigned short>
   >::Insert(CUtlMap<CNetworkStringDict::CTableItem, CNetworkStringTableItem, unsigned
   short>::Node_t const&) */

ushort __thiscall
CUtlRBTree<CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::Node_t,unsigned_short,CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::Node_t,unsigned_short,CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CNetworkStringDict::CTableItem,CNetworkStringTableItem,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         *this,Node_t *param_1)

{
  ushort uVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  undefined2 *puVar5;
  ushort uVar6;
  int iVar7;
  int local_24;
  ushort local_1e;
  
  uVar1 = *(ushort *)(this + 0x10);
  if (*(ushort *)(this + 0x10) == 0xffff) {
    local_1e = NewNode(this);
    local_24 = (uint)local_1e * 0x34;
    puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar5[2] = 0xffff;
    puVar5[1] = 0xffff;
    *puVar5 = 0xffff;
    puVar5[3] = 0;
  }
  else {
    do {
      uVar6 = uVar1;
      iVar7 = (uint)uVar6 * 0x34;
      cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar7 + 8);
      if (cVar3 == '\0') {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_003415e6 = 0xffff;
          DAT_003415e8 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar2 = false;
        uVar1 = *(ushort *)(*(int *)(this + 4) + 2 + iVar7);
      }
      else {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_003415e6 = 0xffff;
          DAT_003415e8 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar2 = true;
        uVar1 = *(ushort *)(*(int *)(this + 4) + iVar7);
      }
    } while (uVar1 != 0xffff);
    local_1e = NewNode(this);
    local_24 = (uint)local_1e * 0x34;
    puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar5[2] = uVar6;
    puVar5[1] = 0xffff;
    *puVar5 = 0xffff;
    puVar5[3] = 0;
    if (uVar6 != 0xffff) {
      if (bVar2) {
        *(ushort *)(*(int *)(this + 4) + iVar7) = local_1e;
      }
      else {
        *(ushort *)(*(int *)(this + 4) + 2 + iVar7) = local_1e;
      }
      goto LAB_001ac5f8;
    }
  }
  *(ushort *)(this + 0x10) = local_1e;
LAB_001ac5f8:
  InsertRebalance(this,local_1e);
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -8) {
    *(undefined4 *)(local_24 + 8) = *(undefined4 *)param_1;
    CUtlString::CUtlString((CUtlString *)(local_24 + 0xc),(CUtlString *)(param_1 + 4));
    *(undefined4 *)(local_24 + 0x1c) = *(undefined4 *)(param_1 + 0x14);
    *(undefined4 *)(local_24 + 0x20) = *(undefined4 *)(param_1 + 0x18);
    *(undefined4 *)(local_24 + 0x24) = *(undefined4 *)(param_1 + 0x1c);
    *(undefined4 *)(local_24 + 0x28) = *(undefined4 *)(param_1 + 0x20);
    *(undefined4 *)(local_24 + 0x2c) = *(undefined4 *)(param_1 + 0x24);
    *(undefined4 *)(local_24 + 0x30) = *(undefined4 *)(param_1 + 0x28);
  }
  return local_1e;
}

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)