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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x47c
mov dword [ebp - 0x420], 0x3a0041
mov dword [ebp - 0x41c], 0x5c
call sym._open_mountmgr
mov dword [ebp - 0x440], eax
cmp eax, 0xffffffff
je 0x40c6d2
movzx esi, word [ebp - 0x420]
cmp si, 0x5a
ja 0x40c276
mov dword [ebp - 0x43c], 0x400
lea eax, [ebp - 0x418]
shr eax, 0x10
mov dword [ebp - 0x450], eax
lea eax, [ebp - 0x3ec]
shr eax, 0x10
mov dword [ebp - 0x44c], eax
jmp 0x40c1c8
movzx eax, word [ebx + 0x1a]
mov edi, 0
lea esi, [ebp - 0x220]
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 - 0x42c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x420]
mov dword [ebp - 0x444], ecx
mov dword [esp + 8], 0x104
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
sub esp, 0x20
test eax, eax
jne 0x40c10b
mov dword [ebp - 0x42c], 0
xor ecx, ecx
mov word [ebp - 0x220], cx
test edi, edi
je 0x40c1a4
movsx eax, byte [ebp - 0x420]
mov dword [esp + 8], 0x417a48
mov dword [esp + 4], 4
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._swprintf.constprop.0_1
lea eax, [ebp - 0x428]
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 0x40c2c0
xor edx, edx
test byte [0x415050], 8
jne 0x40c370
mov eax, dword [ebp - 0x42c]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x444]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
movsx eax, byte [ebp - 0x420]
mov dword [esp], eax
call sym._add_drive
movzx eax, word [ebp - 0x420]
lea esi, [eax + 1]
mov word [ebp - 0x420], si
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
cmp si, 0x5a
ja 0x40c276
mov eax, dword [ebp - 0x43c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ebx, eax
test eax, eax
je 0x40c276
lea edx, [ebp - 0x410]
xor eax, eax
mov ecx, 8
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x43c]
mov edi, dword [ebp - 0x440]
mov word [ebp - 0x3f8], 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 0x40c078
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xea
movzx esi, word [ebp - 0x420]
je 0x40c2b0
inc esi
mov dword [esp], ebx
mov word [ebp - 0x420], si
call dword [sym.imp.ucrtbase.dll_free]
cmp si, 0x5a
jbe 0x40c1c8
mov eax, 0x415a7c
mov edx, 0x415dbc
mov dword [eax], 0
add eax, 0x20
cmp edx, eax
jne 0x40c280
mov eax, dword [ebp - 0x440]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, 1
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx]
mov dword [ebp - 0x43c], eax
jmp 0x40c1b5
lea eax, [ebp - 0x424]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x3ec]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x424], 0xa0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
jne 0x40c420
test byte [0x415050], 8
jne 0x40c427
lea eax, [ebp - 0x3ec]
mov dword [esp + 4], 0x417bc0
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [ebp - 0x448], eax
call eax
mov edx, 3
test eax, eax
jne 0x40c3a5
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x448], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov edx, dword [ebp - 0x448]
sub esp, 4
jmp 0x40c175
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 - 0x448], edx
call sym._wine_dbg_log.constprop.0_2
mov edx, dword [ebp - 0x448]
jmp 0x40c175
lea eax, [ebp - 0x3ec]
mov dword [esp + 4], str.network
mov dword [esp], eax
mov eax, dword [ebp - 0x448]
call eax
mov edx, 4
test eax, eax
je 0x40c346
lea eax, [ebp - 0x3ec]
mov dword [esp + 4], str.floppy
mov dword [esp], eax
mov eax, dword [ebp - 0x448]
call eax
mov edx, 2
test eax, eax
je 0x40c346
lea eax, [ebp - 0x3ec]
mov dword [esp + 4], str.cdrom
mov dword [esp], eax
mov eax, dword [ebp - 0x448]
call eax
mov edx, 5
test eax, eax
je 0x40c346
lea esi, [esi]
nop
xor edx, edx
jmp 0x40c346
mov edx, dword [ebp - 0x450]
test edx, edx
je 0x40c52f
lea eax, [ebp - 0x418]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x454], 0x417a39
sub esp, 8
mov edx, eax
test eax, eax
jne 0x40c558
movzx eax, word [ebp - 0x418]
test ax, ax
je 0x40c89a
lea esi, [esi]
nop
mov ecx, edx
lea edx, [edx + 1]
cmp word [ebp + ecx*2 - 0x416], 0
jne 0x40c478
mov edx, 0x224c
mov dword [ebp - 0x454], edi
mov word [ebp - 0x34c], dx
lea edx, [ebp - 0x34a]
mov dword [ebp - 0x448], edx
lea edx, [ebp - 0x418]
mov dword [ebp - 0x458], ebx
mov edi, edx
mov ebx, dword [ebp - 0x448]
jmp 0x40c4fe
cmp ax, 9
je 0x40c718
cmp ax, 0xa
jne 0x40c736
mov eax, 0x6e5c
add ebx, 2
mov word [ebx - 2], ax
lea edx, [ecx - 1]
test ecx, ecx
jle 0x40c811
lea eax, [ebp - 0x22a]
cmp ebx, eax
ja 0x40c811
movzx eax, word [edi]
mov ecx, edx
add edi, 2
cmp ax, 0xd
je 0x40c701
jbe 0x40c4c0
cmp ax, 0x22
je 0x40c790
cmp ax, 0x5c
jne 0x40c729
mov eax, 0x5c5c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40c4e0
lea eax, [ebp - 0x418]
mov dword [esp], 0x417a2c
mov dword [ebp - 0x448], eax
movzx eax, word [ebp - 0x448]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
mov dword [ebp - 0x454], eax
mov ecx, dword [ebp - 0x44c]
test ecx, ecx
je 0x40c862
lea eax, [ebp - 0x3ec]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x417a39
test edx, edx
jne 0x40c69b
movzx eax, word [ebp - 0x3ec]
test ax, ax
je 0x40c8c2
nop
mov ecx, edx
lea edx, [edx + 1]
cmp word [ebp + ecx*2 - 0x3ea], 0
jne 0x40c5a0
mov dword [ebp - 0x458], ecx
mov edx, 0x224c
lea ecx, [ebp - 0x3ec]
mov word [ebp - 0x34c], dx
lea edx, [ebp - 0x34a]
mov dword [ebp - 0x448], ecx
mov ecx, dword [ebp - 0x458]
mov dword [ebp - 0x45c], edi
mov dword [ebp - 0x460], ebx
jmp 0x40c62c
cmp ax, 9
je 0x40c6f0
cmp ax, 0xa
jne 0x40c7ae
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
lea eax, [ebp - 0x22a]
lea edi, [ecx - 1]
cmp edx, eax
ja 0x40c661
test ecx, ecx
jle 0x40c661
mov eax, dword [ebp - 0x448]
mov ecx, edi
movzx eax, word [eax]
add dword [ebp - 0x448], 2
cmp ax, 0xd
je 0x40c6dc
jbe 0x40c5f0
cmp ax, 0x22
je 0x40c800
cmp ax, 0x5c
jne 0x40c7a1
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
jmp 0x40c610
mov eax, edi
mov byte [edx], 0x22
mov ebx, dword [ebp - 0x460]
mov edi, dword [ebp - 0x45c]
test eax, eax
jle 0x40c8db
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov ecx, dword [ebp - 0x454]
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 0x40c31f
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x40c610
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x40c610
mov eax, 0x725c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40c4e0
mov eax, 0x745c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40c4e0
lea edx, [eax - 0x20]
cmp dx, 0x5e
jbe 0x40c892
mov edx, eax
mov byte [ebx], 0x5c
add ebx, 5
shr dx, 0xc
movzx edx, dx
movzx edx, byte [edx + 0x4231b0]
mov byte [ebx - 4], dl
mov edx, eax
shr dx, 8
and edx, 0xf
movzx edx, byte [edx + 0x4231b0]
mov byte [ebx - 3], dl
mov edx, eax
and eax, 0xf
shr dx, 4
movzx eax, byte [eax + 0x4231b0]
and edx, 0xf
movzx edx, byte [edx + 0x4231b0]
mov byte [ebx - 1], al
mov byte [ebx - 2], dl
jmp 0x40c4e0
mov eax, 0x225c
add ebx, 2
mov word [ebx - 2], ax
jmp 0x40c4e0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40c88a
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + 0x4231b0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [edi + 0x4231b0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x4231b0]
and edi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [edi + 0x4231b0]
mov byte [edx - 1], al
mov byte [edx - 2], bl
jmp 0x40c610
mov edi, 0x225c
add edx, 2
mov word [edx - 2], di
jmp 0x40c610
mov eax, ebx
mov dword [ebp - 0x448], ebx
mov edi, dword [ebp - 0x454]
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x458]
test edx, edx
jle 0x40c8b9
mov ecx, dword [ebp - 0x448]
mov edx, 0x2e2e
mov word [ecx + 1], dx
lea eax, [ecx + 4]
mov byte [ecx + 3], 0x2e
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [ebp - 0x454], eax
jmp 0x40c558
lea eax, [ebp - 0x3ec]
mov dword [esp], 0x417a2c
mov dword [ebp - 0x448], eax
movzx eax, word [ebp - 0x448]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x40c69b
mov byte [edx], al
inc edx
jmp 0x40c610
mov byte [ebx], al
inc ebx
jmp 0x40c4e0
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
mov word [ebp - 0x34c], ax
lea eax, [ebp - 0x34a]
mov dword [ebp - 0x448], eax
mov eax, dword [ebp - 0x448]
inc eax
jmp 0x40c846
mov ecx, 0x224c
mov byte [ebp - 0x34a], 0x22
lea edx, [ebp - 0x34a]
mov word [ebp - 0x34c], cx
lea eax, [edx + 1]
jmp 0x40c68a