L L4D2node

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

0x003f8e10 · 2562 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIPKc19CActivityRemapCacheiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE15InsertRebalanceEi

Decompiled

undefined (2 params)

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

void __thiscall
CUtlRBTree<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int,CUtlMap<char_const*,CActivityRemapCache,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int>,int>>
::InsertRebalance(CUtlRBTree<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int,CUtlMap<char_const*,CActivityRemapCache,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CActivityRemapCache,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_003f8e74:
      *(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28 + 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_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (param_1 == -1) goto LAB_003f91a5;
LAB_003f8e41:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x28);
    }
    else {
      if (param_1 != -1) goto LAB_003f8e41;
LAB_003f91a5:
      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_00f137f8 = -1;
      DAT_00f137fc = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
      if (iVar1 == -1) goto LAB_003f9170;
LAB_003f8e61:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
    }
    else {
      if (iVar1 != -1) goto LAB_003f8e61;
LAB_003f9170:
      puVar6 = &Links(int)::s_Sentinel;
    }
    if (puVar6[3] != 0) {
      iVar1 = *(int *)(this + 0x10);
      goto LAB_003f8e74;
    }
    if (Links(int)::s_Sentinel == '\0') {
      iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
      if (iVar1 != 0) {
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (param_1 == -1) goto LAB_003f9115;
LAB_003f8ea9:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x28);
    }
    else {
      if (param_1 != -1) goto LAB_003f8ea9;
LAB_003f9115:
      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_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (iVar1 == -1) goto LAB_003f90e4;
LAB_003f8ec9:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
    }
    else {
      if (iVar1 != -1) goto LAB_003f8ec9;
LAB_003f90e4:
      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_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      if (iVar1 == -1) goto LAB_003f90ac;
LAB_003f8ee6:
      puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
    }
    else {
      if (iVar1 != -1) goto LAB_003f8ee6;
LAB_003f90ac:
      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_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        goto LAB_003f8efa;
      }
      if (iVar4 == -1) goto LAB_003f907a;
LAB_003f8f03:
      piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x28);
    }
    else {
LAB_003f8efa:
      if (iVar4 != -1) goto LAB_003f8f03;
LAB_003f907a:
      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_00f137f8 = -1;
          DAT_00f137fc = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) goto LAB_003f92b4;
LAB_003f8f25:
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x28);
      }
      else {
        if (iVar5 != -1) goto LAB_003f8f25;
LAB_003f92b4:
        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_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
      }
      iVar3 = DAT_00f13800;
      if (iVar4 != -1) {
        iVar3 = *(int *)(*(int *)(this + 4) + iVar4 * 0x28 + 0xc);
      }
      if (iVar3 == 0) {
LAB_003f8f56:
        *(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28 + 0xc) = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar4 * 0x28 + 0xc) = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x28 + 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_00f137f8 = -1;
            DAT_00f137fc = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (param_1 == -1) goto LAB_003f95a5;
LAB_003f9229:
          iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x28 + 8);
          if (Links(int)::s_Sentinel != '\0') goto LAB_003f9240;
LAB_003f95b8:
          iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
          if (iVar3 == 0) goto LAB_003f9240;
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f137f8 = -1;
          DAT_00f137fc = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
          if (iVar4 == -1) goto LAB_003f9610;
LAB_003f9249:
          if (param_1 != *(int *)(*(int *)(this + 4) + iVar4 * 0x28 + 4)) goto LAB_003f925e;
LAB_003f9628:
          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_00f137f8 = -1;
            DAT_00f137fc = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (iVar1 == -1) {
            puVar6 = &Links(int)::s_Sentinel;
          }
          else {
            puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
          }
          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_00f137f8 = -1;
            DAT_00f137fc = -1;
            __cxa_guard_release(&Links(int)::s_Sentinel);
          }
          if (iVar5 == -1) {
            puVar7 = &Links(int)::s_Sentinel;
            puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x28);
          }
          else {
            puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x28);
            puVar7 = puVar6;
          }
          iVar5 = puVar7[2];
          param_1 = iVar1;
        }
        else {
          if (param_1 != -1) goto LAB_003f9229;
LAB_003f95a5:
          iVar4 = DAT_00f137fc;
          if (Links(int)::s_Sentinel == '\0') goto LAB_003f95b8;
LAB_003f9240:
          if (iVar4 != -1) goto LAB_003f9249;
LAB_003f9610:
          if (param_1 == DAT_00f137f8) goto LAB_003f9628;
LAB_003f925e:
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
        }
        puVar6[3] = 1;
        *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x28 + 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_00f137f8 = -1;
          DAT_00f137fc = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) goto LAB_003f9344;
LAB_003f8fa1:
        piVar2 = (int *)(*(int *)(this + 4) + iVar5 * 0x28);
      }
      else {
        if (iVar5 != -1) goto LAB_003f8fa1;
LAB_003f9344:
        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_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        if (iVar4 == -1) goto LAB_003f9310;
LAB_003f8fbd:
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar4 * 0x28);
      }
      else {
        if (iVar4 != -1) goto LAB_003f8fbd;
LAB_003f9310:
        puVar6 = &Links(int)::s_Sentinel;
      }
      if (puVar6[3] == 0) goto LAB_003f8f56;
      if (Links(int)::s_Sentinel == '\0') {
        iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar4 != 0) {
          Links(int)::s_Sentinel = 0xffffffff;
          DAT_00f137f8 = -1;
          DAT_00f137fc = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (param_1 == -1) goto LAB_003f9505;
LAB_003f8fe6:
        iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x28 + 8);
        if (Links(int)::s_Sentinel != '\0') goto LAB_003f8ffd;
LAB_003f9518:
        iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
        if (iVar3 == 0) goto LAB_003f8ffd;
        Links(int)::s_Sentinel = 0xffffffff;
        DAT_00f137f8 = -1;
        DAT_00f137fc = -1;
        __cxa_guard_release(&Links(int)::s_Sentinel);
        if (iVar4 == -1) goto LAB_003f9570;
LAB_003f9006:
        piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x28);
      }
      else {
        if (param_1 != -1) goto LAB_003f8fe6;
LAB_003f9505:
        iVar4 = DAT_00f137fc;
        if (Links(int)::s_Sentinel == '\0') goto LAB_003f9518;
LAB_003f8ffd:
        if (iVar4 != -1) goto LAB_003f9006;
LAB_003f9570:
        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_00f137f8 = -1;
          DAT_00f137fc = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar1 == -1) {
          puVar6 = &Links(int)::s_Sentinel;
        }
        else {
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
        }
        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_00f137f8 = -1;
          DAT_00f137fc = -1;
          __cxa_guard_release(&Links(int)::s_Sentinel);
        }
        if (iVar5 == -1) {
          puVar7 = &Links(int)::s_Sentinel;
          puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x28);
        }
        else {
          puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x28);
          puVar7 = puVar6;
        }
        iVar5 = puVar7[2];
        param_1 = iVar1;
      }
      else {
        puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x28);
      }
      puVar6[3] = 1;
      *(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x28 + 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)