BuildMinidumpComment
0x00217070 · 529 bytes · __cdecl
_Z20BuildMinidumpCommentPKcb
Decompiled
undefined (2 params)
/* BuildMinidumpComment(char const*, bool) */
void BuildMinidumpComment(char *param_1,bool param_2)
{
undefined4 uVar1;
undefined4 uVar2;
undefined4 uVar3;
undefined4 uVar4;
undefined4 uVar5;
char cVar6;
int iVar7;
char *pcVar8;
uint uVar9;
bool bVar10;
longdouble lVar11;
bVar10 = *(int *)(sys_minidumpexpandedspew._28_4_ + 0x30) == 0;
uVar9 = errorText;
if ((bVar10) && (0xdab < (int)errorText)) {
uVar9 = 0xdac;
}
/* try { // try from 002170b4 to 00217291 has its CatchHandler @ 00217297 */
_V_memset(DAT_003edba8,0,uVar9);
if (param_1 == (char *)0x0) {
lVar11 = (longdouble)Plat_FloatTime();
V_snprintf(DAT_003edba8,uVar9,"Crash\nUptime( %f )\n",SUB84((double)lVar11,0),
(int)((ulonglong)(double)lVar11 >> 0x20));
}
else {
iVar7 = _V_strlen(param_1);
if (param_1[iVar7 + -1] == '\n') {
param_1[iVar7 + -1] = '\0';
}
lVar11 = (longdouble)Plat_FloatTime();
V_snprintf(DAT_003edba8,uVar9,"Sys_Error( %s )\nUptime( %f )\n",param_1,SUB84((double)lVar11,0),
(int)((ulonglong)(double)lVar11 >> 0x20));
}
V_strncat(DAT_003edba8,g_minidumpinfo,uVar9,-1);
SteamAPI_SetMiniDumpComment(DAT_003edba8);
Plat_GetPagedPoolInfo(&g_final);
uVar5 = g_nMapLoadCount;
uVar4 = gHostSpawnCount;
uVar3 = g_HostServerAbortCount;
uVar2 = g_HostErrorCount;
uVar1 = g_HostEndDemo;
if (game == (undefined *)0x0) {
pcVar8 = "inactive";
}
else {
cVar6 = (**(code **)(*(int *)game + 0x40))(game);
pcVar8 = "active";
if (cVar6 == '\0') {
pcVar8 = "inactive";
}
}
V_snprintf(g_ppi,0x200,
"\nPaged Pool\nprev PP PAGES: used: %lu, free %lu\nfinal PP PAGES: used: %lu, free %lu\nmemallocfail? = %u\nActive: %s SpawnCount %d MapLoad Count %d\nError count %d, end demo %d, abort count %d\n"
,g_pagedpoolinfo,DAT_003edb24,g_final,DAT_003edc0c,1,pcVar8,uVar4,uVar5,uVar2,uVar1,
uVar3);
V_strncat(DAT_003edba8,g_ppi,uVar9,-1);
SteamAPI_SetMiniDumpComment(DAT_003edba8);
if (bVar10) {
return;
}
CErrorText::BuildCommentExtended((CErrorText *)&errorText,uVar9);
SteamAPI_SetMiniDumpComment(DAT_003edba8);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.