ComputeMembersDlcMaskFromSettings
0x00039760 · 238 bytes · __cdecl
_Z33ComputeMembersDlcMaskFromSettingsP9KeyValues
Decompiled
undefined (1 param)
/* ComputeMembersDlcMaskFromSettings(KeyValues*) */
ulonglong ComputeMembersDlcMaskFromSettings(KeyValues *param_1)
{
ulonglong uVar1;
int iVar2;
int iVar3;
int in_GS_OFFSET;
ulonglong uVar4;
ulonglong uVar5;
undefined4 uVar6;
CFmtStrN<256> local_12c [5];
undefined1 local_127 [263];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar6 = 0;
uVar4 = KeyValues::GetUint64((char *)param_1,0xb0b7e);
iVar2 = KeyValues::GetInt(param_1,"members/numMachines",0);
uVar1 = uVar4;
if ((1 < iVar2) && (uVar4 != 0)) {
iVar3 = 1;
do {
CFmtStrN<256>::CFmtStrN(local_12c,"members/machine%d/dlcmask",iVar3,uVar6);
uVar6 = 0;
uVar5 = KeyValues::GetUint64((char *)param_1,ZEXT48(local_127));
uVar1 = uVar5 & uVar4;
uVar4 = uVar4 & uVar5;
if (iVar2 <= iVar3 + 1) break;
iVar3 = iVar3 + 1;
} while (uVar1 != 0);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar1;
}
/* 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.