INextBot::GetDebugHistory
0x007543d0 · 364 bytes · __thiscall
_ZNK8INextBot15GetDebugHistoryEjP10CUtlVectorIPKNS_20NextBotDebugLineTypeE10CUtlMemoryIS3_iEE
Decompiled
undefined (3 params)
/* INextBot::GetDebugHistory(unsigned int, CUtlVector<INextBot::NextBotDebugLineType const*,
CUtlMemory<INextBot::NextBotDebugLineType const*, int> >*) const */
void __thiscall INextBot::GetDebugHistory(INextBot *this,uint param_1,CUtlVector *param_2)
{
uint *puVar1;
int iVar2;
int iVar3;
void *pvVar4;
int iVar5;
int iVar6;
int iVar7;
if ((param_2 != (CUtlVector *)0x0) &&
(*(undefined4 *)(param_2 + 0xc) = 0, 0 < *(int *)(this + 0x228))) {
iVar7 = 0;
do {
while (puVar1 = *(uint **)(*(int *)(this + 0x21c) + iVar7 * 4), (param_1 & *puVar1) != 0) {
iVar2 = *(int *)(param_2 + 0xc);
iVar5 = iVar2 + 1;
iVar6 = *(int *)(param_2 + 4);
if (iVar6 < iVar5) {
iVar3 = *(int *)(param_2 + 8);
if (iVar3 < 0) goto LAB_00754439;
if (iVar3 == 0) {
if (iVar6 == 0) {
if (iVar5 < 9) {
iVar3 = 8;
goto LAB_007544d7;
}
iVar6 = 8;
}
do {
iVar3 = iVar6 * 2;
if (iVar5 <= iVar3) break;
iVar3 = iVar6 * 4;
iVar6 = iVar3;
} while (iVar3 < iVar5);
}
else {
for (iVar3 = (iVar2 / iVar3 + 1) * iVar3; iVar3 < iVar5; iVar3 = (iVar3 + iVar5) / 2) {
}
}
LAB_007544d7:
*(int *)(param_2 + 4) = iVar3;
if (*(void **)param_2 == (void *)0x0) {
pvVar4 = malloc(iVar3 << 2);
*(void **)param_2 = pvVar4;
}
else {
pvVar4 = realloc(*(void **)param_2,iVar3 << 2);
*(void **)param_2 = pvVar4;
iVar5 = *(int *)(param_2 + 0xc) + 1;
}
}
else {
LAB_00754439:
pvVar4 = *(void **)param_2;
}
*(int *)(param_2 + 0xc) = iVar5;
*(void **)(param_2 + 0x10) = pvVar4;
iVar6 = iVar2 << 2;
iVar5 = (iVar5 - iVar2) + -1;
if (0 < iVar5) {
iVar6 = iVar2 * 4;
_V_memmove((void *)((int)pvVar4 + iVar6 + 4),(void *)((int)pvVar4 + iVar6),iVar5 * 4);
pvVar4 = *(void **)param_2;
}
if ((undefined4 *)((int)pvVar4 + iVar6) == (undefined4 *)0x0) break;
*(undefined4 *)((int)pvVar4 + iVar6) = puVar1;
iVar7 = iVar7 + 1;
if (*(int *)(this + 0x228) <= iVar7) {
return;
}
}
iVar7 = iVar7 + 1;
} while (iVar7 < *(int *)(this + 0x228));
}
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.