L L4D2node

CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>::Insert

0x001920f0 · 474 bytes · __thiscall

_ZN10CUtlRBTreeI10CUtlSymboltPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE6InsertES2_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlSymbol, unsigned short, bool (*)(CUtlSymbol const&, CUtlSymbol const&),
   CUtlMemory<UtlRBTreeNode_t<CUtlSymbol, unsigned short>, unsigned short> >::Insert(CUtlSymbol
   const&) */

uint __thiscall
CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlSymbol,unsigned_short,bool(*)(CUtlSymbol_const&,CUtlSymbol_const&),CUtlMemory<UtlRBTreeNode_t<CUtlSymbol,unsigned_short>,unsigned_short>>
         *this,CUtlSymbol *param_1)

{
  ushort uVar1;
  int iVar2;
  bool bVar3;
  char cVar4;
  int iVar5;
  uint uVar6;
  undefined2 *puVar7;
  uint uVar8;
  int local_24;
  ushort local_1e;
  
  uVar1 = *(ushort *)(this + 0x10);
  if (*(ushort *)(this + 0x10) == 0xffff) {
    uVar6 = NewNode(this);
    uVar8 = uVar6 & 0xffff;
    local_24 = uVar8 * 10;
    puVar7 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar7[2] = 0xffff;
    puVar7[1] = 0xffff;
    *puVar7 = 0xffff;
    puVar7[3] = 0;
  }
  else {
    do {
      local_1e = uVar1;
      iVar2 = (uint)local_1e * 10;
      cVar4 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar2 + 8);
      if (cVar4 == '\0') {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_003412c6 = 0xffff;
          DAT_003412c8 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar3 = false;
        uVar1 = *(ushort *)(*(int *)(this + 4) + 2 + iVar2);
      }
      else {
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar5 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_003412c6 = 0xffff;
          DAT_003412c8 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar3 = true;
        uVar1 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 10);
      }
    } while (uVar1 != 0xffff);
    uVar6 = NewNode(this);
    uVar8 = uVar6 & 0xffff;
    local_24 = uVar8 * 10;
    puVar7 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar7[2] = local_1e;
    puVar7[1] = 0xffff;
    *puVar7 = 0xffff;
    puVar7[3] = 0;
    if (local_1e != 0xffff) {
      if (bVar3) {
        *(short *)(*(int *)(this + 4) + iVar2) = (short)uVar6;
      }
      else {
        *(short *)(*(int *)(this + 4) + 2 + iVar2) = (short)uVar6;
      }
      goto LAB_001921c3;
    }
  }
  *(short *)(this + 0x10) = (short)uVar6;
LAB_001921c3:
  InsertRebalance(this,(ushort)uVar8);
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  if (local_24 + *(int *)(this + 4) != -8) {
    *(undefined2 *)(local_24 + *(int *)(this + 4) + 8) = *(undefined2 *)param_1;
  }
  return uVar6;
}

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)