L L4D2node

CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>::Insert

0x00bb9df0 · 460 bytes · __thiscall

_ZN10CUtlRBTreeIN12CChoreoScene10ActiveListEiPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_iEiEE6InsertES3_

Decompiled

undefined (2 params)

/* CUtlRBTree<CChoreoScene::ActiveList, int, bool (*)(CChoreoScene::ActiveList const&,
   CChoreoScene::ActiveList const&), CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList, int>, int>
   >::Insert(CChoreoScene::ActiveList const&) */

int __thiscall
CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
::Insert(CUtlRBTree<CChoreoScene::ActiveList,int,bool(*)(CChoreoScene::ActiveList_const&,CChoreoScene::ActiveList_const&),CUtlMemory<UtlRBTreeNode_t<CChoreoScene::ActiveList,int>,int>>
         *this,ActiveList *param_1)

{
  int iVar1;
  undefined4 uVar2;
  bool bVar3;
  char cVar4;
  int iVar5;
  undefined4 *puVar6;
  int iVar7;
  int local_24;
  
  iVar5 = *(int *)(this + 0x10);
  if (*(int *)(this + 0x10) == -1) {
    iVar5 = NewNode(this);
    local_24 = iVar5 * 0x18;
    puVar6 = (undefined4 *)(local_24 + *(int *)(this + 4));
    puVar6[2] = 0xffffffff;
    puVar6[1] = 0xffffffff;
    *puVar6 = 0xffffffff;
    puVar6[3] = 0;
  }
  else {
    do {
      iVar7 = iVar5;
      iVar1 = iVar7 * 0x18;
      cVar4 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar1 + 0x10);
      if (cVar4 == '\0') {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = 0xffffffff;
          DAT_00f6d2d4 = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        bVar3 = false;
        iVar5 = *(int *)(*(int *)(this + 4) + 4 + iVar1);
      }
      else {
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f6d2d0 = 0xffffffff;
          DAT_00f6d2d4 = 0xffffffff;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        iVar5 = *(int *)(*(int *)(this + 4) + iVar7 * 0x18);
        bVar3 = true;
      }
    } while (iVar5 != -1);
    iVar5 = NewNode(this);
    local_24 = iVar5 * 0x18;
    puVar6 = (undefined4 *)(local_24 + *(int *)(this + 4));
    puVar6[2] = iVar7;
    puVar6[1] = 0xffffffff;
    *puVar6 = 0xffffffff;
    puVar6[3] = 0;
    if (iVar7 != -1) {
      if (bVar3) {
        *(int *)(*(int *)(this + 4) + iVar1) = iVar5;
      }
      else {
        *(int *)(*(int *)(this + 4) + 4 + iVar1) = iVar5;
      }
      goto LAB_00bb9ebd;
    }
  }
  *(int *)(this + 0x10) = iVar5;
LAB_00bb9ebd:
  InsertRebalance(this,iVar5);
  *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
  local_24 = local_24 + *(int *)(this + 4);
  if (local_24 != -0x10) {
    uVar2 = *(undefined4 *)(param_1 + 4);
    *(undefined4 *)(local_24 + 0x10) = *(undefined4 *)param_1;
    *(undefined4 *)(local_24 + 0x14) = uVar2;
  }
  return iVar5;
}

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)