GetUserIDString
0x000f9eb0 · 350 bytes · __cdecl
_Z15GetUserIDStringRK8USERID_s
Decompiled
undefined (1 param)
/* GetUserIDString(USERID_s const&) */
undefined1 * GetUserIDString(USERID_s *param_1)
{
int iVar1;
undefined1 local_28 [24];
GetUserIDString(USERID_s_const&)::idstr._0_4_ =
GetUserIDString(USERID_s_const&)::idstr._0_4_ & 0xffffff00;
if (*(int *)param_1 == 1) {
_V_memset(local_28,0,0xc);
iVar1 = Steam3Server();
if ((*(int *)(iVar1 + 0x98) == 1) && (iVar1 = _V_memcmp(param_1 + 4,local_28,0xc), iVar1 == 0))
{
GetUserIDString(USERID_s_const&)::idstr._12_4_ =
GetUserIDString(USERID_s_const&)::idstr._12_4_ & 0xffffff00;
GetUserIDString(USERID_s_const&)::idstr._0_4_ = 0x41455453;
GetUserIDString(USERID_s_const&)::idstr._4_4_ = 0x44495f4d;
GetUserIDString(USERID_s_const&)::idstr._8_4_ = 0x4e414c5f;
return GetUserIDString(USERID_s_const&)::idstr;
}
iVar1 = _V_memcmp(param_1 + 4,local_28,0xc);
if (iVar1 == 0) {
GetUserIDString(USERID_s_const&)::idstr._0_4_ = 0x41455453;
GetUserIDString(USERID_s_const&)::idstr._4_4_ = 0x44495f4d;
GetUserIDString(USERID_s_const&)::idstr._8_4_ = 0x4e45505f;
GetUserIDString(USERID_s_const&)::idstr._12_4_ = 0x474e4944;
GetUserIDString(USERID_s_const&)::idstr[0x10] = 0;
}
else {
V_snprintf(GetUserIDString(USERID_s_const&)::idstr,0x3f,"STEAM_%u:%u:%u",
(uint)*(ushort *)(param_1 + 4),*(undefined4 *)(param_1 + 0xc),
*(undefined4 *)(param_1 + 8));
GetUserIDString(USERID_s_const&)::idstr[0x3f] = 0;
}
}
else {
if (*(int *)param_1 == 3) {
GetUserIDString(USERID_s_const&)::idstr._0_4_ = 0x56544c48;
GetUserIDString(USERID_s_const&)::idstr._4_4_ =
GetUserIDString(USERID_s_const&)::idstr._4_4_ & 0xffffff00;
return GetUserIDString(USERID_s_const&)::idstr;
}
GetUserIDString(USERID_s_const&)::idstr._0_4_ = 0x4e4b4e55;
GetUserIDString(USERID_s_const&)::idstr._4_4_ = 0x4e574f;
}
return GetUserIDString(USERID_s_const&)::idstr;
}
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.