CUtlVector<rr2::CriterionStatic,CUtlMemoryConservative<rr2::CriterionStatic>>::InsertBefore
0x00bdb200 · 238 bytes · __thiscall
_ZN10CUtlVectorIN3rr215CriterionStaticE22CUtlMemoryConservativeIS1_EE12InsertBeforeEiRKS1_
Decompiled
undefined (3 params)
/* CUtlVector<rr2::CriterionStatic, CUtlMemoryConservative<rr2::CriterionStatic>
>::InsertBefore(int, rr2::CriterionStatic const&) */
int __thiscall
CUtlVector<rr2::CriterionStatic,CUtlMemoryConservative<rr2::CriterionStatic>>::InsertBefore
(CUtlVector<rr2::CriterionStatic,CUtlMemoryConservative<rr2::CriterionStatic>> *this,
int param_1,CriterionStatic *param_2)
{
byte bVar1;
CriterionStatic CVar2;
undefined4 uVar3;
undefined2 *puVar4;
void *pvVar5;
byte bVar6;
int iVar7;
int iVar8;
iVar7 = *(int *)(this + 8) + 1;
if ((int)(*(uint *)(this + 4) / 0x14) < iVar7) {
pvVar5 = realloc(*(void **)this,iVar7 * 0x14);
*(void **)this = pvVar5;
*(int *)(this + 4) = iVar7 * 0x14;
iVar7 = *(int *)(this + 8) + 1;
}
else {
pvVar5 = *(void **)this;
}
*(int *)(this + 8) = iVar7;
iVar7 = (iVar7 - param_1) + -1;
iVar8 = param_1 * 0x14;
*(void **)(this + 0xc) = pvVar5;
if (0 < iVar7) {
_V_memmove((void *)((int)pvVar5 + iVar8 + 0x14),(void *)((int)pvVar5 + iVar8),iVar7 * 0x14);
pvVar5 = *(void **)this;
}
puVar4 = (undefined2 *)((int)pvVar5 + iVar8);
if (puVar4 != (undefined2 *)0x0) {
*puVar4 = *(undefined2 *)param_2;
bVar1 = *(byte *)(puVar4 + 4);
*(undefined4 *)(puVar4 + 2) = *(undefined4 *)(param_2 + 4);
bVar6 = (byte)param_2[8] & 1;
*(byte *)(puVar4 + 4) = bVar1 & 0xfe | bVar6;
CVar2 = param_2[8];
*(byte *)(puVar4 + 4) = bVar1 & 0xfc | bVar6 | (byte)CVar2 & 2;
*(byte *)(puVar4 + 4) = bVar1 & 0xf8 | bVar6 | (byte)CVar2 & 2 | (byte)param_2[8] & 4;
uVar3 = *(undefined4 *)(param_2 + 0x10);
*(undefined4 *)(puVar4 + 6) = *(undefined4 *)(param_2 + 0xc);
*(undefined4 *)(puVar4 + 8) = uVar3;
}
return param_1;
}
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.