https://bugs.winehq.org/show_bug.cgi?id=45218
bugzilla@biechl.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@biechl.net
--- Comment #11 from bugzilla@biechl.net --- Thing is, in windows the injector does work. Memory allocation seems to be handled differently in windows, so Wine does something different here. That the application does not work is a result of that.
I understand that inverting the memory allocation may not be a proper overall solution, but maybe there is a better approach that, in the end, is also more closer to "the way Windows is supposed to work"? :)
Here is what one of the developers of the said binary says about the problem, and why it can't be worked around, maybe that helps:
Since branch instructions have a range that is smaller than the address space on 64-bit operating systems, we need to allocate a buffer that is adjacent to the game's code, called a "branch trampoline". Without that, the game's code and our DLL's code may be located too far away in memory to branch directly to each other. Either WINE's loader is not supporting ASLR and loads executables at a very low address all of the time, or the functions for querying the state of memory are not implemented correctly.