CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>>::Grow
0x00246b70 · 140 bytes · __thiscall
_ZN15CUtlFixedMemoryI19UtlLinkedListElem_tIN14CCommandBuffer9Command_tEiEE4GrowEi
Decompiled
undefined (2 params)
/* CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t, int> >::Grow(int) */
void __thiscall
CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>>::Grow
(CUtlFixedMemory<UtlLinkedListElem_t<CCommandBuffer::Command_t,int>> *this,int param_1)
{
undefined4 *puVar1;
undefined4 *puVar2;
int iVar3;
undefined4 *puVar4;
int iVar5;
if (0 < param_1) {
if (*(int *)(this + 8) == 0) {
iVar3 = *(int *)(this + 4);
iVar5 = iVar3;
if (iVar3 == 0) {
iVar5 = 2;
}
}
else {
iVar3 = *(int *)(this + 4);
iVar5 = *(int *)(this + 8);
}
if (iVar5 < param_1) {
iVar5 = iVar5 * ((iVar5 + -1 + param_1) / iVar5);
}
*(int *)(this + 4) = iVar3 + iVar5;
puVar2 = malloc(iVar5 * 0x14 + 8);
if (puVar2 == (undefined4 *)0x0) {
Error("CUtlFixedMemory overflow!\n");
}
*puVar2 = 0;
puVar2[1] = iVar5;
puVar1 = *(undefined4 **)this;
if (*(undefined4 **)this == (undefined4 *)0x0) {
*(undefined4 **)this = puVar2;
}
else {
do {
puVar4 = puVar1;
puVar1 = (undefined4 *)*puVar4;
} while (puVar1 != (undefined4 *)0x0);
*puVar4 = puVar2;
}
}
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.