FuelUpdate.exe - widberg/fmtk GitHub Wiki

The file FuelUpdate.exe does not actually come with the game, it is included in updates downloaded by GFWL (see XLive). If there is an update available, the game is given a path to the directory containing the update files downloaded by GFWL, one of which being FuelUpdate.exe.

Upon exiting the game, if XLiveGetUpdateInformation @5022 returns a positive value, the game attempts to update itself. This is done by launching a new process that takes the currently running game process handle as a command-line parameter. This process is launched using ShellExecuteW with the L"open" verb.

The exact function call is ShellExecuteW(NULL, L"open", File, Parameters, NULL, SW_SHOW);. At the time of calling, the value of File is the path to the update directory concatenated with L"FuelUpdate.exe". The value of Parameters is composed of several segments that are concatenated together. First is, L"/p %Ix /r " where the %Ix format specifier has been replaced with the hexadecimal representation of a duplicate of the currently running FUEL.exe processes handle. Next is the absolute path to SecuLauncher.exe followed by the command-line arguments passed to the currently running FUEL.exe process. The maximum length of the File and Parameters buffers is 260 WCHARs each, the value of MAX_PATH.

Presumably, the /p option is short for "process" given that it accepts a process handle as a value. The /r could be for "run", meaning that FuelUpdate.exe would run the game after updating it since it takes the command to launch the game as a value.

In summary, at the time ShellExecuteW is called, the value of File may look like C:\Users\widberg\AppData\Local\Microsoft\XLive\Updates\FuelUpdate.exe and the value of Parameters may look like /p deadbeef /r D:\SteamLibrary\steamapps\common\FUEL\SecuLauncher.exe -W if the game was launched in windowed mode originally. The "Backing up patch update installers" section of the "Games for Windows - LIVE" entry on PCGamingWiki has more information about where updates are stored.