GetUniqueStuckLogFilename
0x007548d0 · 431 bytes · unknown
_Z25GetUniqueStuckLogFilenamev
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* GetUniqueStuckLogFilename() */
undefined4 GetUniqueStuckLogFilename(void)
{
char *__s;
size_t __n;
int iVar1;
undefined1 *puVar2;
int in_GS_OFFSET;
char local_110 [128];
char local_90 [128];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if ((GetUniqueStuckLogFilename()::filename == '\0') &&
(iVar1 = __cxa_guard_acquire(&GetUniqueStuckLogFilename()::filename), iVar1 != 0)) {
GetUniqueStuckLogFilename()::filename._0_4_ = &PTR_InitQuietTruncation_00c08ee8;
GetUniqueStuckLogFilename()::filename[4] = 1;
GetUniqueStuckLogFilename()::filename[5] = '\0';
GetUniqueStuckLogFilename()::filename._264_4_ = 0;
__cxa_guard_release(&GetUniqueStuckLogFilename()::filename);
}
if (GetUniqueStuckLogFilename()::filename[5] != '\0') {
__s = *(char **)(gpGlobals + 0x3c);
if (__s == (char *)0x0) goto LAB_00754a11;
__n = strlen(__s);
iVar1 = strncmp(__s,GetUniqueStuckLogFilename()::filename + 10,__n);
if (iVar1 == 0) goto LAB_00754a11;
}
_V_strcpy(local_110,"HH:MM:SS");
if (local_110[0] != '\0') {
iVar1 = 0;
do {
while (local_110[0] == ':') {
if (3 < iVar1) {
local_110[iVar1] = '\0';
goto LAB_00754980;
}
local_110[iVar1] = '-';
iVar1 = iVar1 + 1;
local_110[0] = local_110[iVar1];
if (local_110[0] == '\0') goto LAB_00754980;
}
iVar1 = iVar1 + 1;
local_110[0] = local_110[iVar1];
} while (local_110[0] != '\0');
}
LAB_00754980:
_V_strcpy(local_90,"MM/DD/YY");
iVar1 = 0;
while (local_90[0] != '\0') {
if ((local_90[0] == '/') || (local_90[0] == '\\')) {
if (3 < iVar1) {
local_90[iVar1] = '\0';
break;
}
local_90[iVar1] = '-';
}
iVar1 = iVar1 + 1;
local_90[0] = local_90[iVar1];
}
GetUniqueStuckLogFilename()::filename[5] = '\0';
GetUniqueStuckLogFilename()::filename._264_4_ = 0;
puVar2 = &DAT_00d539c2;
if (*(undefined1 **)(gpGlobals + 0x3c) != (undefined1 *)0x0) {
puVar2 = *(undefined1 **)(gpGlobals + 0x3c);
}
CFmtStrN<256>::sprintf
((CFmtStrN<256> *)GetUniqueStuckLogFilename()::filename,"logs\\%s_%s_%s.stuck",puVar2,
local_90,local_110);
LAB_00754a11:
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return 0xfe93e5;
}
/* 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.