L L4D2node

CUtlRBTree<CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::Node_t,int,CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::Node_t,int>,int>>::Insert

0x004493e0 · 562 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKcN19CDecalEmitterSystem10DecalEntryEiE6Node_tEiNS5_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS6_iEiEE6InsertERKS6_

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<char const*, CDecalEmitterSystem::DecalEntry, int>::Node_t, int, CUtlMap<char
   const*, CDecalEmitterSystem::DecalEntry, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<char
   const*, CDecalEmitterSystem::DecalEntry, int>::Node_t, int>, int> >::Insert(CUtlMap<char const*,
   CDecalEmitterSystem::DecalEntry, int>::Node_t const&) */

int __thiscall
CUtlRBTree<CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::Node_t,int,CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::Node_t,int>,int>>
::Insert(CUtlRBTree<CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::Node_t,int,CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CDecalEmitterSystem::DecalEntry,int>::Node_t,int>,int>>
         *this,Node_t *param_1)

{
  undefined4 uVar1;
  bool bVar2;
  char cVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  int iVar7;
  int local_28;
  int local_20;
  
  iVar5 = *(int *)(this + 0x10);
  if (*(int *)(this + 0x10) == -1) {
    local_28 = NewNode(this);
    local_20 = local_28 * 0x28;
    puVar6 = (undefined4 *)(local_20 + *(int *)(this + 4));
    puVar6[2] = 0xffffffff;
    puVar6[1] = 0xffffffff;
    *puVar6 = 0xffffffff;
    puVar6[3] = 0;
  }
  else {
    do {
      iVar7 = iVar5;
      iVar4 = iVar7 * 0x28;
      cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar4 + 0x10);
      if (cVar3 == '\0') {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f158c8 = 0xffffffff;
          DAT_00f158cc = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        bVar2 = false;
        iVar5 = *(int *)(*(int *)(this + 4) + 4 + iVar4);
      }
      else {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f158c8 = 0xffffffff;
          DAT_00f158cc = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        iVar5 = *(int *)(*(int *)(this + 4) + iVar7 * 0x28);
        bVar2 = true;
      }
    } while (iVar5 != -1);
    local_28 = NewNode(this);
    local_20 = local_28 * 0x28;
    puVar6 = (undefined4 *)(local_20 + *(int *)(this + 4));
    puVar6[2] = iVar7;
    puVar6[1] = 0xffffffff;
    *puVar6 = 0xffffffff;
    puVar6[3] = 0;
    if (iVar7 != -1) {
      if (bVar2) {
        *(int *)(*(int *)(this + 4) + iVar4) = local_28;
      }
      else {
        *(int *)(*(int *)(this + 4) + 4 + iVar4) = local_28;
      }
      goto LAB_004494ba;
    }
  }
  *(int *)(this + 0x10) = local_28;
LAB_004494ba:
  InsertRebalance(this,local_28);
  *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
  local_20 = local_20 + *(int *)(this + 4);
  if (local_20 != -0x10) {
    uVar1 = *(undefined4 *)param_1;
    *(undefined4 *)(local_20 + 0x14) = 0;
    *(undefined4 *)(local_20 + 0x18) = 0;
    *(undefined4 *)(local_20 + 0x1c) = 0;
    *(undefined4 *)(local_20 + 0x20) = 0;
    *(undefined4 *)(local_20 + 0x10) = uVar1;
    *(undefined4 *)(local_20 + 0x24) = 0;
    iVar5 = *(int *)(param_1 + 0x10);
    if (0 < iVar5) {
      iVar4 = 0;
      iVar7 = 0;
      while( true ) {
                    /* try { // try from 00449537 to 0044953b has its CatchHandler @ 0044962d */
        CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
                  ((CUtlVector<int,CUtlMemory<int,int>> *)(local_20 + 0x14),iVar4,
                   (int *)(*(int *)(param_1 + 4) + iVar7 * 4));
        iVar7 = iVar7 + 1;
        if (iVar7 == iVar5) break;
        iVar4 = *(int *)(local_20 + 0x20);
      }
    }
  }
  return local_28;
}

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)