Function at 0x401641
Capabilities:
Unmount volume via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x40d1e8]
mov dword [ebp - 0x5c], eax
mov ecx, dword [0x40d1ec]
mov dword [ebp - 0x58], ecx
mov edx, dword [0x40d1f0]
mov dword [ebp - 0x54], edx
mov ax, word [0x40d1f4]
mov word [ebp - 0x50], ax
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x8c], 0x20
mov dword [ebp - 0x48], 2
mov dword [ebp - 0x88], 6
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0xbc], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x94], 0
mov dword [ebp - 8], 0
mov ecx, dword [str.NO_NAME]
mov dword [ebp - 0xb4], ecx
mov edx, dword [0x40d1fc]
mov dword [ebp - 0xb0], edx
mov eax, dword [0x40d200]
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x20]
mov word [ebp - 0x54], dx
call fcn.00401000
mov dword [ebp - 0xa0], eax
push 0
push 0x20000000
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x401778
push str.Failed_to_open_device
mov ecx, dword [ebp + 8]
push ecx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
push 0
lea edx, [ebp - 0x4c]
push edx
push 0
push 0
push 0
push 0
push 0x90083
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4017b1
push str.Failed_to_allow_extended_DASD_on_device_n
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402602
add esp, 8
jmp 0x4017c2
push str.FSCTL_ALLOW_EXTENDED_DASD_IO_OK_n
mov edx, dword [ebp + 8]
push edx
call fcn.00402602
add esp, 8
push 0
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 0
push 0
push 0x90018
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4017fe
push str.Failed_to_lock_device
mov edx, dword [ebp + 8]
push edx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x18
lea ecx, [ebp - 0x40]
push ecx
push 0
push 0
push 0x70000
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40183c
push str.Failed_to_get_device_geometry
mov eax, dword [ebp + 8]
push eax
call fcn.004010a1
add esp, 8
jmp 0x4021cb
push 0
lea ecx, [ebp - 0x4c]
push ecx
push 0x20
lea edx, [ebp - 0x7c]
push edx
push 0
push 0
push 0x74004
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x401932
push str.IOCTL_DISK_GET_PARTITION_INFO_failed__trying_IOCTL_DISK_GET_PARTITION_INFO_EX_n
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402602
add esp, 8
push 0
lea edx, [ebp - 0x4c]
push edx
push 0x90
lea eax, [ebp - 0x14c]
push eax
push 0
push 0
push 0x70048
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4018bd
push str.Failed_to_get_partition_info__both_regular_and__ex_
mov edx, dword [ebp + 8]
push edx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
push 0x20
push 0
lea eax, [ebp - 0x7c]
push eax
call fcn.004046b0
add esp, 0xc
mov ecx, dword [ebp - 0x144]
mov dword [ebp - 0x7c], ecx
mov edx, dword [ebp - 0x140]
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x138]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x2c]
xor eax, eax
push eax
push edx
mov ecx, dword [ebp - 0x140]
push ecx
mov edx, dword [ebp - 0x144]
push edx
call fcn.00404710
mov dword [ebp - 0x6c], eax
xor eax, eax
cmp dword [ebp - 0x14c], 0
setne al
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
push str.IOCTL_DISK_GET_PARTITION_INFO_EX_ok__GPTMode_d_n
mov edx, dword [ebp + 8]
push edx
call fcn.00402602
add esp, 0xc
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x2c]
xor edx, edx
push edx
push ecx
mov eax, dword [ebp - 0x70]
push eax
mov ecx, dword [ebp - 0x74]
push ecx
call fcn.00404710
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
ja 0x401979
jb 0x401963
cmp dword [ebp - 0x20], 0x10000
jae 0x401979
push str.This_drive_is_too_small_for_FAT32___there_must_be_at_least_64K_clusters_n
mov edx, dword [ebp + 8]
push edx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
cmp dword [ebp - 0x1c], 0
ja 0x401985
cmp dword [ebp - 0x20], 0xffffffff
jb 0x40199b
push str.This_drive_is_too_big_for_FAT32___max_2TB_supported_n
mov eax, dword [ebp + 8]
push eax
call fcn.004010a1
add esp, 8
jmp 0x4021cb
push 4
push 0x3000
mov ecx, dword [ebp - 0x44]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x80], eax
push 4
push 0x3000
mov edx, dword [ebp - 0x44]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x94], eax
push 4
push 0x3000
mov eax, dword [ebp - 0x44]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x80], 0
je 0x4019f5
cmp dword [ebp - 0x94], 0
je 0x4019f5
cmp dword [ebp - 8], 0
jne 0x401a0b
push str.Failed_to_allocate_memory
mov ecx, dword [ebp + 8]
push ecx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
mov edx, dword [ebp - 0x80]
mov byte [edx], 0xeb
mov eax, dword [ebp - 0x80]
mov byte [eax + 1], 0x58
mov ecx, dword [ebp - 0x80]
mov byte [ecx + 2], 0x90
push str.MSWIN4.1
mov edx, dword [ebp - 0x80]
add edx, 3
push edx
call fcn.004045c0
add esp, 8
mov eax, dword [ebp - 0x80]
mov cx, word [ebp - 0x44]
mov word [eax + 0xb], cx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
cmp eax, dword [ebp - 0x44]
jae 0x401a5f
push str.You_must_choose_a_cluster_size_bigger_than_the_sector_size
mov ecx, dword [ebp + 8]
push ecx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
xor edx, edx
div dword [ebp - 0x44]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0x80]
mov cl, byte [ebp - 0xbc]
mov byte [eax + 0xd], cl
mov edx, dword [ebp - 0x80]
mov ax, word [ebp - 0x8c]
mov word [edx + 0xe], ax
mov ecx, dword [ebp - 0x80]
mov dl, byte [ebp - 0x48]
mov byte [ecx + 0x10], dl
mov eax, dword [ebp - 0x80]
mov word [eax + 0x11], 0
mov ecx, dword [ebp - 0x80]
mov word [ecx + 0x13], 0
mov edx, dword [ebp - 0x80]
mov byte [edx + 0x15], 0xf8
mov eax, dword [ebp - 0x80]
mov word [eax + 0x16], 0
mov ecx, dword [ebp - 0x80]
mov dx, word [ebp - 0x30]
mov word [ecx + 0x18], dx
mov eax, dword [ebp - 0x80]
mov cx, word [ebp - 0x34]
mov word [eax + 0x1a], cx
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 0x6c]
mov dword [edx + 0x1c], eax
mov ecx, dword [ebp - 0x2c]
xor edx, edx
push edx
push ecx
mov eax, dword [ebp - 0x70]
push eax
mov ecx, dword [ebp - 0x74]
push ecx
call fcn.00404710
mov dword [ebp - 0x9c], eax
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 0x9c]
mov dword [edx + 0x20], eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x80]
xor eax, eax
mov al, byte [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x80]
xor edx, edx
mov dl, byte [ecx + 0xd]
push edx
mov eax, dword [ebp - 0x80]
xor ecx, ecx
mov cx, word [eax + 0xe]
push ecx
mov edx, dword [ebp - 0x80]
mov eax, dword [edx + 0x20]
push eax
call fcn.004011c0
add esp, 0x14
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 0x24], edx
mov eax, dword [ebp - 0x80]
mov word [eax + 0x28], 0
mov ecx, dword [ebp - 0x80]
mov word [ecx + 0x2a], 0
mov edx, dword [ebp - 0x80]
mov dword [edx + 0x2c], 2
mov eax, dword [ebp - 0x80]
mov word [eax + 0x30], 1
mov ecx, dword [ebp - 0x80]
mov dx, word [ebp - 0x88]
mov word [ecx + 0x32], dx
mov eax, dword [ebp - 0x80]
mov byte [eax + 0x40], 0x80
mov ecx, dword [ebp - 0x80]
mov byte [ecx + 0x41], 0
mov edx, dword [ebp - 0x80]
mov byte [edx + 0x42], 0x29
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0xa0]
mov dword [eax + 0x43], ecx
push 0xb
lea edx, [ebp - 0xb4]
push edx
mov eax, dword [ebp - 0x80]
add eax, 0x47
push eax
call fcn.00404280
add esp, 0xc
push 8
push str.FAT32
mov ecx, dword [ebp - 0x80]
add ecx, 0x52
push ecx
call fcn.00404280
add esp, 0xc
mov edx, dword [ebp - 0x80]
mov byte [edx + 0x1fe], 0x55
mov eax, dword [ebp - 0x80]
mov byte [eax + 0x1ff], 0xaa
cmp dword [ebp - 0x44], 0x200
je 0x401be8
mov ecx, dword [ebp - 0x80]
add ecx, dword [ebp - 0x44]
mov byte [ecx - 2], 0x55
mov edx, dword [ebp - 0x80]
add edx, dword [ebp - 0x44]
mov byte [edx - 1], 0xaa
mov eax, dword [ebp - 0x94]
mov dword [eax], 0x41615252
mov ecx, dword [ebp - 0x94]
mov dword [ecx + 0x1e4], 0x61417272
mov edx, dword [ebp - 0x94]
mov dword [edx + 0x1e8], 0xffffffff
mov eax, dword [ebp - 0x94]
mov dword [eax + 0x1ec], 0xffffffff
mov ecx, dword [ebp - 0x94]
mov dword [ecx + 0x1fc], 0xaa550000
mov edx, dword [ebp - 8]
mov dword [edx], 0xffffff8
mov eax, dword [ebp - 8]
mov dword [eax + 4], 0xfffffff
mov ecx, dword [ebp - 8]
mov dword [ecx + 8], 0xfffffff
mov edx, dword [ebp - 0x9c]
sub edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 0x48]
imul eax, dword [ebp - 0x24]
sub edx, eax
mov dword [ebp - 0xb8], edx
mov eax, dword [ebp - 0xb8]
xor edx, edx
div dword [ebp - 0xbc]
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0
ja 0x401c91
cmp dword [ebp - 0x18], 0xfffffff
jbe 0x401ca7
push str.This_drive_has_more_than_228_clusters__try_to_specify_a_larger_cluster_size_or_use_the_default_n
mov edx, dword [ebp + 8]
push edx
call fcn.004010a1
add esp, 8
jmp 0x4021cb
cmp dword [ebp - 0x14], 0
ja 0x401ce7
jb 0x401cb8
cmp dword [ebp - 0x18], 0x10000
jae 0x401ce7
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
push str.ClusterCount_I64d_n
mov edx, dword [ebp + 8]
push edx
call fcn.00402602
add esp, 0x10
push str.FAT32_must_have_at_least_65536_clusters__try_to_specify_a_smaller_cluster_size_or_use_the_default_n
mov eax, dword [ebp + 8]
push eax
call fcn.004010a1
add esp, 8
jmp 0x4021cb
push 0
push 4
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.004041a0
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], edx
mov eax, dword [ebp - 0x44]
sub eax, 1
xor ecx, ecx
mov edx, dword [ebp - 0xa8]
add edx, eax
mov eax, dword [ebp - 0xa4]
adc eax, ecx
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0xa4], eax
mov ecx, dword [ebp - 0x44]
xor edx, edx
push edx
push ecx
mov eax, dword [ebp - 0xa4]
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
call fcn.00404130
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], edx
mov edx, dword [ebp - 0x24]
xor eax, eax
mov dword [ebp - 0x15c], edx
mov dword [ebp - 0x158], eax
mov ecx, dword [ebp - 0xa4]
cmp ecx, dword [ebp - 0x158]
jb 0x401d93
ja 0x401d7d
mov edx, dword [ebp - 0xa8]
cmp edx, dword [ebp - 0x15c]
jbe 0x401d93
push str.This_drive_is_too_big_for_this_version_of_fat32format__check_for_an_upgrade_n
mov eax, dword [ebp + 8]
push eax
call fcn.004010a1
add esp, 8
jmp 0x4021cb
cmp dword [0x40f1dc], 0
je 0x401da8
mov dword [ebp - 0x160], str.64_bit
jmp 0x401db2
mov dword [ebp - 0x160], str.32_bit
mov ecx, dword [ebp - 0x160]
push ecx
xor edx, edx
mov dx, word [0x40f1d8]
push edx
push 0x40d8d0
push str.1.02
push str.GuiFormat_version__s__s_Windows_version__4.4x__s
mov eax, dword [ebp + 8]
push eax
call fcn.00402602
add esp, 0x18
mov ecx, dword [ebp - 0x9c]
push ecx
push 0
push 0x3b9aca00
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x74]
push eax
call fcn.00404710
mov dword [ebp - 0x168], eax
mov dword [ebp - 0x164], edx
fild qword [ebp - 0x168]
sub esp, 8
fstp qword [esp]
push str.Size_:__gGB__u_sectors_n
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402602
add esp, 0x14
mov edx, dword [ebp - 0xbc]
imul edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x44]
push eax
push str._d_Bytes_Per_Sector__Cluster_size__d_bytes_n
mov ecx, dword [ebp + 8]
push ecx
invalid