http://bugs.winehq.org/show_bug.cgi?id=34618
Bug #: 34618 Summary: bleem! demo thinks that Wine is a debugger and doesn't run Product: Wine Version: 1.7.3 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: winebugs140@gmail.com Classification: Unclassified
PlayStation emulator bleem! thinks that Wine is a debugger and doesn't run.
First you need to change Wine settings to Windows 98 or 95 because the program doesn't work with NT systems.
Tested with: Ubuntu 13.04, GeForce 9600M GS (NVIDIA driver 313) Mac OS X 10.7.5, ATI HD 2600 Pro, Mac Driver/X11
http://bugs.winehq.org/show_bug.cgi?id=34618
WineBuG winebugs140@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://web.archive.org/web/ | |20010607095803/http://www.b | |leem.com/files/demo-v1_4.ex | |e
http://bugs.winehq.org/show_bug.cgi?id=34618
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com 2013-09-28 14:21:52 CDT --- Confirming in wine 1.7.3. Was also present in 1.4.1 and 1.2.3.
http://bugs.winehq.org/show_bug.cgi?id=34618
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |obfuscation CC| |focht@gmx.net Summary|bleem! demo thinks that |bleem! demo thinks that |Wine is a debugger and |Wine is a debugger and |doesn't run |doesn't run (expects Win9x | |TEB field 'DebugContext' | |instead of NT Process ID)
--- Comment #2 from Anastasius Focht focht@gmx.net 2013-09-28 15:32:48 CDT --- Hello folks,
trace log doesn't reveal much, you have to debug the actual code...
--- snip --- ... 0025:Starting process L"C:\Program Files\bleem\bleem!\bleem!.exe" (entryproc=0x401000) 0025:Call KERNEL32.GetVersionExA(00401134) ret=0040102b 0025:Ret KERNEL32.GetVersionExA() retval=00000001 ret=0040102b 0025:Call KERNEL32.GetModuleFileNameA(00000000,004011e0,00000104) ret=00401058 0025:Ret KERNEL32.GetModuleFileNameA() retval=00000028 ret=00401058 0025:Call KERNEL32.CreateFileA(004011e0 "C:\Program Files\bleem\bleem!\bleem!.exe",80000000,00000001,00000000,00000003,00000080,00000000) ret=0040107c 0025:Ret KERNEL32.CreateFileA() retval=00000064 ret=0040107c 0025:Call KERNEL32.CreateFileMappingA(00000064,00000000,00000002,00000000,00000000,00000000) ret=00401096 0025:Ret KERNEL32.CreateFileMappingA() retval=00000068 ret=00401096 0025:Call KERNEL32.MapViewOfFile(00000068,00000004,00000000,00000000,00000000) ret=004010ad 0025:Ret KERNEL32.MapViewOfFile() retval=00530000 ret=004010ad 0025:Call KERNEL32.UnmapViewOfFile(00530000) ret=004010d6 0025:Ret KERNEL32.UnmapViewOfFile() retval=00000001 ret=004010d6 0025:Call KERNEL32.CloseHandle(00000068) ret=004010e1 0025:Ret KERNEL32.CloseHandle() retval=00000001 ret=004010e1 0025:Call KERNEL32.CloseHandle(00000064) ret=004010ec 0025:Ret KERNEL32.CloseHandle() retval=00000001 ret=004010ec 0025:Call user32.MessageBeep(00000010) ret=004010ff 0025:Ret user32.MessageBeep() retval=00000001 ret=004010ff 0025:Call user32.MessageBoxA(00000000,0040142d "This program is not designed to operate with a debugger!\n\nPlease disable or exit the debugger and try again.",004012e5 "bleem, llc.",00011010) ret=0040111c --- snip ---
The code in question:
--- snip --- 00585586 C74424 24 06000000 MOV DWORD PTR SS:[ESP+24],6 0058558E 64:A1 20000000 MOV EAX,DWORD PTR FS:[20] 00585594 85C0 TEST EAX,EAX 00585596 C3 RETN --- snip ---
On Win9x systems the TEB field FS:[0x20] is also known as 'DebugContext'.
Wine implements the NT behaviour for this TEB field -> "teb->ClientId.UniqueProcess"
I doubt it's worth to mess up Wine code just for this app...
As workaround patch the executable to foil the debugger check.
--- snip --- $ printf '\x30' | dd of=bleem!.exe bs=1 seek=349588 count=1 conv=notrunc --- snip ---
What does it do?
It changes the opcode 0x85,0xC0 (test eax,eax) at file offset 0x55594 to 0x30,0xC0 (xor eax,eax), faking success.
This lets the app run into next Wine bug ...
Regards
http://bugs.winehq.org/show_bug.cgi?id=34618
Jarkko K jarkko_korpi@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarkko_korpi@hotmail.com
--- Comment #3 from Jarkko K jarkko_korpi@hotmail.com --- I can confirm that the issues are still at
wine 1.7.15
http://bugs.winehq.org/show_bug.cgi?id=34618
hanska2@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hanska2@luukku.com
--- Comment #4 from hanska2@luukku.com --- The code is still untouched.
1.7.23
http://bugs.winehq.org/show_bug.cgi?id=34618
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Component|-unknown |ntdll Resolution|--- |WONTFIX
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
it's pointless to ping those kind of bugs in short time. Once per year is enough.
Resolving 'WONTFIX' as adding support for WinVer dependent PEB/TEB layout will likely break things which is not worth the benefit.
I already gave an easy workaround.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34618
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=34618
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 53364 --> https://bugs.winehq.org/attachment.cgi?id=53364 hack
While testing bug 36013 I did this small trick to get past the error without patching bleem!. Since it does not look that awful I'm attaching, not sure if 0 is the correct value though.
https://bugs.winehq.org/show_bug.cgi?id=34618
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #8 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Bruno Jesus from comment #7)
Created attachment 53364 [details] hack
While testing bug 36013 I did this small trick to get past the error without patching bleem!. Since it does not look that awful I'm attaching, not sure if 0 is the correct value though.
Its very likely that you'll run into new issues with this hack applied. Wine internally also uses ClientId.UniqueProcess at various places. A more complete patch would require additional changes at all places where ClientId.UniqueProcess is used, but not sure if its worth the effort. Did you also try Anastasius hack from comment #2?
https://bugs.winehq.org/show_bug.cgi?id=34618
--- Comment #9 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Sebastian Lackner from comment #8)
Its very likely that you'll run into new issues with this hack applied. Wine internally also uses ClientId.UniqueProcess at various places. A more complete patch would require additional changes at all places where ClientId.UniqueProcess is used, but not sure if its worth the effort. Did you also try Anastasius hack from comment #2?
I totally agree. And yes, I tested with his patch and with my patch from the other bug and the program still crashes, last line is always: fixme:vxd:VMM_VxDCall GetDemandPageInfo(00390124 00000000): stub!