Function at 0x40ceb9
Capabilities:
Get disk information
Get disk information via ioctl
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov eax, 0x118c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00484d70
mov ecx, 0x40
sub esp, eax
lea edi, [ebp - 0x1118]
xor eax, eax
cmp dword [ebp + 0xc], 0
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x1018]
mov ecx, 0x400
mov ebx, dword [ebp + 8]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x1120], 0x7060401
mov dword [ebp - 0x111c], 0xef0e0c0b
je 0x40d03d
mov edx, 0x4df248
mov ecx, 0x160
xor esi, esi
mov edi, edx
mov dword [0x4df240], esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov byte [eax], 0
xor eax, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 1
mov dword [esp + 4], eax
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.0040853f
mov esi, eax
test eax, eax
jne 0x40cf62
cmp dword [ebp + 0x14], 0
jne 0x40cf96
mov dword [esp + 4], ebx
mov dword [esp], str.No_volume_information_for_drive_0x_02x
call fcn.0043d9e0
jmp 0x40cf96
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], ecx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
sub esp, 0x20
test eax, eax
je 0x40cf4a
mov dword [esp], esi
call sub.msvcrt.dll_free
xor edx, edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], edx
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.0040835f
mov edi, eax
cmp eax, 0xffffffff
je 0x40d03d
xor eax, eax
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x1124]
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x1118]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x700a0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x40d00c
cmp dword [ebp - 0x1124], 0
jne 0x40d04a
cmp dword [ebp + 0x14], 0
jne 0x40d02b
call fcn.0043df77
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], str.Could_not_get_geometry_for_drive_0x_02x:__s
call fcn.0043d9e0
lea eax, [edi - 1]
cmp eax, 0xfffffffd
ja 0x40d03d
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
xor eax, eax
mov dword [ebp - 0x1134], eax
jmp 0x40d9f0
mov eax, dword [ebp - 0x1100]
mov edx, dword [ebp - 0x10fc]
mov dword [0x4df234], 0xffffffff
mov dword [0x4df220], eax
mov eax, dword [ebp - 0x1104]
mov dword [0x4df224], edx
mov dword [0x4df230], eax
cmp eax, 0x1ff
ja 0x40d0a1
cmp dword [ebp + 0x14], 0
jne 0x40d097
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov dword [esp], str.Warning:_Drive_0x_02x_reports_a_sector_size_of__d___Correcting_to_512_bytes.
call fcn.0043d9e0
mov dword [0x4df230], 0x200
mov eax, dword [ebp - 0x1108]
cmp dword [ebp + 0x14], 0
mov dword [0x4df22c], eax
mov eax, dword [ebp - 0x1110]
mov dword [0x4df238], eax
jne 0x40d14e
xor eax, eax
mov esi, dword [0x4df230]
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov edx, dword [0x4df224]
mov eax, dword [0x4df220]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0043e475
cmp dword [0x4df238], 0xc
mov ecx, str.FIXED
mov dword [esp + 0xc], esi
mov edx, eax
mov eax, str.Removable
mov dword [esp], str.Disk_type:__s__Disk_size:__s__Sector_size:__d_bytes
cmove eax, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call fcn.0043d9e0
mov eax, dword [ebp - 0x1108]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x110c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1118]
mov edx, dword [ebp - 0x1114]
mov dword [esp], str.Cylinders:__I64i__Tracks_per_cylinder:__d__Sectors_per_track:__d
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0043d9e0
lea eax, [ebp - 0x1124]
xor ecx, ecx
xor esi, esi
mov dword [esp], edi
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], 0x1000
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], esi
mov dword [esp + 4], 0x70050
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
sub esp, 0x20
test eax, eax
je 0x40d19b
cmp dword [ebp - 0x1124], 0
jne 0x40d1be
cmp dword [ebp + 0x14], 0
jne 0x40d02b
call fcn.0043df77
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp], str.Could_not_get_layout_for_drive_0x_02x:__s
jmp 0x40d026
mov eax, dword [ebp - 0x1018]
test eax, eax
je 0x40d1d4
dec eax
je 0x40d668
jmp 0x40d99f
xor edx, edx
mov ebx, dword [ebp - 0x1014]
xor eax, eax
xor ecx, ecx
mov dword [0x4df23c], edx
mov edx, dword [0x4df240]
cmp ebx, eax
je 0x40d206
imul esi, eax, 0x90
cmp byte [ebp + esi - 0xfc8], 0
je 0x40d203
inc edx
mov cl, 1
inc eax
jmp 0x40d1ec
test cl, cl
je 0x40d210
mov dword [0x4df240], edx
cmp byte [ebp - 0xfc8], 0
je 0x40d257
cmp dword [ebp - 0xfdc], 0
jne 0x40d257
cmp dword [ebp - 0xfe0], 0
jne 0x40d257
cmp dword [ebp + 0x14], 0
je 0x40d240
mov dword [ebp - 0x1140], 1
jmp 0x40d2d3
mov eax, dword [str.Super_Floppy_Disk]
mov dword [esp], str.Partition_type:_SFD___s__or_unpartitioned
mov dword [esp + 4], eax
call fcn.0043d9e0
jmp 0x40d231
cmp dword [ebp + 0x14], 0
jne 0x40d272
mov eax, dword [0x4df240]
mov dword [esp], str.Partition_type:_MBR__NB_Partitions:__d
mov dword [esp + 4], eax
call fcn.0043d9e0
mov eax, dword [ebp - 0x1010]
xor edx, edx
cmp eax, 0x49464555
sete dl
cmp dword [ebp + 0x14], 0
mov dword [0x4df7e0], edx
jne 0x40d2b4
cmp eax, 0x49464555
mov edx, 0x495854
mov ecx, str._UEFI_target_
mov dword [esp + 4], eax
cmove edx, ecx
mov dword [esp], str.Disk_ID:_0x_08X__s
mov dword [esp + 8], edx
call fcn.0043d9e0
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0x4968c9
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.0040a7fa
xor eax, eax
mov dword [ebp - 0x1140], eax
xor eax, eax
lea ebx, [ebp - 0x1018]
mov dword [ebp - 0x1130], eax
mov dword [ebp - 0x1134], eax
mov eax, dword [ebp - 0x1130]
cmp eax, dword [ebp - 0x1014]
jae 0x40d9c5
mov al, byte [ebx + 0x50]
mov byte [ebp - 0x112c], al
test al, al
je 0x40d657
cmp al, 4
jne 0x40d338
cmp dword [ebp - 0x1140], 0
je 0x40d338
mov eax, 0x1000000
cmp eax, dword [0x4df220]
mov eax, 0
sbb eax, dword [0x4df224]
jge 0x40d9d9
jmp 0x40d9c5
cmp byte [ebp - 0x112c], 0xef
jne 0x40d9d9
mov dword [esp + 4], 1
mov eax, dword [0x4df230]
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov esi, eax
test eax, eax
je 0x40d9d9
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
imul eax, dword [ebp - 0x1130], 0x90
mov edx, dword [ebp + eax - 0xfdc]
mov eax, dword [ebp + eax - 0xfe0]
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
sub esp, 0x14
test eax, eax
jne 0x40d3a8
xor eax, eax
mov dword [ebp - 0x1138], eax
jmp 0x40d3fe
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1124]
mov dword [esp + 0xc], eax
mov eax, dword [0x4df230]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
sub esp, 0x14
test eax, eax
je 0x40d39e
lea eax, [esi + 0x2b]
mov dword [esp + 8], 9
mov dword [esp + 4], str.UEFI_NTFS
mov dword [esp], eax
call sub.msvcrt.dll_strncmp
test eax, eax
sete al
movzx eax, al
mov dword [ebp - 0x1138], eax
mov dword [esp], esi
call sub.msvcrt.dll_free
cmp dword [ebp + 0x14], 0
jne 0x40d44c
cmp dword [ebp - 0x1138], 0
mov eax, str.__UEFI:NTFS_
jne 0x40d427
xor esi, esi
mov eax, 0x495854
mov dword [ebp - 0x1138], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1140]
mov esi, dword [ebp - 0x1130]
mov dword [esp], str.Partition__d_s:
xor eax, 1
add eax, esi
mov dword [esp + 4], eax
call fcn.0043d9e0
xor eax, eax
mov dl, byte [ebp - 0x112c]
cmp dl, byte [eax + ebp - 0x1120]
je 0x40d465
inc eax
cmp eax, 8
jne 0x40d44e
jmp 0x40d46f
mov dword [ebp - 0x1134], 1
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
cmp dword [ebp - 0x1130], 0xf
mov dword [ebp - 0x1148], eax
mov dword [ebp - 0x1144], edx
ja 0x40d4af
imul ecx, dword [ebp - 0x1130], 0x58
mov dword [ecx + 0x4df290], eax
mov eax, dword [ebx + 0x40]
mov dword [ecx + 0x4df294], edx
mov edx, dword [ebx + 0x44]
mov dword [ecx + 0x4df298], eax
mov dword [ecx + 0x4df29c], edx
cmp dword [ebp + 0x14], 0
jne 0x40d5fb
cmp byte [ebx + 0x51], 0
mov eax, dword [0x4df230]
mov ecx, 0x496749
mov esi, 0x49674d
cmovne esi, ecx
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x1148]
mov edx, dword [ebp - 0x1144]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00484da0
xor ecx, ecx
mov dword [ebp - 0x1150], eax
mov eax, dword [ebx + 0x40]
mov dword [ebp - 0x114c], edx
mov edx, dword [ebx + 0x44]
mov dword [ebp - 0x1148], eax
mov dword [ebp - 0x1144], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp + 8], 1
mov dword [esp], eax
call fcn.0043e475
mov dword [ebp - 0x1154], eax
imul eax, dword [ebp - 0x1130], 0x90
mov edx, dword [ebp + eax - 0xfdc]
mov eax, dword [ebp + eax - 0xfe0]
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0040aab2
xor ecx, ecx
cmp dword [ebp - 0x1140], 0
mov dword [ebp - 0x1158], eax
mov al, byte [ebp - 0x112c]
cmove ecx, eax
cmp byte [ebp - 0x112c], 7
movzx eax, cl
mov dword [ebp - 0x115c], eax
je 0x40d58a
cmp dword [ebp - 0x1140], 0
je 0x40d592
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
jne 0x40d5a1
movzx eax, byte [ebp - 0x112c]
mov dword [esp], eax
call fcn.0040ce46
mov dword [esp + 0x24], esi
mov edx, dword [ebp - 0x1150]
mov ecx, dword [ebp - 0x114c]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov edx, dword [ebp - 0x1148]
mov ecx, dword [ebp - 0x1144]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov esi, dword [ebp - 0x1154]
mov dword [esp + 0x10], esi
mov esi, dword [ebp - 0x1158]
mov dword [esp + 0xc], esi
mov esi, dword [ebp - 0x115c]
mov dword [esp + 4], eax
mov dword [esp + 8], esi
mov dword [esp], str.__Type:__s__0x_02x__r_n__Detected_File_System:__s_r_n__Size:__s___lld_bytes__r_n__Start_Sector:__lld__Boot:__s
call fcn.0043d9e0
mov eax, dword [0x4df230]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00484da0
mov edx, dword [0x4df234]
cmp edx, eax
cmovbe eax, edx
cmp byte [ebp - 0x112c], 0xea
mov dword [0x4df234], eax
je 0x40d63e
cmp dword [ebp - 0x1138], 0
je 0x40d644
dec dword [0x4df240]
cmp byte [ebp - 0x112c], 0xee
jne 0x40d657
mov dword [0x4df7dc], 1
inc dword [ebp - 0x1130]
add ebx, 0x90
jmp 0x40d2e7
mov dword [0x4df23c], 1
cmp dword [ebp + 0x14], 0
jne 0x40d6f2
mov eax, dword [ebp - 0x1014]
mov dword [esp], str.Partition_type:_GPT__NB_Partitions:__d
mov dword [esp + 4], eax
call fcn.0043d9e0
lea eax, [ebp - 0x1010]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0043e32e
mov dword [esp], str.Disk_GUID:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
mov eax, dword [ebp - 0xff8]
mov edx, dword [ebp - 0xff4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov eax, dword [ebp - 0x1000]
mov edx, dword [ebp - 0xffc]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0xff0]
mov dword [esp], str.Max_parts:__d__Start_Offset:__I64i__Usable___I64i_bytes
mov dword [esp + 4], eax
call fcn.0043d9e0
xor eax, eax
lea ebx, [ebp - 0xfa0]
xor esi, esi
mov dword [ebp - 0x112c], 0x4df220
mov dword [ebp - 0x1134], eax
cmp esi, dword [ebp - 0x1014]
jae 0x40d9c5
cmp esi, 0xf
ja 0x40d74c
mov ecx, dword [ebp - 0x112c]
mov eax, dword [ebx - 0x40]
mov edx, dword [ebx - 0x3c]
mov dword [ecx + 0x70], eax
mov eax, dword [ebx - 0x38]
mov dword [ecx + 0x74], edx
mov edx, dword [ebx - 0x34]
mov dword [ecx + 0x78], eax
mov eax, ecx
add eax, 0x28
mov dword [ecx + 0x7c], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
inc dword [0x4df240]
mov dword [esp + 4], 0x4964e4
mov dword [esp], ebx
call sub.msvcrt.dll_wcscmp
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x1138], eax
lea eax, [ebx - 0x28]
mov dword [ebp - 0x1130], eax
jne 0x40d7b0
mov dword [esp], eax
call fcn.0040ce6f
cmp dword [ebp - 0x1138], 0
mov ecx, str.__UEFI:NTFS_
mov dword [esp], str.Partition__d_s:_r_n__Type:__s
mov edx, eax
mov eax, 0x495854
cmove eax, ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
lea eax, [esi + 1]
mov dword [esp + 4], eax
call fcn.0043d9e0
cmp word [ebx], 0
je 0x40d7d2
cmp dword [ebp + 0x14], 0
jne 0x40d8ec
mov dword [esp + 4], ebx
mov dword [esp], str.__Name:__S
call fcn.0043d9e0
jmp 0x40d7dc
cmp dword [ebp + 0x14], 0
jne 0x40d8ec
imul ecx, esi, 0x90
mov edx, dword [ebp + ecx - 0xfdc]
mov eax, dword [ebp + ecx - 0xfe0]
mov dword [ebp - 0x1154], ecx
mov dword [esp], edi
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call fcn.0040aab2
mov dword [esp], str.__Detected_File_System:__s
mov dword [esp + 4], eax
call fcn.0043d9e0
mov eax, dword [ebx - 8]
mov edx, dword [ebx - 4]
mov dword [ebp - 0x1140], eax
mov eax, dword [0x4df230]
mov dword [ebp - 0x113c], edx
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [ebx - 0x40]
mov edx, dword [ebx - 0x3c]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00484da0
mov dword [ebp - 0x1148], eax
xor eax, eax
mov dword [ebp - 0x1144], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov edx, dword [ebx - 0x34]
mov eax, dword [ebx - 0x38]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0043e475
mov dword [ebp - 0x1150], eax
lea eax, [ebx - 0x18]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0043e32e
mov edx, dword [ebp - 0x1140]
mov ecx, dword [ebp - 0x113c]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov edx, dword [ebp - 0x1148]
mov ecx, dword [ebp - 0x1144]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x1154]
mov edx, dword [ebp + ecx - 0xfd8]
mov ecx, dword [ebp + ecx - 0xfd4]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov edx, dword [ebp - 0x1150]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], str.__ID:__s_r_n__Size:__s___I64i_bytes__r_n__Start_Sector:__I64i__Attributes:_0x_016I64X
call fcn.0043d9e0
mov eax, dword [0x4df230]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, dword [ebx - 0x40]
mov edx, dword [ebx - 0x3c]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00484da0
mov edx, dword [0x4df234]
cmp edx, eax
cmovbe eax, edx
cmp dword [ebp - 0x1138], 0
mov dword [0x4df234], eax
jne 0x40d92e
dec dword [0x4df240]
jmp 0x40d962
mov dword [esp + 4], 0x4c7fac
mov eax, dword [ebp - 0x1130]
mov dword [esp], eax
call fcn.0043cd77
test eax, eax
jne 0x40d926
mov dword [esp + 4], 0x4c7dfc
mov eax, dword [ebp - 0x1130]
mov dword [esp], eax
call fcn.0043cd77
test eax, eax
jne 0x40d926
mov dword [esp + 4], 0x4c7f6c
mov eax, dword [ebp - 0x1130]
mov dword [esp], eax
call fcn.0043cd77
test eax, eax
mov eax, 1
cmove eax, dword [ebp - 0x1134]
inc esi
add dword [ebp - 0x112c], 0x58
add ebx, 0x90
mov dword [ebp - 0x1134], eax
jmp 0x40d70c
xor ebx, ebx
cmp dword [ebp + 0x14], 0
mov dword [0x4df23c], ebx
je 0x40d9b7
xor ecx, ecx
mov dword [ebp - 0x1134], ecx
jmp 0x40d9c5
mov dword [esp], str.Partition_type:_RAW
call fcn.0043d9e0
jmp 0x40d9ad
lea eax, [edi - 1]
cmp eax, 0xfffffffd
ja 0x40d9f0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edx
jmp 0x40d9f0
cmp dword [ebp + 0x14], 0
je 0x40d41a
xor eax, eax
mov dword [ebp - 0x1138], eax
jmp 0x40d44c
mov eax, dword [ebp - 0x1134]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret