SetupSteamStartupEnvironment
0x000d90c0 · 220 bytes · __cdecl
_Z28SetupSteamStartupEnvironmentP9KeyValuesPKcR13CSteamEnvVars
Decompiled
undefined (3 params)
/* SetupSteamStartupEnvironment(KeyValues*, char const*, CSteamEnvVars&) */
undefined4 SetupSteamStartupEnvironment(KeyValues *param_1,char *param_2,CSteamEnvVars *param_3)
{
KeyValues *pKVar1;
int in_GS_OFFSET;
char local_228 [260];
char local_124 [260];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy(local_228,param_2,0x104);
V_AppendSlash(local_228,0x104);
V_strncat(local_228,"steaminfo.txt",0x104,-1);
pKVar1 = (KeyValues *)ReadKeyValuesFile(local_228);
SetSteamAppUser(pKVar1,local_124,param_3);
SetSteamUserPassphrase(pKVar1,param_3);
SetSteamAppId(param_1,param_2,param_3);
if (pKVar1 != (KeyValues *)0x0) {
KeyValues::deleteThis();
param_1 = pKVar1;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail(param_1);
}
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.