CUtlVector<CUtlVector<ModelInstanceHashPair_t,CUtlMemory<ModelInstanceHashPair_t,int>>,CUtlMemory<CUtlVector<ModelInstanceHashPair_t,CUtlMemory<ModelInstanceHashPair_t,int>>,int>>::SetCount
0x0018ac10 · 354 bytes · __thiscall
_ZN10CUtlVectorIS_I23ModelInstanceHashPair_t10CUtlMemoryIS0_iEES1_IS3_iEE8SetCountEi
Decompiled
undefined (2 params)
/* CUtlVector<CUtlVector<ModelInstanceHashPair_t, CUtlMemory<ModelInstanceHashPair_t, int> >,
CUtlMemory<CUtlVector<ModelInstanceHashPair_t, CUtlMemory<ModelInstanceHashPair_t, int> >, int>
>::SetCount(int) */
void __thiscall
CUtlVector<CUtlVector<ModelInstanceHashPair_t,CUtlMemory<ModelInstanceHashPair_t,int>>,CUtlMemory<CUtlVector<ModelInstanceHashPair_t,CUtlMemory<ModelInstanceHashPair_t,int>>,int>>
::SetCount(CUtlVector<CUtlVector<ModelInstanceHashPair_t,CUtlMemory<ModelInstanceHashPair_t,int>>,CUtlMemory<CUtlVector<ModelInstanceHashPair_t,CUtlMemory<ModelInstanceHashPair_t,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_0018ac4a;
if (iVar1 == 0) {
if (iVar6 == 0) {
if (iVar4 < 3) {
iVar6 = 2;
goto LAB_0018acef;
}
iVar6 = 2;
}
do {
iVar6 = iVar6 * 2;
} while (iVar6 < iVar4);
}
else {
for (iVar6 = ((iVar4 + -1) / iVar1 + 1) * iVar1; iVar6 < iVar4; iVar6 = (iVar6 + iVar4) / 2) {
}
}
LAB_0018acef:
*(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_0018ac4a:
pvVar3 = *(void **)this;
}
*(int *)(this + 0xc) = iVar5;
iVar6 = (iVar5 - iVar7) - param_1;
*(void **)(this + 0x10) = pvVar3;
if (iVar6 < 1) {
if (0 < param_1) {
LAB_0018ac6c:
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_0018ac6c;
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.