Function at 0x4068d0
Capabilities:
Check if process is running under wine
Get disk information
Query or enumerate registry value

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x458
mov dword [ebp - 0x418], 0x3a0041
mov dword [ebp - 0x414], 0x5c
call sym._open_mountmgr
mov dword [ebp - 0x430], eax
cmp eax, 0xffffffff
je 0x406f92
movzx ebx, word [ebp - 0x418]
cmp bx, 0x5a
ja 0x406b1c
lea eax, [ebp - 0x410]
mov esi, 0x400
shr eax, 0x10
mov dword [ebp - 0x43c], eax
lea eax, [ebp - 0x3e4]
shr eax, 0x10
mov dword [ebp - 0x438], eax
nop
lea esi, [esi]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x406b1c
xor ecx, ecx
xor eax, eax
mov dword [ebp + eax - 0x408], ecx
add eax, 4
cmp eax, 0x20
jb 0x40695f
lea eax, [ebp - 0x408]
mov word [ebp - 0x3f0], bx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x430]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x20
mov dword [esp + 4], 0x6d4084
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x406b60
movzx eax, word [edi + 0x1a]
xor ecx, ecx
mov ebx, eax
add eax, edi
test bx, bx
cmove eax, ecx
mov dword [ebp - 0x428], eax
movzx eax, word [edi + 0x1c]
mov dword [esp + 0x1c], 0
mov ebx, eax
add eax, edi
mov dword [esp + 0x18], 0
test bx, bx
lea ebx, [ebp - 0x218]
mov dword [esp + 0x14], 0
cmovne ecx, eax
lea eax, [ebp - 0x424]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x418]
mov dword [ebp - 0x42c], ecx
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
sub esp, 0x20
test eax, eax
jne 0x406a50
mov dword [ebp - 0x424], 0
xor ecx, ecx
mov word [ebp - 0x218], cx
mov edx, dword [ebp - 0x428]
movzx eax, word [ebp - 0x418]
test edx, edx
je 0x406aff
movsx eax, al
mov dword [esp + 8], 0x41a38e
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x410]
mov dword [esp + 4], 4
mov dword [esp], eax
call sym._swprintf.constprop.0_1
lea eax, [ebp - 0x420]
mov dword [esp + 4], str.SoftwareWineDrives
mov dword [esp + 8], eax
mov dword [esp], reloc.uxtheme.dll_Ordinal_2
call dword [sym.imp.advapi32.dll_RegOpenKeyW]
sub esp, 0xc
test eax, eax
je 0x406b90
xor ecx, ecx
test byte [0x417240], 8
jne 0x406c40
mov eax, dword [ebp - 0x424]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x42c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x428]
mov dword [esp + 4], eax
movsx eax, byte [ebp - 0x418]
mov dword [esp], eax
call sym._add_drive
movzx eax, word [ebp - 0x418]
lea ebx, [eax + 1]
mov word [ebp - 0x418], bx
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
cmp bx, 0x5a
jbe 0x406948
mov eax, 0x4283bc
mov edx, 0x4286fc
lea esi, [esi]
lea edi, [edi]
mov dword [eax], 0
add eax, 0x20
cmp edx, eax
jne 0x406b30
mov eax, dword [ebp - 0x430]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 1
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xea
movzx ebx, word [ebp - 0x418]
je 0x406b88
add ebx, 1
mov word [ebp - 0x418], bx
jmp 0x406b09
mov esi, dword [edi]
jmp 0x406b09
lea eax, [ebp - 0x41c]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3e4]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x410]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x420]
mov dword [ebp - 0x41c], 0xa0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x406cf0
test byte [0x417240], 8
jne 0x406cf7
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], 0x41a484
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [ebp - 0x434], eax
call eax
mov ecx, 3
test eax, eax
jne 0x406c75
mov eax, dword [ebp - 0x420]
mov dword [ebp - 0x434], ecx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x434]
sub esp, 4
jmp 0x406ac3
mov dword [esp + 0xc], str.__Unable_to_open_SoftwareWineDrives_n
mov dword [esp + 8], str.get_drive_type
mov dword [esp + 4], 0x417240
mov dword [esp], 3
mov dword [ebp - 0x434], ecx
call sym._wine_dbg_log.constprop.0_2
mov ecx, dword [ebp - 0x434]
jmp 0x406ac3
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], str.network
mov dword [esp], eax
mov eax, dword [ebp - 0x434]
call eax
mov ecx, 4
test eax, eax
je 0x406c16
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], str.floppy
mov dword [esp], eax
mov eax, dword [ebp - 0x434]
call eax
mov ecx, 2
test eax, eax
je 0x406c16
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], str.cdrom
mov dword [esp], eax
mov eax, dword [ebp - 0x434]
call eax
mov ecx, 5
test eax, eax
je 0x406c16
mov esi, esi
lea edi, [edi]
xor ecx, ecx
jmp 0x406c16
mov eax, dword [ebp - 0x43c]
test eax, eax
je 0x406dfa
lea eax, [ebp - 0x410]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x440], 0x41a37f
sub esp, 8
test eax, eax
jne 0x406e23
cmp word [ebp - 0x410], 0
je 0x407154
nop
mov ecx, eax
lea eax, [eax + 1]
cmp word [ebp + ecx*2 - 0x40e], 0
jne 0x406d40
mov edx, 0x224c
lea eax, [ebp - 0x342]
mov dword [ebp - 0x440], esi
mov word [ebp - 0x344], dx
lea edx, [ebp - 0x410]
mov esi, eax
mov dword [ebp - 0x444], edi
mov dword [ebp - 0x434], edx
jmp 0x406dbb
cmp ax, 9
je 0x406fe0
cmp ax, 0xa
jne 0x406ffe
mov eax, 0x6e5c
add esi, 2
mov word [esi - 2], ax
lea eax, [ecx - 1]
test ecx, ecx
jle 0x4070d1
lea edx, [ebp - 0x222]
cmp esi, edx
ja 0x4070d1
mov ecx, eax
add dword [ebp - 0x434], 2
mov eax, dword [ebp - 0x434]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x406fc9
jbe 0x406d80
cmp ax, 0x22
je 0x407050
cmp ax, 0x5c
jne 0x406ff1
mov edi, 0x5c5c
add esi, 2
mov word [esi - 2], di
jmp 0x406da0
lea eax, [ebp - 0x410]
mov dword [esp], 0x41a372
mov dword [ebp - 0x434], eax
movzx eax, word [ebp - 0x434]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
mov dword [ebp - 0x440], eax
mov eax, dword [ebp - 0x438]
test eax, eax
je 0x407116
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, 0x41a37f
sub esp, 8
test eax, eax
jne 0x406f5b
cmp word [ebp - 0x3e4], 0
je 0x407176
lea esi, [esi]
lea edi, [edi]
mov ecx, eax
lea eax, [eax + 1]
cmp word [ebp + ecx*2 - 0x3e2], 0
jne 0x406e70
mov eax, 0x224c
mov dword [ebp - 0x444], esi
lea edx, [ebp - 0x342]
mov word [ebp - 0x344], ax
lea eax, [ebp - 0x3e4]
mov dword [ebp - 0x448], edi
mov esi, eax
mov dword [ebp - 0x434], ecx
jmp 0x406eed
cmp ax, 9
je 0x406fb8
cmp ax, 0xa
jne 0x40706e
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov ecx, dword [ebp - 0x434]
lea eax, [ecx - 1]
test ecx, ecx
jle 0x406f21
lea ecx, [ebp - 0x222]
cmp edx, ecx
ja 0x406f21
mov dword [ebp - 0x434], eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x406fa0
jbe 0x406eb0
cmp ax, 0x22
je 0x4070c0
cmp ax, 0x5c
jne 0x407061
mov edi, 0x5c5c
add edx, 2
mov word [edx - 2], di
jmp 0x406ed0
mov esi, dword [ebp - 0x444]
mov edi, dword [ebp - 0x448]
mov byte [edx], 0x22
test eax, eax
jle 0x40718f
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x344]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov ecx, eax
mov eax, dword [ebp - 0x440]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], str.Got_type__s_for__s_n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.get_drive_type
mov dword [esp + 4], 0x417240
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x406bef
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x406ed0
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x406ed0
mov eax, 0x725c
add esi, 2
mov word [esi - 2], ax
jmp 0x406da0
mov eax, 0x745c
add esi, 2
mov word [esi - 2], ax
jmp 0x406da0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40714a
mov edi, eax
mov byte [esi], 0x5c
add esi, 5
shr di, 0xc
movzx edi, di
movzx edx, byte [edi + str.0123456789abcdefadd_drive]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [esi - 4], dl
movzx edx, byte [edi + str.0123456789abcdefadd_drive]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefadd_drive]
and edi, 0xf
mov byte [esi - 3], dl
movzx edx, byte [edi + str.0123456789abcdefadd_drive]
mov byte [esi - 1], al
mov byte [esi - 2], dl
jmp 0x406da0
mov eax, 0x225c
add esi, 2
mov word [esi - 2], ax
jmp 0x406da0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x407140
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdefadd_drive]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, byte [edi + str.0123456789abcdefadd_drive]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefadd_drive]
and edi, 0xf
mov byte [edx - 3], cl
movzx ecx, byte [edi + str.0123456789abcdefadd_drive]
mov byte [edx - 1], al
mov byte [edx - 2], cl
jmp 0x406ed0
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
jmp 0x406ed0
mov edx, esi
mov edi, dword [ebp - 0x444]
mov esi, dword [ebp - 0x440]
mov byte [edx], 0x22
test eax, eax
jle 0x40716f
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x344]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x440], eax
jmp 0x406e23
lea eax, [ebp - 0x3e4]
mov dword [esp], 0x41a372
mov dword [ebp - 0x434], eax
movzx eax, word [ebp - 0x434]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
mov ecx, eax
jmp 0x406f5b
mov byte [edx], al
add edx, 1
jmp 0x406ed0
mov byte [esi], al
add esi, 1
jmp 0x406da0
mov eax, 0x224c
mov byte [ebp - 0x342], 0x22
mov word [ebp - 0x344], ax
lea eax, [ebp - 0x342]
mov edx, eax
mov eax, edx
add eax, 1
jmp 0x4070fa
mov ecx, 0x224c
mov byte [ebp - 0x342], 0x22
lea edx, [ebp - 0x342]
mov word [ebp - 0x344], cx
lea eax, [edx + 1]
jmp 0x406f48