CDownloadListGenerator::CalculateWhiteListCRC
0x0013e350 · 247 bytes · __thiscall
_ZN22CDownloadListGenerator21CalculateWhiteListCRCEPhPKc
Decompiled
undefined (3 params)
/* CDownloadListGenerator::CalculateWhiteListCRC(unsigned char*, char const*) */
undefined4 __thiscall
CDownloadListGenerator::CalculateWhiteListCRC
(CDownloadListGenerator *this,uchar *param_1,char *param_2)
{
int iVar1;
undefined4 uVar2;
int in_GS_OFFSET;
char local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = *(int *)(sv_show_whitelist_msg._28_4_ + 0x30);
(**(code **)(*g_pFileSystem + 0x30))(g_pFileSystem,param_2,"GAME_ROOT",local_124,0x104,0,0);
param_1[0] = '\0';
param_1[1] = '\0';
param_1[2] = '\0';
param_1[3] = '\0';
param_1[4] = '\0';
param_1[5] = '\0';
param_1[6] = '\0';
param_1[7] = '\0';
param_1[8] = '\0';
param_1[9] = '\0';
param_1[10] = '\0';
param_1[0xb] = '\0';
param_1[0xc] = '\0';
param_1[0xd] = '\0';
param_1[0xe] = '\0';
param_1[0xf] = '\0';
uVar2 = MD5_Hash_File(param_1,local_124,false,(uint *)0x0);
if (iVar1 != 0) {
if ((char)uVar2 == '\0') {
Msg("Failed to CRC %s\n",param_2);
}
else {
Msg("CRC\'d \'%s\' .\n",param_2);
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar2;
}
/* 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.