L L4D2node

CUtlRBTree<CUtlString,unsigned_short,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,unsigned_short>,unsigned_short>>::NewNode

0x0061c390 · 267 bytes · __thiscall

_ZN10CUtlRBTreeI10CUtlStringtPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE7NewNodeEv

Decompiled

undefined (1 param)

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

uint __thiscall
CUtlRBTree<CUtlString,unsigned_short,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,unsigned_short>,unsigned_short>>
::NewNode(CUtlRBTree<CUtlString,unsigned_short,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,unsigned_short>,unsigned_short>>
          *this)

{
  ushort uVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  
  uVar1 = *(ushort *)(this + 0x14);
  uVar5 = (uint)uVar1;
  if (uVar1 != 0xffff) {
    iVar4 = *(int *)(this + 4);
    iVar6 = iVar4 + (uint)uVar1 * 0x18;
    *(undefined2 *)(this + 0x14) = *(undefined2 *)(iVar6 + 2);
    goto LAB_0061c3ba;
  }
  iVar6 = *(int *)(this + 8);
  if ((int)(uint)*(ushort *)(this + 0x16) < iVar6) {
    uVar2 = *(ushort *)(this + 0x16) + 1;
    uVar3 = uVar2 & 0xffff;
    if (iVar6 <= (int)uVar3) {
      uVar2 = uVar5;
      uVar3 = 0xffff;
    }
    if (iVar6 <= (int)uVar3) goto LAB_0061c437;
LAB_0061c407:
    iVar6 = (uVar2 & 0xffff) * 0x18;
    uVar5 = uVar2;
  }
  else {
    iVar4 = 0;
    if (iVar6 < 1) {
      iVar4 = 0xffff;
    }
    uVar2 = (0 < iVar6) - 1;
    if (iVar4 < iVar6) goto LAB_0061c407;
LAB_0061c437:
    CUtlMemory<UtlRBTreeNode_t<CUtlString,unsigned_short>,unsigned_short>::Grow
              ((CUtlMemory<UtlRBTreeNode_t<CUtlString,unsigned_short>,unsigned_short> *)(this + 4),1
              );
    iVar4 = *(int *)(this + 8);
    if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
      uVar2 = *(ushort *)(this + 0x16) + 1;
      uVar3 = uVar2 & 0xffff;
      if ((int)uVar3 < iVar4) {
        iVar6 = uVar3 * 0x18;
        uVar5 = uVar2;
      }
      else {
        iVar6 = 0x17ffe8;
        uVar3 = 0xffff;
      }
    }
    else {
      uVar3 = 0;
      iVar6 = 0x17ffe8;
      if (iVar4 < 1) {
        uVar3 = 0xffff;
      }
      else {
        iVar6 = 0;
        uVar5 = 0;
      }
    }
    if (iVar4 <= (int)uVar3) {
      Error("CUtlRBTree overflow!\n");
    }
  }
  iVar4 = *(int *)(this + 4);
  *(short *)(this + 0x16) = (short)uVar5;
  iVar6 = iVar4 + iVar6;
LAB_0061c3ba:
  if ((CUtlString *)(iVar6 + 8) != (CUtlString *)0x0) {
    CUtlString::CUtlString((CUtlString *)(iVar6 + 8));
    iVar4 = *(int *)(this + 4);
  }
  *(int *)(this + 0x18) = iVar4;
  return uVar5;
}

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)