BumpFileHistory
0x00719d60 · 402 bytes · __regparm3
_ZL15BumpFileHistoryPKci
Decompiled
undefined (2 params)
/* BumpFileHistory(char const*, int) */
void __regparm3 BumpFileHistory(char *param_1,int param_2)
{
char cVar1;
int iVar2;
int in_GS_OFFSET;
char local_820 [1024];
char local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar2 = 99;
if (param_2 < 100) {
iVar2 = param_2;
}
V_snprintf(local_820,0x400,"%s%02d",param_1,iVar2);
cVar1 = (**(code **)(filesystem[1] + 0x28))(filesystem + 1,local_820,0);
if (cVar1 != '\0') {
(**(code **)(*filesystem + 0x40))(filesystem,local_820,0);
}
iVar2 = iVar2 + -1;
if (0 < iVar2) {
do {
while( true ) {
V_snprintf(local_820,0x400,"%s%02d",param_1,iVar2);
V_snprintf(local_420,0x400,"%s%02d",param_1,iVar2 + 1);
cVar1 = (**(code **)(filesystem[1] + 0x28))(filesystem + 1,local_820,0);
if (cVar1 == '\0') break;
(**(code **)(*filesystem + 0x44))(filesystem,local_820,local_420,0);
iVar2 = iVar2 + -1;
if (iVar2 == 0) goto LAB_00719e7f;
}
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
}
LAB_00719e7f:
cVar1 = (**(code **)(filesystem[1] + 0x28))(filesystem + 1,param_1,0);
if (cVar1 != '\0') {
(**(code **)(*filesystem + 0x44))(filesystem,param_1,local_820,0);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.