[Bug 44650] Multiple Blizzard games need dxgi and d3d11 dlls mapped without hole between two LOAD segments (Diablo III v2. 6. 1. 49286+, World of Warcraft, Overwatch)

WineHQ Bugzilla wine-bugs at winehq.org
Mon Dec 9 15:11:51 CST 2019


https://bugs.winehq.org/show_bug.cgi?id=44650

--- Comment #10 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

revisiting. Not sure if this type anti-cheat measure is still active in all the
current game clients. At least for WoW and Diablo III (f2p) it doesn't seem to
be. I can't check Overwatch as one needs to pay for it.

Instead of going with Wine-Staging and/or custom linker script solutions we
could leverage from the conversion of the affected dlls to PE format
(cross-compile with mingw).

'd3d11.dll' was already converted some time ago:

https://source.winehq.org/git/wine.git/commitdiff/d216374962b199cf028d07194fd3b1ebfb6d4a35
("d3d11: Build with msvcrt.")

--- snip ---
...
002b:trace:module:load_builtin_dll Trying built-in L"d3d11.dll"
002b:trace:ntdll:FILE_CreateFile handle=0x22ee00 access=80100000
name=L"\\??\\Z:\\home\\focht\\projects\\wine\\mainline-install-x86_64\\bin\\..\\lib64\\wine\\d3d11.dll"
objattr=00000040 root=(nil) sec=(nil) io=0x22ee20 alloc_size=(nil)
attr=00000000 sharing=00000005 disp=1 options=00000060 ea=(nil).0x00000000
002b: create_file( access=80100000, sharing=00000005, create=1,
options=00000060, attrs=00000000,
objattr={rootdir=0000,attributes=00000040,sd={},name=L""},
filename="/home/focht/wine-games/wineprefix64-bnet/dosdevices/z:/home/focht/projects/wine/mainline-install-x86_64/bin/../lib64/wine/d3d11.dll"
)
002b: create_file() = 0 { handle=2384 }
002b: get_handle_fd( handle=2384 )
002b: *fd* 2384 -> 286
002b: get_handle_fd() = 0 { type=1, cacheable=1, access=00120089,
options=00000060 }
002b: create_mapping( access=000f000d, flags=01000000, file_access=00000001,
size=00000000, file_handle=2384, objattr={} )
002b: create_mapping() = 0 { handle=238c }
002b: close_handle( handle=2384 )
002b: close_handle() = 0
002b: unmap_view( base=17400000 )
002b: unmap_view() = 0
002b: get_mapping_info( handle=238c, access=0000000c )
002b: get_mapping_info() = 0 { size=00292000, flags=01800000, shared_file=0000,
image={base=64f40000,entry_point=64f6ca30,map_size=00292000,stack_size=00200000,stack_commit=00001000,zerobits=00000000,subsystem=00000003,subsystem_low=0002,subsystem_high=0005,gp=00000000,image_charact=2026,dll_charact=0100,machine=8664,contains_code=1,image_flags=40,loader_flags=00000000,header_size=00000600,file_size=002b936a,checksum=002c0361,cpu=x86_64}
}
002b: get_handle_fd( handle=238c )
002b: *fd* 238c -> 297
002b: get_handle_fd() = 0 { type=1, cacheable=1, access=000f000d,
options=00000020 }
002b:trace:virtual:map_view got mem in reserved area 0x17400000-0x17692000
002b:trace:module:map_image mapped PE file at 0x17400000-0x17692000
002b:trace:module:map_image mapping section .text at 0x17401000 off 600 size
2c400 virt 2c3f0 flags 60500020
002b:trace:module:map_image clearing 0x1742d400 - 0x1742e000
002b:trace:module:map_image mapping section .data at 0x1742e000 off 2ca00 size
200 virt 110 flags c0500040
002b:trace:module:map_image clearing 0x1742e200 - 0x1742f000
002b:trace:module:map_image mapping section .rodata at 0x1742f000 off 2cc00
size 600 virt 410 flags c0300040
002b:trace:module:map_image clearing 0x1742f600 - 0x17430000
002b:trace:module:map_image mapping section .rdata at 0x17430000 off 2d200 size
18000 virt 17f80 flags 40600040
002b:trace:module:map_image mapping section .pdata at 0x17448000 off 45200 size
2800 virt 2634 flags 40300040
002b:trace:module:map_image clearing 0x1744a800 - 0x1744b000
002b:trace:module:map_image mapping section .xdata at 0x1744b000 off 47a00 size
2a00 virt 2808 flags 40300040
002b:trace:module:map_image clearing 0x1744da00 - 0x1744e000
002b:trace:module:map_image mapping section .bss at 0x1744e000 off 0 size 0
virt 140 flags c0600080
002b:trace:module:map_image mapping section .edata at 0x1744f000 off 4a400 size
ee00 virt ec3c flags 40300040
002b:trace:module:map_image clearing 0x1745de00 - 0x1745e000
002b:trace:module:map_image mapping section .idata at 0x1745e000 off 59200 size
2600 virt 25ac flags c0300040
002b:trace:module:map_image clearing 0x17460600 - 0x17461000
002b:trace:module:map_image mapping section .rsrc at 0x17461000 off 5b800 size
400 virt 3b0 flags c0400040
002b:trace:module:map_image clearing 0x17461400 - 0x17462000
002b:trace:module:map_image mapping section .reloc at 0x17462000 off 5bc00 size
800 virt 620 flags 42300040
002b:trace:module:map_image clearing 0x17462800 - 0x17463000
002b:trace:module:map_image mapping section /4 at 0x17463000 off 5c400 size 400
virt 310 flags 42100040
002b:trace:module:map_image clearing 0x17463400 - 0x17464000
002b:trace:module:map_image mapping section /19 at 0x17464000 off 5c800 size
17d800 virt 17d78e flags 42100040
002b:trace:module:map_image clearing 0x175e1800 - 0x175e2000
002b:trace:module:map_image mapping section /31 at 0x175e2000 off 1da000 size
3a00 virt 3963 flags 42100040
002b:trace:module:map_image clearing 0x175e5a00 - 0x175e6000
002b:trace:module:map_image mapping section /45 at 0x175e6000 off 1dda00 size
c600 virt c43e flags 42100040
002b:trace:module:map_image clearing 0x175f2600 - 0x175f3000
002b:trace:module:map_image mapping section /57 at 0x175f3000 off 1ea000 size
ca00 virt c9c0 flags 42400040
002b:trace:module:map_image clearing 0x175ffa00 - 0x17600000
002b:trace:module:map_image mapping section /70 at 0x17600000 off 1f6a00 size
1a400 virt 1a2f8 flags 42100040
002b:trace:module:map_image clearing 0x1761a400 - 0x1761b000
002b:trace:module:map_image mapping section /81 at 0x1761b000 off 210e00 size
77000 virt 76f89 flags 42100040
002b: map_view( mapping=238c, access=0000000c, base=17400000, size=00292000,
start=00000000 )
002b: map_view() = 0
002b:trace:virtual:VIRTUAL_DumpView View: 0x17400000 - 0x17691fff (image)
002b:trace:virtual:VIRTUAL_DumpView       0x17400000 - 0x17400fff c-r--
002b:trace:virtual:VIRTUAL_DumpView       0x17401000 - 0x1742dfff c-r-x
002b:trace:virtual:VIRTUAL_DumpView       0x1742e000 - 0x1742ffff c-rW-
002b:trace:virtual:VIRTUAL_DumpView       0x17430000 - 0x1744dfff c-r--
002b:trace:virtual:VIRTUAL_DumpView       0x1744e000 - 0x1744efff c-rW-
002b:trace:virtual:VIRTUAL_DumpView       0x1744f000 - 0x1745dfff c-r--
002b:trace:virtual:VIRTUAL_DumpView       0x1745e000 - 0x17461fff c-rW-
002b:trace:virtual:VIRTUAL_DumpView       0x17462000 - 0x17691fff c-r--
002b: close_handle( handle=238c )
002b: close_handle() = 0
...
002b:trace:loaddll:load_native_dll Loaded L"C:\\windows\\system32\\d3d11.dll"
at 0x17400000: PE builtin
002b:trace:module:load_dll Loaded module
L"\\??\\C:\\windows\\system32\\d3d11.dll" at 0x17400000
002b:trace:module:process_attach (L"d3d11.dll",(nil)) - START
002b:Call LDR notification callback
(proc=0x140181420,reason=1,data=0x22f710,context=(nil))
002b:Ret  LDR notification callback
(proc=0x140181420,reason=1,data=0x22f710,context=(nil))
002b:Call PE DLL (proc=0x1742ca30,module=0x17400000
L"d3d11.dll",reason=PROCESS_ATTACH,res=(nil))
...
002b:Ret  PE DLL (proc=0x1742ca30,module=0x17400000
L"d3d11.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1
002b:trace:module:process_attach (L"d3d11.dll",(nil)) - END
002b:Ret  ntdll.LdrLoadDll() retval=00000000 ret=7105c003
...
002b:Ret  KERNEL32.LoadLibraryA() retval=17400000 ret=1405c5a3f
002b:Call KERNEL32.GetProcAddress(17400000,14208c5f8 "D3D11CreateDevice")
ret=1405c5a8b
002b:Ret  KERNEL32.GetProcAddress() retval=1740137c ret=1405c5a8b
...
--- snip ---

Not sure why the conversion of components to PE format happens less frequently
now. Maybe MinWin refactoring (kernelbase <-> kernel32) has higher priority?

More component owners could do it themselves to speed up to conversion process.
Like Hans did:

*
https://source.winehq.org/git/wine.git/commitdiff/e3057aea62c911fc7d7ae73d30d3ffa892956fd7
("winhttp: Build with msvcrt.")

*
https://source.winehq.org/git/wine.git/commitdiff/dba0dd41613a91f17142a9bd8ea12b5abb881433
("wbemprox: Build with msvcrt.")

I propose to convert 'dxgi.dll' and 'd3d12.dll' to PE as well to have this
issue resolved - maybe before Wine 5.0 happens ;-)

$ wine --version
wine-4.21-187-gf81e4cc8fb

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list