L L4D2node

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

0x0014da90 · 2918 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapItttE6Node_tEtNS1_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS2_tEtEE15InsertRebalanceEt

Decompiled

undefined (2 params)

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

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

{
  ushort uVar1;
  int iVar2;
  undefined2 *puVar3;
  ushort uVar4;
  ushort *puVar5;
  undefined2 *puVar6;
  uint uVar7;
  ushort local_20;
  ushort local_1e;
  
  local_1e = param_1;
  do {
    uVar1 = *(ushort *)(this + 0x10);
    if (local_1e == uVar1) {
LAB_0014db05:
      *(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc + 6) = 1;
      return;
    }
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e02 = 0xffff;
        DAT_00340e04 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_0014dacf;
LAB_0014de51:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_0014de51;
LAB_0014dacf:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
    }
    uVar1 = puVar3[2];
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
      DAT_00340e02 = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00340e04 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar1 != 0xffff) goto LAB_0014daf1;
LAB_0014de18:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_0014de18;
LAB_0014daf1:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
    }
    if (puVar3[3] != 0) {
      uVar1 = *(ushort *)(this + 0x10);
      goto LAB_0014db05;
    }
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e02 = 0xffff;
        DAT_00340e04 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_0014db3d;
LAB_0014ddb9:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_0014ddb9;
LAB_0014db3d:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
    }
    uVar1 = puVar3[2];
    uVar7 = (uint)uVar1;
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e02 = 0xffff;
        DAT_00340e04 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_0014db62;
LAB_0014dd45:
      local_20 = DAT_00340e04;
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0014db7b;
LAB_0014dd60:
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e02 = 0xffff;
        DAT_00340e04 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_0014db85;
LAB_0014dd85:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_0014dd45;
LAB_0014db62:
      local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0xc + 4);
      if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0014dd60;
LAB_0014db7b:
      if (uVar1 == 0xffff) goto LAB_0014dd85;
LAB_0014db85:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
    }
    uVar4 = puVar3[2];
    if (Links(unsigned_short)::s_Sentinel == '\0') {
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e04 = 0xffff;
        DAT_00340e02 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        goto LAB_0014db9a;
      }
      if (uVar4 != 0xffff) goto LAB_0014dba4;
LAB_0014dd13:
      puVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
LAB_0014db9a:
      if (uVar4 == 0xffff) goto LAB_0014dd13;
LAB_0014dba4:
      puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
    }
    if (uVar1 == *puVar5) {
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar2 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00340e02 = 0xffff;
          DAT_00340e04 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (local_20 != 0xffff) goto LAB_0014dbcf;
LAB_0014e019:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (local_20 == 0xffff) goto LAB_0014e019;
LAB_0014dbcf:
        puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc);
      }
      uVar4 = puVar3[1];
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e02 = 0xffff;
        DAT_00340e04 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar4 != 0xffff) goto LAB_0014dbf1;
LAB_0014df48:
        if (DAT_00340e06 == 0) goto LAB_0014dc08;
LAB_0014df60:
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340e02 = 0xffff;
            DAT_00340e04 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (local_1e != 0xffff) goto LAB_0014df7d;
LAB_0014e2f9:
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (local_1e == 0xffff) goto LAB_0014e2f9;
LAB_0014df7d:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
        }
        uVar4 = puVar3[2];
        if ((Links(unsigned_short)::s_Sentinel == '\0') &&
           (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00340e02 = 0xffff;
          DAT_00340e04 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar4 != 0xffff) goto LAB_0014df9f;
LAB_0014e250:
          if (local_1e != DAT_00340e02) goto LAB_0014dfb9;
LAB_0014e268:
          RotateLeft(this,uVar1);
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340e02 = 0xffff;
            DAT_00340e04 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar1 == 0xffff) {
            puVar3 = &Links(unsigned_short)::s_Sentinel;
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
          }
          uVar4 = puVar3[2];
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340e02 = 0xffff;
            DAT_00340e04 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar4 == 0xffff) {
            puVar6 = &Links(unsigned_short)::s_Sentinel;
            puVar3 = (undefined2 *)(*(int *)(this + 4) + 0xbfff4);
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
            puVar6 = puVar3;
          }
          local_20 = puVar6[2];
          local_1e = uVar1;
        }
        else {
          if (uVar4 == 0xffff) goto LAB_0014e250;
LAB_0014df9f:
          if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 2))
          goto LAB_0014e268;
LAB_0014dfb9:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
        }
        puVar3[3] = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
        RotateRight(this,local_20);
      }
      else {
        if (uVar4 == 0xffff) goto LAB_0014df48;
LAB_0014dbf1:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) != 0) goto LAB_0014df60;
LAB_0014dc08:
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
        local_1e = local_20;
        *(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
      }
    }
    else {
      if (Links(unsigned_short)::s_Sentinel == '\0') {
        iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
        if (iVar2 != 0) {
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00340e02 = 0xffff;
          DAT_00340e04 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (local_20 != 0xffff) goto LAB_0014dc66;
LAB_0014e0b9:
        puVar5 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (local_20 == 0xffff) goto LAB_0014e0b9;
LAB_0014dc66:
        puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0xc);
      }
      uVar4 = *puVar5;
      if ((Links(unsigned_short)::s_Sentinel == '\0') &&
         (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00340e02 = 0xffff;
        DAT_00340e04 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar4 != 0xffff) goto LAB_0014dc87;
LAB_0014e080:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar4 == 0xffff) goto LAB_0014e080;
LAB_0014dc87:
        puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
      }
      if (puVar3[3] == 0) {
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) = 1;
        local_1e = local_20;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
      }
      else {
        if (Links(unsigned_short)::s_Sentinel == '\0') {
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 != 0) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340e02 = 0xffff;
            DAT_00340e04 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (local_1e != 0xffff) goto LAB_0014de7d;
LAB_0014e369:
          uVar4 = DAT_00340e04;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0014de95;
LAB_0014e380:
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 == 0) goto LAB_0014de95;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00340e02 = 0xffff;
          DAT_00340e04 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar4 != 0xffff) goto LAB_0014de9f;
LAB_0014e3e0:
          if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_0014deb8;
LAB_0014e3f8:
          RotateRight(this,uVar1);
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340e02 = 0xffff;
            DAT_00340e04 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar1 == 0xffff) {
            puVar3 = &Links(unsigned_short)::s_Sentinel;
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
          }
          uVar4 = puVar3[2];
          if ((Links(unsigned_short)::s_Sentinel == '\0') &&
             (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
            Links(unsigned_short)::s_Sentinel = 0xffff;
            DAT_00340e02 = 0xffff;
            DAT_00340e04 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar4 == 0xffff) {
            puVar6 = &Links(unsigned_short)::s_Sentinel;
            puVar3 = (undefined2 *)(*(int *)(this + 4) + 0xbfff4);
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
            puVar6 = puVar3;
          }
          local_20 = puVar6[2];
          local_1e = uVar1;
        }
        else {
          if (local_1e == 0xffff) goto LAB_0014e369;
LAB_0014de7d:
          uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc + 4);
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_0014e380;
LAB_0014de95:
          if (uVar4 == 0xffff) goto LAB_0014e3e0;
LAB_0014de9f:
          if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc)) goto LAB_0014e3f8;
LAB_0014deb8:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
        }
        puVar3[3] = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
        RotateLeft(this,local_20);
      }
    }
  } 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)