DownloadCache::GetCacheFilename
0x0013c840 · 126 bytes · __thiscall
_ZN13DownloadCache16GetCacheFilenameEPK14RequestContextPc
Decompiled
undefined (3 params)
/* DownloadCache::GetCacheFilename(RequestContext const*, char*) */
void __thiscall
DownloadCache::GetCacheFilename(DownloadCache *this,RequestContext *param_1,char *param_2)
{
char *__src;
int iVar1;
char *pcVar2;
char *pcVar3;
bool bVar4;
byte bVar5;
bVar5 = 0;
BuildKeyNames(this,(char *)(param_1 + 0x214));
__src = (char *)KeyValues::GetString(*(KeyValues **)this,(char *)(this + 4),(char *)0x0);
bVar4 = __src == (char *)0x0;
if (!bVar4) {
iVar1 = 5;
pcVar2 = __src;
pcVar3 = "cache";
do {
if (iVar1 == 0) break;
iVar1 = iVar1 + -1;
bVar4 = *pcVar2 == *pcVar3;
pcVar2 = pcVar2 + (uint)bVar5 * -2 + 1;
pcVar3 = pcVar3 + (uint)bVar5 * -2 + 1;
} while (bVar4);
if (bVar4) {
strncpy(param_2,__src,0x1000);
param_2[0xfff] = '\0';
return;
}
}
*param_2 = '\0';
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.