Sys_Error_Internal
0x00214fe0 · 437 bytes · __cdecl
_Z18Sys_Error_InternalbPKcPc
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Sys_Error_Internal(bool, char const*, char*) */
void Sys_Error_Internal(bool param_1,char *param_2,char *param_3)
{
char cVar1;
int *piVar2;
int iVar3;
int in_GS_OFFSET;
char local_410 [1024];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
V_vsnprintf(local_410,0x400,param_2,param_3);
if (Sys_Error_Internal(bool,char_const*,char*)::bReentry == '\0') {
Sys_Error_Internal(bool,char_const*,char*)::bReentry = '\x01';
if (s_bIsDedicated == '\0') {
Sys_Printf("%s\n",local_410);
}
else {
puts(local_410);
}
g_bInErrorExit = 1;
piVar2 = (int *)CommandLine_Tier0();
iVar3 = (**(code **)(*piVar2 + 0x28))(piVar2,"-makereslists");
if (iVar3 == 0) {
piVar2 = (int *)CommandLine_Tier0();
iVar3 = (**(code **)(*piVar2 + 0x28))(piVar2,"-nomessagebox");
if (iVar3 == 0) {
piVar2 = (int *)CommandLine_Tier0();
iVar3 = (**(code **)(*piVar2 + 0x28))(piVar2,"-nocrashdialog");
if (iVar3 == 0) {
Warning(&DAT_002c6892,local_410);
}
}
}
cVar1 = Plat_IsInDebugSession(0);
if (cVar1 != '\0') {
raise(5);
}
BuildMinidumpComment(local_410,true);
g_bUpdateMinidumpComment = 0;
if (param_1) {
cVar1 = Plat_IsInDebugSession(0);
if (cVar1 == '\0') {
piVar2 = (int *)CommandLine_Tier0();
iVar3 = (**(code **)(*piVar2 + 0x28))(piVar2,"-nominidumps");
if (iVar3 == 0) {
_DAT_00000000 = 0xdeadbeef;
}
}
}
host_initialized = 0;
Plat_ExitProcess(100);
}
else {
fprintf(_stderr,"%s\n",local_410);
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.