L L4D2node

CUtlRBTree<CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert

0x0052f0c0 · 753 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIfN28CTraceBulletEntityEnumerator13BulletTrace_tEtE6Node_tEtNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_tEtEE6InsertERKS4_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<float, CTraceBulletEntityEnumerator::BulletTrace_t, unsigned short>::Node_t,
   unsigned short, CUtlMap<float, CTraceBulletEntityEnumerator::BulletTrace_t, unsigned
   short>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<float,
   CTraceBulletEntityEnumerator::BulletTrace_t, unsigned short>::Node_t, unsigned short>, unsigned
   short> >::Insert(CUtlMap<float, CTraceBulletEntityEnumerator::BulletTrace_t, unsigned
   short>::Node_t const&) */

ushort __thiscall
CUtlRBTree<CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::Node_t,unsigned_short,CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<float,CTraceBulletEntityEnumerator::BulletTrace_t,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
         *this,Node_t *param_1)

{
  undefined4 uVar1;
  ushort uVar2;
  bool bVar3;
  char cVar4;
  int iVar5;
  undefined2 *puVar6;
  int iVar7;
  ushort uVar8;
  int local_24;
  ushort local_1e;
  
  uVar2 = *(ushort *)(this + 0x10);
  if (*(ushort *)(this + 0x10) == 0xffff) {
    local_1e = NewNode(this);
    local_24 = (uint)local_1e * 0x68;
    puVar6 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar6[2] = 0xffff;
    puVar6[1] = 0xffff;
    *puVar6 = 0xffff;
    puVar6[3] = 0;
  }
  else {
    do {
      uVar8 = uVar2;
      iVar7 = (uint)uVar8 * 0x68;
      cVar4 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar7 + 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_00f1d16a = 0xffff;
          DAT_00f1d16c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar3 = false;
        uVar2 = *(ushort *)(*(int *)(this + 4) + 2 + iVar7);
      }
      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_00f1d16a = 0xffff;
          DAT_00f1d16c = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        bVar3 = true;
        uVar2 = *(ushort *)(*(int *)(this + 4) + iVar7);
      }
    } while (uVar2 != 0xffff);
    local_1e = NewNode(this);
    local_24 = (uint)local_1e * 0x68;
    puVar6 = (undefined2 *)(local_24 + *(int *)(this + 4));
    puVar6[2] = uVar8;
    puVar6[1] = 0xffff;
    *puVar6 = 0xffff;
    puVar6[3] = 0;
    if (uVar8 != 0xffff) {
      if (bVar3) {
        *(ushort *)(*(int *)(this + 4) + iVar7) = local_1e;
      }
      else {
        *(ushort *)(*(int *)(this + 4) + 2 + iVar7) = local_1e;
      }
      goto LAB_0052f1a8;
    }
  }
  *(ushort *)(this + 0x10) = local_1e;
LAB_0052f1a8:
  InsertRebalance(this,local_1e);
  *(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -8) {
    uVar1 = *(undefined4 *)param_1;
    *(undefined4 *)(local_24 + 0x60) = 0xffffffff;
    *(undefined4 *)(local_24 + 8) = uVar1;
    *(undefined4 *)(local_24 + 0xc) = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(local_24 + 0x10) = *(undefined4 *)(param_1 + 8);
    *(undefined4 *)(local_24 + 0x14) = *(undefined4 *)(param_1 + 0xc);
    *(undefined4 *)(local_24 + 0x18) = *(undefined4 *)(param_1 + 0x10);
    *(undefined4 *)(local_24 + 0x1c) = *(undefined4 *)(param_1 + 0x14);
    *(undefined4 *)(local_24 + 0x20) = *(undefined4 *)(param_1 + 0x18);
    *(undefined4 *)(local_24 + 0x24) = *(undefined4 *)(param_1 + 0x1c);
    *(undefined4 *)(local_24 + 0x28) = *(undefined4 *)(param_1 + 0x20);
    *(undefined4 *)(local_24 + 0x2c) = *(undefined4 *)(param_1 + 0x24);
    *(undefined4 *)(local_24 + 0x30) = *(undefined4 *)(param_1 + 0x28);
    *(Node_t *)(local_24 + 0x34) = param_1[0x2c];
    *(Node_t *)(local_24 + 0x35) = param_1[0x2d];
    *(undefined2 *)(local_24 + 0x36) = *(undefined2 *)(param_1 + 0x2e);
    *(undefined4 *)(local_24 + 0x38) = *(undefined4 *)(param_1 + 0x30);
    *(undefined4 *)(local_24 + 0x3c) = *(undefined4 *)(param_1 + 0x34);
    *(undefined2 *)(local_24 + 0x40) = *(undefined2 *)(param_1 + 0x38);
    *(Node_t *)(local_24 + 0x42) = param_1[0x3a];
    *(Node_t *)(local_24 + 0x43) = param_1[0x3b];
    *(undefined4 *)(local_24 + 0x44) = *(undefined4 *)(param_1 + 0x3c);
    uVar1 = *(undefined4 *)(param_1 + 0x44);
    *(undefined4 *)(local_24 + 0x48) = *(undefined4 *)(param_1 + 0x40);
    *(undefined4 *)(local_24 + 0x4c) = uVar1;
    *(undefined4 *)(local_24 + 0x50) = *(undefined4 *)(param_1 + 0x48);
    *(undefined2 *)(local_24 + 0x54) = *(undefined2 *)(param_1 + 0x4c);
    *(undefined2 *)(local_24 + 0x56) = *(undefined2 *)(param_1 + 0x4e);
    *(undefined4 *)(local_24 + 0x58) = *(undefined4 *)(param_1 + 0x50);
    *(undefined4 *)(local_24 + 0x5c) = *(undefined4 *)(param_1 + 0x54);
    *(undefined4 *)(local_24 + 0x60) = *(undefined4 *)(param_1 + 0x58);
    *(undefined4 *)(local_24 + 100) = *(undefined4 *)(param_1 + 0x5c);
    *(undefined4 *)(local_24 + 100) = *(undefined4 *)(param_1 + 0x5c);
  }
  return local_1e;
}

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)