CUGCFileRequestManager::GetFileRequestByFilename
0x00222a80 · 296 bytes · __thiscall
_ZNK22CUGCFileRequestManager24GetFileRequestByFilenameEPKc
Decompiled
undefined (2 params)
/* CUGCFileRequestManager::GetFileRequestByFilename(char const*) const */
int __thiscall
CUGCFileRequestManager::GetFileRequestByFilename(CUGCFileRequestManager *this,char *param_1)
{
int iVar1;
int iVar2;
uint uVar3;
int iVar4;
int in_GS_OFFSET;
char local_124 [260];
int local_20;
iVar4 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(short *)(this + 0x12) != 0) {
uVar3 = 0;
do {
iVar2 = *(int *)(*(int *)(this + 4) + 0x10 + iVar4);
CUGCFileRequest::GetFullPath((CUGCFileRequest *)(iVar2 + 0x328),local_124,0x104);
iVar1 = _V_stricmp(local_124,param_1);
if (iVar1 == 0) goto LAB_00222b27;
uVar3 = uVar3 + 1;
iVar4 = iVar4 + 0x14;
} while (uVar3 < *(ushort *)(this + 0x12));
}
iVar4 = 0;
if (0 < *(int *)(this + 0x28)) {
do {
iVar2 = *(int *)(*(int *)(this + 0x1c) + iVar4 * 4);
CUGCFileRequest::GetFullPath((CUGCFileRequest *)(iVar2 + 0x328),local_124,0x104);
iVar1 = _V_stricmp(local_124,param_1);
if (iVar1 == 0) goto LAB_00222b27;
iVar4 = iVar4 + 1;
} while (iVar4 < *(int *)(this + 0x28));
}
iVar2 = 0;
LAB_00222b27:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return iVar2;
}
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.