https://bugs.winehq.org/show_bug.cgi?id=39209
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW URL| |http://bin.psunrise.com/Sma | |rtDiarySuite4Medical-setup. | |exe CC| |focht@gmx.net Summary|Smart Diary Suite crashes |Smart Diary Suite 4 crashes |when updating options |when updating options | |('CLSID_AudioCompressorCate | |gory', | |'{33D9A761-90C8-11d0-BD43-0 | |0A0C911CE86}' must be | |treated as special | |category) Ever confirmed|0 |1
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The app is protected by Themida v2 protection scheme which doesn't like relay tracing and debuggers.
--- snip --- -=[ ProtectionID v0.6.6.7 DECEMBER]=- (c) 2003-2015 CDKiLLER & TippeX Build 24/12/14-22:48:13 Ready... Scanning -> C:\Program Files\Smart Diary Suite 4\SDS4.exe File Type : 32-Bit Exe (Subsystem : Win GUI / 2), Size : 6843064 (0686AB8h) Byte(s) Compilation TimeStamp : 0x51F761DF -> Tue 30th Jul 2013 06:49:03 (GMT) [TimeStamp] 0x51F761DF -> Tue 30th Jul 2013 06:49:03 (GMT) | PE Header | - | Offset: 0x00000108 | VA: 0x00400108 | - -> File Appears to be Digitally Signed @ Offset 0685800h, size : 012B8h / 04792 byte(s) [File Heuristics] -> Flag #1 : 00000000000001001100000000100110 (0x0004C026) [Entrypoint Section Entropy] : 7.99 (section #0) " " | Size : 0x3EDE00 (4120064) byte(s) [DllCharacteristics] -> Flag : (0x8000) -> TSA [SectionCount] 7 (0x7) | ImageSize 0xE19000 (14782464) byte(s) [VersionInfo] Company Name : Programming Sunrise [VersionInfo] Product Name : Smart Diary (R) Suite 4 [VersionInfo] Product Version : 4.8.0.0 [VersionInfo] File Description : Smart Diary (R) Suite 4 [VersionInfo] File Version : 4.8.0.0 [VersionInfo] Original FileName : SDS4.exe [VersionInfo] Internal Name : SDS4.exe [VersionInfo] Version Comments : http://www.sdiary.com [VersionInfo] Legal Trademarks : Smart Diary (R) is a registered trademark; Smart Diary (R) Suite by Programming Sunrise [VersionInfo] Legal Copyrights : Copyright © 1997-2013 by Programming Sunrise [!] Themida v2.0.1.0 - v2.1.8.0 (or newer) detected ! [i] Hide PE Scanner Option used - Scan Took : 1.262 Second(s) [0000006CAh (1738) tick(s)] [499 of 573 scan(s) done] --- snip ---
Trace with selected channels:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Smart Diary Suite 4
$ WINEDEBUG=+tid,+seh,+loaddll,+process,+ole,+variant,+devenum wine ./SDS4.exe
log2.txt 2>&1
... 0034:trace:ole:CoCreateInstance (rclsid={62be5d10-60eb-11d0-bd3b-00a0c911ce86}, pUnkOuter=(nil), dwClsContext=00000001, riid={29840822-5b84-11d0-bd3b-00a0c911ce86}, ppv=0x846dcf4) 0034:trace:ole:CoGetTreatAsClass ({62be5d10-60eb-11d0-bd3b-00a0c911ce86},0x846dbd8) 0034:trace:ole:CoGetClassObject CLSID: {62be5d10-60eb-11d0-bd3b-00a0c911ce86},IID: {00000001-0000-0000-c000-000000000046} 0034:trace:ole:COMPOBJ_DllList_Add L"C:\windows\system32\devenum.dll" 0034:trace:loaddll:load_builtin_dll Loaded L"C:\windows\system32\avicap32.dll" at 0x7c4e0000: builtin 0034:trace:loaddll:load_builtin_dll Loaded L"C:\windows\system32\devenum.dll" at 0x7bae0000: builtin 0034:trace:devenum:DllMain 0x7bae0000 0x1 (nil) 0034:trace:ole:apartment_getclassobject added new loaded dll L"C:\windows\system32\devenum.dll" 0034:trace:ole:apartment_getclassobject calling DllGetClassObject 0x7bae7fb8 0034:trace:devenum:DllGetClassObject ({62be5d10-60eb-11d0-bd3b-00a0c911ce86}, {00000001-0000-0000-c000-000000000046}, 0x846dbe8) 0034:trace:devenum:DEVENUM_IClassFactory_QueryInterface (0x7bafb184)->({00000001-0000-0000-c000-000000000046}, 0x846dbe8) 0034:trace:devenum:DEVENUM_IClassFactory_AddRef 0034:trace:devenum:DEVENUM_IClassFactory_CreateInstance (0x7bafb184)->((nil), {29840822-5b84-11d0-bd3b-00a0c911ce86}, 0x846dcf4) 0034:trace:devenum:DEVENUM_IClassFactory_Release 0034:trace:devenum:DEVENUM_ICreateDevEnum_CreateClassEnumerator (0x7bafb160)->({33d9a761-90c8-11d0-bd43-00a0c911ce86}, 0x846dce8, 0) 0034:warn:devenum:open_category_key Could not open L"CLSID\{33D9A761-90C8-11D0-BD43-00A0C911CE86}\Instance" 0034:fixme:devenum:DEVENUM_ICreateDevEnum_CreateClassEnumerator Category {33d9a761-90c8-11d0-bd43-00a0c911ce86} not found 0034:trace:seh:raise_exception code=c0000005 flags=0 addr=0x85f2023 ip=085f2023 tid=0034 0034:trace:seh:raise_exception info[0]=00000000 0034:trace:seh:raise_exception info[1]=00000000 0034:trace:seh:raise_exception eax=00000001 ebx=00000004 ecx=0846dcf0 edx=00000000 esi=08c51404 edi=0847cb50 0034:trace:seh:raise_exception ebp=0846dd04 esp=0846dc78 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00210202 ... Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x085f2023). ... Backtrace: =>0 0x085f2023 in adjmmseng (+0x62023) (0x0846dd04) 1 0x085f1ea0 in adjmmseng (+0x61e9f) (0x0846dd20) 2 0x085f22a1 in adjmmseng (+0x622a0) (0x0846dd44) 3 0x0847cb58 in asrecmms (+0xcb57) (0x0846dde8) 4 0x08497203 in asrecmms (+0x27202) (0x0846de80) 5 0x00805233 in sds4 (+0x405232) (0x0846df40) 6 0x0080552b in sds4 (+0x40552a) (0x0846df60) 0x085f2023: movl 0x0(%edx),%eax Modules: Module Address Debug info Name (182 modules) PE 400000- 1219000 Export sds4 PE 50c0000- 50d1000 Deferred qwadjb PE 50f0000- 50fc000 Deferred 1eaadjc PE 7df0000- 7dfb000 Deferred rsaadjd PE 8470000- 858f000 Export asrecmms PE 8590000- 8b38000 Export adjmmseng PE 9070000- 907b000 Deferred mjcriu PE 10000000-1025c000 Deferred chartdir51 PE 10300000-10309000 Deferred peaadje PE 10400000-1040f000 Deferred khaadjf PE 10500000-1052b000 Deferred kfgresk ELF 48e28000-48e31000 Deferred libffi.so.6 ... Threads: process tid prio (all id:s are in hex) ... 0000005a (D) C:\Program Files\Smart Diary Suite 4\SDS4.exe 00000043 0 00000042 15 00000041 15 00000040 15 0000003f 15 0000003d 15 0000003c 2 0000003b 15 00000036 0 00000035 0 00000034 0 <== ... --- snip ---
'33D9A761-90C8-11d0-BD43-00A0C911CE86' -> CLSID_AudioCompressorCategory
There is a plugin 'Multimedia Engine' ('AdjMmsEng.dll') which tries to query the list of available audio compressors.
Wine returns S_FALSE (no category found) and the stupid app code seems to use 'SUCCEEDED(hr)' macro despite what MSDN says, assuming success. It tries to access the IEnumMoniker instance which is obviously NULL.
MSDN https://msdn.microsoft.com/de-de/library/windows/desktop/dd406744%28v=vs.85%...
--- quote --- If the category does not exist or is empty, the return value is S_FALSE, and the ppEnumMoniker parameter receives the value NULL. Therefore, test for the return value S_OK instead of using the SUCCEEDED macro: --- quote ---
Anyway, the real problem is how Wine handles 'CLSID_AudioCompressorCategory'. It must be treated as special category.
Source: https://source.winehq.org/git/wine.git/blob/df5f835e686337b5f33679f107f64be6...
--- snip --- 111 static BOOL IsSpecialCategory(const CLSID *clsid) 112 { 113 return IsEqualGUID(clsid, &CLSID_AudioRendererCategory) || 114 IsEqualGUID(clsid, &CLSID_AudioInputDeviceCategory) || 115 IsEqualGUID(clsid, &CLSID_VideoInputDeviceCategory) || 116 IsEqualGUID(clsid, &CLSID_VideoCompressorCategory) || 117 IsEqualGUID(clsid, &CLSID_MidiRendererCategory); 118 } --- snip ---
https://source.winehq.org/git/wine.git/blob/df5f835e686337b5f33679f107f64be6...
After that it still crashes but that's another bug.
$ sha1sum SmartDiarySuite4Medical-setup.exe 406d1cab38e08c5bcbfbe1c38906948d1b8fba78 SmartDiarySuite4Medical-setup.exe
$ du -sh SmartDiarySuite4Medical-setup.exe 13M SmartDiarySuite4Medical-setup.exe
$ wine --version wine-1.7.51
Regards