NavTroubleReportAutoComplete
0x0098d370 · 267 bytes · __cdecl
_ZL28NavTroubleReportAutoCompletePKcPA64_c
Decompiled
undefined (2 params)
/* NavTroubleReportAutoComplete(char const*, char (*) [64]) */
int NavTroubleReportAutoComplete(char *param_1,char *param_2)
{
int iVar1;
undefined1 *puVar2;
int iVar3;
int iVar4;
int iVar5;
char *pcVar6;
int iVar7;
int in_GS_OFFSET;
char local_61 [65];
int local_20;
iVar5 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = _V_strlen(param_1);
if (iVar1 < 0x40) {
V_strncpy(local_61,param_1,0x41);
puVar2 = (undefined1 *)_V_strrchr(local_61,' ');
if (puVar2 != (undefined1 *)0x0) {
*puVar2 = 0;
iVar3 = _V_strlen(puVar2 + 1);
pcVar6 = "orphan";
iVar7 = 0;
iVar1 = iVar5;
do {
iVar4 = V_strnicmp(pcVar6,puVar2 + 1,iVar3);
iVar5 = iVar1;
if (iVar4 == 0) {
iVar5 = iVar1 + 1;
V_snprintf(param_2 + iVar1 * 0x40,0x40,"%s %s",local_61,pcVar6);
}
iVar7 = iVar7 + 1;
pcVar6 = *(char **)(troubleReportTable + iVar7 * 8);
} while ((pcVar6 != (char *)0x0) && (iVar1 = iVar5, iVar5 < 0x40));
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar5;
}
/* 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.