https://bugs.winehq.org/show_bug.cgi?id=53775
--- Comment #7 from Dario dario86@tutamail.com --- Subroutine at 0x10004430 in bio3hd.asi is successfully injected in ddraw.ddl and executed. This brief subroutine stores a couple of words in memory representing the intended resolution of 1280x960. This behavior is consistent between Windows and Wine. An issue however is apparent when the next injected subroutine at 0x10004460 in bio3hd.asi is called. On Windows this subroutine takes a resolution of 1280x960 and few other values as input parameters. While on Windows these parameters are correctly passed, on Wine the vertical resolution of 960 is not passed to the subroutine, leading to an unexpected condition. This is the earliest occurrence of misbehavior on the part of Wine that I managed to come across. I don't know whether the problem lies in between the two calls or earlier in the execution of the program.
This is what ESP register looks like when entering subroutine 0x10004460 in bio3hd.asi under Windows: [esp+4] 0x0A761040 [esp+8] 0x00000500 <- 1280 [esp+C] 0x000003C0 <- 960 [esp+10] 0x00000140 <- 320 [esp+14] 0x0A88D040
This is what it looks like in Wine: [esp+4] 0x00000000 [esp+8] 0x028ADAC0 [esp+C] 0x00000500 <- 1280 [esp+10] 0x00000140 <- 320 [esp+14] 0x055BD000
Under Wine, the value representing the vertical resolution is missing from the stack.