https://bugs.winehq.org/show_bug.cgi?id=49973
Bug ID: 49973 Summary: 64-bit Cheat Engine does not properly handle 32-bit processes Product: Wine Version: 5.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: subgraph93@gmail.com Distribution: ---
Created attachment 68374 --> https://bugs.winehq.org/attachment.cgi?id=68374 cheatengine-x86_64.exe attaching to Tutorial-i386.exe
Distribution: Ubuntu 20.04 Program download: Cheat Engine 7.1, available from https://cheatengine.org/downloads.php (the actual link appears to change on every page refresh) Program source code: available at https://github.com/cheat-engine/cheat-engine/
On Windows 7, 64-bit Cheat Engine (cheatengine-x86_64.exe) works fine for 32-bit processes as well as 64-bit processes. However, when using Wine, 64-bit CE cannot properly attach to 32-bit processes. 32-bit CE works fine for 32-bit processes. Explaining in some more detail below.
To attach CE to a program, start CE and the program (in any order), then when CE opens, click the "Open process" icon (it looks like a desktop monitor with a magnifying glass; it's below the "File" menu button) and select the target process from the list. CE comes with its own tutorial programs (32-bit and 64-bit), so installing another, unrelated program shouldn't be needed for testing.
A simple way to identify whether the issue exists is to add an address using the executable name. To do this, click the "Add Address Manually" button in CE, enter ["programname.exe"] (with the square brackets; e. g. ["Tutorial-i386.exe"]) in the "Address" box, then click OK. Note the new entry in the address list below and check the value in the "Address" column for that entry. When using 32-bit CE on a 32-bit program, the address column shows the actual address (e. g. 00905A4D) and may show a value, but when using 64-bit CE on a 32-bit program (something that works on Windows), the address column shows the text with the program name – something like (["Tutorial-i386.exe"]), with the parentheses, – and the value is just question marks.
The most obvious impact of the issue is that cheat tables and assembly scripts cannot work unless the base address (is this the right term?) of the .exe is hardcoded. Other problems with using 64-bit CE on 32-bit programs are that the code finder does not work (so you can't complete Step 5 of the tutorial, which requires you to overwrite an instruction that changes a value; you can't find that instruction), and that pointer scans do not work. (I'll file other tickets if these turn out to be their own issues; but both features work fine if 32-bit CE is used on a 32-bit process.)
I set the version as 5.4 because it's the first version I noticed this issue in. This issue was also present in every newer version up to 5.19 (both devel and staging channels). I don't think it's a regression. I didn't use Cheat Engine with Wine versions before 5.4.
Attached the terminal output for the 5.19-staging test with 64-bit CE and the 32-bit tutorial.
https://bugs.winehq.org/show_bug.cgi?id=49973
Rafał Mużyło galtgendo@o2.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |galtgendo@o2.pl