KeyValues::GetUint64
0x00b6eff0 · 238 bytes · __cdecl
_ZN9KeyValues9GetUint64EPKcy
Decompiled
undefined (2 params)
/* KeyValues::GetUint64(char const*, unsigned long long) */
longlong KeyValues::GetUint64(char *param_1,ulonglong param_2)
{
char cVar1;
int iVar2;
undefined4 in_stack_00000010;
undefined4 local_14;
undefined4 local_10;
iVar2 = FindKey((KeyValues *)param_1,(char *)param_2,false);
if (iVar2 == 0) {
return CONCAT44(in_stack_00000010,param_2._4_4_);
}
cVar1 = *(char *)(iVar2 + 0x10);
if (cVar1 == '\x03') {
return (longlong)(int)*(float *)(iVar2 + 0xc);
}
if (cVar1 < '\x04') {
if (cVar1 == '\x01') {
local_14 = 0;
local_10 = 0;
sscanf(*(char **)(iVar2 + 4),"%lld",&local_14);
return CONCAT44(local_10,local_14);
}
}
else {
if (cVar1 == '\x05') {
local_14 = 0;
local_10 = 0;
swscanf(*(wchar_t **)(iVar2 + 8),L"%lld",&local_14);
return CONCAT44(local_10,local_14);
}
if (cVar1 == '\a') {
return **(longlong **)(iVar2 + 4);
}
}
return (longlong)*(int *)(iVar2 + 0xc);
}
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.