https://bugs.winehq.org/show_bug.cgi?id=49052
--- Comment #9 from Paul Gofman pgofman@codeweavers.com --- Created attachment 68331 --> https://bugs.winehq.org/attachment.cgi?id=68331 Bypass NtOpenFile in NtGetNlsSectionPtr()
I've tested the Blossom Tales: The Sleeping King with the latest Wine and it is almost there. The following upstream changes made the hidden DLLs load ok now: - moving most of Nt... functions to the Unix part of ntdll; - reworking loader so that it fully works through Nt functions now and thus does not depend on the dll being placed as a Unix disk file.
Still with mainstream Wine the game hits stack overflow exception at start. That happens because NtGetNlsSectionPtr() is not in the Unix part yet. It calls NtOpenFile which is hotpatched by Enigma, and Enigma uses kernelbase locale functions to handle the file name. This results in infinite recursion. The attached proof of concept hack makes the game start fine for me. So this should work in a proper way once NtGetNlsSectionPtr gets moved to the Unix part.
I also tested 'The Rising of the Shield Hero Relive The Animation' which had the same issues and it is also working fine for me with the attached hack.