L L4D2node

CUtlVector<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry,int>>,CUtlMemory<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry,int>>,int>>::SetCount

0x00480860 · 354 bytes · __thiscall

_ZN10CUtlVectorIS_IN23CEntityDataInstantiatorI17physicspushlist_tE9HashEntryE10CUtlMemoryIS3_iEES4_IS6_iEE8SetCountEi

Decompiled

undefined (2 params)

/* CUtlVector<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,
   CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry, int> >,
   CUtlMemory<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,
   CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry, int> >, int> >::SetCount(int)
    */

void __thiscall
CUtlVector<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry,int>>,CUtlMemory<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry,int>>,int>>
::SetCount(CUtlVector<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry,int>>,CUtlMemory<CUtlVector<CEntityDataInstantiator<physicspushlist_t>::HashEntry,CUtlMemory<CEntityDataInstantiator<physicspushlist_t>::HashEntry,int>>,int>>
           *this,int param_1)

{
  int iVar1;
  undefined4 *puVar2;
  void *pvVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  
  RemoveAll(this);
  iVar7 = *(int *)(this + 0xc);
  if (param_1 == 0) {
    return;
  }
  iVar6 = *(int *)(this + 4);
  iVar4 = param_1 + iVar7;
  iVar5 = iVar4;
  if (iVar6 < iVar4) {
    iVar1 = *(int *)(this + 8);
    if (iVar1 < 0) goto LAB_0048089a;
    if (iVar1 == 0) {
      if (iVar6 == 0) {
        if (iVar4 < 3) {
          iVar6 = 2;
          goto LAB_0048093f;
        }
        iVar6 = 2;
      }
      do {
        iVar6 = iVar6 * 2;
      } while (iVar6 < iVar4);
    }
    else {
      for (iVar6 = ((iVar4 + -1) / iVar1 + 1) * iVar1; iVar6 < iVar4; iVar6 = (iVar6 + iVar4) / 2) {
      }
    }
LAB_0048093f:
    *(int *)(this + 4) = iVar6;
    if (*(void **)this == (void *)0x0) {
      pvVar3 = malloc(iVar6 * 0x14);
      *(void **)this = pvVar3;
    }
    else {
      pvVar3 = realloc(*(void **)this,iVar6 * 0x14);
      *(void **)this = pvVar3;
      iVar5 = *(int *)(this + 0xc) + param_1;
    }
  }
  else {
LAB_0048089a:
    pvVar3 = *(void **)this;
  }
  *(int *)(this + 0xc) = iVar5;
  iVar6 = (iVar5 - iVar7) - param_1;
  *(void **)(this + 0x10) = pvVar3;
  if (iVar6 < 1) {
    if (0 < param_1) {
LAB_004808bc:
      iVar4 = 0;
      iVar7 = iVar7 * 0x14;
      do {
        puVar2 = (undefined4 *)(iVar7 + *(int *)this);
        if (puVar2 != (undefined4 *)0x0) {
          *puVar2 = 0;
          puVar2[1] = 0;
          puVar2[2] = 0;
          puVar2[3] = 0;
          puVar2[4] = 0;
        }
        iVar4 = iVar4 + 1;
        iVar7 = iVar7 + 0x14;
      } while (iVar4 < param_1);
      return;
    }
  }
  else if (0 < param_1) {
    _V_memmove((void *)((int)pvVar3 + iVar4 * 0x14),(void *)((int)pvVar3 + iVar7 * 0x14),
               iVar6 * 0x14);
    goto LAB_004808bc;
  }
  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)