L L4D2node

CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>::RotateLeft

0x004cf1d0 · 1297 bytes · __thiscall

_ZN10CUtlRBTreeI17CBalanceTeamGrouptPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE10RotateLeftEt

Decompiled

undefined (2 params)

/* CUtlRBTree<CBalanceTeamGroup, unsigned short, bool (*)(CBalanceTeamGroup const&,
   CBalanceTeamGroup const&), CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup, unsigned short>,
   unsigned short> >::RotateLeft(unsigned short) */

void __thiscall
CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>
::RotateLeft(CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>
             *this,ushort param_1)

{
  short *psVar1;
  int iVar2;
  undefined2 *puVar3;
  ushort uVar4;
  ushort *puVar5;
  ushort uVar6;
  bool bVar7;
  int local_24;
  int local_20;
  
  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_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    if (param_1 != 0xffff) goto LAB_004cf1fb;
LAB_004cf3f8:
    local_20 = 0x2bffd4;
    uVar6 = DAT_00f1ad1a;
    if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004cf21e;
LAB_004cf418:
    iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar2 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    iVar2 = *(int *)(this + 4);
    if (uVar6 != 0xffff) goto LAB_004cf22b;
LAB_004cf443:
    local_24 = 0x2bffd4;
    puVar3 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    if (param_1 == 0xffff) goto LAB_004cf3f8;
LAB_004cf1fb:
    local_20 = (uint)param_1 * 0x2c;
    uVar6 = *(ushort *)(*(int *)(this + 4) + local_20 + 2);
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004cf418;
LAB_004cf21e:
    iVar2 = *(int *)(this + 4);
    if (uVar6 == 0xffff) goto LAB_004cf443;
LAB_004cf22b:
    local_24 = (uint)uVar6 * 0x2c;
    puVar3 = (undefined2 *)(local_24 + iVar2);
  }
  bVar7 = Links(unsigned_short)::s_Sentinel == '\0';
  *(undefined2 *)(iVar2 + 2 + local_20) = *puVar3;
  if ((bVar7) && (iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
    Links(unsigned_short)::s_Sentinel = 0xffff;
    DAT_00f1ad1a = 0xffff;
    DAT_00f1ad1c = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  if (uVar6 == 0xffff) {
    psVar1 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    psVar1 = (short *)(local_24 + *(int *)(this + 4));
  }
  if (*psVar1 != -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_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar5 = &Links(unsigned_short)::s_Sentinel;
    if (uVar6 != 0xffff) {
      puVar5 = (ushort *)(*(int *)(this + 4) + local_24);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar5 * 0x2c) = param_1;
  }
  if (uVar6 != 0xffff) {
    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_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar3 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar3 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + local_24) = puVar3[2];
  }
  if (param_1 == *(ushort *)(this + 0x10)) {
    *(ushort *)(this + 0x10) = uVar6;
    goto LAB_004cf34c;
  }
  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_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    if (param_1 != 0xffff) goto LAB_004cf2ed;
LAB_004cf555:
    uVar4 = DAT_00f1ad1c;
    if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004cf2ff;
LAB_004cf570:
    iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar2 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      goto LAB_004cf2ff;
    }
    if (uVar4 != 0xffff) goto LAB_004cf309;
LAB_004cf59b:
    puVar5 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    if (param_1 == 0xffff) goto LAB_004cf555;
LAB_004cf2ed:
    uVar4 = *(ushort *)(local_20 + *(int *)(this + 4) + 4);
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004cf570;
LAB_004cf2ff:
    if (uVar4 == 0xffff) goto LAB_004cf59b;
LAB_004cf309:
    puVar5 = (ushort *)((uint)uVar4 * 0x2c + *(int *)(this + 4));
  }
  if (param_1 == *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_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar3 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar3 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar3[2] * 0x2c) = uVar6;
  }
  else {
    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_00f1ad1a = 0xffff;
      DAT_00f1ad1c = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar3 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar3 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar3[2] * 0x2c) = uVar6;
  }
LAB_004cf34c:
  *(ushort *)(*(int *)(this + 4) + local_24) = param_1;
  if (param_1 != 0xffff) {
    *(ushort *)(*(int *)(this + 4) + 4 + local_20) = uVar6;
  }
  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)