L L4D2node

CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>::InsertRebalance

0x00403430 · 2918 bytes · __thiscall

_ZN10CUtlRBTreeIN19CCombatCharVisCache15VisCacheEntry_tEtNS0_18CVisCacheEntryLessE10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE15InsertRebalanceEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t, unsigned short,
   CCombatCharVisCache::CVisCacheEntryLess,
   CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t, unsigned short>, unsigned short>
   >::InsertRebalance(unsigned short) */

void __thiscall
CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CCombatCharVisCache::VisCacheEntry_t,unsigned_short,CCombatCharVisCache::CVisCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<CCombatCharVisCache::VisCacheEntry_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_004034a5:
      *(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x18 + 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_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_0040346f;
LAB_004037f1:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_004037f1;
LAB_0040346f:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
    }
    uVar1 = puVar3[2];
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
      DAT_00f13992 = 0xffff;
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f13994 = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      if (uVar1 != 0xffff) goto LAB_00403491;
LAB_004037b8:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_004037b8;
LAB_00403491:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x18);
    }
    if (puVar3[3] != 0) {
      uVar1 = *(ushort *)(this + 0x10);
      goto LAB_004034a5;
    }
    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_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (local_1e != 0xffff) goto LAB_004034dd;
LAB_00403759:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (local_1e == 0xffff) goto LAB_00403759;
LAB_004034dd:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
    }
    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_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_00403502;
LAB_004036e5:
      local_20 = DAT_00f13994;
      if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0040351b;
LAB_00403700:
      iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
      if (iVar2 != 0) {
        Links(unsigned_short)::s_Sentinel = 0xffff;
        DAT_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      }
      if (uVar1 != 0xffff) goto LAB_00403525;
LAB_00403725:
      puVar3 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
      if (uVar1 == 0xffff) goto LAB_004036e5;
LAB_00403502:
      local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x18 + 4);
      if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00403700;
LAB_0040351b:
      if (uVar1 == 0xffff) goto LAB_00403725;
LAB_00403525:
      puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
    }
    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_00f13994 = 0xffff;
        DAT_00f13992 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        goto LAB_0040353a;
      }
      if (uVar4 != 0xffff) goto LAB_00403544;
LAB_004036b3:
      puVar5 = &Links(unsigned_short)::s_Sentinel;
    }
    else {
LAB_0040353a:
      if (uVar4 == 0xffff) goto LAB_004036b3;
LAB_00403544:
      puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
    }
    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_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (local_20 != 0xffff) goto LAB_0040356f;
LAB_004039b9:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (local_20 == 0xffff) goto LAB_004039b9;
LAB_0040356f:
        puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18);
      }
      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_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar4 != 0xffff) goto LAB_00403591;
LAB_004038e8:
        if (DAT_00f13996 == 0) goto LAB_004035a8;
LAB_00403900:
        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_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (local_1e != 0xffff) goto LAB_0040391d;
LAB_00403c99:
          puVar3 = &Links(unsigned_short)::s_Sentinel;
        }
        else {
          if (local_1e == 0xffff) goto LAB_00403c99;
LAB_0040391d:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
        }
        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_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar4 != 0xffff) goto LAB_0040393f;
LAB_00403bf0:
          if (local_1e != DAT_00f13992) goto LAB_00403959;
LAB_00403c08:
          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_00f13992 = 0xffff;
            DAT_00f13994 = 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 * 0x18);
          }
          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_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar4 == 0xffff) {
            puVar6 = &Links(unsigned_short)::s_Sentinel;
            puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x17ffe8);
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
            puVar6 = puVar3;
          }
          local_20 = puVar6[2];
          local_1e = uVar1;
        }
        else {
          if (uVar4 == 0xffff) goto LAB_00403bf0;
LAB_0040393f:
          if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 2))
          goto LAB_00403c08;
LAB_00403959:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
        }
        puVar3[3] = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 6) = 0;
        RotateRight(this,local_20);
      }
      else {
        if (uVar4 == 0xffff) goto LAB_004038e8;
LAB_00403591:
        if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) != 0) goto LAB_00403900;
LAB_004035a8:
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
        local_1e = local_20;
        *(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 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_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        }
        if (local_20 != 0xffff) goto LAB_00403606;
LAB_00403a59:
        puVar5 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (local_20 == 0xffff) goto LAB_00403a59;
LAB_00403606:
        puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0x18);
      }
      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_00f13992 = 0xffff;
        DAT_00f13994 = 0xffff;
        __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
        if (uVar4 != 0xffff) goto LAB_00403627;
LAB_00403a20:
        puVar3 = &Links(unsigned_short)::s_Sentinel;
      }
      else {
        if (uVar4 == 0xffff) goto LAB_00403a20;
LAB_00403627:
        puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
      }
      if (puVar3[3] == 0) {
        *(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) = 1;
        local_1e = local_20;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 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_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (local_1e != 0xffff) goto LAB_0040381d;
LAB_00403d09:
          uVar4 = DAT_00f13994;
          if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00403835;
LAB_00403d20:
          iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
          if (iVar2 == 0) goto LAB_00403835;
          Links(unsigned_short)::s_Sentinel = 0xffff;
          DAT_00f13992 = 0xffff;
          DAT_00f13994 = 0xffff;
          __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          if (uVar4 != 0xffff) goto LAB_0040383f;
LAB_00403d80:
          if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_00403858;
LAB_00403d98:
          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_00f13992 = 0xffff;
            DAT_00f13994 = 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 * 0x18);
          }
          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_00f13992 = 0xffff;
            DAT_00f13994 = 0xffff;
            __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
          }
          if (uVar4 == 0xffff) {
            puVar6 = &Links(unsigned_short)::s_Sentinel;
            puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x17ffe8);
          }
          else {
            puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
            puVar6 = puVar3;
          }
          local_20 = puVar6[2];
          local_1e = uVar1;
        }
        else {
          if (local_1e == 0xffff) goto LAB_00403d09;
LAB_0040381d:
          uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x18 + 4);
          if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00403d20;
LAB_00403835:
          if (uVar4 == 0xffff) goto LAB_00403d80;
LAB_0040383f:
          if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18)) goto LAB_00403d98;
LAB_00403858:
          puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
        }
        puVar3[3] = 1;
        *(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 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)