--- quote ---
This can patch non-executables and 64-bit executable files, but patching of 32-bit executables is not supported. They are subject to special processing which alters PE relocations to match with those in the old file to improve compression. To reverse this, the meaning of the decoding data must be interpreted. Details, including where to find that data in the patch file, are
included in pa19.c. Interleaved decompression of large files is also not supported.
--- quote ---
The majority of the installers referenced/duplicated here are 32-bit and the 64-bit ones also contain 32-bit components and have at least one 32-bit PE patched. I couldn't find a pure 64-bit one that works with the current mspatcha state, hence not deduplicating/resolving yet.
Hello folks,
revisiting. Rejoice! Progress has been made.
* https:/ /source. winehq. org/git/ wine.git/ commitdiff/ 2aa494686133bf4 c4b6b054a45bf1d 1d429acdc5 ("mspatcha: Add functions to API header file.")
* https:/ /source. winehq. org/git/ wine.git/ commitdiff/ 8695a6986ef2b7c ae7c1f3247fec8e 8e14de1971 ("mspatcha: Partially implement ApplyPatchToFileW and related functions.")
--- quote ---
This can patch non-executables and 64-bit executable files, but patching of 32-bit executables is not supported. They are subject to special processing which alters PE relocations to match with those in the old file to improve compression. To reverse this, the meaning of the decoding data must be interpreted. Details, including where to find that data in the patch file, are
included in pa19.c. Interleaved decompression of large files is also not supported.
--- quote ---
* https:/ /source. winehq. org/git/ wine.git/ commitdiff/ f8c25628266f025 e01332b780c793d 96d97dad25 ("mspatcha: Add stubs for signature and normalization functions.")
Thanks Conor so far!
Adding stable download link from Internet Archive for one of the smallest installers (MS SQL Server Express):
https:/ /web.archive. org/web/ 20130318195510/ http:// download. microsoft. com/download/ 6/C/7/6C7458CA- 8B07-411E- 9E3B-0DED205126 96/SQLEXPR32. EXE
--- snip --- +seh,+relay, +mspatcha wine ./SQLEXPR32.EXE >>log.txt 2>&1 LoadLibraryA( 0034f44c "C:\\windows\ \system32\ \mspatcha. dll") ret=010036a5 0,module= 0x7cef0000 L"mspatcha. dll",reason= PROCESS_ ATTACH, res=(nil) ) mspatcha: DllMain (0x0x7cef0000, 1, (nil)) DisableThreadLi braryCalls( 7cef0000) ret=7cefa489 DisableThreadLi braryCalls( ) retval=00000001 ret=7cefa489 0,module= 0x7cef0000 L"mspatcha. dll",reason= PROCESS_ ATTACH, res=(nil) ) retval=1 LoadLibraryA( ) retval=7cef0000 ret=010036a5 GetProcAddress( 7cef0000, 0100238c "GetFilePatchSi gnatureA" ) ret=010036bc GetProcAddress( ) retval=7cef8188 ret=010036bc GetProcAddress( 7cef0000, 01002378 "ApplyPatchToFi leA") ret=010036ce GetProcAddress( ) retval=7cef80ac ret=010036ce ApplyPatchToFil eA(0034faa4 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \_sfx_0000. _p",0034fba8 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Install\ \sqlagent90_ msdb_upgrade. sql",0034fcac "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Install\ \instmsdb. sql",00000000) ret=0100483a mspatcha: read_header patched file size will be 1139896 mspatcha: read_header patch supports 1 old file(s) mspatcha: read_header found 0 range(s) to ignore mspatcha: read_header found 0 range(s) to retain mspatcha: decode_ lzxd_stream decoding stream of size 290 to size 1139896, starting at 1221164 mspatcha: decode_ lzxd_stream setting window to 0x400000 ApplyPatchToFil eA() retval=00000001 ret=0100483a drv.SetWindowTe xt(0001007a, 0019ff20 L"Setup\\Program Files\\Microsoft SQL Server\ \x86\\Data\ \msdbdata. mdf") ret=7e6e6ee9 drv.SetWindowTe xt() retval=00000000 ret=7e6e6ee9 ApplyPatchToFil eA(0034faa4 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \_sfx_0001. _p",0034fba8 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Install\ \instmsdb. sql",0034fcac "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Data\ \msdbdata. mdf",00000000) ret=0100483a mspatcha: read_header patched file size will be 4653056 mspatcha: read_header patch supports 1 old file(s) mspatcha: read_header found 0 range(s) to ignore mspatcha: read_header found 0 range(s) to retain mspatcha: decode_ lzxd_stream decoding stream of size 418322 to size 4653056, starting at 1139896 mspatcha: decode_ lzxd_stream setting window to 0x800000 ApplyPatchToFil eA() retval=00000001 ret=0100483a
$ WINEDEBUG=
...
002a:Call KERNEL32.
002a:Call PE DLL (proc=0x7cefc32
002a:trace:
002a:Call KERNEL32.
002a:Ret KERNEL32.
002a:Ret PE DLL (proc=0x7cefc32
002a:Ret KERNEL32.
002a:Call KERNEL32.
002a:Ret KERNEL32.
002a:Call KERNEL32.
002a:Ret KERNEL32.
002a:Call mspatcha.
...
002a:trace:
002a:trace:
...
002a:trace:
002a:trace:
...
002a:trace:
...
002a:trace:
...
002a:Ret mspatcha.
...
002b:Call winex11.
002b:Ret winex11.
...
002a:Call mspatcha.
...
002a:trace:
002a:trace:
...
002a:trace:
002a:trace:
...
002a:trace:
...
002a:trace:
...
002a:Ret mspatcha.
...
--- snip ---
--- snip --- drv.SetWindowTe xt(0001007a, 001a0108 L"Setup\\Program Files\\Microsoft SQL Server\ \x86\\Binn\ \res\\1033\ \XPStar90. RLL") ret=7e6e6ee9 drv.SetWindowTe xt() retval=00000000 ret=7e6e6ee9 mspatcha: read_header skipping rebase field mspatcha: read_header patched file size will be 8491603 mspatcha: read_header patch supports 28 old file(s) mspatcha: read_header found 2 range(s) to ignore DeleteFileW( 001a0660 L"c:\\ef244e834 4c867a4618ba071 ad7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Binn\ \res\\1033\ \XPStar90. RLL") ret=7cefc2ef DeleteFileW( ) retval=00000001 ret=7cefc2ef ApplyPatchToFil eA() retval=00000000 ret=0100483a ApplyPatchToFil eA(0034faa4 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \_sfx_0006. _p",0034fba8 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Binn\ \res\\1033\ \XPStar90. RLL",0034fcac "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \90\\Tools\ \Binn\\ Resources\ \1033\\ SQLCMD. rll",00000000) ret=0100483a CreateFileW( 001a0730 L"c:\\ef244e834 4c867a4618ba071 ad7a67b6\ \_sfx_0006. _p",80000000, 00000001, 00000000, 00000003, 00000000, 00000000) ret=7cefc1a6 CreateFileW( ) retval=00000078 ret=7cefc1a6 CreateFileW( 001a07a0 L"c:\\ef244e834 4c867a4618ba071 ad7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Binn\ \res\\1033\ \XPStar90. RLL",80000000, 00000001, 00000000, 00000003, 00000000, 00000000) ret=7cefc1d2 CreateFileW( ) retval=ffffffff ret=7cefc1d2 CloseHandle( 00000078) ret=7cefc230 CloseHandle( ) retval=00000001 ret=7cefc230 ApplyPatchToFil eA() retval=00000000 ret=0100483a GetLastError( ) ret=0100484e GetLastError( ) retval=00000002 ret=0100484e
...
002b:Call winex11.
002b:Ret winex11.
...
002a:trace:
002a:trace:
002a:trace:
...
002a:trace:
...
002a:Call KERNEL32.
002a:Ret KERNEL32.
...
002a:Ret mspatcha.
...
002a:Call mspatcha.
...
002a:Call KERNEL32.
002a:Ret KERNEL32.
002a:Call KERNEL32.
002a:Ret KERNEL32.
002a:Call KERNEL32.
002a:Ret KERNEL32.
...
002a:Ret mspatcha.
002a:Call KERNEL32.
002a:Ret KERNEL32.
--- snip ---
--- snip --- ApplyPatchToFil eA(0034faa4 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \_sfx_0009. _p",0034fba8 "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Binn\ \sqlservr. exe",0034fcac "c:\\ef244e8344 c867a4618ba071a d7a67b6\ \Setup\ \Program Files\\Microsoft SQL Server\ \x86\\Binn\ \res\\1033\ \sqlevn70. rll",00000000) ret=0100483a mspatcha: read_header skipping rebase field mspatcha: read_header patched file size will be 1737568 mspatcha: read_header patch supports 1 old file(s) mspatcha: read_header found 0 range(s) to ignore mspatcha: read_header found 0 range(s) to retain mspatcha: read_header special processing of 32-bit executables not implemented. ApplyPatchToFil eA() retval=00000000 ret=0100483a
...
002a:Call mspatcha.
...
002a:trace:
002a:trace:
002a:trace:
...
002a:trace:
002a:trace:
002a:fixme:
...
002a:Ret mspatcha.
--- snip ---
--- snip --- MessageBoxA( 0001006e, 0034fb34 "File is corrupt",0034fd34 "Extraction Failed",00010010) ret=0100390f
002a:Call user32.
--- snip ---
The majority of the installers referenced/ duplicated here are 32-bit and the 64-bit ones also contain 32-bit components and have at least one 32-bit PE patched. I couldn't find a pure 64-bit one that works with the current mspatcha state, hence not deduplicating/ resolving yet.
$ wine --version 7-305-g9bcaf976 9c
wine-4.
Regards