https://bugs.winehq.org/show_bug.cgi?id=45510
Bug ID: 45510 Summary: Sentinel Runtime Setup problem Product: Wine Version: 3.13 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: hildogjr@gmail.com Distribution: ---
Created attachment 61886 --> https://bugs.winehq.org/attachment.cgi?id=61886 Installation error
During my Windows software installation on Wine (see attached image) I have to install the "Sentinel Runtime Setup" for access the server license.
I am getting the follow error, not considering the "fixme", the errors stated on line 82 block my installation.
wine Psim11.0.3_32bit_setup.exe 002a:fixme:plugplay:build_report_descriptor Clamping joystick to 6 axis 002a:err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet! 002a:err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet! 002a:err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet! 002a:err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet! 002a:err:hid_report:process_hid_report Device reports coming in too fast, last report not read yet! 0030:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"UpdateProperties", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"CurrDialog", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"CurrDialog", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"Wizard", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"Wizard", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"bFound", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"bFound", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"record", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"record", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"NextDialog", clsid {000c109e-0000-0000-c000-000000000046} 0060:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"NextDialog", clsid {000c109e-0000-0000-c000-000000000046} 0030:err:richedit:ReadStyleSheet missing style number 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"UpdateProperties", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"CurrDialog", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"CurrDialog", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"Wizard", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"Wizard", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"bFound", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"bFound", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"record", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"record", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"NextDialog", clsid {000c109e-0000-0000-c000-000000000046} 0061:fixme:msi:AutomationObject_GetIDsOfNames Unknown member L"NextDialog", clsid {000c109e-0000-0000-c000-000000000046} 0063:fixme:nls:GetThreadPreferredUILanguages 00000038, 0x45f5ec, 0x45f5fc 0x45f5f0 0063:fixme:nls:get_dummy_preferred_ui_language (0x38 0x45f5ec 0x45f5fc 0x45f5f0) returning a dummy value (current locale) wine: cannot find L"C:\windows\system32\hasp_rt.exe" 0063:fixme:ver:GetCurrentPackageId (0x45b38c (nil)): stub 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0072:fixme:nls:GetThreadPreferredUILanguages 00000038, 0x56f5ec, 0x56f5fc 0x56f5f0 0072:fixme:nls:get_dummy_preferred_ui_language (0x38 0x56f5ec 0x56f5fc 0x56f5f0) returning a dummy value (current locale) wine: cannot find L"C:\windows\system32\hasp_rt.exe" 0072:fixme:ver:GetCurrentPackageId (0x56c2bc (nil)): stub 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0017:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 2d1400 (device=2d access=0 func=500 method=0) 0080:fixme:ole:CoInitializeSecurity (0x33ede8,-1,(nil),(nil),6,2,(nil),8192,(nil)) - stub! 0080:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet 0082:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadColorTbl malformed entry 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:err:richedit:ReadStyleSheet skipping optional destination 0082:fixme:msi:event_spawn_wait_dialog doing nothing 0090:fixme:heap:RtlSetHeapInformation 0x240000 0 0x23fd30 4 stub 0090:fixme:winspool:PerfOpen (null): stub 0090:fixme:winspool:PerfCollect L"740", 0x23dea8, 0x23de90, 0x23de94: stub 0090:fixme:winspool:PerfClose stub 0090:fixme:winspool:PerfOpen (null): stub 0090:fixme:winspool:PerfCollect L"740", 0x23deb8, 0x23dea0, 0x23dea4: stub 0090:fixme:winspool:PerfClose stub 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! PCMCIA\FAST_Electronic-Hardlock_V1.0-E258 C:\windows\system32\setup\aladdin\akspccard.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! PCMCIA\FAST_Electronic-Hardlock_V1.0-9586 C:\windows\system32\setup\aladdin\akspccard.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! PCMCIA\Aladdin_Knowledge_Systems_Ltd.-Hardlock_V2.0-73FD C:\windows\system32\setup\aladdin\akspccard.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! PCMCIA\Aladdin_Knowledge_Systems_Ltd.-PC-CardHASP_V1.1-A809 C:\windows\system32\setup\aladdin\akspccard.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! USB\Hardlock C:\windows\system32\setup\aladdin\hasphl\akshasp.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! USB\Hasp C:\windows\system32\setup\aladdin\hasphl\akshasp.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! Aladdin\Vid0529&Pid0001&HaspHL C:\windows\system32\setup\aladdin\hasphl\akshhl.inf 0x00000000 0090:fixme:newdev:UpdateDriverForPlugAndPlayDevicesA Stub! USB\Vid_0529&Pid_0001 C:\windows\system32\setup\aladdin\hasphl\aksusb.inf 0x00000000 009b:fixme:ntoskrnl:KeInitializeEvent stub: 0x6c42e0 1 1 009b:fixme:ntoskrnl:KeInitializeSemaphore (0x6c42a0 0 100) stub 009b:fixme:ntoskrnl:KeInitializeMutex stub: 0x6c4300, 0 009b:fixme:ntoskrnl:KeWaitForSingleObject stub: 0x6c4300, 0, 0, 0, (nil) wine: Unhandled privileged instruction at address 0x6c6b72 (thread 009b), starting debugger... 008d:err:service:process_send_command service protocol error - failed to read pipe r = 0 count = 0!
https://bugs.winehq.org/show_bug.cgi?id=45510
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de ---
0082:err:richedit:ReadStyleSheet skipping optional destination
Are you sure this is causing the issue? If so, "wientricks riched20" should fix the issue. But I doubt that's the problem here.
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #2 from Hildo Guillardi Júnior hildogjr@gmail.com --- Really, I am not sure. But I can provide a better debug if you pass me the parameters to do that. And the last messages are
wine: Unhandled privileged instruction at address 0x6c6b72 (thread 009b), starting debugger... 008d:err:service:process_send_command service protocol error - failed to read pipe r = 0 count = 0!
with the software installation error.
https://bugs.winehq.org/show_bug.cgi?id=45510
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|Sentinel Runtime Setup |Sentinel HASP Runtime |problem |(driver) 7.8 installer | |fails, reports 'Error when | |starting the hardlock | |service' (custom imports | |resolver fails to locate | |some ntoskrnl exports) Keywords| |download, hardware, | |Installer, obfuscation CC| |focht@gmx.net Component|-unknown |ntoskrnl URL| |https://supportportal.gemal | |to.com/csm/?id=kb_article&s | |ys_id=a459d328dba207c8fe0af | |f3dbf9619ce
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming. I found the Sentinel HASP driver/runtime installer package PSIM 11.x uses on the original vendor site, albeit slightly different version.
Relevant part of trace log:
--- snip --- $ WINEDEBUG=+seh,+relay,+msi,+service,+ntoskrnl wine ./HASPUserSetup.exe
log.txt 2>&1
... 0009:Call KERNEL32.CreateProcessW(00000000,0018059c L"MSIEXEC.EXE /i "C:\users\focht\Temp\{FF7C4F7B-D751-4BF4-A3F9-8CB260F6EEE7}\HASP_Setup.msi" SETUPEXEDIR="Z:\home\focht\Downloads\Sentinel_LDK_Run-time_setup" SETUPEXENAME="HASPUserSetup.exe"",00000000,00000000,00000000,00000020,00000000,00000000,0033c314,0033c380) ret=0044488b ... 002f:Call KERNEL32.__wine_kernel_init() ret=7bc6d45a 0009:Ret KERNEL32.CreateProcessW() retval=00000001 ret=0044488b ... 002f:trace:msi:ACTION_CustomAction Handling custom action L"Action.6CF3F7DF_6AED_451D_BF8F_AD216156BF2B" (c11 L"haspds_msi.dll.6CF3F7DF_6AED_451D_BF8F_AD216156BF2B" L"HaspdsMsiInst") ... 002f:trace:msi:HANDLE_CustomType17 L"haspds_msi.dll.6CF3F7DF_6AED_451D_BF8F_AD216156BF2B" L"HaspdsMsiInst" ... 0039:Call KERNEL32.LoadLibraryW(0015c910 L"C:\Program Files\Common Files\Aladdin Shared\HASP\haspds_msi.dll") ret=7e919445 ... 0039:Ret PE DLL (proc=0x10001bbe,module=0x10000000 L"haspds_msi.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0039:Ret KERNEL32.LoadLibraryW() retval=10000000 ret=7e919445 0039:Call KERNEL32.GetProcAddress(10000000,0015aed0 "HaspdsMsiInst") ret=7e9194c8 0039:Ret KERNEL32.GetProcAddress() retval=10001170 ret=7e9194c8 0039:trace:msi:alloc_msi_remote_handle 1 -> 1 0039:trace:msi:__wine_msi_call_dll_function calling "HaspdsMsiInst" ... 0039:Call advapi32.CreateServiceA(00160688,0015eede "hardlock",0015eede "hardlock",000f01ff,00000001,00000002,00000001,0056e210 "C:\windows\system32\drivers\hardlock.sys",00000000,00000000,0015f130 "",00000000,00000000) ret=006a4c54 ... 0039:Ret advapi32.CreateServiceA() retval=00160b30 ret=006a4c54 ... 0039:Call advapi32.StartServiceA(00160b30,00000000,00000000) ret=006a4d4b ... 003d:Call KERNEL32.CreateProcessW(00000000,0011c680 L"C:\windows\system32\winedevice.exe",00000000,00000000,00000000,00000400,00450000,00000000,00bbf7ec,00bbf830) ret=7efe4bb0 ... 0044:Call KERNEL32.__wine_kernel_init() ret=7bc6d45a 003d:Ret KERNEL32.CreateProcessW() retval=00000001 ret=7efe4bb0 ... 0048:Call KERNEL32.LoadLibraryW(0011cd68 L"C:\windows\system32\drivers\hardlock.sys") ret=7effa9fa 0048:Ret KERNEL32.LoadLibraryW() retval=00780000 ret=7effa9fa ... 0048:Call driver init 0x809224 (obj=0x11cb88,str=L"\Registry\Machine\System\CurrentControlSet\Services\hardlock") ... 0048:Call ntoskrnl.exe.RtlInitUnicodeString(0065fc74,007f531e L"\REGISTRY\MACHINE\System\CurrentControlSet\Services\HaspNt") ret=00797e56 0048:Call ntdll.RtlInitUnicodeString(0065fc74,007f531e L"\REGISTRY\MACHINE\System\CurrentControlSet\Services\HaspNt") ret=7bc81363 0048:Ret ntdll.RtlInitUnicodeString() retval=0065fc74 ret=7bc81363 0048:Ret ntoskrnl.exe.RtlInitUnicodeString() retval=0065fc74 ret=00797e56 ... 0048:Call ntoskrnl.exe.IoCreateDevice(0011cb88,0000040c,0065fba8,00009c40,00000000,00000000,0065fc90) ret=007984cc 0048:trace:ntoskrnl:IoCreateDevice (0x11cb88, 1036, L"\Device\FNT0", 40000, 0, 0, 0x65fc90) 0048:Call ntdll.RtlAllocateHeap(00110000,00000008,000004c4) ret=7e985874 0048:Ret ntdll.RtlAllocateHeap() retval=0011d348 ret=7e985874 0048:Ret ntoskrnl.exe.IoCreateDevice() retval=00000000 ret=007984cc ... 0048:Call ntoskrnl.exe.IoCreateSymbolicLink(0065fba0,0065fba8) ret=008058a4 0048:trace:ntoskrnl:IoCreateSymbolicLink L"\DosDevices\FEnteDev" -> L"\Device\FNT0" 0048:Call ntdll.NtCreateSymbolicLinkObject(0065fb24,000f0001,0065fb0c,0065fba8) ret=7e985bd1 0048:Ret ntdll.NtCreateSymbolicLinkObject() retval=00000000 ret=7e985bd1 0048:Ret ntoskrnl.exe.IoCreateSymbolicLink() retval=00000000 ret=008058a4 ... 0048:Call ntoskrnl.exe.RtlAppendUnicodeToString(0011e820,007f57d8 L"\Parameters") ret=008042bf 0048:Call ntdll.RtlAppendUnicodeToString(0011e820,007f57d8 L"\Parameters") ret=7bc81363 0048:Ret ntdll.RtlAppendUnicodeToString() retval=00000000 ret=7bc81363 0048:Ret ntoskrnl.exe.RtlAppendUnicodeToString() retval=00000000 ret=008042bf 0048:Call ntoskrnl.exe.RtlQueryRegistryValues(80000000,0011e828,0065fa34,00000000,00000000) ret=007843fd 0048:Call ntdll.RtlQueryRegistryValues(80000000,0011e828,0065fa34,00000000,00000000) ret=7bc81363 0048:Ret ntdll.RtlQueryRegistryValues() retval=c0000034 ret=7bc81363 0048:Ret ntoskrnl.exe.RtlQueryRegistryValues() retval=c0000034 ret=007843fd .... 0048:Call ntoskrnl.exe.PsGetVersion(0065fbb4,0065fbb8,00000000,00000000) ret=00804f70 0048:Call ntdll.RtlGetVersion(0065fa34) ret=7e9886ef 0048:Ret ntdll.RtlGetVersion() retval=00000000 ret=7e9886ef 0048:Ret ntoskrnl.exe.PsGetVersion() retval=00000001 ret=00804f70 .... 0048:Call hal.HalGetBusData(00000004,00000000,00000000,0065f964,00000040) ret=00798cf1 0048:fixme:ntoskrnl:HalGetBusData (4 0 0 0x65f964 64) stub! 0048:Ret hal.HalGetBusData() retval=00000000 ret=00798cf1 ... 0048:Call ntoskrnl.exe.ZwQuerySystemInformation(0000000b,0011e820,000008e4,0065fa74) ret=007f00c9 0048:Call ntdll.NtQuerySystemInformation(0000000b,0011e820,000008e4,0065fa74) ret=7bc81363 0048:Ret ntdll.NtQuerySystemInformation() retval=00000000 ret=7bc81363 0048:Ret ntoskrnl.exe.ZwQuerySystemInformation() retval=00000000 ret=007f00c9 ... 0048:Call ntoskrnl.exe.IoGetConfigurationInformation() ret=0079a124 0048:fixme:ntoskrnl:IoGetConfigurationInformation partial stub 0048:Ret ntoskrnl.exe.IoGetConfigurationInformation() retval=7e9b45c0 ret=0079a124 ... 0048:Call ntoskrnl.exe.RtlInitUnicodeString(0065f844,007f7020 L"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion") ret=007eff93 0048:Call ntdll.RtlInitUnicodeString(0065f844,007f7020 L"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion") ret=7bc81363 0048:Ret ntdll.RtlInitUnicodeString() retval=0065f844 ret=7bc81363 0048:Ret ntoskrnl.exe.RtlInitUnicodeString() retval=0065f844 ret=007eff93 0048:Call ntoskrnl.exe.ZwOpenKey(0065f850,02000000,0065f824) ret=007effc5 0048:Call ntdll.NtOpenKey(0065f850,02000000,0065f824) ret=7bc81363 0048:Ret ntdll.NtOpenKey() retval=00000000 ret=7bc81363 0048:Ret ntoskrnl.exe.ZwOpenKey() retval=00000000 ret=007effc5 0048:Call ntoskrnl.exe.ZwQueryValueKey(00000044,0065f83c,00000001,0011fa68,00000200,0065f84c) ret=007efff3 0048:Call ntdll.NtQueryValueKey(00000044,0065f83c,00000001,0011fa68,00000200,0065f84c) ret=7bc81363 0048:Ret ntdll.NtQueryValueKey() retval=00000000 ret=7bc81363 0048:Ret ntoskrnl.exe.ZwQueryValueKey() retval=00000000 ret=007efff3 0048:trace:seh:raise_exception code=c0000005 flags=0 addr=(nil) ip=00000000 tid=0048 0048:trace:seh:raise_exception info[0]=00000000 0048:trace:seh:raise_exception info[1]=00000000 0048:trace:seh:raise_exception eax=0011fa68 ebx=7e97f2d4 ecx=00000016 edx=0011fa90 esi=0011fa60 edi=0011f850 0048:trace:seh:raise_exception ebp=0065f854 esp=0065f808 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010216 0048:trace:seh:call_vectored_handlers calling handler at 0x7e9827fd code=c0000005 flags=0 0048:trace:seh:call_vectored_handlers handler at 0x7e9827fd returned 0 0048:trace:seh:call_stack_handlers calling handler at 0x7bcb3a34 code=c0000005 flags=0 0048:Call KERNEL32.UnhandledExceptionFilter(0065f304) ret=7bcb3a6f wine: Unhandled page fault on read access to 0x00000000 at address (nil) (thread 0048), starting debugger... ... 0039:Call user32.MessageBoxA(0005006c,0056e970 "Error when starting the hardlock service with parameters 1168 1053 1.\nThis is an internal error. For assistance, contact your administrator or the software manufacturer. Vypr\x9ael casov\xfd limit po\x9eadavku slu\x9eby.\r\n\nStatus Code: 48 5 935 1053",100092d8 "Sentinel HASP Run-time installation",00000040) ret=100013c7 --- snip ---
'c:\windows\aksdrvsetup.log':
--- snip --- [27/7/2018-13:5:19]Running on Win 7 ../hhlinst.c,3903, [27/7/2018-13:5:19]haspdinst 1 ver 7.81//7.81 started ../hhlinst.c,1551, [27/7/2018-13:5:19]DLL InstallPath = C:\Program Files\Common Files\Aladdin Shared\HASP\haspds_windows.dll ../hhlinst.c,1591, [27/7/2018-13:5:20]Called hhls_ExtractFiles AKSUPACK_EXTRACTED Params: hasp_windows.dll C:\users\focht\Temp\hasp_windows.dll 1 5695548 ../hhlinst.c,3571, [27/7/2018-13:5:20]Called hhls_ExtractFiles AKSUPACK_EXTRACTED Params: haspdinst_x64.exe C:\users\focht\Temp\haspdinst_x64.exe 1 5695548 ../hhlinst.c,3571, [27/7/2018-13:5:20]Called hhls_ExtractFiles AKSUPACK_EXTRACTED Params: hhl01.cab C:\users\focht\Temp\hhl01.cab 1 5695548 ../hhlinst.c,3571, [27/7/2018-13:5:20]Unpackdone ../hhlinst.c,1637, ... [27/7/2018-13:5:20]Install PnP Device aksusb.inf. ../instdrv.c,1248, [27/7/2018-13:5:20]call pUpdateDriverForPlugAndPlayDevices. ../instdrv.c,1319, [27/7/2018-13:5:20]Driver successfully updated ../instdrv.c,1348, [27/7/2018-13:5:20]Install PnP Device aksusb.inf done. Status = 0 ../instdrv.c,1644, [27/7/2018-13:5:20]read config file ../hhlinst.c,1996, [27/7/2018-13:5:20]read config file OK ../hhlinst.c,2015, [27/7/2018-13:5:20]check action type ../hhlinst.c,2018, [27/7/2018-13:5:20]read config file ../hhlinst.c,1996, [27/7/2018-13:5:20]read config file OK ../hhlinst.c,2015, [27/7/2018-13:5:20]check action type ../hhlinst.c,2018, [27/7/2018-13:5:20]read config file ../hhlinst.c,1996, [27/7/2018-13:5:20]read config file OK ../hhlinst.c,2015, [27/7/2018-13:5:20]check action type ../hhlinst.c,2018, [27/7/2018-13:5:20]read config file ../hhlinst.c,1996, [27/7/2018-13:5:20]read config file OK ../hhlinst.c,2015, [27/7/2018-13:5:20]check action type ../hhlinst.c,2018, [27/7/2018-13:5:20]read config file ../hhlinst.c,1996, [27/7/2018-13:5:20]read config file OK ../hhlinst.c,2015, [27/7/2018-13:5:20]check action type ../hhlinst.c,2018, [27/7/2018-13:5:20] hardlock.sys VER 0 ../instdrv.c,2162, [27/7/2018-13:5:20]InstallService Hardlock. ../instdrv.c,692, [27/7/2018-13:5:20]service Hardlock newer 0 serviceexist 0. ../instdrv.c,731, [27/7/2018-13:5:20]start service Hardlock. ../instdrv.c,903, [27/7/2018-13:5:20]UnInstallService hardlock. ../instdrv.c,1019, [27/7/2018-13:5:20]UnInstallService hardlock end status 0. ../instdrv.c,1146, [27/7/2018-13:5:23]Error when starting the hardlock service with parameters 1168 1053 1. ../instdrv.c,935, [27/7/2018-13:5:23]Windows error 1053 ../instdrv.c,935, [27/7/2018-13:5:23]do not write instcount err 1 48 ../hhlinst.c,2360, [27/7/2018-13:5:23]end actual install ../hhlinst.c,2436, [27/7/2018-13:5:23]Install returned 1 48 ../hhlinst.c,1742, --- snip ---
Disassembly of driver code (after decryption in memory):
--- snip --- ... 007F0001 8B46 04 MOV EAX,DWORD PTR DS:[ESI+4] 007F0004 8B48 0C MOV ECX,DWORD PTR DS:[EAX+C] 007F0007 8B50 08 MOV EDX,DWORD PTR DS:[EAX+8] 007F000A 57 PUSH EDI 007F000B 51 PUSH ECX 007F000C 03D0 ADD EDX,EAX 007F000E 52 PUSH EDX 007F000F 50 PUSH EAX 007F0010 E8 4F230000 CALL hardlock.007F2364 007F0015 8B46 04 MOV EAX,DWORD PTR DS:[ESI+4] ... 007F22B0 JMP DWORD PTR DS:[7F422C] ; ntoskrnl.NtOpenKey 007F22B6 JMP DWORD PTR DS:[7F4224] ; ntoskrnl.NtSetValueKey 007F22BC JMP DWORD PTR DS:[7F4220] ; ntoskrnl.MmMapIoSpace 007F22C2 JMP DWORD PTR DS:[7F421C] ; ntoskrnl.NtEnumerateValueKey ... 007F235E JMP DWORD PTR DS:[7F4074] ; ntoskrnl.KeInitializeSemaphore 007F2364 JMP DWORD PTR DS:[7F4078] 007F236A JMP DWORD PTR DS:[7F407C] ; ntoskrnl.NtQueryValueKey 007F2370 JMP DWORD PTR DS:[7F4080] ; ntoskrnl.IofCompleteRequest 007F2376 JMP DWORD PTR DS:[7F4084] ; ntoskrnl.IofCallDriver 007F237C JMP DWORD PTR DS:[7F4088] ; ntoskrnl.__wine_stub_KeReadStateEvent 007F2382 JMP DWORD PTR DS:[7F408C] ; ntoskrnl.__wine_stub_IoCancelIrp 007F2388 JMP DWORD PTR DS:[7F4090] ; ntoskrnl.KeDelayExecutionThread 007F238E JMP DWORD PTR DS:[7F4094] ; ntoskrnl.IoGetDeviceObjectPointer 007F2394 JMP DWORD PTR DS:[7F4098] ; ntoskrnl.IoBuildDeviceIoControlRequest 007F239A JMP DWORD PTR DS:[7F409C] ; ntoskrnl.ExAllocatePoolWithTag 007F23A0 JMP DWORD PTR DS:[7F40A0] ; ntoskrnl.RtlIntegerToUnicodeString 007F23A6 JMP DWORD PTR DS:[7F40A4] ; ntoskrnl.RtlAppendUnicodeStringToString 007F23AC JMP DWORD PTR DS:[7F40A8] ; ntoskrnl.IoGetConfigurationInformation 007F23B2 JMP DWORD PTR DS:[7F40AC] ; ntoskrnl.KeInitializeEvent 007F23B8 JMP DWORD PTR DS:[7F40B0] ; ntoskrnl.ObReferenceObjectByPointer 007F23BE JMP DWORD PTR DS:[7F40B8] ; ntoskrnl.RtlCompareMemory 007F23C4 JMP DWORD PTR DS:[7F40BC] ; ntoskrnl.NTOSKRNL_memset 007F23CA JMP DWORD PTR DS:[7F40C0] ... 007F23C4 JMP DWORD PTR DS:[7F40BC] ; ntoskrnl.NTOSKRNL_memset 007F23CA JMP DWORD PTR DS:[7F40C0] 007F23D0 JMP DWORD PTR DS:[7F40C4] ; ntoskrnl.NTOSKRNL_memcpy ... 007F2442 JMP DWORD PTR DS:[7F4110] ; ntoskrnl.__wine_stub_IoIsSystemThread 007F2448 JMP DWORD PTR DS:[7F4114] 007F244E JMP DWORD PTR DS:[7F411C] ; ntoskrnl.__wine_stub_IoDetachDevice ... 007F2472 JMP DWORD PTR DS:[7F4134] ; ntoskrnl.IoAllocateMdl 007F2478 JMP DWORD PTR DS:[7F4138] 007F247E JMP DWORD PTR DS:[7F413C] 007F2484 JMP DWORD PTR DS:[7F4140] ; ntoskrnl.RtlInitString ... 007F2538 JMP DWORD PTR DS:[7F41C4] ; ntoskrnl.NtWriteFile 007F253E JMP DWORD PTR DS:[7F41C8] 007F2544 JMP DWORD PTR DS:[7F41CC] 007F254A JMP DWORD PTR DS:[7F41D0] ; ntoskrnl._alldiv ... 007F2592 JMP DWORD PTR DS:[7F4204] ; ntoskrnl.NtDeviceIoControlFile 007F2598 JMP DWORD PTR DS:[<&HAL.KeGetCurrentIrql>] 007F259E JMP DWORD PTR DS:[<&HAL.READ_PORT_UCHAR>] 007F25A4 JMP DWORD PTR DS:[<&HAL.WRITE_PORT_UCHAR>] 007F25AA JMP DWORD PTR DS:[<&HAL.HalGetBusData>] 007F25B0 JMP DWORD PTR DS:[<&HAL.KfLowerIrql>] 007F25B6 JMP DWORD PTR DS:[<&HAL.KfRaiseIrql>] 007F25BC JMP DWORD PTR DS:[<&HAL.KfReleaseSpinLock>] 007F25C2 JMP DWORD PTR DS:[<&HAL.KfAcquireSpinLock>] 007F25C8 JMP DWORD PTR DS:[<&HAL.KeStallExecutionProcessor>] 007F25CE 0000 ADD BYTE PTR DS:[EAX],AL --- snip ---
The customer imports resolver failed to locate several ntoskrnl API exports, hence the holes. It causes NULL ptr deref whenever such an unresolved import is called later. I could probably figure out the missing exports and have stubs added but it won't help much. This is not going to fly. There are already multiple bug reports for stubs/missing kernel driver infrastructure.
$ sha1sum Sentinel_LDK_Run-time_setup.zip 8f65d01803dc5297b7d7916a0f653428d0dc9b21 Sentinel_LDK_Run-time_setup.zip
$ du -sh Sentinel_LDK_Run-time_setup.zip 17M Sentinel_LDK_Run-time_setup.zip $ wine --version wine-3.13
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Sentinel HASP Runtime |Sentinel HASP Runtime |(driver) 7.8 installer |(driver) 6.6-7.8 installer |fails, reports 'Error when |fails, reports 'Error when |starting the hardlock |starting the hardlock |service' (custom imports |service' (custom imports |resolver fails to locate |resolver fails to locate |some ntoskrnl exports) |some ntoskrnl exports)
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
your screenshot shows "SafeNet" which seems to indicate it's an older HASP runtime installer, before Gemalto aquired SafeNet in 2014 (https://en.wikipedia.org/wiki/SafeNet) and took over their stuff.
I've checked different versions of the runtime installer and they all exhibit the same problem:
Gemalto's Sentinel HASP Runtime:
* https://fdsdown.safenet-inc.com/filesSN/Index/7440108fb3384e67bf6f28a7c22a09... (7.81) * http://safenet-sentinel.ru/files/sentinel_ldk_run-time_gui.zip (7.80) * http://www.microimages.com/downloads/HASPUserSetup.exe (7.60)
SafeNET's Sentinel HASP Runtime:
* https://www.hremresearch.com/Eng/download/Sentinel_LDK_Run-time_setup_7.41.z... (7.41) * http://www.argusone.com/pub/Add_PC_Files/Sentinel_HASP_Run-time_setup/HASPUs... (6.60)
Even these old ones exhibit the same problem.
I wonder which exact version of the runtime do you have, because the exception is different (not NULL ptr but priv instruction). There a file 'aksdrvsetup.log' in 'c:\windows' directory that should tell.
There were some issues with hardlock resolved in the past:
* bug 44496 ("Custom imports resolver used by multiple kernel drivers can't cope with 'ntoskrnl.exe' low-level (wc)string/copy helpers being forwarded to 'msvcrt.dll' (BattlEye 'BEDaisy', Sentinel HASP 'hardlock.sys')") * bug 44636 ("Sentinel HASP 'hardlock.sys' kernel driver access to CR4 via %ESI register operand not handled in ntoskrnl emulate_instruction") * older ones, but I don't assume you did run with Wine 1.7.x
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #5 from Hildo Guillardi Júnior hildogjr@gmail.com --- Created attachment 61907 --> https://bugs.winehq.org/attachment.cgi?id=61907 Log file from Safe
@Anastasius, found the log file at c:\Windows (WINE folder). Please tell me if this can help (or tell me to run additional debugs).
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #6 from Hildo Guillardi Júnior hildogjr@gmail.com --- Created attachment 61908 --> https://bugs.winehq.org/attachment.cgi?id=61908 Log on Windows
Log on Windows 10 of this software (SafeNet drive) installation that works. Just think if can help to some comparative process.
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #7 from Anastasius Focht focht@gmx.net --- Hello Hildo,
--- quote --- Just think if can help to some comparative process. --- quote ---
Unfortunately Windows logs don't help here. They are just records/traces of the installation environment/process/steps. Bugs/deficiencies like this one here can't be resolved with that.
Your log file attachment from the WINEPREFIX provides useful information though.
--- snip --- [25/7/2018-10:31:6]Running on Win 7 X64 ../hhlinst.c,4147, [25/7/2018-10:31:6]haspdinst 1 ver 7.32//7.32 started --- snip ---
* default 64-bit WINEPREFIX (Windows 7) * Sentinel HASP Runtime 7.32 being used
The original vendor pulled all old downloads due to the acquisition. Fortunately I found version 7.32 on some company website that provides software/tools for Sheet-Metal-Manufacturing:
https://www.uwerk.de/en/images/UWerkDownLoads/HASP/GUI/HASPUserSetup.zip
With that one I was able to reproduce/debug/fix the crash - in the 64-bit Sentinel Hardlock Device Driver. I will create a new ticket for that one as I don't want to mix up different issues into one ticket.
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
I've created bug 45521 for the 64-bit driver in 64-bit WINEPREFIX. But even with that one fixed (already tested a fix), the HASP installer will run into next problem ('aksfridge' driver doesn't load).
NOTE:
All these tickets are mainly about making these drivers not crash in their driver initialization routine so that installers are happy when the kernel services start. These hardware/kernel drivers are in no way functional with Wine.
If your software relies on working licensing mechanism you need to look into native Linux HASP solutions first (run a license server on your host).
http://sentinelldk.safenet-inc.com/LDKdocs/GSG/Sentinel%20LDK%20for%20Linux_...
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
mirh mirh@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mirh@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #9 from Hildo Guillardi Júnior hildogjr@gmail.com --- I still having the issue. The software installer call the Sentinel HASP Run-Time during the execution and raise up with the first attached error, not allowing me to proceed.
https://bugs.winehq.org/show_bug.cgi?id=45510
Hildo Guillardi Júnior hildogjr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|3.13 |3.17
--- Comment #10 from Hildo Guillardi Júnior hildogjr@gmail.com --- Present at version 3.17
https://bugs.winehq.org/show_bug.cgi?id=45510
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|3.17 |3.13
--- Comment #11 from Anastasius Focht focht@gmx.net --- Hello folks,
please don't change the version field.
It's has a specific meaning: the version of Wine used when the bug report was created. Thanks.
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #12 from Hildo Guillardi Júnior hildogjr@gmail.com --- Ok.
If necessary, I can provide (by personal message) the executable installation file.
https://bugs.winehq.org/show_bug.cgi?id=45510
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Sentinel HASP Runtime |Sentinel HASP Runtime |(driver) 6.6-7.8 installer |v6.6-7.8 driver installer |fails, reports 'Error when |reports Windows error 1053 |starting the hardlock |when starting the 32-bit |service' (custom imports |hardlock kernel driver |resolver fails to locate |service (custom imports |some ntoskrnl exports) |resolver fails to locate | |some ntoskrnl exports) Status|NEW |RESOLVED Fixed by SHA1| |a1cdcc5290618c00d73e7a71aaa | |38897ec501138 URL|https://supportportal.gemal |https://web.archive.org/web |to.com/csm/?id=kb_article&s |/20201128131118/http://www. |ys_id=a459d328dba207c8fe0af |cadshop.ru/drivers/HASPDINS |f3dbf9619ce |T_7.32.exe Resolution|--- |FIXED
--- Comment #13 from Anastasius Focht focht@gmx.net --- Hello folks,
@ comment #10
--- quote --- Present at version 3.17 --- quote ---
Although it doesn't matter that much I found the exact Sentinel HASP runtime version you've used here:
www.cadshop.ru/drivers/HASPDINST_7.32.exe
Snapshot:
https://web.archive.org/web/20201128131118/http://www.cadshop.ru/drivers/HAS...
The 32-bit Hardlock driver exhibits a different set of problems versus the 64-bit driver (default WoW64 prefix) which loads even with older Wine 3.x releases (no error from entry point / driver init).
--- snip --- [28/11/2020-15:40:39]check action type ../hhlinst.c,2070, [28/11/2020-15:40:39] hardlock.sys VER 0 ../instdrv.c,1956, [28/11/2020-15:40:39]InstallService Hardlock. ../instdrv.c,629, [28/11/2020-15:40:39]service Hardlock newer 0 serviceexist 0. ../instdrv.c,668, [28/11/2020-15:40:39]start service Hardlock. ../instdrv.c,742, [28/11/2020-15:40:39]UnInstallService hardlock. ../instdrv.c,825, [28/11/2020-15:40:39]UnInstallService hardlock end status 0. ../instdrv.c,938, [28/11/2020-15:40:45]Error when starting the hardlock service with parameters 1168 1053 1. ../instdrv.c,774, [28/11/2020-15:40:45]Windows error 1053 --- snip ---
That particular error 1053 was fixed by https://source.winehq.org/git/wine.git/commitdiff/a1cdcc5290618c00d73e7a71aa... ("ntoskrnl: Build with msvcrt."), part of Wine 4.11 release.
Thanks Alexandre.
The driver still fails after that commit but with a different error class (ZwLoadDriver -> c000009a). Let's not recycle bugs.
--- snip --- ... [28/11/2020-15:39:37]check action type ../hhlinst.c,2070, [28/11/2020-15:39:37] hardlock.sys VER 0 ../instdrv.c,1956, [28/11/2020-15:39:37]InstallService Hardlock. ../instdrv.c,629, [28/11/2020-15:39:37]service Hardlock newer 0 serviceexist 0. ../instdrv.c,668, [28/11/2020-15:39:37]start service Hardlock. ../instdrv.c,742, [28/11/2020-15:39:37]UnInstallService hardlock. ../instdrv.c,825, [28/11/2020-15:39:37]UnInstallService hardlock end status 0. ../instdrv.c,938, [28/11/2020-15:39:43]Error when starting the hardlock service with parameters 1168 1450 1. ../instdrv.c,774, [28/11/2020-15:39:43]Windows error 1450 --- snip ---
I will create additional bugs as needed or reference on existing ones.
$ sha1sum HASPDINST_7.32.exe 96520c7e2bdc40a232daca01d6edbd7aa3f162ba HASPDINST_7.32.exe
$ du -sh HASPDINST_7.32.exe 16M HASPDINST_7.32.exe
$ wine --version wine-4.10-171-ga1cdcc52906
$ wine --version wine-5.22-196-g2001705a3f0
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
continuation is bug 50208 ("Multiple kernel drivers need NtQuerySystemInformation(SystemModuleInformation) to return correct ImageBaseAddress and ImageSize for modules (Sentinel HASP 'hardlock.sys')")
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
--- Comment #15 from Anastasius Focht focht@gmx.net --- Hello folks,
addendum just for documentation, how the imports resolver works in a nutshell.
The obfuscated driver uses a technique called API hashing. This technique is also used by lots of malware to disguise their actions.
Driver IAT dumped from memory with most imports already resolved except the last few entries to test the algorithm. Initially the table contains only the 32-bit hashes.
--- snip --- 0000000000D77280 0000000000D91850 hal.HalGetBusDataByOffset 0000000000D77288 0000000000000000 0000000000D77290 0000000000332F80 ntoskrnl.RtlRandom 0000000000D77298 000000000032BE70 ntoskrnl.KeWaitForSingleObject 0000000000D772A0 000000000032C8D0 ntoskrnl.KeDelayExecutionThread 0000000000D772A8 000000000032C040 ntoskrnl.KeSetEvent 0000000000D772B0 0000000000323CD0 ntoskrnl.MmIsAddressValid 0000000000D772B8 0000000000321FF0 ntoskrnl.IofCallDriver 0000000000D772C0 000000000032BF10 ntoskrnl.KeInitializeEvent 0000000000D772C8 00000000003244B0 ntoskrnl.ObfDereferenceObject 0000000000D772D0 0000000000313598 ntoskrnl.__wine_stub_KeInsertQueueDpc 0000000000D772D8 000000000032C230 ntoskrnl.KeClearEvent 0000000000D772E0 0000000000324D80 ntoskrnl.KeSetTargetProcessorDpc 0000000000D772E8 0000000000324CD0 ntoskrnl.KeInitializeDpc 0000000000D772F0 0000000000323420 ntoskrnl.KeQueryActiveProcessors 0000000000D772F8 0000000000330DF0 ntoskrnl.__C_specific_handler 0000000000D77300 0000000000323FB0 ntoskrnl.MmUnlockPages 0000000000D77308 0000000000323DD0 ntoskrnl.MmMapLockedPagesSpecifyCache 0000000000D77310 000000000031FD30 ntoskrnl.IoFreeMdl 0000000000D77318 0000000000323F10 ntoskrnl.MmProbeAndLockPages 0000000000D77320 000000000031FE50 ntoskrnl.IoAllocateMdl 0000000000D77328 0000000000331D10 ntoskrnl.NtDeleteValueKey 0000000000D77330 0000000000331C80 ntoskrnl.NtCreateKey 0000000000D77338 0000000000332380 ntoskrnl.NtSetValueKey 0000000000D77340 0000000000331D00 ntoskrnl.NtDeleteKey 0000000000D77348 0000000000331D60 ntoskrnl.NtEnumerateKey 0000000000D77350 0000000000331D70 ntoskrnl.NtEnumerateValueKey 0000000000D77358 00000000003229C0 ntoskrnl.ExAllocatePoolWithTag 0000000000D77360 00000000003320D0 ntoskrnl.NtQueryKey 0000000000D77368 0000000000331EF0 ntoskrnl.NtOpenKey 0000000000D77370 0000000000321950 ntoskrnl.IoDeleteDevice 0000000000D77378 0000000000322540 ntoskrnl.IoUnregisterShutdownNotification 0000000000D77380 0000000000323FF0 ntoskrnl.MmUnmapIoSpace 0000000000D77388 0000000000323D30 ntoskrnl.MmMapIoSpace 0000000000D77390 0000000000322890 ntoskrnl.IofCompleteRequest 0000000000D77398 0000000000311990 ntoskrnl.__wine_stub_ExInterlockedInsertTailList 0000000000D773A0 000000000031F530 ntoskrnl.IoGetCurrentProcess 0000000000D773A8 0000000000312D10 ntoskrnl.__wine_stub_IoRegisterLastChanceShutdownNotification 0000000000D773B0 0000000000322500 ntoskrnl.IoRegisterShutdownNotification 0000000000D773B8 000000000031ED40 ntoskrnl.ObReferenceObjectByHandle 0000000000D773C0 0000000000324600 ntoskrnl.PsCreateSystemThread 0000000000D773C8 0000000000325280 ntoskrnl.KeLeaveCriticalRegion 0000000000D773D0 000000000032EA20 ntoskrnl.ExReleaseResourceLite 0000000000D773D8 000000000032D960 ntoskrnl.ExAcquireResourceSharedLite 0000000000D773E0 0000000000325230 ntoskrnl.KeEnterCriticalRegion 0000000000D773E8 000000000032D550 ntoskrnl.ExAcquireResourceExclusiveLite 0000000000D773F0 000000000032D450 ntoskrnl.ExInitializeResourceLite 0000000000D773F8 000000000032D4C0 ntoskrnl.ExDeleteResourceLite 0000000000D77400 00000000003314C0 ntoskrnl.toupper 0000000000D77408 0000000000323550 ntoskrnl.KeSetPriorityThread 0000000000D77410 000000000032D0F0 ntoskrnl.ExInterlockedRemoveHeadList 0000000000D77418 00000000003292C0 ntoskrnl.IoGetDeviceProperty 0000000000D77420 0000000000325350 ntoskrnl.KeBugCheckEx 0000000000D77428 000000007DC7C8B3 hash1 0000000000D77430 00000000F8BD1FE5 hash2 0000000000D77438 00000000B061FF53 hash3 0000000000D77440 00000000D8F8AA3E hash4 0000000000D77448 0000000000000000 0000000000D77450 0000000000000000 0000000000D77458 0000000000000000 --- snip ---
I won't bother you with the disassembly of the routine because its obfuscated. If you are interested:
--- snip --- ... 0000000000D803E1 | call aksfridge.D802A2 | calc_hash() 0000000000D803E6 | jmp aksfridge.D803F4 | EAX = 32-bit hash 0000000000D803F4 | cmp eax,esi | 0000000000D803F6 | je aksfridge.D80437 | --- snip ---
--- snip --- Base Module Path 0000000000220000 sechost.dll ...\lib64\wine\sechost.dll 0000000000250000 ucrtbase.dll ...\lib64\wine\ucrtbase.dll 0000000000310000 ntoskrnl.exe ...\lib64\wine\ntoskrnl.exe 0000000000360000 msvcrt.dll ...\lib64\wine\msvcrt.dll 0000000000AD0000 rpcrt4.dll ...\lib64\wine\rpcrt4.dll 0000000000D60000 aksfridge.sys C:\windows\system32\drivers\aksfridge.sys 0000000000D90000 hal.dll ...\lib64\wine\hal.dll 000000007B000000 kernelbase.dll ...\lib64\wine\kernelbase.dll 000000007B600000 kernel32.dll ...\lib64\wine\kernel32.dll 000000007BC00000 ntdll.dll ...\lib64\wine\ntdll.dll 0000000140000000 winedevice.exe ...\lib64\wine\winedevice.exe 0000000180000000 advapi32.dll ...\lib64\wine\advapi32.dll --- snip ---
The 32-bit and 64-bit driver uses the same algorithm / 32-bit API hashes.
I turned the driver's API hashing function into a piece of Python code.
'aksfridge_hash_api.py':
--- snip --- #!/usr/bin/env python import sys
def to_hash(str): hash_val = 5 for i in range(len(str)): hash_val = ror(hash_val, 7, 32) hash_val += ord(str[i]) return hash_val
# Rotate right: 0b1001 --> 0b1100 ror = lambda val, r_bits, max_bits: \ ((val & (2**max_bits-1)) >> r_bits%max_bits) | \ (val << (max_bits-(r_bits%max_bits)) & (2**max_bits-1))
# check to_hash() working with known correct hashes test_hash1 = to_hash("CcMdlWriteComplete") assert test_hash1 == 0x73F2510A test_hash2 = to_hash("CcPinMappedData") assert test_hash2 == 0x238B94BB
for api_name in sys.argv[1:]: hash = to_hash(api_name) print("{} = 0x{:X}".format(api_name, hash)) --- snip ---
The hashing is lossy, hence there is no "api-name-from-hash" functionality. That's not a problem - simply hash all known ntoskrnl exports and lookup the value. That's what the driver essentially does. If Wine's ntoskrnl.exe doesn't export the API (commented out in .spec file or missing) then the driver would fail/crash at one point.
Download a reasonable complete/up-to-date 'ntoskrnl.def' from whatever Github repo:
https://github.com/msys2-contrib/mingw-w64/blob/master/mingw-w64-crt/lib64/n...
--- snip --- $ wget https://raw.githubusercontent.com/msys2-contrib/mingw-w64/master/mingw-w64-c... --- snip ---
Now feed the content of the .def file to the script. Each line of the input file is converted into a script argument using "$(echo $(cat xxx))". The script doesn't handle invalid input / non-API functions. It just treats everything as string for simplicity.
It prints the calculated hashes for each string argument:
--- snip --- $ ./aksfridge_hash_api.py $(echo $(cat ntoskrnl.def)) ...
AlpcGetHeaderSize = 0xB8450BA0 AlpcGetMessageAttribute = 0xEC22F2AA AlpcInitializeMessageAttribute = 0x69D899AC CcCanIWrite = 0x318059A6 CcCoherencyFlushAndPurgeCache = 0x5254F917 CcCopyRead = 0xF3787B88 CcCopyWrite = 0x320759AC ... wcsspn = 0xC30F9EAD wcsstr = 0xCB0F9EB1 wcstombs = 0x3EB304C2 wcstoul = 0x698227A9 wctomb = 0xBCFFA6A1 --- snip ---
Back in the old days when Wine's 'ntoskrnl.exe' exports were less complete and one API hash couldn't be found, you'd simply:
--- snip --- $ ./aksfridge_hash_api.py $(echo $(cat ntoskrnl.def)) | grep 7DC7C8B3
ZwQueryValueKey = 0x7DC7C8B3 --- snip ---
Regards
https://bugs.winehq.org/show_bug.cgi?id=45510
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.0-rc1.