L L4D2node

CUtlLinkedList<CDispDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispDecal,unsigned_short>,unsigned_short>>::AllocInternal

0x00139030 · 394 bytes · __thiscall

_ZN14CUtlLinkedListI10CDispDecaltLb1Et10CUtlMemoryI19UtlLinkedListElem_tIS0_tEtEE13AllocInternalEb

Decompiled

undefined (2 params)

/* CUtlLinkedList<CDispDecal, unsigned short, true, unsigned short,
   CUtlMemory<UtlLinkedListElem_t<CDispDecal, unsigned short>, unsigned short>
   >::AllocInternal(bool) */

uint __thiscall
CUtlLinkedList<CDispDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispDecal,unsigned_short>,unsigned_short>>
::AllocInternal(CUtlLinkedList<CDispDecal,unsigned_short,true,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CDispDecal,unsigned_short>,unsigned_short>>
                *this,bool param_1)

{
  ushort uVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  
  uVar1 = *(ushort *)(this + 0x10);
  uVar6 = (uint)uVar1;
  uVar2 = uVar6;
  if (uVar1 == 0xffff) {
    iVar3 = *(int *)(this + 4);
    if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
      uVar5 = *(ushort *)(this + 0x16) + 1;
      uVar8 = uVar5 & 0xffff;
      uVar7 = 0xffff;
      if ((int)uVar8 < iVar3) {
        uVar2 = uVar5;
        uVar7 = uVar8;
      }
    }
    else {
      uVar7 = 0;
      if (iVar3 < 1) {
        uVar7 = 0xffff;
      }
      uVar2 = (0 < iVar3) - 1;
    }
    if ((int)uVar7 < iVar3) {
LAB_00139117:
      if ((short)uVar2 != -1) {
        *(short *)(this + 0x16) = (short)uVar2;
        *(short *)(this + 0x14) = *(short *)(this + 0x14) + 1;
        iVar3 = (uVar2 & 0xffff) * 0x50;
        iVar4 = *(int *)this + iVar3;
        goto LAB_00139060;
      }
      if (AllocInternal(bool)::__executeCount < 10) {
        AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
        Warning("CUtlLinkedList overflow! (exhausted index range)\n");
      }
    }
    else {
      CUtlMemory<UtlLinkedListElem_t<CDispDecal,unsigned_short>,unsigned_short>::Grow
                ((CUtlMemory<UtlLinkedListElem_t<CDispDecal,unsigned_short>,unsigned_short> *)this,1
                );
      iVar3 = *(int *)(this + 4);
      *(undefined4 *)(this + 0x18) = *(undefined4 *)this;
      if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
        uVar1 = *(ushort *)(this + 0x16) + 1;
        uVar5 = (uint)uVar1;
        uVar7 = 0xffff;
        if ((int)uVar5 < iVar3) {
          uVar7 = uVar5;
        }
        uVar2 = (uint)uVar1;
        if (iVar3 <= (int)uVar5) {
          uVar2 = uVar6;
        }
      }
      else {
        uVar7 = 0;
        if (iVar3 < 1) {
          uVar7 = 0xffff;
        }
        uVar2 = (0 < iVar3) - 1;
      }
      if ((int)uVar7 < iVar3) goto LAB_00139117;
      if (AllocInternal(bool)::__executeCount < 10) {
        AllocInternal(bool)::__executeCount = AllocInternal(bool)::__executeCount + 1;
        Warning("CUtlLinkedList overflow! (exhausted memory allocator)\n");
        return 0xffffffff;
      }
    }
    uVar2 = 0xffffffff;
  }
  else {
    iVar3 = (uint)uVar1 * 0x50;
    iVar4 = *(int *)this + iVar3;
    *(undefined2 *)(this + 0x10) = *(undefined2 *)(iVar4 + 0x4e);
LAB_00139060:
    if (!param_1) {
      *(short *)(iVar4 + 0x4e) = (short)uVar2;
      *(short *)(*(int *)this + 0x4c + iVar3) = (short)uVar2;
      return uVar2;
    }
    *(undefined2 *)(iVar4 + 0x4e) = 0xffff;
    *(undefined2 *)(*(int *)this + 0x4c + iVar3) = 0xffff;
  }
  return uVar2;
}

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)