L L4D2node

CUtlLinkedList<CCommandBuffer::Command_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>>>::AllocInternal

0x00246c10 · 359 bytes · __thiscall

_ZN14CUtlLinkedListIN14CCommandBuffer9Command_tEiLb1Ei15CUtlFixedMemoryI19UtlLinkedListElem_tIS1_iEEE13AllocInternalEb

Decompiled

undefined (2 params)

/* CUtlLinkedList<CCommandBuffer::Command_t, int, true, int,
   CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t, int> > >::AllocInternal(bool) */

int * __thiscall
CUtlLinkedList<CCommandBuffer::Command_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>>>
::AllocInternal(CUtlLinkedList<CCommandBuffer::Command_t,int,true,int,CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>>>
                *this,bool param_1)

{
  int *piVar1;
  int *piVar2;
  int *piVar3;
  int iVar4;
  int *piVar5;
  
  piVar1 = *(int **)(this + 0x14);
  if (piVar1 != (int *)0x0) {
    *(int *)(this + 0x14) = piVar1[4];
    piVar3 = piVar1;
    piVar5 = piVar1;
    goto joined_r0x00246c9c;
  }
  piVar2 = *(int **)(this + 0x20);
  if (((piVar2 == (int *)0x0) || (iVar4 = *(int *)(this + 0x24), iVar4 < 0)) || (piVar2[1] <= iVar4)
     ) {
    piVar2 = *(int **)this;
    if (piVar2 == (int *)0x0) goto LAB_00246cbb;
LAB_00246c41:
    if (piVar2[1] < 1) goto LAB_00246cbb;
LAB_00246c48:
    iVar4 = 0;
  }
  else {
    iVar4 = iVar4 + 1;
    if (piVar2[1] <= iVar4) {
      piVar2 = (int *)*piVar2;
      if (piVar2 != (int *)0x0) goto LAB_00246c41;
LAB_00246cbb:
      CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>>::Grow
                ((CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>> *)this,1);
      piVar2 = *(int **)(this + 0x20);
      *(undefined4 *)(this + 0x28) = 0;
      if (((piVar2 == (int *)0x0) || (iVar4 = *(int *)(this + 0x24), iVar4 < 0)) ||
         (piVar2[1] <= iVar4)) {
        piVar2 = *(int **)this;
      }
      else {
        iVar4 = iVar4 + 1;
        if (iVar4 < piVar2[1]) {
          if (iVar4 < 0) goto LAB_00246cf8;
          goto LAB_00246c4a;
        }
        piVar2 = (int *)*piVar2;
      }
      if ((piVar2 == (int *)0x0) || (piVar2[1] < 1)) {
LAB_00246cf8:
        if (AllocInternal(bool)::__executeCount < 10) {
          AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
          Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
          return (int *)0x0;
        }
        return (int *)0x0;
      }
      goto LAB_00246c48;
    }
    if (iVar4 < 0) goto LAB_00246cbb;
  }
LAB_00246c4a:
  piVar3 = piVar2 + iVar4 * 5 + 2;
  if (piVar3 == (int *)0x0) {
    if (AllocInternal(bool)::__executeCount < 10) {
      AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
      Warning("CUtlLinkedList overflow! (exhausted index range)\n");
    }
    return (int *)0x0;
  }
  *(int **)(this + 0x20) = piVar2;
  *(int *)(this + 0x24) = iVar4;
  piVar5 = piVar3;
  if (piVar2[1] <= iVar4) {
    piVar3 = (int *)0x0;
    piVar5 = piVar1;
  }
  *(int *)(this + 0x1c) = *(int *)(this + 0x1c) + 1;
joined_r0x00246c9c:
  if (param_1) {
    piVar3[4] = 0;
    piVar3[3] = 0;
    return piVar5;
  }
  piVar3[4] = (int)piVar5;
  piVar3[3] = (int)piVar5;
  return piVar5;
}

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)