L L4D2node

CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>::NewNode

0x00064230 · 337 bytes · __thiscall

_ZN10CUtlRBTreeIN7CUtlMapIjN5GCSDK16JobStatsBucket_tEiE6Node_tEiNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_iEiEE7NewNodeEv

Decompiled

undefined (1 param)

/* CUtlRBTree<CUtlMap<unsigned int, GCSDK::JobStatsBucket_t, int>::Node_t, int, CUtlMap<unsigned
   int, GCSDK::JobStatsBucket_t, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int,
   GCSDK::JobStatsBucket_t, int>::Node_t, int>, int> >::NewNode() */

int __thiscall
CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
::NewNode(CUtlRBTree<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int,CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,GCSDK::JobStatsBucket_t,int>::Node_t,int>,int>>
          *this)

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined4 *puVar7;
  byte bVar8;
  
  bVar8 = 0;
  iVar6 = *(int *)(this + 0x18);
  if (iVar6 != -1) {
    iVar3 = *(int *)(this + 4);
    iVar5 = iVar6 * 0xec + iVar3;
    *(undefined4 *)(this + 0x18) = *(undefined4 *)(iVar5 + 4);
    goto LAB_00064255;
  }
  iVar3 = *(int *)(this + 0x1c);
  iVar5 = *(int *)(this + 8);
  if ((iVar3 < 0) || (iVar5 <= iVar3)) {
    if (iVar5 < 1) goto LAB_000642c0;
LAB_000642ac:
    iVar5 = 0;
    iVar6 = 0;
  }
  else {
    iVar4 = iVar3 + 1;
    if ((iVar4 < 0) || (iVar5 <= iVar4)) {
LAB_000642c0:
      iVar4 = *(int *)(this + 0xc);
      if (-1 < iVar4) {
        iVar1 = iVar5 + 1;
        if (iVar4 == 0) {
          iVar4 = 1;
          if (iVar5 != 0) {
            iVar4 = iVar5;
          }
          while (iVar5 = iVar4, iVar5 < iVar1) {
            iVar4 = iVar5 * 2;
          }
        }
        else {
          for (iVar5 = iVar4 * (iVar5 / iVar4 + 1); iVar5 < iVar1; iVar5 = (iVar5 + iVar1) / 2) {
          }
        }
        *(int *)(this + 8) = iVar5;
        if (*(void **)(this + 4) == (void *)0x0) {
          pvVar2 = malloc(iVar5 * 0xec);
          *(void **)(this + 4) = pvVar2;
        }
        else {
          pvVar2 = realloc(*(void **)(this + 4),iVar5 * 0xec);
          iVar3 = *(int *)(this + 0x1c);
          *(void **)(this + 4) = pvVar2;
          iVar5 = *(int *)(this + 8);
        }
      }
      if ((iVar3 < 0) || (iVar5 <= iVar3)) {
        if (0 < iVar5) goto LAB_000642ac;
      }
      else {
        iVar3 = iVar3 + 1;
        if (iVar3 < iVar5) {
          iVar5 = iVar3 * 0xec;
          iVar6 = iVar3;
          goto LAB_000642b0;
        }
      }
      Error("CUtlRBTree overflow!\n");
      iVar5 = -0xec;
    }
    else {
      iVar5 = iVar4 * 0xec;
      iVar6 = iVar4;
    }
  }
LAB_000642b0:
  iVar3 = *(int *)(this + 4);
  *(int *)(this + 0x1c) = iVar6;
  iVar5 = iVar5 + iVar3;
LAB_00064255:
  if (iVar5 != -0x10) {
    puVar7 = (undefined4 *)(iVar5 + 0x14);
    for (iVar3 = 0x36; iVar3 != 0; iVar3 = iVar3 + -1) {
      *puVar7 = 0;
      puVar7 = puVar7 + (uint)bVar8 * -2 + 1;
    }
    iVar3 = *(int *)(this + 4);
  }
  *(int *)(this + 0x20) = iVar3;
  return iVar6;
}

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)