L L4D2node

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

0x004cf740 · 1341 bytes · __thiscall

_ZN10CUtlRBTreeI17CBalanceTeamGrouptPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE11RotateRightEt

Decompiled

undefined (2 params)

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

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

{
  ushort uVar1;
  int iVar2;
  ushort uVar3;
  ushort *puVar4;
  undefined2 *puVar5;
  int iVar6;
  int local_24;
  
  if (Links(unsigned_short)::s_Sentinel == '\0') {
    iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar6 != 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_004cf768;
LAB_004cf975:
    local_24 = 0x2bffd4;
    puVar4 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    if (param_1 == 0xffff) goto LAB_004cf975;
LAB_004cf768:
    local_24 = (uint)param_1 * 0x2c;
    puVar4 = (ushort *)(*(int *)(this + 4) + local_24);
  }
  uVar1 = *puVar4;
  if ((Links(unsigned_short)::s_Sentinel == '\0') &&
     (iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
    DAT_00f1ad1a = 0xffff;
    Links(unsigned_short)::s_Sentinel = 0xffff;
    DAT_00f1ad1c = 0xffff;
    __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
  }
  iVar6 = 0x2bffd4;
  puVar5 = &Links(unsigned_short)::s_Sentinel;
  if (uVar1 != 0xffff) {
    iVar6 = (uint)uVar1 * 0x2c;
    puVar5 = (undefined2 *)(*(int *)(this + 4) + iVar6);
  }
  *(undefined2 *)(*(int *)(this + 4) + local_24) = puVar5[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);
  }
  if (uVar1 == 0xffff) {
    puVar5 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    puVar5 = (undefined2 *)(*(int *)(this + 4) + iVar6);
  }
  if (puVar5[1] != -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 (uVar1 != 0xffff) {
      puVar5 = (undefined2 *)(*(int *)(this + 4) + iVar6);
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)(ushort)puVar5[1] * 0x2c) = param_1;
  }
  if (uVar1 != 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);
    }
    puVar5 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar5 = (undefined2 *)(*(int *)(this + 4) + local_24);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + iVar6) = puVar5[2];
  }
  if (param_1 == *(ushort *)(this + 0x10)) {
    *(ushort *)(this + 0x10) = uVar1;
    goto LAB_004cf8c9;
  }
  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);
      goto LAB_004cf85a;
    }
    if (param_1 != 0xffff) goto LAB_004cf864;
LAB_004cfaf8:
    uVar3 = DAT_00f1ad1c;
    if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004cf876;
LAB_004cfb10:
    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_004cf876;
    }
    if (uVar3 != 0xffff) goto LAB_004cf880;
LAB_004cfb41:
    puVar5 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
LAB_004cf85a:
    if (param_1 == 0xffff) goto LAB_004cfaf8;
LAB_004cf864:
    uVar3 = *(ushort *)(local_24 + *(int *)(this + 4) + 4);
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004cfb10;
LAB_004cf876:
    if (uVar3 == 0xffff) goto LAB_004cfb41;
LAB_004cf880:
    puVar5 = (undefined2 *)((uint)uVar3 * 0x2c + *(int *)(this + 4));
  }
  if (param_1 == puVar5[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 (param_1 != 0xffff) {
      puVar5 = (undefined2 *)(*(int *)(this + 4) + local_24);
    }
    *(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar5[2] * 0x2c) = uVar1;
  }
  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);
    }
    puVar5 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar5 = (undefined2 *)(*(int *)(this + 4) + local_24);
    }
    *(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar5[2] * 0x2c) = uVar1;
  }
LAB_004cf8c9:
  *(ushort *)(*(int *)(this + 4) + 2 + iVar6) = param_1;
  if (param_1 != 0xffff) {
    *(ushort *)(*(int *)(this + 4) + 4 + local_24) = uVar1;
  }
  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)