Skip to content

winrun: run the updated (64-bit) Steam client started by the bootstrapper - #84

Merged
v3nn7 merged 4 commits into
v3nn7/upbeat-planck-7qk3j0from
v3nn7/steam-client-wow64
Nov 1, 2026
Merged

v3nn7 merged 4 commits into
v3nn7/upbeat-planck-7qk3j0from
v3nn7/steam-client-wow64

Conversation

@v3nn7

@v3nn7 v3nn7 commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #83 (base: v3nn7/upbeat-planck-7qk3j0). Draft: work in progress.

Finding

The Steam update downloaded on 2026-11-01 installs a 64-bit client: steam.exe, SteamUI.dll, SDL3.dll, the FFmpeg DLLs, video64.dll, tier0_s64, vstdlib_s64, steamclient64.dll are PE32+. Only the bootstrapper from SteamSetup is 32-bit. So the relaunched steam.exe runs natively in winrun; the WOW64 work serves the bootstrapper and the 32-bit modules kept for games.

State

  • The 64-bit steam.exe started by the bootstrapper binds all its imports, shows its "Steam" update window, downloads and checks its manifest over HTTPS and verifies its files.
  • LoadLibrary(steamui.dll) still fails: the FFmpeg TLS/crypto imports (crypt32, ncrypt, secur32, getnameinfo) are missing, and steamclient64.dll and crashhandler64.dll (wininet) still need functions.

Changes

  • WOW64: 8 import-stub pages (was 1, 340 stubs); x86 OVERLAPPED; many signatures; 32-bit layouts (MENUITEMINFOW, ICONINFO, INPUT, WAVEHDR, SP_DEVINFO_DATA, VARIANT/PROPVARIANT, STGMEDIUM, CERT_CHAIN_PARA, token info); RtlCaptureContext / RtlCaptureStackBackTrace as 32-bit code; 32-bit vectored handlers; callbacks into 32-bit code from runtime threads; PE32 static TLS in LoadLibrary.
  • New functions: ANSI forms, toolhelp, volume GUID names, ReadDirectoryChangesW (polled), transacted file delete/move, VirtualProtect/VirtualQuery on image pages, BCrypt pseudo-handles, VariantChangeType(Ex), SDDL parsing, menus, icons from resources, display modes, hid.dll and others (see commits).
  • Fixes: ReplaceFile error code (probed on Windows), CertGetCertificateChain x64 CERT_CHAIN_PARA offsets (crash).

Labels: bug, installer

Work report

  • Why: to get steam.exe, started by the bootstrapper, to run in winrun. The client turned out to be 64-bit after the update.
  • What changed: compatibility/win32/src/ — new clientapi.rs, client64.rs, user32/client.rs, oleaut32/coerce.rs, wow64/code32.rs; modified wow64.rs, wow64/sigs.rs, wow64/layouts.rs, loader.rs, mem.rs, kernel32.rs, pipes.rs, ktm.rs, bcrypt.rs, crypt32.rs, user32.rs, user32/gdi.rs, winmm.rs, setupapi.rs, shell32.rs, ole32.rs, propsys.rs, oleaut32.rs, nls.rs, locale.rs, sysext.rs, files.rs, tokens.rs, objsec.rs, accounts.rs, objects.rs, winsta.rs, dwmapi.rs, apiextra.rs, procinfo.rs, psapi.rs, registry.rs, version.rs, volumes.rs, process.rs, main.rs.
  • Verification: cargo build -p osyx-win32 (release, user target) is clean, with no new warnings. QEMU/WHPX boots of a Steam image with the update installed show the stages above. Windows behaviour was probed with mingw (ReplaceFileW, VariantChangeType, BCrypt pseudo-handles). scripts/win-test.ps1 has not been run.
  • Remaining: the FFmpeg TLS/crypto imports, steamclient64.dll and wininet imports; SteamUI's first window; the win-test comparison with origin/main.

🤖 Generated with Claude Code

v3nn7 and others added 4 commits November 1, 2026 16:50
The bridge had one page of import stubs (340); the Steam client and its
DLLs import close to a thousand functions. The stubs now fill eight
pages, with the callback return stub at their end.

steam.exe, crashhandler, tier0_s and vstdlib_s get signatures for the
functions winrun already had, and the missing ones exist now: ANSI forms
of registry, file, volume, version, psapi and user32 functions
(clientapi.rs), GetBinaryTypeW, GetComputerNameExW, FoldStringW,
EnumSystemLocalesW, IsValidLocale, GetLocaleInfoA, CompareStringA,
WaitNamedPipeW and the debugging pair (OSyx has no debugger interface).

