https://bugs.winehq.org/show_bug.cgi?id=44585
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
--- quote --- I tried compiling a custom version of Wine with just the LdrRegisterDllNotification patch (and dependencies) from staging, but Diablo III still crashes. --- quote ---
well I never said that adding OS loader module notification callback interface alone makes the game(s) fully functional. Unlike other bug reports (Overwatch, World of Warcraft) which are completely messed up I separate issues for better traceability and testing. Of course there are still more patches missing.
--- quote --- According to the log from 2.21-staging the next call should be NtCreateFile. That function is already implemented in wine's ntdll so I don't know what's going wrong now. --- quote ---
As I already said: guessing from trace log is pointless as the imports resolving phase is invisible. One has to debug the code to see it.
After ntdll.LdrRegisterDllNotification(), the obfuscated code resolves another bunch of imports. The module and API function names to be resolved are obfuscated using pre-computed hashes. Basically the in-memory export table for 'ntdll, 'kernel32', 'user32' and 'gdi32' modules is walked, all the function names are hashed and compared against the precomputed hashes for matches. There is even a Windows version awareness in this phase. Depending on the WinVer setting (WinXP vs. Win7), few different APIs are resolved.
I wish the orginial patch authors would have put more effort into traceability. Many times a reference to a bug report/ticket/link to discussion is missing. The sheer number of patches in Wine-Staging makes it almost impossible to extract the minimum required set to fix a certain class of problems/games/apps. I would rather avoid wasting my time debugging this crap to identify the minimum set of patches required and exact order (it's not fun) ... but well.
Anyway, I will create additional tickets to cover the minimum patches that need to be applied to make this game functional with vanilla Wine 3.2
Regards