L L4D2node

CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>::RotateLeft

0x0018f380 · 1186 bytes · __thiscall

_ZN10CUtlRBTreeI10CUtlStringiPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_iEiEE10RotateLeftEi

Decompiled

undefined (2 params)

/* CUtlRBTree<CUtlString, int, bool (*)(CUtlString const&, CUtlString const&),
   CUtlMemory<UtlRBTreeNode_t<CUtlString, int>, int> >::RotateLeft(int) */

void __thiscall
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::RotateLeft(CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
             *this,int param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined4 *puVar5;
  bool bVar6;
  int local_24;
  int local_20;
  
  if (Links(int)::s_Sentinel == '\0') {
    iVar2 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
    if (iVar2 != 0) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    if (param_1 != -1) goto LAB_0018f3aa;
LAB_0018f55f:
    local_20 = -0x20;
    iVar2 = DAT_003412d0;
    if (Links(int)::s_Sentinel != '\0') goto LAB_0018f3c4;
LAB_0018f580:
    iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
    if (iVar4 != 0) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    iVar4 = *(int *)(this + 4);
    if (iVar2 != -1) goto LAB_0018f3d0;
LAB_0018f5aa:
    local_24 = -0x20;
    puVar5 = &Links(int)::s_Sentinel;
  }
  else {
    if (param_1 == -1) goto LAB_0018f55f;
LAB_0018f3aa:
    local_20 = param_1 * 0x20;
    iVar2 = *(int *)(*(int *)(this + 4) + local_20 + 4);
    if (Links(int)::s_Sentinel == '\0') goto LAB_0018f580;
LAB_0018f3c4:
    iVar4 = *(int *)(this + 4);
    if (iVar2 == -1) goto LAB_0018f5aa;
LAB_0018f3d0:
    local_24 = iVar2 * 0x20;
    puVar5 = (undefined4 *)(local_24 + iVar4);
  }
  bVar6 = Links(int)::s_Sentinel == '\0';
  *(undefined4 *)(iVar4 + 4 + local_20) = *puVar5;
  if ((bVar6) && (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
    Links(int)::s_Sentinel = 0xffffffff;
    DAT_003412d0 = -1;
    DAT_003412d4 = -1;
    __cxa_guard_release(&Links(int)::s_Sentinel);
  }
  if (iVar2 == -1) {
    piVar1 = &Links(int)::s_Sentinel;
  }
  else {
    piVar1 = (int *)(local_24 + *(int *)(this + 4));
  }
  if (*piVar1 != -1) {
    if ((Links(int)::s_Sentinel == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    piVar1 = &Links(int)::s_Sentinel;
    if (iVar2 != -1) {
      piVar1 = (int *)(local_24 + *(int *)(this + 4));
    }
    *(int *)(*(int *)(this + 4) + 8 + *piVar1 * 0x20) = param_1;
  }
  if (iVar2 != -1) {
    if ((Links(int)::s_Sentinel == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    puVar5 = &Links(int)::s_Sentinel;
    if (param_1 != -1) {
      puVar5 = (undefined4 *)(local_20 + *(int *)(this + 4));
    }
    *(undefined4 *)(*(int *)(this + 4) + 8 + local_24) = puVar5[2];
  }
  if (param_1 == *(int *)(this + 0x10)) {
    *(int *)(this + 0x10) = iVar2;
    goto LAB_0018f4c3;
  }
  if (Links(int)::s_Sentinel == '\0') {
    iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
    if (iVar4 != 0) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    if (param_1 != -1) goto LAB_0018f478;
LAB_0018f6a4:
    iVar4 = DAT_003412d4;
    if (Links(int)::s_Sentinel != '\0') goto LAB_0018f489;
LAB_0018f6b8:
    iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
    if (iVar3 != 0) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
      goto LAB_0018f489;
    }
    if (iVar4 != -1) goto LAB_0018f492;
LAB_0018f6e2:
    piVar1 = &Links(int)::s_Sentinel;
  }
  else {
    if (param_1 == -1) goto LAB_0018f6a4;
LAB_0018f478:
    iVar4 = *(int *)(local_20 + *(int *)(this + 4) + 8);
    if (Links(int)::s_Sentinel == '\0') goto LAB_0018f6b8;
LAB_0018f489:
    if (iVar4 == -1) goto LAB_0018f6e2;
LAB_0018f492:
    piVar1 = (int *)(iVar4 * 0x20 + *(int *)(this + 4));
  }
  if (param_1 == *piVar1) {
    if ((Links(int)::s_Sentinel == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    puVar5 = &Links(int)::s_Sentinel;
    if (param_1 != -1) {
      puVar5 = (undefined4 *)(local_20 + *(int *)(this + 4));
    }
    *(int *)(*(int *)(this + 4) + puVar5[2] * 0x20) = iVar2;
  }
  else {
    if ((Links(int)::s_Sentinel == '\0') &&
       (iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
      Links(int)::s_Sentinel = 0xffffffff;
      DAT_003412d0 = -1;
      DAT_003412d4 = -1;
      __cxa_guard_release(&Links(int)::s_Sentinel);
    }
    puVar5 = &Links(int)::s_Sentinel;
    if (param_1 != -1) {
      puVar5 = (undefined4 *)(local_20 + *(int *)(this + 4));
    }
    *(int *)(*(int *)(this + 4) + 4 + puVar5[2] * 0x20) = iVar2;
  }
LAB_0018f4c3:
  *(int *)(*(int *)(this + 4) + local_24) = param_1;
  if (param_1 != -1) {
    *(int *)(*(int *)(this + 4) + 8 + local_20) = iVar2;
  }
  return;
}

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)