Function at 0x401730
Capabilities:
Get disk information via ioctl
Unmount volume via ioctl

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xfc
mov eax, dword [ebp + 8]
lea ecx, str.._c:
lea edx, [ebp - 0x60]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 8]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0040c570
lea ecx, [ebp - 0x60]
mov edx, esp
mov dword [edx], ecx
mov dword [edx + 0x18], 0
mov dword [edx + 0x14], 0x80
mov dword [edx + 0x10], 3
mov dword [edx + 0xc], 0
mov dword [edx + 8], 3
mov dword [edx + 4], 0x80000000
mov dword [ebp - 0x6c], eax
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov ecx, 0xffffffff
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x10], ecx
jne 0x401846
call sub.KERNEL32.DLL_GetLastError
mov ecx, eax
sub eax, 5
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x74], eax
je 0x4017f4
jmp 0x4017c9
mov eax, dword [ebp - 0x70]
sub eax, 2
mov dword [ebp - 0x78], eax
jne 0x401812
jmp 0x4017d6
lea eax, str.Drive__c_does_not_exist_n
mov ecx, dword [ebp - 0x14]
movsx ecx, byte [ecx + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov dword [ebp - 0x7c], eax
jmp 0x40183a
lea eax, str.Access_to_drive__c_denied__admin_necessary__n
mov ecx, dword [ebp - 0x14]
movsx ecx, byte [ecx + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov dword [ebp - 0x80], eax
jmp 0x40183a
call sub.KERNEL32.DLL_GetLastError
lea ecx, str.Error__08lx_opening_drive__c_n
mov edx, dword [ebp - 0x14]
movsx edx, byte [edx + 8]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0040c1c8
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x10], 2
jmp 0x401ce9
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x68]
mov edx, esp
mov dword [edx + 0x18], ecx
mov dword [edx], eax
mov dword [edx + 0x1c], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0xc], 0
mov dword [edx + 8], 0
mov dword [edx + 4], 0x90018
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x4018ec
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 8]
mov dword [ebp - 0x88], eax
call sub.KERNEL32.DLL_GetLastError
lea ecx, str.Could_not_lock__c___08lx__n
mov dword [esp], ecx
mov ecx, dword [ebp - 0x88]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0040c1c8
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x10]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0x8c], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x90], eax
jmp 0x401ce9
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
lea ecx, [ebp - 0x68]
mov edx, esp
mov dword [edx + 0x18], ecx
mov dword [edx], eax
mov dword [edx + 0x1c], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0xc], 0
mov dword [edx + 8], 0
mov dword [edx + 4], 0x90020
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x401992
mov eax, dword [ebp - 0x14]
movsx eax, byte [eax + 8]
mov dword [ebp - 0x94], eax
call sub.KERNEL32.DLL_GetLastError
lea ecx, str.Could_not_unmount__c___08lx__n
mov dword [esp], ecx
mov ecx, dword [ebp - 0x94]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.0040c1c8
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x10]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0x98], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x9c], eax
jmp 0x401ce9
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x10]
lea edx, [ebp - 0x68]
mov esi, esp
mov dword [esi + 0x18], edx
mov dword [esi + 0x10], eax
mov dword [esi], ecx
mov dword [esi + 0x1c], 0
mov dword [esi + 0x14], 0xc
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [esi + 4], 0x2d1080
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x401a22
lea eax, str.Could_not_get_physical_disk_of__c_n
mov ecx, dword [ebp - 0x14]
movsx ecx, byte [ecx + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x10]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0xa0], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xa4], eax
jmp 0x401ce9
lea eax, str..PhysicalDrive_u
lea ecx, [ebp - 0x60]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov dword [esi + 0xc], edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0040c570
lea ecx, [ebp - 0x60]
mov edx, esp
mov dword [edx], ecx
mov dword [edx + 0x18], 0
mov dword [edx + 0x14], 0x80
mov dword [edx + 0x10], 3
mov dword [edx + 0xc], 0
mov dword [edx + 8], 3
mov dword [edx + 4], 0xc0000000
mov dword [ebp - 0xa8], eax
call sub.KERNEL32.DLL_CreateFileA
sub esp, 0x1c
mov ecx, 0xffffffff
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x14], ecx
jne 0x401b58
call sub.KERNEL32.DLL_GetLastError
mov ecx, eax
sub eax, 5
mov dword [ebp - 0xac], ecx
mov dword [ebp - 0xb0], eax
je 0x401aed
jmp 0x401aba
mov eax, dword [ebp - 0xac]
sub eax, 2
mov dword [ebp - 0xb4], eax
jne 0x401b0d
jmp 0x401acd
lea eax, str.Disk__u_does_not_exist_n
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov dword [ebp - 0xb8], eax
jmp 0x401b34
lea eax, str.Access_to_disk__u_denied__admin_necessary__n
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov dword [ebp - 0xbc], eax
jmp 0x401b34
call sub.KERNEL32.DLL_GetLastError
lea ecx, str.Error__08lx_opening_disk__u_n
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0xc]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0040c1c8
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
mov ecx, esp
mov dword [ecx], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xc4], eax
jmp 0x401ce9
lea eax, [ebp - 0x40]
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x14]
lea edx, [ebp - 0x68]
mov esi, esp
mov dword [esi + 0x18], edx
mov dword [esi + 0x10], eax
mov dword [esi], ecx
mov dword [esi + 0x1c], 0
mov dword [esi + 0x14], 0x20
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [esi + 4], 0x700a0
call sub.KERNEL32.DLL_DeviceIoControl
sub esp, 0x20
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x401be8
lea eax, str.Could_not_get_disk_geometry_of__c_n
mov ecx, dword [ebp - 0x14]
movsx ecx, byte [ecx + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x14]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0xc8], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xcc], eax
jmp 0x401ce9
cmp dword [ebp - 0x38], 0xb
je 0x401c4c
lea eax, str._c_is_not_an_SD_card_n
mov ecx, dword [ebp - 0x14]
movsx ecx, byte [ecx + 8]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0040c1c8
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x14]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0xd0], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x10]
mov edx, esp
mov dword [edx], ecx
mov dword [ebp - 0xd4], eax
call sub.KERNEL32.DLL_CloseHandle
sub esp, 4
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xd8], eax
jmp 0x401ce9
mov eax, 8
mov ecx, 0x2c
lea edx, [ebp - 0x60]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
mov dword [esi + 0x18], edi
mov edi, dword [ebp - 0x24]
mov dword [esi + 0x1c], edi
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x14]
mov dword [edi + 0x28], esi
mov esi, dword [ebp - 0x14]
add esi, 0x18
mov dword [esp], esi
mov dword [esp + 4], 8
mov dword [esp + 8], 0x2c
mov dword [esp + 0xc], edx
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0xe0], ecx
call fcn.004064ac
lea ecx, str.SD_card__c__disk__u___s_bytes___u_sector_size_n
lea edx, [ebp - 0x60]
mov esi, dword [ebp - 0x14]
movsx esi, byte [esi + 8]
mov edi, dword [ebp - 0x14]
mov edi, dword [edi + 0xc]
mov ebx, dword [ebp - 0x14]
mov ebx, dword [ebx + 0x28]
mov dword [esp], ecx
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
mov dword [ebp - 0xe4], eax
call fcn.0040c1c8
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0x10]
add esp, 0xfc
pop esi
pop edi
pop ebx
pop ebp
ret