L L4D2node

CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>::NewNode

0x0081c3f0 · 275 bytes · __thiscall

_ZN10CUtlRBTreeIN12CSceneEntity17SpeakEventSound_tEtPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE7NewNodeEv

Decompiled

undefined (1 param)

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

void __thiscall
CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>>
::NewNode(CUtlRBTree<CSceneEntity::SpeakEventSound_t,unsigned_short,bool(*)(CSceneEntity::SpeakEventSound_t_const&,CSceneEntity::SpeakEventSound_t_const&),CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_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) * 0x10 + iVar4;
    *(undefined2 *)(this + 0x14) = *(undefined2 *)(iVar1 + 2);
    goto LAB_0081c419;
  }
  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_0081c48f;
LAB_0081c461:
    uVar3 = (undefined2)uVar5;
    iVar1 = (uVar5 & 0xffff) << 4;
  }
  else {
    iVar4 = 0xffff;
    if (0 < iVar1) {
      iVar4 = 0;
    }
    uVar5 = (0 < iVar1) - 1;
    if (iVar4 < iVar1) goto LAB_0081c461;
LAB_0081c48f:
    CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_t,unsigned_short>,unsigned_short>::Grow
              ((CUtlMemory<UtlRBTreeNode_t<CSceneEntity::SpeakEventSound_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 << 4;
      }
      else {
        iVar1 = 0xffff0;
        uVar2 = 0xffff;
        uVar3 = 0xffff;
      }
    }
    else {
      uVar2 = 0;
      iVar1 = 0xffff0;
      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_0081c419:
  if (iVar1 != -8) {
    *(undefined2 *)(iVar1 + 8) = 0xffff;
    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)