Function at 0x40c720
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, 0x460
mov dword [ebp - 0x418], 0x3a0041
mov dword [ebp - 0x414], 0x5c
call sym._open_mountmgr
mov dword [ebp - 0x42c], eax
cmp eax, 0xffffffff
je 0x40ce02
movzx esi, word [ebp - 0x418]
cmp si, 0x5a
ja 0x40c99e
mov dword [ebp - 0x428], 0x400
lea eax, [ebp - 0x410]
shr eax, 0x10
mov dword [ebp - 0x43c], eax
lea eax, [ebp - 0x3e4]
shr eax, 0x10
mov dword [ebp - 0x438], eax
jmp 0x40c8f0
movzx eax, word [ebx + 0x1a]
mov edi, 0
lea esi, [ebp - 0x218]
mov edx, eax
add eax, ebx
test dx, dx
cmovne edi, eax
movzx eax, word [ebx + 0x1c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov edx, eax
add eax, ebx
mov dword [esp + 0x14], 0
test dx, dx
mov ecx, eax
mov dword [esp + 4], esi
mov eax, 0
cmove ecx, eax
lea eax, [ebp - 0x424]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x418]
mov dword [ebp - 0x430], ecx
mov dword [esp + 8], 0x104
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
sub esp, 0x20
test eax, eax
jne 0x40c833
mov dword [ebp - 0x424], 0
xor ecx, ecx
mov word [ebp - 0x218], cx
test edi, edi
je 0x40c8cc
movsx eax, byte [ebp - 0x418]
mov dword [esp + 8], 0x417a90
mov dword [esp + 4], 4
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x410]
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 0x40c9f0
xor edx, edx
test byte [0x415050], 8
jne 0x40caa0
mov eax, dword [ebp - 0x424]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x430]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
movsx eax, byte [ebp - 0x418]
mov dword [esp], eax
call sym._add_drive
movzx eax, word [ebp - 0x418]
lea esi, [eax + 1]
mov word [ebp - 0x418], si
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
cmp si, 0x5a
ja 0x40c99e
mov eax, dword [ebp - 0x428]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ebx, eax
test eax, eax
je 0x40c99e
lea edx, [ebp - 0x408]
xor eax, eax
mov ecx, 8
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x428]
mov edi, dword [ebp - 0x42c]
mov word [ebp - 0x3f0], si
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x20
mov dword [esp + 8], edx
mov dword [esp + 4], 0x6d4084
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_DeviceIoControl]
sub esp, 0x20
test eax, eax
jne 0x40c7a0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xea
movzx esi, word [ebp - 0x418]
je 0x40c9e0
inc esi
mov dword [esp], ebx
mov word [ebp - 0x418], si
call dword [sym.imp.ucrtbase.dll_free]
cmp si, 0x5a
jbe 0x40c8f0
mov eax, 0x415a7c
mov edx, 0x415dbc
lea esi, [esi]
nop
mov dword [eax], 0
add eax, 0x20
cmp edx, eax
jne 0x40c9b0
mov eax, dword [ebp - 0x42c]
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 [ebx]
mov dword [ebp - 0x428], eax
jmp 0x40c8dd
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 0x40cb50
test byte [0x415050], 8
jne 0x40cb57
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], 0x417c08
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [ebp - 0x434], eax
call eax
mov edx, 3
test eax, eax
jne 0x40cad5
mov eax, dword [ebp - 0x420]
mov dword [ebp - 0x434], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov edx, dword [ebp - 0x434]
sub esp, 4
jmp 0x40c89d
mov dword [esp + 0xc], str.__Unable_to_open_SoftwareWineDrives_n
mov dword [esp + 8], str.get_drive_type
mov dword [esp + 4], 0x415050
mov dword [esp], 3
mov dword [ebp - 0x434], edx
call sym._wine_dbg_log.constprop.0_2
mov edx, dword [ebp - 0x434]
jmp 0x40c89d
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], str.network
mov dword [esp], eax
mov eax, dword [ebp - 0x434]
call eax
mov edx, 4
test eax, eax
je 0x40ca76
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], str.floppy
mov dword [esp], eax
mov eax, dword [ebp - 0x434]
call eax
mov edx, 2
test eax, eax
je 0x40ca76
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], str.cdrom
mov dword [esp], eax
mov eax, dword [ebp - 0x434]
call eax
mov edx, 5
test eax, eax
je 0x40ca76
lea esi, [esi]
nop
xor edx, edx
jmp 0x40ca76
mov edx, dword [ebp - 0x43c]
test edx, edx
je 0x40cc5f
lea eax, [ebp - 0x410]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x440], 0x417a81
sub esp, 8
mov edx, eax
test eax, eax
jne 0x40cc88
movzx eax, word [ebp - 0x410]
test ax, ax
je 0x40cfca
lea esi, [esi]
nop
mov ecx, edx
lea edx, [edx + 1]
cmp word [ebp + ecx*2 - 0x40e], 0
jne 0x40cba8
mov edx, 0x224c
mov dword [ebp - 0x440], edi
mov word [ebp - 0x344], dx
lea edx, [ebp - 0x342]
mov dword [ebp - 0x434], edx
lea edx, [ebp - 0x410]
mov dword [ebp - 0x444], ebx
mov edi, edx
mov ebx, dword [ebp - 0x434]
jmp 0x40cc2e
cmp ax, 9
je 0x40ce50
cmp ax, 0xa
jne 0x40ce6e
mov eax, 0x6e5c
add ebx, 2
mov word [ebx - 2], ax
lea edx, [ecx - 1]
test ecx, ecx
jle 0x40cf41
lea eax, [ebp - 0x222]
cmp ebx, eax
ja 0x40cf41
movzx eax, word [edi]
mov ecx, edx
add edi, 2
cmp ax, 0xd
je 0x40ce39
jbe 0x40cbf0
cmp ax, 0x22
je 0x40cec0
cmp ax, 0x5c
jne 0x40ce61
mov eax, 0x5c5c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40cc10
lea eax, [ebp - 0x410]
mov dword [esp], 0x417a74
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 ecx, dword [ebp - 0x438]
test ecx, ecx
je 0x40cf92
lea eax, [ebp - 0x3e4]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x417a81
test edx, edx
jne 0x40cdcb
movzx eax, word [ebp - 0x3e4]
test ax, ax
je 0x40cff2
nop
mov ecx, edx
lea edx, [edx + 1]
cmp word [ebp + ecx*2 - 0x3e2], 0
jne 0x40ccd0
mov dword [ebp - 0x444], ecx
mov edx, 0x224c
lea ecx, [ebp - 0x3e4]
mov word [ebp - 0x344], dx
lea edx, [ebp - 0x342]
mov dword [ebp - 0x434], ecx
mov ecx, dword [ebp - 0x444]
mov dword [ebp - 0x448], edi
mov dword [ebp - 0x44c], ebx
jmp 0x40cd5c
cmp ax, 9
je 0x40ce28
cmp ax, 0xa
jne 0x40cede
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
lea eax, [ebp - 0x222]
lea edi, [ecx - 1]
cmp edx, eax
ja 0x40cd91
test ecx, ecx
jle 0x40cd91
mov eax, dword [ebp - 0x434]
mov ecx, edi
movzx eax, word [eax]
add dword [ebp - 0x434], 2
cmp ax, 0xd
je 0x40ce10
jbe 0x40cd20
cmp ax, 0x22
je 0x40cf30
cmp ax, 0x5c
jne 0x40ced1
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
jmp 0x40cd40
mov eax, edi
mov byte [edx], 0x22
mov ebx, dword [ebp - 0x44c]
mov edi, dword [ebp - 0x448]
test eax, eax
jle 0x40d00b
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, dword [ebp - 0x440]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Got_type__s_for__s_n
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.get_drive_type
mov dword [esp + 4], 0x415050
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40ca4f
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 0x40cd40
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x40cd40
mov eax, 0x725c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40cc10
mov eax, 0x745c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40cc10
lea edx, [eax - 0x20]
cmp dx, 0x5e
jbe 0x40cfc2
mov edx, eax
mov byte [ebx], 0x5c
add ebx, 5
shr dx, 0xc
movzx edx, dx
movzx edx, byte [edx + 0x4233f0]
mov byte [ebx - 4], dl
mov edx, eax
shr dx, 8
and edx, 0xf
movzx edx, byte [edx + 0x4233f0]
mov byte [ebx - 3], dl
mov edx, eax
and eax, 0xf
shr dx, 4
movzx eax, byte [eax + 0x4233f0]
and edx, 0xf
movzx edx, byte [edx + 0x4233f0]
mov byte [ebx - 1], al
mov byte [ebx - 2], dl
jmp 0x40cc10
mov eax, 0x225c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40cc10
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40cfba
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x4233f0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [edi + 0x4233f0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x4233f0]
and edi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [edi + 0x4233f0]
mov byte [edx - 1], al
mov byte [edx - 2], bl
jmp 0x40cd40
mov edi, 0x225c
add edx, 2
mov word [edx - 2], di
jmp 0x40cd40
mov eax, ebx
mov dword [ebp - 0x434], ebx
mov edi, dword [ebp - 0x440]
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x444]
test edx, edx
jle 0x40cfe9
mov ecx, dword [ebp - 0x434]
mov edx, 0x2e2e
mov word [ecx + 1], dx
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x344]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x440], eax
jmp 0x40cc88
lea eax, [ebp - 0x3e4]
mov dword [esp], 0x417a74
mov dword [ebp - 0x434], eax
movzx eax, word [ebp - 0x434]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x40cdcb
mov byte [edx], al
inc edx
jmp 0x40cd40
mov byte [ebx], al
inc ebx
jmp 0x40cc10
mov eax, 0x224c
mov byte [ebp - 0x342], 0x22
mov word [ebp - 0x344], ax
lea eax, [ebp - 0x342]
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x434]
inc eax
jmp 0x40cf76
mov ecx, 0x224c
mov byte [ebp - 0x342], 0x22
lea edx, [ebp - 0x342]
mov word [ebp - 0x344], cx
lea eax, [edx + 1]
jmp 0x40cdba