CGameClient::ProcessFileCRCCheck
0x001e8e90 · 426 bytes · __thiscall
_ZN11CGameClient19ProcessFileCRCCheckEP16CLC_FileCRCCheck.part.7
Decompiled
undefined (2 params)
/* CGameClient::ProcessFileCRCCheck(CLC_FileCRCCheck*) [clone .part.7] */
void __thiscall CGameClient::ProcessFileCRCCheck(CGameClient *this,CLC_FileCRCCheck *param_1)
{
int iVar1;
int *in_EAX;
int iVar2;
undefined4 uVar3;
int iVar4;
int in_EDX;
char *pcVar5;
int in_GS_OFFSET;
int local_424;
char local_420 [1024];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pcVar5 = local_420;
for (iVar4 = 0x100; iVar4 != 0; iVar4 = iVar4 + -1) {
pcVar5[0] = '\0';
pcVar5[1] = '\0';
pcVar5[2] = '\0';
pcVar5[3] = '\0';
pcVar5 = pcVar5 + 4;
}
iVar1 = in_EDX + 0x150;
iVar4 = in_EDX + 0x4c;
iVar2 = (**(code **)(*g_pFileSystem + 0x17c))(g_pFileSystem,iVar4,iVar1,&local_424);
if (iVar2 == 0) {
V_snprintf(local_420,0x400,
"Pure server: client has loaded extra file [%s]\\%s. File must be removed to play on this server."
,iVar4,iVar1);
}
else if ((iVar2 == 1) && (*(int *)(in_EDX + 0x254) != local_424)) {
V_snprintf(local_420,0x400,"Pure server: file [%s]\\%s does not match the server\'s file.",iVar4
,iVar1);
}
if (local_420[0] == '\0') {
if (1 < *(int *)(sv_pure_trace._28_4_ + 0x30)) {
uVar3 = (**(code **)(*in_EAX + 0x1c))();
Msg("Pure server CRC check: client %s passed check for [%s]\\%s\n",uVar3,iVar4,iVar1);
}
}
else if (*(int *)(sv_pure_kick_clients._28_4_ + 0x30) == 0) {
(**(code **)(*in_EAX + 0x68))();
if (0 < *(int *)(sv_pure_trace._28_4_ + 0x30)) {
uVar3 = (**(code **)(*in_EAX + 0x2c))();
Msg("[%s] %s\n",uVar3,local_420);
}
}
else {
(**(code **)(*in_EAX + 0x3c))();
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* 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.