L L4D2node

CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>::InsertRebalance

0x00424320 · 2562 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKciiE6Node_tEiNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_iEiEE15InsertRebalanceEi

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlMap<char const*, int, int>::Node_t, int, CUtlMap<char const*, int, int>::CKeyLess,
   CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*, int, int>::Node_t, int>, int>
   >::InsertRebalance(int) */

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

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  
  do {
    iVar1 = *(int *)(this + 0x10);
    if (param_1 == iVar1) {
LAB_00424384:
      *(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18 + 0xc) = 1;
      return;
    }
    if (Links(int)::s_Sentinel == '\0') {
      iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar1 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (param_1 == -1) goto LAB_004246b5;
LAB_00424351:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x18);
    }
    else {
      if (param_1 != -1) goto LAB_00424351;
LAB_004246b5:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar1 = puVar6[2];
    if ((Links(int)::s_Sentinel == '\0') &&
       (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_00f14aec = -1;
      DAT_00f14af0 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
      if (iVar1 == -1) goto LAB_00424680;
LAB_00424371:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
    }
    else {
      if (iVar1 != -1) goto LAB_00424371;
LAB_00424680:
      puVar6 = &Links(int)::s_Sentinel;
    }
    if (puVar6[3] != 0) {
      iVar1 = *(int *)(this + 0x10);
      goto LAB_00424384;
    }
    if (Links(int)::s_Sentinel == '\0') {
      iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar1 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (param_1 == -1) goto LAB_00424625;
LAB_004243b9:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x18);
    }
    else {
      if (param_1 != -1) goto LAB_004243b9;
LAB_00424625:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar1 = puVar6[2];
    if (Links(int)::s_Sentinel == '\0') {
      iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar5 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (iVar1 == -1) goto LAB_004245f4;
LAB_004243d9:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
    }
    else {
      if (iVar1 != -1) goto LAB_004243d9;
LAB_004245f4:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar5 = puVar6[2];
    if (Links(int)::s_Sentinel == '\0') {
      iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar4 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (iVar1 == -1) goto LAB_004245bc;
LAB_004243f6:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
    }
    else {
      if (iVar1 != -1) goto LAB_004243f6;
LAB_004245bc:
      puVar6 = &Links(int)::s_Sentinel;
    }
    iVar4 = puVar6[2];
    if (Links(int)::s_Sentinel == '\0') {
      iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar3 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        goto LAB_0042440a;
      }
      if (iVar4 == -1) goto LAB_0042458a;
LAB_00424413:
      piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x18);
    }
    else {
LAB_0042440a:
      if (iVar4 != -1) goto LAB_00424413;
LAB_0042458a:
      piVar2 = &Links(int)::s_Sentinel;
    }
    if (iVar1 == *piVar2) {
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f14aec = -1;
          DAT_00f14af0 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) goto LAB_004247c4;
LAB_00424435:
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
      }
      else {
        if (iVar5 != -1) goto LAB_00424435;
LAB_004247c4:
        puVar6 = &Links(int)::s_Sentinel;
      }
      iVar4 = puVar6[1];
      if ((Links(int)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      iVar3 = DAT_00f14af4;
      if (iVar4 != -1) {
        iVar3 = *(int *)(*(int *)(this + 4) + iVar4 * 0x18 + 0xc);
      }
      if (iVar3 == 0) {
LAB_00424466:
        *(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18 + 0xc) = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar4 * 0x18 + 0xc) = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
        param_1 = iVar5;
      }
      else {
        if (Links(int)::s_Sentinel == '\0') {
          iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
          if (iVar4 != 0) {
            Links(int)::s_Sentinel = 0xffffffff;
            DAT_00f14aec = -1;
            DAT_00f14af0 = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (param_1 == -1) goto LAB_00424ab5;
LAB_00424739:
          iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x18 + 8);
          if (Links(int)::s_Sentinel != '\0') goto LAB_00424750;
LAB_00424ac8:
          iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
          if (iVar3 == 0) goto LAB_00424750;
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f14aec = -1;
          DAT_00f14af0 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
          if (iVar4 == -1) goto LAB_00424b20;
LAB_00424759:
          if (param_1 != *(int *)(*(int *)(this + 4) + iVar4 * 0x18 + 4)) goto LAB_0042476e;
LAB_00424b38:
          RotateLeft(this,iVar1);
          if ((Links(int)::s_Sentinel == '\0') &&
             (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
            Links(int)::s_Sentinel = 0xffffffff;
            DAT_00f14aec = -1;
            DAT_00f14af0 = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (iVar1 == -1) {
            puVar6 = &Links(int)::s_Sentinel;
          }
          else {
            puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
          }
          iVar5 = puVar6[2];
          if ((Links(int)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
            Links(int)::s_Sentinel = 0xffffffff;
            DAT_00f14aec = -1;
            DAT_00f14af0 = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (iVar5 == -1) {
            puVar7 = &Links(int)::s_Sentinel;
            puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x18);
          }
          else {
            puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
            puVar7 = puVar6;
          }
          iVar5 = puVar7[2];
          param_1 = iVar1;
        }
        else {
          if (param_1 != -1) goto LAB_00424739;
LAB_00424ab5:
          iVar4 = DAT_00f14af0;
          if (Links(int)::s_Sentinel == '\0') goto LAB_00424ac8;
LAB_00424750:
          if (iVar4 != -1) goto LAB_00424759;
LAB_00424b20:
          if (param_1 == DAT_00f14aec) goto LAB_00424b38;
LAB_0042476e:
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
        }
        puVar6[3] = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
        RotateRight(this,iVar5);
      }
    }
    else {
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f14aec = -1;
          DAT_00f14af0 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) goto LAB_00424854;
LAB_004244b1:
        piVar2 = (int *)(*(int *)(this + 4) + iVar5 * 0x18);
      }
      else {
        if (iVar5 != -1) goto LAB_004244b1;
LAB_00424854:
        piVar2 = &Links(int)::s_Sentinel;
      }
      iVar4 = *piVar2;
      if ((Links(int)::s_Sentinel == '\0') &&
         (iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        if (iVar4 == -1) goto LAB_00424820;
LAB_004244cd:
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar4 * 0x18);
      }
      else {
        if (iVar4 != -1) goto LAB_004244cd;
LAB_00424820:
        puVar6 = &Links(int)::s_Sentinel;
      }
      if (puVar6[3] == 0) goto LAB_00424466;
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f14aec = -1;
          DAT_00f14af0 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (param_1 == -1) goto LAB_00424a15;
LAB_004244f6:
        iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x18 + 8);
        if (Links(int)::s_Sentinel != '\0') goto LAB_0042450d;
LAB_00424a28:
        iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar3 == 0) goto LAB_0042450d;
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f14aec = -1;
        DAT_00f14af0 = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        if (iVar4 == -1) goto LAB_00424a80;
LAB_00424516:
        piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x18);
      }
      else {
        if (param_1 != -1) goto LAB_004244f6;
LAB_00424a15:
        iVar4 = DAT_00f14af0;
        if (Links(int)::s_Sentinel == '\0') goto LAB_00424a28;
LAB_0042450d:
        if (iVar4 != -1) goto LAB_00424516;
LAB_00424a80:
        piVar2 = &Links(int)::s_Sentinel;
      }
      if (param_1 == *piVar2) {
        RotateRight(this,iVar1);
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f14aec = -1;
          DAT_00f14af0 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar1 == -1) {
          puVar6 = &Links(int)::s_Sentinel;
        }
        else {
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
        }
        iVar5 = puVar6[2];
        if ((Links(int)::s_Sentinel == '\0') &&
           (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f14aec = -1;
          DAT_00f14af0 = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) {
          puVar7 = &Links(int)::s_Sentinel;
          puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x18);
        }
        else {
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
          puVar7 = puVar6;
        }
        iVar5 = puVar7[2];
        param_1 = iVar1;
      }
      else {
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
      }
      puVar6[3] = 1;
      *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
      RotateLeft(this,iVar5);
    }
  } 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)