_Host_Map_f_CompletionFunc
0x0017f4b0 · 267 bytes · __cdecl
_Z26_Host_Map_f_CompletionFuncPKcS0_PA64_c
Decompiled
undefined (3 params)
/* _Host_Map_f_CompletionFunc(char const*, char const*, char (*) [64]) */
int _Host_Map_f_CompletionFunc(char *param_1,char *param_2,char *param_3)
{
int iVar1;
size_t sVar2;
int in_GS_OFFSET;
int local_70;
int local_64;
char local_60 [64];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = _V_strstr(param_2,param_1);
if (iVar1 != 0) {
sVar2 = strlen(param_1);
param_2 = param_2 + sVar2;
}
local_64 = 0;
iVar1 = MapList_CountMaps(param_2,false,&local_64);
local_70 = 0x40;
if ((0x3f < iVar1) || (local_70 = MapList_CountMaps(param_2,false,&local_64), 0 < local_70)) {
iVar1 = 0;
MapList_ListMaps(param_2,false,false,0x40,local_64,param_3);
do {
iVar1 = iVar1 + 1;
V_strncpy(local_60,param_3,0x40);
V_snprintf(param_3,0x40,"%s%s",param_1,local_60);
sVar2 = strlen(param_3);
param_3[sVar2 - 4] = '\0';
param_3 = param_3 + 0x40;
} while (iVar1 < local_70);
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_70;
}
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.