L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::InsertRebalance

0x005c4b80 · 688 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIjP24CInstancedResponseSystemtE6Node_tEtNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_tEtEE15InsertRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<unsigned int, CInstancedResponseSystem*, unsigned short>::Node_t, unsigned
   short, CUtlMap<unsigned int, CInstancedResponseSystem*, unsigned short>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int, CInstancedResponseSystem*, unsigned
   short>::Node_t, unsigned short>, unsigned short> >::InsertRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,CInstancedResponseSystem*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
                  *this,ushort param_1)

{
  ushort uVar1;
  ushort uVar2;
  ushort uVar3;
  int iVar4;
  ushort *puVar5;
  uint uVar6;
  uint uVar7;
  ushort local_1e;
  
  local_1e = param_1;
  do {
    uVar1 = *(ushort *)(this + 0x10);
    if (local_1e == uVar1) {
LAB_005c4bd2:
      *(undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4) + 6) = 1;
      return;
    }
    iVar4 = Links(this,local_1e);
    iVar4 = Links(this,*(ushort *)(iVar4 + 4));
    if (*(short *)(iVar4 + 6) != 0) {
      uVar1 = *(ushort *)(this + 0x10);
      goto LAB_005c4bd2;
    }
    iVar4 = Links(this,local_1e);
    uVar1 = *(ushort *)(iVar4 + 4);
    uVar6 = (uint)uVar1;
    iVar4 = Links(this,uVar1);
    uVar2 = *(ushort *)(iVar4 + 4);
    iVar4 = Links(this,uVar1);
    puVar5 = (ushort *)Links(this,*(ushort *)(iVar4 + 4));
    if (uVar1 == *puVar5) {
      uVar7 = (uint)uVar2;
      iVar4 = Links(this,uVar2);
      uVar3 = *(ushort *)(iVar4 + 2);
      iVar4 = Links(this,uVar3);
      if (*(short *)(iVar4 + 6) == 0) {
        *(undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)((uint)uVar3 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar7 * 0x10 + *(int *)(this + 4) + 6) = 0;
        local_1e = uVar2;
      }
      else {
        iVar4 = Links(this,local_1e);
        iVar4 = Links(this,*(ushort *)(iVar4 + 4));
        if (local_1e == *(ushort *)(iVar4 + 2)) {
          RotateLeft(this,uVar1);
          iVar4 = Links(this,uVar1);
          uVar6 = (uint)*(ushort *)(iVar4 + 4);
          iVar4 = Links(this,*(ushort *)(iVar4 + 4));
          uVar7 = (uint)*(ushort *)(iVar4 + 4);
          local_1e = uVar1;
        }
        *(undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar7 * 0x10 + *(int *)(this + 4) + 6) = 0;
        RotateRight(this,(ushort)uVar7);
      }
    }
    else {
      uVar7 = (uint)uVar2;
      puVar5 = (ushort *)Links(this,uVar2);
      uVar3 = *puVar5;
      iVar4 = Links(this,uVar3);
      if (*(short *)(iVar4 + 6) == 0) {
        *(undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)((uint)uVar3 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x10 + 6) = 0;
        local_1e = uVar2;
      }
      else {
        iVar4 = Links(this,local_1e);
        puVar5 = (ushort *)Links(this,*(ushort *)(iVar4 + 4));
        if (local_1e == *puVar5) {
          RotateRight(this,uVar1);
          iVar4 = Links(this,uVar1);
          uVar6 = (uint)*(ushort *)(iVar4 + 4);
          iVar4 = Links(this,*(ushort *)(iVar4 + 4));
          uVar7 = (uint)*(ushort *)(iVar4 + 4);
          local_1e = uVar1;
        }
        *(undefined2 *)(uVar6 * 0x10 + *(int *)(this + 4) + 6) = 1;
        *(undefined2 *)(uVar7 * 0x10 + *(int *)(this + 4) + 6) = 0;
        RotateLeft(this,(ushort)uVar7);
      }
    }
  } while( true );
}

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)