https://bugs.winehq.org/show_bug.cgi?id=55582
--- Comment #6 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Rafał Mużyło from comment #5)
Any idea what that patch exactly changes in the executable ?
The patch has an "extended version" by the same author, called Civilization II User Interface Additions. It is written in Delphi 7 and the author released the source code of it: https://github.com/FoxAhead/Civ2-UI-Additions/releases/tag/v1.20.3
There is an ASM snippet in Civ2UIA.dpr which probably deals with the issue: procedure PatchEditBox64Bit(); register; asm push GCL_CBWNDEXTRA mov eax, [ebp + $08] push eax call [$006E7E9C] // GetClassLongA mov ebx, eax sub al, 4 push eax mov eax, [ebp + $08] push eax call [$006E7E2C] // GetWindowLongA sub ebx, 8 mov [ebp - $08], eax mov eax, [ebp - $0C] push ebx mov eax, [ebp + $08] push eax call [$006E7E2C] // GetWindowLongA mov [ebp - $14], eax mov eax, [ebp + $0C] mov [ebp - $1C], eax push $005D2C94 ret end;
Should be noted that the patch is only needed for 64-bit Windowses whereas the crash happens in both 32-bit and WOW64 Wine.