CUtlVector<scavengelist_t,CUtlMemoryFixedGrowable<scavengelist_t,64u,int>>::GrowVector
0x00964d70 · 234 bytes · __thiscall
_ZN10CUtlVectorI14scavengelist_t23CUtlMemoryFixedGrowableIS0_Lj64EiEE10GrowVectorEi
Decompiled
undefined (2 params)
/* CUtlVector<scavengelist_t, CUtlMemoryFixedGrowable<scavengelist_t, 64u, int> >::GrowVector(int)
*/
void __thiscall
CUtlVector<scavengelist_t,CUtlMemoryFixedGrowable<scavengelist_t,64u,int>>::GrowVector
(CUtlVector<scavengelist_t,CUtlMemoryFixedGrowable<scavengelist_t,64u,int>> *this,
int param_1)
{
int iVar1;
void *pvVar2;
int iVar3;
int iVar4;
CUtlMemory<scavengelist_t,int> *in_stack_ffffffd4;
int in_stack_ffffffd8;
iVar1 = *(int *)(this + 4);
iVar3 = *(int *)(this + 0x210) + param_1;
if (iVar1 < iVar3) {
iVar4 = *(int *)(this + 8);
iVar3 = iVar3 - iVar1;
if (iVar4 < 0) {
CUtlMemory<scavengelist_t,int>::ConvertToGrowableMemory(in_stack_ffffffd4,in_stack_ffffffd8);
iVar4 = *(int *)(this + 8);
if (iVar4 < 0) {
iVar3 = param_1 + *(int *)(this + 0x210);
goto LAB_00964d8e;
}
iVar1 = *(int *)(this + 4);
}
iVar3 = iVar3 + iVar1;
if (iVar4 == 0) {
if (iVar1 == 0) {
iVar1 = 4;
}
for (; iVar1 < iVar3; iVar1 = iVar1 * 2) {
}
}
else {
for (iVar1 = ((iVar3 + -1) / iVar4 + 1) * iVar4; iVar1 < iVar3; iVar1 = (iVar1 + iVar3) / 2) {
}
}
*(int *)(this + 4) = iVar1;
if (*(void **)this == (void *)0x0) {
pvVar2 = malloc(iVar1 << 3);
iVar3 = param_1 + *(int *)(this + 0x210);
*(void **)this = pvVar2;
}
else {
pvVar2 = realloc(*(void **)this,iVar1 << 3);
iVar3 = param_1 + *(int *)(this + 0x210);
*(void **)this = pvVar2;
}
}
else {
LAB_00964d8e:
pvVar2 = *(void **)this;
}
*(int *)(this + 0x210) = iVar3;
*(void **)(this + 0x214) = pvVar2;
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.