https://bugs.winehq.org/show_bug.cgi?id=44061
Kimmo Myllyvirta kimmo.myllyvirta@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kimmo.myllyvirta@gmail.com
--- Comment #2 from Kimmo Myllyvirta kimmo.myllyvirta@gmail.com --- Created attachment 61124 --> https://bugs.winehq.org/attachment.cgi?id=61124 hacks for wine staging
Here's some notes. Bungie banned my account, apparently for trying to get this working on wine, so I can't debug this any further.
See also bug 44585, this is another app which needs ldr notifications. The staged implementation seems to work, but call_dll_entry_point is failing for multiple dlls after destiny 2 has called LdrRegisterDllNotification. This is just the peak of the iceberg; fixme:crypt:CRYPT_LoadProvider Failed to load dll L"C:\windows\system32\rsaenh.dll"
At least it is replacing the entry points. What the entry point (rsaenh) was before the ldr callback, your usual __wine_spec_dll_entry; movq %rsp,%rbp pushq %rdi pushq %rsi pushq %rbx subq $0xa0,%rsp andq $fffffff0,%rsp subq $30,%rsp cmpl $1,%edx movups %xmm6,0xffffffffffffff48(%rbp) ...
And what the entry point is after call_ldr_notifications, notify->callback(reason, &data, notify->context);
xorl %eax,%eax cmpl $1,%edx setnz %al ret inb %dx,%al movb 0x0000000048000000,%al andl $fffffff0,%esp subq $30,%rsp cmpl $1,%edx movups %xmm6,0xffffffffffffff48(%rbp) ...
So, it replaces couple of bytes from the beginning, no idea what it is trying to achieve here, but this will definitely fail. It runs further if the ldr callback is not called in MODULE_InitDLL.
Other notes, not really related to this bug: - dxgi_device_SetMaximumFrameLatency needs better stub: destiny 2 will throw you "Graphics initialization failed" -messagebox and exit, if SetMaximumFrameLatency doesn't return S_OK. - It needs kernel32 GetCurrencyFormatEx (stub) implementation. - Native (and working) .NET is needed for miniTicketDbg.exe. It seems to be a crash reporter/watchdog or similar, Destiny 2 will just exit if miniTicketDbg fails to start. - WTHelperGetProvCertFromChain crashes, it should check for for null pSgnr (or I'm just fixing symptoms here, not the cause)
Anyways, here's some hacks to get it running for those who are brave enough to debug it further (it won't go in-game yet).