L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::NewNode

0x005c4510 · 325 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIj13ResponseGrouptE6Node_tEtNS2_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE7NewNodeEv

Decompiled

undefined (1 param)

/* CUtlRBTree<CUtlMap<unsigned int, ResponseGroup, unsigned short>::Node_t, unsigned short,
   CUtlMap<unsigned int, ResponseGroup, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int, ResponseGroup, unsigned short>::Node_t, unsigned
   short>, unsigned short> >::NewNode() */

void __thiscall
CUtlRBTree<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::NewNode(CUtlRBTree<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          *this)

{
  int iVar1;
  uint uVar2;
  undefined2 uVar3;
  int iVar4;
  uint uVar5;
  
  if (*(ushort *)(this + 0x14) != 0xffff) {
    iVar4 = *(int *)(this + 4);
    iVar1 = (uint)*(ushort *)(this + 0x14) * 0x20 + iVar4;
    *(undefined2 *)(this + 0x14) = *(undefined2 *)(iVar1 + 2);
    goto LAB_005c4539;
  }
  iVar1 = *(int *)(this + 8);
  if ((int)(uint)*(ushort *)(this + 0x16) < iVar1) {
    uVar5 = *(ushort *)(this + 0x16) + 1;
    uVar2 = uVar5 & 0xffff;
    if (iVar1 <= (int)uVar2) {
      uVar2 = 0xffff;
      uVar5 = 0xffff;
    }
    if (iVar1 <= (int)uVar2) goto LAB_005c45e7;
LAB_005c45b1:
    uVar3 = (undefined2)uVar5;
    iVar1 = (uVar5 & 0xffff) << 5;
  }
  else {
    iVar4 = 0xffff;
    if (0 < iVar1) {
      iVar4 = 0;
    }
    uVar5 = (0 < iVar1) - 1;
    if (iVar4 < iVar1) goto LAB_005c45b1;
LAB_005c45e7:
    CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
    ::Grow((CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,ResponseGroup,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
            *)(this + 4),1);
    iVar4 = *(int *)(this + 8);
    uVar3 = 0xffff;
    if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
      uVar2 = *(ushort *)(this + 0x16) + 1;
      uVar3 = (undefined2)uVar2;
      uVar2 = uVar2 & 0xffff;
      if ((int)uVar2 < iVar4) {
        iVar1 = uVar2 << 5;
      }
      else {
        iVar1 = 0x1fffe0;
        uVar2 = 0xffff;
        uVar3 = 0xffff;
      }
    }
    else {
      uVar2 = 0;
      iVar1 = 0x1fffe0;
      if (iVar4 < 1) {
        uVar2 = 0xffff;
      }
      else {
        iVar1 = 0;
        uVar3 = 0;
      }
    }
    if (iVar4 <= (int)uVar2) {
      Error("CUtlRBTree overflow!\n");
    }
  }
  iVar4 = *(int *)(this + 4);
  *(undefined2 *)(this + 0x16) = uVar3;
  iVar1 = iVar4 + iVar1;
LAB_005c4539:
  if (iVar1 != -8) {
    *(undefined4 *)(iVar1 + 0xc) = 0;
    *(undefined4 *)(iVar1 + 0x10) = 0;
    *(undefined4 *)(iVar1 + 0x14) = 0;
    *(undefined4 *)(iVar1 + 0x18) = 0;
    *(undefined1 *)(iVar1 + 0x1c) = 1;
    *(undefined1 *)(iVar1 + 0x1d) = 0;
    *(undefined1 *)(iVar1 + 0x1e) = 1;
    *(byte *)(iVar1 + 0x1f) = *(byte *)(iVar1 + 0x1f) & 0xe0 | 1;
    iVar4 = *(int *)(this + 4);
  }
  *(int *)(this + 0x18) = iVar4;
  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)