L L4D2node

CUtlRBTree<void*,unsigned_short,bool(*)(void*const&,void*const&),CUtlMemory<UtlRBTreeNode_t<void*,unsigned_short>,unsigned_short>>::RotateLeft

0x001f3a80 · 1279 bytes · __thiscall

_ZN10CUtlRBTreeIPvtPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE10RotateLeftEt

Decompiled

undefined (2 params)

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

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

{
  short *psVar1;
  ushort *puVar2;
  int iVar3;
  undefined2 *puVar4;
  ushort uVar5;
  ushort uVar6;
  bool bVar7;
  int local_24;
  int local_20;
  
  if (Links(unsigned_short)::s_Sentinel == '\0') {
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    if (param_1 != 0xffff) goto LAB_001f3aab;
LAB_001f3c98:
    local_20 = 0xbfff4;
    uVar6 = DAT_003417fa;
    if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_001f3ace;
LAB_001f3cb8:
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    iVar3 = *(int *)(this + 4);
    if (uVar6 != 0xffff) goto LAB_001f3adb;
LAB_001f3ce3:
    local_24 = 0xbfff4;
    puVar4 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    if (param_1 == 0xffff) goto LAB_001f3c98;
LAB_001f3aab:
    local_20 = (uint)param_1 * 0xc;
    uVar6 = *(ushort *)(*(int *)(this + 4) + local_20 + 2);
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_001f3cb8;
LAB_001f3ace:
    iVar3 = *(int *)(this + 4);
    if (uVar6 == 0xffff) goto LAB_001f3ce3;
LAB_001f3adb:
    local_24 = (uint)uVar6 * 0xc;
    puVar4 = (undefined2 *)(local_24 + iVar3);
  }
  bVar7 = Links(unsigned_short)::s_Sentinel == '\0';
  *(undefined2 *)(iVar3 + 2 + local_20) = *puVar4;
  if ((bVar7) && (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
    DAT_003417fa = 0xffff;
    Links(unsigned_short)::s_Sentinel = 0xffff;
    DAT_003417fc = 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') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar2 = &Links(unsigned_short)::s_Sentinel;
    if (uVar6 != 0xffff) {
      puVar2 = (ushort *)(local_24 + *(int *)(this + 4));
    }
    *(ushort *)(*(int *)(this + 4) + 4 + (uint)*puVar2 * 0xc) = param_1;
  }
  if (uVar6 != 0xffff) {
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar4 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar4 = (undefined2 *)(*(int *)(this + 4) + local_20);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + local_24) = puVar4[2];
  }
  if (param_1 == *(ushort *)(this + 0x10)) {
    *(ushort *)(this + 0x10) = uVar6;
    goto LAB_001f3bec;
  }
  if (Links(unsigned_short)::s_Sentinel == '\0') {
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    if (param_1 != 0xffff) goto LAB_001f3b95;
LAB_001f3de5:
    uVar5 = DAT_003417fc;
    if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_001f3ba7;
LAB_001f3e00:
    iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
    if (iVar3 != 0) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
      goto LAB_001f3ba7;
    }
    if (uVar5 != 0xffff) goto LAB_001f3bb1;
LAB_001f3e2b:
    puVar2 = &Links(unsigned_short)::s_Sentinel;
  }
  else {
    if (param_1 == 0xffff) goto LAB_001f3de5;
LAB_001f3b95:
    uVar5 = *(ushort *)(local_20 + *(int *)(this + 4) + 4);
    if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_001f3e00;
LAB_001f3ba7:
    if (uVar5 == 0xffff) goto LAB_001f3e2b;
LAB_001f3bb1:
    puVar2 = (ushort *)(*(int *)(this + 4) + (uint)uVar5 * 0xc);
  }
  if (param_1 == *puVar2) {
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar4 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar4 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    *(ushort *)(*(int *)(this + 4) + (uint)(ushort)puVar4[2] * 0xc) = uVar6;
  }
  else {
    if ((Links(unsigned_short)::s_Sentinel == '\0') &&
       (iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
      Links(unsigned_short)::s_Sentinel = 0xffff;
      DAT_003417fa = 0xffff;
      DAT_003417fc = 0xffff;
      __cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
    }
    puVar4 = &Links(unsigned_short)::s_Sentinel;
    if (param_1 != 0xffff) {
      puVar4 = (undefined2 *)(local_20 + *(int *)(this + 4));
    }
    *(ushort *)(*(int *)(this + 4) + 2 + (uint)(ushort)puVar4[2] * 0xc) = uVar6;
  }
LAB_001f3bec:
  *(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)