Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

fix(ngx): rebuild crypt32 and wintrust from the current signer patch

raymondchins829fe8d6a2a7
diff --git a/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift b/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift
index 9239e08..b499a35 100644
--- a/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift
+++ b/app/Sources/BridgeplayApp/Model/FreeEngineWinecx.swift
@@ -175,10 +175,10 @@ enum FreeEngineWinecx {
nvidia: [
WinecxBundledFile(resource: "crypt32-winecx-11.17", ext: "dll",
path: "lib/wine/x86_64-windows/crypt32.dll",
- sha256: "19330827fc085603c2a73b859b801980f494a942ae470398634fbb6e1d62ada9"),
+ sha256: "27b485cc2a6bf651d8d72173e5d40dbc914666d3f8e8f6a4031a91c5ff22ebbf"),
WinecxBundledFile(resource: "wintrust-winecx-11.17", ext: "dll",
path: "lib/wine/x86_64-windows/wintrust.dll",
- sha256: "6ae3a8723bae11e5ff9ad6e23d1f1325740b1892d01b78abdeb1b77ac8bb6da8"),
+ sha256: "256f3b7106cb8f7f390e1551f209bfb72ccf43744d6d583e5664e44d7602bfee"),
// nvapi-shim/: a native nvapi64 that reports a newer NVIDIA driver than
// Apple's 561.09 and passes everything else to Apple's nvapi.dll.
WinecxBundledFile(resource: "nvapi64-shim", ext: "dll",
diff --git a/app/Sources/BridgeplayApp/Resources/crypt32-winecx-11.17.dll b/app/Sources/BridgeplayApp/Resources/crypt32-winecx-11.17.dll
index 1ff6d52..9758c06 100755
Binary files a/app/Sources/BridgeplayApp/Resources/crypt32-winecx-11.17.dll and b/app/Sources/BridgeplayApp/Resources/crypt32-winecx-11.17.dll differ
diff --git a/app/Sources/BridgeplayApp/Resources/wintrust-winecx-11.17.dll b/app/Sources/BridgeplayApp/Resources/wintrust-winecx-11.17.dll
index 5b0575b..5f39e7e 100755
Binary files a/app/Sources/BridgeplayApp/Resources/wintrust-winecx-11.17.dll and b/app/Sources/BridgeplayApp/Resources/wintrust-winecx-11.17.dll differ
diff --git a/docs/WINECX.md b/docs/WINECX.md
index 846cc51..9cd9feb 100644
--- a/docs/WINECX.md
+++ b/docs/WINECX.md
@@ -385,7 +385,8 @@ python3 resolve.py ../Libraries/Wine # self-tests against PINNED
python3 apply.py <ntdll.dll> <out> <detour bin> # patched hashes
```
-4.7.3 (`winecx-11.17`): both detours fit in `.text` padding.
+4.7.3 (`winecx-11.17`): both detours fit in `.text` padding. The detour payloads and
+every other shipped file are in [Shipped binaries](#shipped-binaries).
| Pin | sha256 |
|---|---|
@@ -394,18 +395,6 @@ python3 apply.py <ntdll.dll> <out> <detour bin> # patched hashes
| patched x86_64 ntdll | `4573d521671a48212670e7543aa9ebf0921e383dada69477f677f435df2bef5a` |
| clean i386 ntdll | `cc8a9035cea0e26c5d333ef220f1becefc27ae44d2cdcdaea3278e8739d26fd9` |
| patched i386 ntdll | `628d08854dc42009f63dc489005c2a49a3f1fe4c6a949dc1ac505915004e5b70` |
-| `detour2-winecx-11.17.bin` | `e1bbd185b19de3e23d627ae3a8bf25ed1b767bff5690102c5312a5ed3813e736` |
-| `detour32-winecx-11.17.bin` | `085df281ffe81c2803f44dd30df885248e5510c8560f0f20a5ae36e8446f7559` |
-| `winemac-winecx-11.17.so` | `aa192f846ad15d56de200fc92752eaf2d455700846ae2cf1ccc7b27b535f1c00` |
-| `winebus-winecx-11.17.so` | `6223c035c824c90708abbc3e733f8d1d6ed6b8b4e9a3e1a5c813493ceba50473` |
-| `winebus-winecx-11.17.sys` | `da108d1c3788fa32807ef08c4d26d8a89812c230317ffa7ba5111e126bda607c` |
-| `ws2_32-winecx-11.17.dll` | `cb0a5670ce6dbf949ed25cca54e9f1c4930cd4c2ade895836d518d3d9073079c` |
-| `kernel32-winecx-11.17.dll` | `9cffe153abd3f91f7157f936377baac47c5aef9fa807e263a0f9e051c6010af3` |
-| `kernelbase-winecx-11.17.dll` | `4d55600b204724046567688ca96132e49e53af1baac7a362f3e2bf285f669a8a` |
-| `d3dx11_43-winecx-11.17.dll` | `7d23cdfacc922f67dfa2eba98df277ae2ae351ad3646c3191a84966b55dbbfd3` |
-| `d3dx11_43-winecx-11.17-i386.dll` | `dd4dd351f2a5880c9848d5ccf4944a0b5e7622bb7fb196544115b1f9c92d749c` |
-| `d3dx11_42-winecx-11.17.dll` | `3d97e1de9000a78e27eb5c90d0ab9b36d54fd350760063da27226d22c90c8e1b` |
-| `d3dx11_42-winecx-11.17-i386.dll` | `85075f8b4f30f1a993238a0d6ab772a3a3df6c031e87ee9401c4367a527cd57c` |
4.5.125 (`winecx-11.15`):
@@ -416,9 +405,65 @@ python3 apply.py <ntdll.dll> <out> <detour bin> # patched hashes
| patched x86_64 ntdll | `4efd956e573726777827cddaa89ef3b7f72d6cfd7b8e2049e41f5f5bdf4a6306` |
| clean i386 ntdll | `e1b208073c804a443e64ada577899d96a5c8eaee435813e4a30e0d143bca6e3c` |
| patched i386 ntdll | `23ee72664f172d38d76ecb8969d5c5af7e6828864dfe298338ed0e773910bc5d` |
-| `detour2-winecx-11.15.bin` | `fde56854b9a7a32da19babe2427d19ff6a6b83de1917fe8d32aaddd2991fc6b9` |
-| `detour32-winecx-11.15.bin` | `37daf5f795535df91bc8fcbd356f22f4fd1ab379ec4acc97ddff44037d265556` |
The unpack test (`FreeEngineWinecxTests.unpacksRealArchive`, once per release) checks all of
this against the real archive when `NOTPROTON_WINECX_ARCHIVE` points at it, or when it sits in
Bridgeplay's download cache.
+
+## Shipped binaries
+
+Every binary in `app/Sources/BridgeplayApp/Resources/` built from a patch or source in this
+repository, with the sha256 of the committed file, which must equal the Swift pin in the last
+column. Build recipes are in the sections above and in each patch folder's README.
+
+| File | Built from | sha256 | Pinned in |
+|---|---|---|---|
+| `crypt32-winecx-11.17.dll` | `ngx-signer-patch/` | `27b485cc2a6bf651d8d72173e5d40dbc914666d3f8e8f6a4031a91c5ff22ebbf` | `FreeEngineWinecx.v1117.nvidia` |
+| `wintrust-winecx-11.17.dll` | `ngx-signer-patch/` | `256f3b7106cb8f7f390e1551f209bfb72ccf43744d6d583e5664e44d7602bfee` | `FreeEngineWinecx.v1117.nvidia` |
+| `nvapi64-shim.dll` | `nvapi-shim/` | `a80aea6347a8b1e72542e458f410d37fdedb39e194c0fcee45a5ae6cd7f571be` | `FreeEngineWinecx.v1117.nvidia` |
+| `win32u-winecx-11.17.so` | `win32u-patch/patch-driver-version.sh` | `b012382d09b2ff1b3c0750d93867f72dd04a7c902bc4179be406b6c558ab162d` | `FreeEngineWinecx.v1117.nvidia` |
+| `wined3d-winecx-11.17.dll` | `wined3d-patch/` | `9298c83d927b3b80d0fa36f52bb5f2ecd60ec4daffff3c93d9b080293e59dfe9` | `FreeEngineWinecx.v1117.nvidia` |
+| `winecoreaudio-winecx-11.17.so` | `winecoreaudio-patch/` | `680b267e8cf41af0868de4adf7f6760615a434a4be06b4ab0cfeece2d9240faa` | `FreeEngineWinecx.v1117.audio` |
+| `ws2_32-winecx-11.17.dll` | `ws2_32-patch/` | `cb0a5670ce6dbf949ed25cca54e9f1c4930cd4c2ade895836d518d3d9073079c` | `FreeEngineWinecx.v1117.network` |
+| `kernel32-winecx-11.17.dll` | `hide-wine-exports-patch/` | `9cffe153abd3f91f7157f936377baac47c5aef9fa807e263a0f9e051c6010af3` | `FreeEngineWinecx.v1117.loader` |
+| `kernelbase-winecx-11.17.dll` | `hide-wine-exports-patch/` | `4d55600b204724046567688ca96132e49e53af1baac7a362f3e2bf285f669a8a` | `FreeEngineWinecx.v1117.loader` |
+| `d3dx11_43-winecx-11.17.dll` | `d3dx11-patch/` | `7d23cdfacc922f67dfa2eba98df277ae2ae351ad3646c3191a84966b55dbbfd3` | `FreeEngineWinecx.v1117.d3dx` |
+| `d3dx11_43-winecx-11.17-i386.dll` | `d3dx11-patch/` | `dd4dd351f2a5880c9848d5ccf4944a0b5e7622bb7fb196544115b1f9c92d749c` | `FreeEngineWinecx.v1117.d3dx` |
+| `d3dx11_42-winecx-11.17.dll` | `d3dx11-patch/` | `3d97e1de9000a78e27eb5c90d0ab9b36d54fd350760063da27226d22c90c8e1b` | `FreeEngineWinecx.v1117.d3dx` |
+| `d3dx11_42-winecx-11.17-i386.dll` | `d3dx11-patch/` | `85075f8b4f30f1a993238a0d6ab772a3a3df6c031e87ee9401c4367a527cd57c` | `FreeEngineWinecx.v1117.d3dx` |
+| `winemac-winecx-11.17.so` | `winemac-patch/winecx-11.17-d3dmetal-retina.patch` | `aa192f846ad15d56de200fc92752eaf2d455700846ae2cf1ccc7b27b535f1c00` | `FreeEngineWinecx.v1117.macDriver` |
+| `winebus-winecx-11.17.so` | Controllers (SDL2 build) | `6223c035c824c90708abbc3e733f8d1d6ed6b8b4e9a3e1a5c813493ceba50473` | `FreeEngineWinecx.v1117.gamepad` |
+| `winebus-winecx-11.17.sys` | `winebus-patch/` | `da108d1c3788fa32807ef08c4d26d8a89812c230317ffa7ba5111e126bda607c` | `FreeEngineWinecx.v1117.gamepad` |
+| `winemac-winecx-11.15.so` | `winemac-patch/winecx-d3dmetal-retina.patch` | `76d8f93839386f37e8badf0c82bb31b5ead22ac580f17896f9d2a729af0fc147` | `FreeEngineWinecx.v1115.macDriver` |
+| `winebus-winecx-11.15.so` | Controllers (SDL2 build) | `1bc53184f5d026ab84a26cf6ef721348fc3b028c019ff969e69eb6cf9b9d1af9` | `FreeEngineWinecx.v1115.gamepad` |
+| `libSDL2-2.0.0.dylib` | SDL 2.32.10, `winemac-patch/sdl2-iokit-gamepad-collection.patch` | `aeeec088bf51f9eac0dbd8e26ae994c7b8568fb42fc676835d6dc2109fc559d1` | `FreeEngineWinecx` `sdl` (both releases) |
+| `winemac-winehq-11.15.so` | `winemac-patch/dxmt_export.c` | `d95fe40b6321ba8a34933a6b394af6d75547220a7168896c357af3a32377b08f` | `FreeEngine` `macDriver` |
+| `detour2-41069.bin` | `ntdll-patch/build.sh` (41069) | `660ea7c935620e620a45a46e552c0a3de9292e031bf93ef676968154d45e78d5` | `NtdllPatcher.byBuild` |
+| `detour2-41073.bin` | `ntdll-patch/build.sh` (41073) | `971c9c8c0f5a9fc7338fb5012a88f8a5297924e48cadb0aa0fa827cce0984a6e` | `NtdllPatcher.byBuild` |
+| `detour2-cx26.bin` | `ntdll-patch/build.sh` (cx26) | `e35b834408599c45f30b23a6d2bf38acfa5c3df4d15206617c471e23a4a01bfb` | `NtdllPatcher.byBuild` |
+| `detour2-fex-41069.bin` | `ntdll-patch/build.sh` (fex-41069) | `0084bba1d7399e749d918dba4f313f1dc1825d2a487f3169b469b57c5b161ca5` | `NtdllPatcher.byBuild` |
+| `detour2-fex-41073.bin` | `ntdll-patch/build.sh` (fex-41073) | `d3b922ad4eae11d9a95cdab1276546af08bd3b28e041427ea0ebc557b094ad32` | `NtdllPatcher.byBuild` |
+| `detour2-fex.bin` | `ntdll-patch/build.sh` (fex) | `6af3f36658907cc94c096e432006807d6997bd970560f2579df748d6fd6e2bc6` | `NtdllPatcher.byBuild` |
+| `detour2-winecx-11.15.bin` | `ntdll-patch/build.sh` (winecx-11.15) | `fde56854b9a7a32da19babe2427d19ff6a6b83de1917fe8d32aaddd2991fc6b9` | `FreeEngineWinecx.v1115.ntdllPatches` |
+| `detour2-winecx-11.17.bin` | `ntdll-patch/build.sh` (winecx-11.17) | `e1bbd185b19de3e23d627ae3a8bf25ed1b767bff5690102c5312a5ed3813e736` | `FreeEngineWinecx.v1117.ntdllPatches` |
+| `detour2-winehq-11.15.bin` | `ntdll-patch/build.sh` (winehq-11.15) | `d394a6b7f4c55e2bb8b99aeb51cd4555527f8e10fa49339e95a8156486c5e2e5` | `NtdllPatcher.byBuild` |
+| `detour2.bin` | `ntdll-patch/build.sh` (rosetta) | `8504714bba0195439cb5b44c89f25c68dbb7f01bae6f72ca0a258a0daec3e244` | `NtdllPatcher.byBuild` |
+| `detour32-41069.bin` | `ntdll-patch/build32.sh` (41069) | `3eaa5021add0c8e30e324d6b1a6392a32720f5f73596418a2086b7f8081eb1bd` | `NtdllPatcher.byBuild` |
+| `detour32-41073.bin` | `ntdll-patch/build32.sh` (41073) | `693d6b8ac801c5697dc7d86aeb4f23fbfb1fd08bb3f949ad3e4b2311cd28348a` | `NtdllPatcher.byBuild` |
+| `detour32-cx26.bin` | `ntdll-patch/build32.sh` (cx26) | `be465bc936cafafae4aa1b4c41f668e08848492d9858c2cf2ad483a9f1ab25e5` | `NtdllPatcher.byBuild` |
+| `detour32-fex-41069.bin` | `ntdll-patch/build32.sh` (fex-41069) | `6ff6c7289e639c4caad85c2670bfa849d9f36baa24152b6979896caede5e249b` | `NtdllPatcher.byBuild` |
+| `detour32-fex-41073.bin` | `ntdll-patch/build32.sh` (fex-41073) | `e0b3a73bb287ecdebe7a9516a732b60e8de95fa0a756ae5ea4c5bd46e4a807c2` | `NtdllPatcher.byBuild` |
+| `detour32-fex.bin` | `ntdll-patch/build32.sh` (fex) | `b4c697ba396ecb59125c505666ad3465d1208b8a1e3e53a0c457657b341376b9` | `NtdllPatcher.byBuild` |
+| `detour32-winecx-11.15.bin` | `ntdll-patch/build32.sh` (winecx-11.15) | `37daf5f795535df91bc8fcbd356f22f4fd1ab379ec4acc97ddff44037d265556` | `FreeEngineWinecx.v1115.ntdllPatches` |
+| `detour32-winecx-11.17.bin` | `ntdll-patch/build32.sh` (winecx-11.17) | `085df281ffe81c2803f44dd30df885248e5510c8560f0f20a5ae36e8446f7559` | `FreeEngineWinecx.v1117.ntdllPatches` |
+| `detour32-winehq-11.15.bin` | `ntdll-patch/build32.sh` (winehq-11.15) | `527431a3a74e9dff7bc3582277ddfa7b44bcac6fba285c028fd2c94fd9202418` | `NtdllPatcher.byBuild` |
+| `detour32.bin` | `ntdll-patch/build32.sh` (rosetta) | `2758d4f6783c853c460187f83f4fb9b1105380d194126ef83fc85e2596d3036a` | `NtdllPatcher.byBuild` |
+| `detour64-fex-41069.bin` | `ntdll-patch/build64.sh` (fex-41069) | `b27484eaed592366ddd3a5b3c565c2dc05e8fa255fbd7e19d9d8eb619ff57c23` | `NtdllPatcher.byBuild` |
+| `detour64-fex-41073.bin` | `ntdll-patch/build64.sh` (fex-41073) | `8a6fe80587815393059cb2cecfdc542b666c158e147560875ff19f37221726d2` | `NtdllPatcher.byBuild` |
+| `detour64-fex.bin` | `ntdll-patch/build64.sh` (fex) | `68a458ec9c32041c79fdd622d18e91cfbe825a5292cae362d310930e34dd598e` | `NtdllPatcher.byBuild` |
+
+`detour32-winehq-11.15.bin` and `detour2-winecx-11.17.bin` rebuild byte for byte from the
+current sources (checked 2026-10-24). `detour2-winehq-11.15.bin` does not: it was built from
+`detour.c` before 160968c and still jumps to lsteamclient's DllMain, while the current source
+gives an 832-byte payload (`dc4d86de…`) that skips it, like the other engines. It stays until a
+WineHQ x86_64 game has been tested with the rebuilt payload.
diff --git a/ngx-signer-patch/README.md b/ngx-signer-patch/README.md
index 72b4532..60faaed 100644
--- a/ngx-signer-patch/README.md
+++ b/ngx-signer-patch/README.md
@@ -16,9 +16,11 @@ redirected check on a heap copy of the caller's `WINTRUST_DATA` and `WINTRUST_FI
the caller's structs are only written where Windows writes them too (`hWVTStateData`); a
`WTD_STATEACTION_VERIFY` copy stays alive until its `WTD_STATEACTION_CLOSE`.
-The committed `crypt32-winecx-11.17.dll` and `wintrust-winecx-11.17.dll` predate those two
-changes (system-directory match, struct copy). They need a rebuild, a DLSS check in a
-Streamline game, and new pins in `FreeEngineWinecx.swift`.
+The committed `crypt32-winecx-11.17.dll` and `wintrust-winecx-11.17.dll` were rebuilt with
+those two changes (system-directory match, struct copy) on 2026-10-24 and repinned. Built
+from the earlier patch, the recipe below reproduced the previous binaries except the PE
+timestamp, checksum, build id and the source path in assert strings. The rebuilt pair has not
+been checked in a Streamline game yet.
Verified 2026-10-12: RE Requiem lists NVIDIA DLSS; 007 First Light logs
`Loaded NGXCore from path (C:\windows\system32\nvngx.dll)`.
diff --git a/ntdll-patch/apply.py b/ntdll-patch/apply.py
index ff379a4..60c3474 100644
--- a/ntdll-patch/apply.py
+++ b/ntdll-patch/apply.py
@@ -32,6 +32,8 @@ PAYLOAD_BY_CLEAN_SHA = {
"3d24426735defd222fd9518b094b738dc1c12afd13efc41a855013ed0f825129": "detour2-fex-41073.bin",
"3ee764335e50709285361e2542731385f0b06e593a76aa84a3c328c278164c4f": "detour32-fex-41073.bin",
"a6678f9d0818e1cdb325e1ce8a07a540433f544b6f756c52a6ab1cfd3f632408": "detour64-fex-41073.bin",
+ "682181234a55f5b7eed5b2ffa691fbdef1b488734337ef67ea7b5ce17adf43a2": "detour2-winehq-11.15.bin",
+ "49396e7ad804a5345b1b968d02fdb6697ddbb7428e61e20e62806c50c37589d1": "detour32-winehq-11.15.bin",
}
KNOWN_MACHINES = (0x8664, 0x14c, 0xaa64)
diff --git a/ntdll-patch/resolve.py b/ntdll-patch/resolve.py
index 380a36f..a8bb2fb 100755
--- a/ntdll-patch/resolve.py
+++ b/ntdll-patch/resolve.py
@@ -176,6 +176,24 @@ PINNED = {
'exports': {'LdrGetDllHandle': 0x180043818, 'LdrLoadDll': 0x180041344,
'NtProtectVirtualMemory': 0x180066f60, 'NtOpenFile': 0x180066bc0,
'NtReadFile': 0x180066620, 'NtClose': 0x180066740}},
+ # WineHQ 11.15 (wine-devel-11.15-osx64.tar.xz)
+ # CEILING: the shipped x86_64 payload is built from detour.c before 160968c (it still jumps
+ # to lsteamclient's DllMain), so build.sh's fresh 832-byte payload (dc4d86de...) differs.
+ # Rebuilding changes WineHQ game behaviour; do it with a WineHQ x86_64 game test.
+ '682181234a55f5b7eed5b2ffa691fbdef1b488734337ef67ea7b5ce17adf43a2':
+ {'hookRVA': 0x3512c, 'stolen': '488b8590000000', 'caveRVA': 0xb3000, 'caveSize': 4096,
+ 'resume': 0x35133, 'wm': 'r14', 'load_path': 0x50,
+ 'payload': 'd394a6b7f4c55e2bb8b99aeb51cd4555527f8e10fa49339e95a8156486c5e2e5',
+ 'exports': {'LdrGetDllHandle': 0x17002fa80, 'LdrLoadDll': 0x17002d4e0,
+ 'NtProtectVirtualMemory': 0x170055944, 'NtOpenFile': 0x1700555a4,
+ 'NtReadFile': 0x170055004, 'NtClose': 0x170055124}},
+ '49396e7ad804a5345b1b968d02fdb6697ddbb7428e61e20e62806c50c37589d1':
+ {'hookRVA': 0x2edcd, 'stolen': '8b4514a802', 'caveRVA': 0x6a075, 'caveSize': 3979,
+ 'resume': 0x2edd2, 'wm': 'edi', 'load_path': -0x3c,
+ 'payload': '527431a3a74e9dff7bc3582277ddfa7b44bcac6fba285c028fd2c94fd9202418',
+ 'exports': {'LdrGetDllHandle': 0x7bc2a670, 'LdrLoadDll': 0x7bc28800,
+ 'NtProtectVirtualMemory': 0x7bc4c874, 'NtOpenFile': 0x7bc4c6a4,
+ 'NtReadFile': 0x7bc4c3d4, 'NtClose': 0x7bc4c464}},
}
EXPORTS = ['LdrGetDllHandle', 'LdrLoadDll', 'NtProtectVirtualMemory',
'NtOpenFile', 'NtReadFile', 'NtClose']