L L4D2node

CUtlRBTree<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::NewNode

0x006cf9b0 · 349 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKc22BasicGameStatsRecord_ttE6Node_tEtNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_tEtEE7NewNodeEv

Decompiled

undefined (1 param)

/* CUtlRBTree<CUtlMap<char const*, BasicGameStatsRecord_t, unsigned short>::Node_t, unsigned short,
   CUtlMap<char const*, BasicGameStatsRecord_t, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*, BasicGameStatsRecord_t, unsigned short>::Node_t,
   unsigned short>, unsigned short> >::NewNode() */

uint __thiscall
CUtlRBTree<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::NewNode(CUtlRBTree<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
          *this)

{
  ushort uVar1;
  uint uVar2;
  uint uVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  
  uVar1 = *(ushort *)(this + 0x14);
  uVar6 = (uint)uVar1;
  if (uVar1 != 0xffff) {
    iVar5 = *(int *)(this + 4);
    iVar4 = (uint)uVar1 * 0x34 + iVar5;
    *(undefined2 *)(this + 0x14) = *(undefined2 *)(iVar4 + 2);
    goto LAB_006cf9de;
  }
  iVar4 = *(int *)(this + 8);
  if ((int)(uint)*(ushort *)(this + 0x16) < iVar4) {
    uVar2 = *(ushort *)(this + 0x16) + 1;
    uVar3 = uVar2 & 0xffff;
    if (iVar4 <= (int)uVar3) {
      uVar2 = uVar6;
      uVar3 = 0xffff;
    }
    if (iVar4 <= (int)uVar3) goto LAB_006cfa9f;
LAB_006cfa67:
    iVar4 = (uVar2 & 0xffff) * 0x34;
    uVar6 = uVar2;
  }
  else {
    iVar5 = 0;
    if (iVar4 < 1) {
      iVar5 = 0xffff;
    }
    uVar2 = (0 < iVar4) - 1;
    if (iVar5 < iVar4) goto LAB_006cfa67;
LAB_006cfa9f:
    CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
    ::Grow((CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,BasicGameStatsRecord_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
            *)(this + 4),1);
    iVar5 = *(int *)(this + 8);
    if ((int)(uint)*(ushort *)(this + 0x16) < iVar5) {
      uVar2 = *(ushort *)(this + 0x16) + 1;
      uVar3 = uVar2 & 0xffff;
      if ((int)uVar3 < iVar5) {
        iVar4 = uVar3 * 0x34;
        uVar6 = uVar2;
      }
      else {
        iVar4 = 0x33ffcc;
        uVar3 = 0xffff;
      }
    }
    else {
      uVar3 = 0;
      iVar4 = 0x33ffcc;
      if (iVar5 < 1) {
        uVar3 = 0xffff;
      }
      else {
        iVar4 = 0;
        uVar6 = 0;
      }
    }
    if (iVar5 <= (int)uVar3) {
      Error("CUtlRBTree overflow!\n");
    }
  }
  iVar5 = *(int *)(this + 4);
  *(short *)(this + 0x16) = (short)uVar6;
  iVar4 = iVar5 + iVar4;
LAB_006cf9de:
  if (iVar4 != -8) {
    *(undefined4 *)(iVar4 + 0xc) = 0;
    *(undefined4 *)(iVar4 + 0x10) = 0;
    *(undefined4 *)(iVar4 + 0x14) = 0;
    *(undefined4 *)(iVar4 + 0x18) = 0;
    *(undefined4 *)(iVar4 + 0x1c) = 0;
    *(undefined1 *)(iVar4 + 0x2c) = 1;
    *(undefined1 *)(iVar4 + 0x2d) = 0;
    *(undefined4 *)(iVar4 + 0x30) = 0;
    _V_memset((void *)(iVar4 + 0x20),0,0xc);
    iVar5 = *(int *)(this + 4);
  }
  *(int *)(this + 0x18) = iVar5;
  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)