https://bugs.winehq.org/show_bug.cgi?id=53053
--- Comment #14 from Etaash Mathamsetty etaash.mathamsetty@gmail.com --- have done some more works behind the scenes and I have this now 00d8:err:ntoskrnl:ZwLoadDriver failed to create driver L"\Registry\Machine\System\CurrentControlSet\Services\vgk": c0000365 003c:fixme:service:scmdatabase_autostart_services Auto-start service L"vgk" failed to start: 647
the driver also seems to work after I run ./wine vgk.sys, but it exits with code 101 (which probably means something is wrong) this is after implementing IoCreateFileEx, IoCreateFile (cuz I implemented Ex so why not), KeAreAllApcsDisabled, and doing some pretty sus instruction emulation with opcodes, 0x83 (cmp), 0x38 (cmp), 0x39 (cmp), and 0xa5 (mov)
I have no idea why it's return c0000365 and error 647, it's only doing this on win10 (it does get a bit farther along)
on win7 and win8, it just says invalid windows version
cmp instruction code: case 0x38: case 0x39: //cmp r/m64 r/m64 {
BYTE *data = INSTR_GetOperandAddr( context, instr + 1, prefixlen + 1, long_addr, rex, segprefix, &len ); BYTE* data2 = INSTR_GetOperandAddr(context, instr + 2, prefixlen + 2, long_addr, rex, segprefix, &len); SIZE_T offset = data - user_shared_data; SIZE_T data_size = get_op_size( long_op, rex );
if(offset <= KSHARED_USER_DATA_PAGE_SIZE - data_size) {
FIXME("data 1 = %llx data 2 = %llx\n", data, data2); //clear ZF and CF context->EFlags &= ~(1UL << 6); context->EFlags &= ~(1UL);
if( *(wine_user_shared_data + offset) == *data2) context->EFlags |= (1 << 6); else if(*(wine_user_shared_data + offset) < *data2) context->EFlags |= (1);
context->Rip += prefixlen + len + 1; return ExceptionContinueExecution; } break; } case 0x83: //cmp r/m64 imm8 { FIXME("rip: %llx\n", context->Rip); BYTE *data = INSTR_GetOperandAddr( context, instr + 1, prefixlen + 1, long_addr, rex, segprefix, &len ); //FIXME("data = %llx, data2 = %llx\n", data, data2); SIZE_T offset = data - user_shared_data; SIZE_T data_size = get_op_size( long_op, rex ); if(offset <= KSHARED_USER_DATA_PAGE_SIZE - data_size) { data = wine_user_shared_data + offset; FIXME("addr %llx offset %llx\n", data, offset); //sometimes won't finish printing due to \0 lol FIXME("data 1 = %wc instr[2] = %d\n", *(wine_user_shared_data + offset), instr[2]); //int temp = 0; context->Rip += prefixlen + len + 2;
//clear ZF and CF context->EFlags &= ~(1UL << 6); context->EFlags &= ~(1UL);
if(*(wine_user_shared_data + offset) == instr[2]) context->EFlags |= (1 << 6); else if(*(wine_user_shared_data + offset) < instr[2]) context->EFlags |= (1); return ExceptionContinueExecution; } break; }