UTIL_GetCurrentCheckClient
0x00b27690 · 462 bytes · unknown
_ZL26UTIL_GetCurrentCheckClientv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* UTIL_GetCurrentCheckClient() */
uint * UTIL_GetCurrentCheckClient(void)
{
uint *puVar1;
int iVar2;
int *piVar3;
uint uVar4;
uint uVar5;
byte *pbVar6;
uint uVar7;
undefined4 *puVar8;
byte bVar9;
float fVar10;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
bVar9 = 0;
fVar10 = *(float *)(gpGlobals + 0xc) - (float)g_CheckClient._16404_4_;
if ((fVar10 < 0.1) && (0.0 <= fVar10)) {
LAB_00b276ca:
if ((((uint)g_CheckClient._16400_4_ < 0x800) && (*(int *)(gpGlobals + 0x58) != 0)) &&
(puVar1 = (uint *)(*(int *)(gpGlobals + 0x58) + g_CheckClient._16400_4_ * 0x10),
(*puVar1 & 2) == 0)) {
if (puVar1[3] == 0) {
puVar1 = (uint *)0x0;
}
return puVar1;
}
return (uint *)0x0;
}
uVar4 = *(uint *)(gpGlobals + 0x14);
uVar7 = g_CheckClient._16400_4_;
if ((int)g_CheckClient._16400_4_ < 1) {
uVar7 = 1;
}
if ((int)uVar4 < (int)uVar7) {
uVar5 = 1;
uVar7 = uVar4;
}
else if (uVar4 == uVar7) {
uVar5 = 1;
}
else {
uVar5 = uVar7 + 1;
}
iVar2 = *(int *)(gpGlobals + 0x58);
do {
if ((int)uVar4 < (int)uVar5) {
uVar5 = 1;
LAB_00b27743:
if ((iVar2 != 0) && (pbVar6 = (byte *)(uVar5 * 0x10 + iVar2), (*pbVar6 & 2) == 0)) {
if (uVar7 == uVar5) goto LAB_00b2779d;
piVar3 = *(int **)(pbVar6 + 0xc);
if (piVar3 != (int *)0x0) {
iVar2 = (**(code **)(*piVar3 + 0x18))(piVar3);
if ((iVar2 != 0) && ((*(uint *)(iVar2 + 0x150) & 0x8000) == 0)) {
g_CheckClient[0x4018] = 0;
puVar8 = (undefined4 *)(g_CheckClient + 0x200c);
for (iVar2 = 0x800; iVar2 != 0; iVar2 = iVar2 + -1) {
*puVar8 = 0;
puVar8 = puVar8 + (uint)bVar9 * -2 + 1;
}
LAB_00b2779d:
piVar3 = *(int **)(pbVar6 + 0xc);
if ((piVar3 != (int *)0x0) &&
(piVar3 = (int *)(**(code **)(*piVar3 + 0x18))(piVar3), piVar3 != (int *)0x0)) {
(**(code **)(*piVar3 + 0x234))(&local_28,piVar3);
local_34 = local_28;
local_30 = local_24;
local_2c = local_20;
iVar2 = (**(code **)(*engine + 0x30))(engine,&local_34);
if (iVar2 != g_CheckClient._16396_4_) {
g_CheckClient._16396_4_ = iVar2;
(**(code **)(*engine + 0x34))(engine,iVar2,0x2000,0x103534c);
}
}
g_CheckClient._16404_4_ = *(undefined4 *)(gpGlobals + 0xc);
g_CheckClient._16400_4_ = uVar5;
goto LAB_00b276ca;
}
uVar4 = *(uint *)(gpGlobals + 0x14);
iVar2 = *(int *)(gpGlobals + 0x58);
}
}
}
else if (uVar5 < 0x800) goto LAB_00b27743;
uVar5 = uVar5 + 1;
} while( true );
}
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.