L L4D2node

CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>::RotateRight

0x005abc40 · 1321 bytes · __thiscall

_ZN10CUtlRBTreeIN14AI_CriteriaSet11CritEntry_tEsPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_sEsEE11RotateRightEs

Decompiled

undefined (2 params)

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

void __thiscall
CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
::RotateRight(CUtlRBTree<AI_CriteriaSet::CritEntry_t,short,bool(*)(AI_CriteriaSet::CritEntry_t_const&,AI_CriteriaSet::CritEntry_t_const&),CUtlMemory<UtlRBTreeNode_t<AI_CriteriaSet::CritEntry_t,short>,short>>
              *this,short param_1)

{
  short sVar1;
  int iVar2;
  short *psVar3;
  undefined2 *puVar4;
  int iVar5;
  short sVar6;
  int local_24;
  
  if (Links(short)::s_Sentinel == '\0') {
    iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
    if (iVar5 != 0) {
      Links(short)::s_Sentinel = 0xffff;
      DAT_00f21a9a = 0xffff;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
    }
    if (param_1 != -1) goto LAB_005abc68;
LAB_005abe65:
    local_24 = -0x50;
    psVar3 = &Links(short)::s_Sentinel;
  }
  else {
    if (param_1 == -1) goto LAB_005abe65;
LAB_005abc68:
    local_24 = param_1 * 0x50;
    psVar3 = (short *)(local_24 + *(int *)(this + 4));
  }
  sVar1 = *psVar3;
  if ((Links(short)::s_Sentinel == '\0') &&
     (iVar5 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar5 != 0)) {
    DAT_00f21a9a = 0xffff;
    Links(short)::s_Sentinel = 0xffff;
    DAT_00f21a9c = -1;
    __cxa_guard_release(&Links(short)::s_Sentinel);
  }
  iVar5 = -0x50;
  puVar4 = &Links(short)::s_Sentinel;
  if (sVar1 != -1) {
    iVar5 = sVar1 * 0x50;
    puVar4 = (undefined2 *)(*(int *)(this + 4) + iVar5);
  }
  *(undefined2 *)(*(int *)(this + 4) + local_24) = puVar4[1];
  if ((Links(short)::s_Sentinel == '\0') &&
     (iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar2 != 0)) {
    DAT_00f21a9a = 0xffff;
    Links(short)::s_Sentinel = 0xffff;
    DAT_00f21a9c = -1;
    __cxa_guard_release(&Links(short)::s_Sentinel);
  }
  if (sVar1 == -1) {
    puVar4 = &Links(short)::s_Sentinel;
  }
  else {
    puVar4 = (undefined2 *)(*(int *)(this + 4) + iVar5);
  }
  if (puVar4[1] != -1) {
    if ((Links(short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar2 != 0)) {
      Links(short)::s_Sentinel = 0xffff;
      DAT_00f21a9a = 0xffff;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
    }
    puVar4 = &Links(short)::s_Sentinel;
    if (sVar1 != -1) {
      puVar4 = (undefined2 *)(*(int *)(this + 4) + iVar5);
    }
    *(short *)(*(int *)(this + 4) + 4 + (short)puVar4[1] * 0x50) = param_1;
  }
  if (sVar1 != -1) {
    if ((Links(short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar2 != 0)) {
      DAT_00f21a9a = 0xffff;
      Links(short)::s_Sentinel = 0xffff;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
    }
    puVar4 = &Links(short)::s_Sentinel;
    if (param_1 != -1) {
      puVar4 = (undefined2 *)(*(int *)(this + 4) + local_24);
    }
    *(undefined2 *)(*(int *)(this + 4) + 4 + iVar5) = puVar4[2];
  }
  if (param_1 == *(short *)(this + 0x10)) {
    *(short *)(this + 0x10) = sVar1;
    goto LAB_005abdbe;
  }
  if (Links(short)::s_Sentinel == '\0') {
    iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
    if (iVar2 != 0) {
      DAT_00f21a9a = 0xffff;
      DAT_00f21a9c = -1;
      Links(short)::s_Sentinel = 0xffff;
      __cxa_guard_release(&Links(short)::s_Sentinel);
      goto LAB_005abd52;
    }
    if (param_1 != -1) goto LAB_005abd5c;
LAB_005abfe0:
    sVar6 = DAT_00f21a9c;
    if (Links(short)::s_Sentinel != '\0') goto LAB_005abd70;
LAB_005abff8:
    iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel);
    if (iVar2 != 0) {
      Links(short)::s_Sentinel = 0xffff;
      DAT_00f21a9a = 0xffff;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
      goto LAB_005abd70;
    }
    if (sVar6 != -1) goto LAB_005abd7d;
LAB_005ac026:
    puVar4 = &Links(short)::s_Sentinel;
  }
  else {
LAB_005abd52:
    if (param_1 == -1) goto LAB_005abfe0;
LAB_005abd5c:
    sVar6 = *(short *)(local_24 + *(int *)(this + 4) + 4);
    if (Links(short)::s_Sentinel == '\0') goto LAB_005abff8;
LAB_005abd70:
    if (sVar6 == -1) goto LAB_005ac026;
LAB_005abd7d:
    puVar4 = (undefined2 *)(sVar6 * 0x50 + *(int *)(this + 4));
  }
  if (param_1 == puVar4[1]) {
    if ((Links(short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar2 != 0)) {
      DAT_00f21a9a = 0xffff;
      Links(short)::s_Sentinel = 0xffff;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
    }
    puVar4 = &Links(short)::s_Sentinel;
    if (param_1 != -1) {
      puVar4 = (undefined2 *)(local_24 + *(int *)(this + 4));
    }
    *(short *)(*(int *)(this + 4) + 2 + (short)puVar4[2] * 0x50) = sVar1;
  }
  else {
    if ((Links(short)::s_Sentinel == '\0') &&
       (iVar2 = __cxa_guard_acquire(&Links(short)::s_Sentinel), iVar2 != 0)) {
      DAT_00f21a9a = 0xffff;
      Links(short)::s_Sentinel = 0xffff;
      DAT_00f21a9c = -1;
      __cxa_guard_release(&Links(short)::s_Sentinel);
    }
    puVar4 = &Links(short)::s_Sentinel;
    if (param_1 != -1) {
      puVar4 = (undefined2 *)(local_24 + *(int *)(this + 4));
    }
    *(short *)(*(int *)(this + 4) + (short)puVar4[2] * 0x50) = sVar1;
  }
LAB_005abdbe:
  *(short *)(*(int *)(this + 4) + 2 + iVar5) = param_1;
  if (param_1 != -1) {
    *(short *)(*(int *)(this + 4) + 4 + local_24) = sVar1;
  }
  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)