32-bit layouts: OVERLAPPED (pipes, GetOverlappedResult), EnumProcess-
Modules, VirtualQueryEx, CreateProcessA/AsUserW, FormatMessage inserts
and its allocated buffer, CopyFileEx progress routines, vectored
exception handlers, GetThreadContext, and RtlCaptureContext /
RtlCaptureStackBackTrace as 32-bit code (wow64/code32.rs).

Not yet run through scripts/win-test.ps1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A 32-bit DLL with static TLS (__declspec(thread)) can now be loaded
with LoadLibrary: every live 32-bit thread gets its block, as Windows
gives one to every existing thread. SteamUI, steamclient, tier0_s,
vstdlib_s and video.dll all have TLS directories.

New functions: menu items (InsertMenuW, DeleteMenu, CheckMenuItem,
GetMenuItemInfoW), icons from resource data, the display-mode and
display-device ANSI forms, GetWindowInfo, IsWindowUnicode,
SetActiveWindow, layered-window attributes, OpenDesktopA/W,
VkKeyScanEx, keybd_event, DialogBoxIndirectParamW, DescribePixelFormat,
GetPixelFormat, GetBitmapBits, StretchBlt, brush origins, the missing
imm32 calls, setupapi instance ids, class GUIDs and CM_Get_DevNode_Status,
DragFinish/DragAcceptFiles, EnumResourceNamesW, console control events
(GenerateConsoleCtrlEvent runs the registered handlers),
SetThreadExecutionState, FreeLibraryAndExitThread, and
VariantChangeType(Ex) with the coercion rules probed on Windows.

32-bit layouts: MENUITEMINFOW, ICONINFO, CURSORINFO, FLASHWINFO, INPUT,
TRACKMOUSEEVENT, RAWINPUTDEVICE(LIST), SP_DEVINFO_DATA, WAVEHDR and
MIDIHDR, STGMEDIUM, PROPVARIANT, VARIANT copies, token information
pointers; winmm, monitor-enumeration and COM callbacks run as 32-bit
code, on a runtime thread too (it gets 32-bit state on first use).

ReplaceFile reports a missing file as ERROR_FILE_NOT_FOUND, as Windows
does (probed with mingw).

Not yet run through scripts/win-test.ps1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Steam update now installs a 64-bit client (steam.exe, SteamUI.dll
and its DLLs are PE32+). It reaches its update window, downloads and
checks its manifest over HTTPS and verifies its files:

- DeleteFileTransactedW and MoveFileTransactedW, with the file system
  as a KTM resource manager (a rollback restores deleted and renamed
  files, a commit drops what was kept aside).
- VirtualProtect and VirtualQuery for pages of loaded images: section
  protections, changes recorded per page, RWX pages switched on demand.
  The CRT's delay-load helper writes the delay IAT this way.
- BCrypt pseudo-handles (BCRYPT_RNG_ALG_HANDLE and the hash ones), as
  Windows 10 provides them (probed).
- CertGetCertificateChain read CERT_CHAIN_PARA with x86 offsets on x64:
  the usage list is at 24, not 16.

Not yet run through scripts/win-test.ps1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Tool Help snapshots (processes, this process's modules), volume GUID
names, ReadDirectoryChangesW (polled: OSyx has no change notification),
GetExtendedTcpTable, CoSetProxyBlanket, SHGetMalloc, ExtractIconExA/W,
hid.dll (no HID device is exposed: requests fail as for a non-HID
handle), the service calls on an empty service database, SDDL to
security descriptors, ShellExecuteA/ExA, SetupDiGetDeviceInterfaceDetailA,
indirect dialogs, GetClassLongPtrA, DisplayConfigSetDeviceInfo,
IsProcessDPIAware/SetProcessDPIAware from the manifest, touch injection
promoted to pointer events, and stored layered-window attributes.

Not yet run through scripts/win-test.ps1; the FFmpeg TLS/crypto imports
and steamclient64.dll are still missing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the bug Something isn't working label Nov 1, 2026
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 346fe69d-6f42-40eb-af96-e099c0dc1cbf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@v3nn7 v3nn7 added the installer Area: installer label Nov 1, 2026
@github-actions github-actions Bot added the installer Area: installer label Nov 1, 2026
@codspeed

codspeed Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 33 untouched benchmarks


Comparing v3nn7/steam-client-wow64 (a7dc5e6) with v3nn7/upbeat-planck-7qk3j0 (6075498)

Open in CodSpeed

@v3nn7
v3nn7 marked this pull request as ready for review November 1, 2026 20:57
@v3nn7
v3nn7 merged commit 4166f78 into v3nn7/upbeat-planck-7qk3j0 Nov 1, 2026
6 checks passed
v3nn7 added a commit that referenced this pull request Nov 2, 2026
winrun: the updated Steam client starts (restore #84, appmodel API)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working installer Area: installer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant