Function at 0x409340
Capabilities:
Get disk information
Get disk information via ioctl
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x114c
call fcn.004a99b0
mov eax, dword [0x5512ec]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x10], 0x7060401
push 0x100
push eax
mov dword [ebp - 0x1118], eax
mov ebx, edx
lea eax, [ebp - 0x110]
mov dword [ebp - 0x113c], ebx
push eax
mov esi, ecx
mov dword [ebp - 0xc], 0xef0e0c0b
mov dword [ebp - 0x1128], 0
call fcn.004ab0f0
add esp, 0xc
lea eax, [ebp - 0x1110]
push 0x1000
push 0
push eax
call fcn.004ab0f0
add esp, 0xc
test ebx, ebx
je 0x409f8c
push 0x80
push 0
push 0x5a31a8
mov dword [0x5a31a0], 0
call fcn.004ab0f0
add esp, 0xc
push 0x80
push 0
push 0x5a3228
call fcn.004ab0f0
add esp, 0xc
mov byte [ebx], 0
mov edx, 1
mov ecx, esi
push 0
push 0
push 0
call fcn.00406080
mov edi, eax
add esp, 0xc
test edi, edi
je 0x409420
push dword [ebp + 8]
push ebx
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x409434
cmp dword [ebp + 0xc], 0
jne 0x409434
push esi
push str.No_volume_information_for_drive_0x_02x
call fcn.0044b0b0
add esp, 8
push edi
call fcn.004d1211
add esp, 4
xor edx, edx
mov ecx, esi
push 1
push 0
call fcn.00405fd0
mov edi, eax
add esp, 8
mov dword [ebp - 0x111c], edi
cmp edi, 0xffffffff
je 0x409f8c
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x1124]
push 0
push eax
push 0x100
lea eax, [ebp - 0x110]
push eax
push 0
push 0
push 0x700a0
push edi
call ebx
test eax, eax
je 0x409f67
cmp dword [ebp - 0x1124], 0
jbe 0x409f67
mov ecx, dword [ebp - 0xfc]
mov edx, dword [ebp - 0xf8]
mov edi, dword [ebp - 0xf4]
mov dword [0x5a3180], edx
mov dword [0x5a3184], edi
mov dword [0x5a3190], ecx
mov dword [0x5a3194], 0xffffffff
cmp ecx, 0x200
jae 0x4094fc
cmp dword [ebp + 0xc], 0
jne 0x4094f1
push ecx
push esi
push str.Warning:_Drive_0x_02x_reports_a_sector_size_of__d___Correcting_to_512_bytes.
call fcn.0044b0b0
mov edi, dword [0x5a3184]
add esp, 0xc
mov edx, dword [0x5a3180]
mov ecx, 0x200
mov dword [0x5a3190], ecx
cmp dword [ebp + 0xc], 0
mov eax, dword [ebp - 0x100]
mov dword [0x5a318c], eax
mov eax, dword [ebp - 0x108]
mov dword [0x5a3198], eax
jne 0x409570
push ecx
push ecx
push edi
push edx
mov edx, 1
xor ecx, ecx
call fcn.0044b990
add esp, 0xc
mov ecx, str.Removable
cmp dword [0x5a3198], 0xc
push eax
mov eax, str.FIXED
cmovne eax, ecx
push eax
push str.Disk_type:__s__Disk_size:__s__Sector_size:__d_bytes
call fcn.0044b0b0
push dword [ebp - 0x100]
push dword [ebp - 0x104]
push dword [ebp - 0x10c]
push dword [ebp - 0x110]
push str.Cylinders:__lli__Tracks_per_cylinder:__d__Sectors_per_track:__d
call fcn.0044b0b0
add esp, 0x24
mov edi, dword [ebp - 0x111c]
lea eax, [ebp - 0x1124]
push 0
push eax
push 0x1000
lea eax, [ebp - 0x1110]
push eax
push 0
push 0
push 0x70050
push edi
call ebx
test eax, eax
je 0x409f53
cmp dword [ebp - 0x1124], 0
jbe 0x409f53
mov eax, dword [ebp - 0x1110]
sub eax, 0
je 0x409adb
sub eax, 1
je 0x4095e6
cmp dword [ebp + 0xc], 0
mov dword [0x5a319c], 0
jne 0x409f31
push str.Partition_type:_RAW
call fcn.0044b0b0
add esp, 4
jmp 0x409f31
mov esi, dword [ebp + 0xc]
mov dword [0x5a319c], 1
test esi, esi
jne 0x4096ad
push dword [ebp - 0x110c]
push str.Partition_type:_GPT__NB_Partitions:__d
call fcn.0044b0b0
movzx eax, byte [ebp - 0x10f9]
push eax
movzx eax, byte [ebp - 0x10fa]
push eax
movzx eax, byte [ebp - 0x10fb]
push eax
movzx eax, byte [ebp - 0x10fc]
push eax
movzx eax, byte [ebp - 0x10fd]
push eax
movzx eax, byte [ebp - 0x10fe]
push eax
movzx eax, byte [ebp - 0x10ff]
push eax
movzx eax, byte [ebp - 0x1100]
push eax
movzx eax, word [ebp - 0x1102]
push eax
movzx eax, word [ebp - 0x1104]
push eax
push dword [ebp - 0x1108]
push str._08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
push 0x59d940
call fcn.0044ac80
add esp, 0x3c
push 0x59d940
push str.Disk_GUID:__s
call fcn.0044b0b0
push dword [ebp - 0x10ec]
push dword [ebp - 0x10f0]
push dword [ebp - 0x10f4]
push dword [ebp - 0x10f8]
push dword [ebp - 0x10e8]
push str.Max_parts:__d__Start_Offset:__lli__Usable___lli_bytes
call fcn.0044b0b0
add esp, 0x20
mov ebx, dword [ebp - 0x110c]
xor edx, edx
mov dword [ebp - 0x1114], edx
test ebx, ebx
je 0x409f31
lea edi, [ebp - 0x10b2]
nop dword [eax]
cmp edx, 0x10
jae 0x4096fd
mov eax, dword [edi - 0x26]
mov ecx, dword [edi - 0x22]
mov dword [edx*8 + 0x5a31a8], eax
mov eax, dword [edi - 0x1e]
mov dword [edx*8 + 0x5a31ac], ecx
mov ecx, dword [edi - 0x1a]
mov dword [edx*8 + 0x5a3228], eax
mov dword [edx*8 + 0x5a322c], ecx
inc dword [0x5a31a0]
lea eax, [edi + 0x1a]
mov ecx, 0x52b8d4
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40973e
test dx, dx
je 0x409732
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40973e
add eax, 4
add ecx, 4
test dx, dx
jne 0x409710
mov dword [ebp - 0x1118], 0
jmp 0x409749
sbb eax, eax
or eax, 1
mov dword [ebp - 0x1118], eax
test esi, esi
jne 0x4099e3
xor ebx, ebx
lea eax, [edi - 0xe]
test eax, eax
je 0x409791
mov ecx, dword [ebx*8 + 0x551f90]
test ecx, ecx
je 0x409791
lea edx, [edi - 0xe]
mov esi, 0xc
nop dword [eax]
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x409788
add edx, 4
add ecx, 4
sub esi, 4
jae 0x409770
mov eax, 1
jmp 0x40978a
xor eax, eax
test eax, eax
jne 0x40979d
lea eax, [edi - 0xe]
inc ebx
cmp ebx, 0x68
jb 0x409753
test eax, eax
jne 0x4097ab
jmp 0x4097f6
cmp ebx, 0x68
jae 0x4097ab
mov eax, dword [ebx*8 + 0x551f94]
jmp 0x4097f6
movzx eax, byte [edi + 1]
push eax
movzx eax, byte [edi]
push eax
movzx eax, byte [edi - 1]
push eax
movzx eax, byte [edi - 2]
push eax
movzx eax, byte [edi - 3]
push eax
movzx eax, byte [edi - 4]
push eax
movzx eax, byte [edi - 5]
push eax
movzx eax, byte [edi - 6]
push eax
movzx eax, word [edi - 8]
push eax
movzx eax, word [edi - 0xa]
push eax
push dword [edi - 0xe]
push str._08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
push 0x59d940
call fcn.0044ac80
add esp, 0x34
mov eax, 0x59d940
cmp dword [ebp - 0x1118], 0
mov ecx, 0x52ad5a
push eax
mov eax, str.__UEFI:NTFS_
cmovne eax, ecx
push eax
mov eax, dword [ebp - 0x1114]
inc eax
push eax
push str.Partition__d_s:_r_n__Type:__s
call fcn.0044b0b0
lea eax, [edi + 0x1a]
add esp, 0x10
cmp word [eax], 0
je 0x409838
push eax
push str.__Name:__S
call fcn.0044b0b0
add esp, 8
push dword [edi - 0x22]
mov ecx, dword [ebp - 0x111c]
push dword [edi - 0x26]
call fcn.00408f10
push eax
push str.__Detected_File_System:__s
call fcn.0044b0b0
mov edx, dword [edi - 0x1a]
add esp, 0x10
mov ecx, dword [edi - 0x1e]
call fcn.004a9840
movsd xmm1, qword [0x549a90]
xor eax, eax
movsd xmm2, qword [0x549a18]
movsd qword [ebp - 0x10], xmm0
nop dword [eax]
comisd xmm1, xmm0
ja 0x409895
mulsd xmm0, xmm2
inc eax
movsd qword [ebp - 0x10], xmm0
cmp eax, 5
jl 0x409880
test eax, eax
jne 0x4098c7
push dword [0x552d30]
cvttsd2si eax, xmm0
push 0x52ad5a
push eax
push 0x52ad5a
push str._s_d_s__s
push 0x20
push 0x59d920
call fcn.004050d0
add esp, 0x1c
jmp 0x40994c
push dword [eax*4 + 0x552d30]
fld qword [ebp - 0x10]
push 0x52ad5a
sub esp, 8
movsd qword [esp], xmm0
mulsd xmm0, qword [0x549a70]
push 0x52ad5a
sub esp, 8
movsd qword [ebp - 0x1140], xmm0
fstp qword [esp]
call fcn.00511880
movsd xmm1, qword [ebp - 0x1140]
add esp, 8
fstp qword [ebp - 0x1130]
movsd xmm0, qword [ebp - 0x1130]
mov ecx, str._s_0.1f_s__s
mulsd xmm0, qword [0x549a70]
mov eax, str._s_0.0f_s__s
subsd xmm1, xmm0
movsd xmm0, qword [0x549a40]
comisd xmm0, xmm1
cmovbe eax, ecx
push eax
push 0x20
push 0x59d920
call fcn.004050d0
add esp, 0x20
lea ecx, [edi + 2]
mov byte [0x59d93f], 0
test ecx, ecx
jne 0x40995e
xor esi, esi
jmp 0x4099a9
movzx eax, byte [edi + 0x11]
push eax
movzx eax, byte [edi + 0x10]
push eax
movzx eax, byte [edi + 0xf]
push eax
movzx eax, byte [edi + 0xe]
push eax
movzx eax, byte [edi + 0xd]
push eax
movzx eax, byte [edi + 0xc]
push eax
movzx eax, byte [edi + 0xb]
push eax
movzx eax, byte [edi + 0xa]
push eax
movzx eax, word [edi + 8]
push eax
movzx eax, word [edi + 6]
push eax
push dword [ecx]
push str._08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
push 0x59d940
call fcn.0044ac80
add esp, 0x34
mov esi, 0x59d940
push dword [edi + 0x16]
push dword [edi + 0x12]
push 0
push dword [0x5a3190]
push dword [edi - 0x22]
push dword [edi - 0x26]
call fcn.0050e0a0
push edx
push eax
push dword [edi - 0x1a]
push dword [edi - 0x1e]
push 0x59d920
push esi
push str.__ID:__s_r_n__Size:__s___lli_bytes__r_n__Start_Sector:__lli__Attributes:_0x_016llX
call fcn.0044b0b0
mov ebx, dword [ebp - 0x110c]
add esp, 0x24
push 0
push dword [0x5a3190]
push dword [edi - 0x22]
push dword [edi - 0x26]
call fcn.0050e0a0
cmp dword [0x5a3194], eax
jb 0x409a03
mov dword [0x5a3194], eax
cmp dword [ebp - 0x1118], 0
je 0x409a6e
lea eax, [edi - 0xe]
test eax, eax
je 0x409ab8
lea ecx, [edi - 0xe]
mov edx, 0x52c5d8
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x409a3c
add ecx, 4
add edx, 4
sub esi, 4
jae 0x409a24
mov eax, 1
jmp 0x409a3e
xor eax, eax
test eax, eax
jne 0x409a6e
lea ecx, [edi - 0xe]
mov edx, 0x52c018
lea esi, [eax + 0xc]
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x409a68
add ecx, 4
add edx, 4
sub esi, 4
jae 0x409a50
mov eax, 1
jmp 0x409a6a
xor eax, eax
test eax, eax
je 0x409a7b
dec dword [0x5a31a0]
lea eax, [edi - 0xe]
test eax, eax
je 0x409ab8
lea ecx, [edi - 0xe]
mov edx, 0x52c5e8
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x409aa0
add ecx, 4
add edx, 4
sub esi, 4
jae 0x409a88
mov eax, 1
jmp 0x409aa2
xor eax, eax
mov ecx, dword [ebp - 0x1128]
test eax, eax
mov eax, 1
cmovne ecx, eax
mov dword [ebp - 0x1128], ecx
mov edx, dword [ebp - 0x1114]
add edi, 0x90
mov esi, dword [ebp + 0xc]
inc edx
mov dword [ebp - 0x1114], edx
cmp edx, ebx
jb 0x4096d0
jmp 0x409f2b
mov ecx, dword [ebp - 0x110c]
mov dword [0x5a319c], 0
test ecx, ecx
je 0x409b0a
lea eax, [ebp - 0x10c0]
cmp byte [eax], 0
je 0x409b00
inc dword [0x5a31a0]
add eax, 0x90
sub ecx, 1
jne 0x409af5
cmp byte [ebp - 0x10c0], 0
mov esi, 0x52ad5a
je 0x409b4a
mov eax, dword [ebp - 0x10d8]
or eax, dword [ebp - 0x10d4]
jne 0x409b4a
cmp dword [ebp + 0xc], eax
jne 0x409b3d
push str.Super_Floppy_Disk
push str.Partition_type:_SFD___s__or_unpartitioned
call fcn.0044b0b0
add esp, 8
mov eax, 1
mov dword [ebp - 0x1118], eax
jmp 0x409bb6
mov ebx, dword [ebp + 0xc]
test ebx, ebx
jne 0x409b90
push dword [0x5a31a0]
push str.Partition_type:_MBR__NB_Partitions:__d
call fcn.0044b0b0
mov ecx, dword [ebp - 0x1108]
xor eax, eax
cmp ecx, 0x49464555
sete al
mov dword [0x5a32c0], eax
mov eax, str._UEFI_target_
cmovne eax, esi
push eax
push ecx
push str.Disk_ID:_0x_08X__s
call fcn.0044b0b0
add esp, 0x14
jmp 0x409ba4
xor eax, eax
cmp dword [ebp - 0x1108], 0x49464555
sete al
mov dword [0x5a32c0], eax
push ebx
mov edx, str.Drive
mov ecx, edi
call fcn.00408360
add esp, 4
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x1114], ecx
cmp dword [ebp - 0x110c], ecx
jbe 0x409f31
lea esi, [ebp - 0x10d8]
mov bl, byte [esi + 0x18]
xor edi, edi
mov dword [ebp - 0x1120], edi
test bl, bl
je 0x409f0c
cmp bl, 4
jne 0x409c17
test eax, eax
je 0x409ca2
cmp dword [0x5a3184], edi
jg 0x409f2b
jl 0x409ca2
cmp dword [0x5a3180], 0x1000000
ja 0x409f2b
jmp 0x409ca2
cmp bl, 0xef
jne 0x409ca2
push 1
push dword [0x5a3190]
call fcn.004b6706
mov edi, eax
add esp, 8
test edi, edi
je 0x409c96
push 0
push 0
push dword [esi + 4]
push dword [esi]
push dword [ebp - 0x111c]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x409c8d
push 0
lea eax, [ebp - 0x1124]
push eax
push dword [0x5a3190]
push edi
push dword [ebp - 0x111c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409c8d
push 9
lea eax, [edi + 0x2b]
push str.UEFI_NTFS
push eax
call fcn.004e1a20
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x1120], eax
push edi
call fcn.004d1211
add esp, 4
mov ecx, dword [ebp - 0x1114]
mov edi, dword [ebp - 0x1120]
cmp dword [ebp + 0xc], 0
jne 0x409cd1
test edi, edi
mov edx, 0x52ad5a
mov eax, str.__UEFI:NTFS_
cmove eax, edx
push eax
mov eax, dword [ebp - 0x1118]
xor eax, 1
add eax, ecx
push eax
push str.Partition__d_s:
call fcn.0044b0b0
add esp, 0xc
xor eax, eax
cmp bl, byte [ebp + eax - 0x10]
je 0x409ce1
inc eax
cmp eax, 8
jb 0x409cd3
jmp 0x409ceb
mov dword [ebp - 0x1128], 1
mov edx, dword [ebp - 0x1114]
cmp edx, 0x10
jae 0x409d1d
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [edx*8 + 0x5a31a8], eax
mov eax, dword [esi + 8]
mov dword [edx*8 + 0x5a31ac], ecx
mov ecx, dword [esi + 0xc]
mov dword [edx*8 + 0x5a3228], eax
mov dword [edx*8 + 0x5a322c], ecx
cmp dword [ebp + 0xc], 0
jne 0x409ec9
mov eax, dword [ebp - 0x1118]
test eax, eax
je 0x409d3d
mov dword [ebp - 0x1120], 0
jmp 0x409d4c
movzx eax, bl
mov dword [ebp - 0x1120], eax
mov eax, dword [ebp - 0x1118]
cmp bl, 7
je 0x409d55
test eax, eax
je 0x409d60
mov eax, dword [ebp - 0x113c]
cmp byte [eax], 0
jne 0x409d67
mov cl, bl
call fcn.0040bc50
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov dword [ebp - 0x1134], eax
call fcn.004a9840
movsd xmm1, qword [0x549a90]
xor eax, eax
movsd xmm2, qword [0x549a18]
movsd qword [ebp - 0x1130], xmm0
comisd xmm1, xmm0
ja 0x409daa
mulsd xmm0, xmm2
inc eax
movsd qword [ebp - 0x1130], xmm0
cmp eax, 5
jl 0x409d92
test eax, eax
jne 0x409ddc
push dword [0x552d30]
cvttsd2si eax, xmm0
push 0x52ad5a
push eax
push 0x52ad5a
push str._s_d_s__s
push 0x20
push 0x59d920
call fcn.004050d0
add esp, 0x1c
jmp 0x409e64
push dword [eax*4 + 0x552d30]
fld qword [ebp - 0x1130]
push 0x52ad5a
sub esp, 8
movsd qword [esp], xmm0
mulsd xmm0, qword [0x549a70]
push 0x52ad5a
sub esp, 8
movsd qword [ebp - 0x1148], xmm0
fstp qword [esp]
call fcn.00511880
movsd xmm1, qword [ebp - 0x1148]
add esp, 8
fstp qword [ebp - 0x1130]
movsd xmm0, qword [ebp - 0x1130]
mov ecx, str._s_0.1f_s__s
mulsd xmm0, qword [0x549a70]
mov eax, str._s_0.0f_s__s
subsd xmm1, xmm0
movsd xmm0, qword [0x549a40]
comisd xmm0, xmm1
cmovbe eax, ecx
push eax
push 0x20
push 0x59d920
call fcn.004050d0
add esp, 0x20
cmp byte [esi + 0x19], 0
mov ecx, 0x52b7f0
mov eax, 0x52b7ec
mov byte [0x59d93f], 0
cmove eax, ecx
push eax
push 0
push dword [0x5a3190]
push dword [esi + 4]
push dword [esi]
call fcn.0050e0a0
mov ecx, dword [ebp - 0x111c]
push edx
push eax
push dword [esi + 0xc]
push dword [esi + 8]
push 0x59d920
push dword [esi + 4]
push dword [esi]
call fcn.00408f10
add esp, 8
push eax
push dword [ebp - 0x1120]
push dword [ebp - 0x1134]
push 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.0044b0b0
add esp, 0x28
push 0
push dword [0x5a3190]
push dword [esi + 4]
push dword [esi]
call fcn.0050e0a0
cmp dword [0x5a3194], eax
jb 0x409ee8
mov dword [0x5a3194], eax
cmp bl, 0xea
je 0x409ef1
test edi, edi
je 0x409ef7
dec dword [0x5a31a0]
mov ecx, dword [ebp - 0x1114]
cmp bl, 0xee
jne 0x409f0c
mov dword [0x5a32bc], 1
mov eax, dword [ebp - 0x1118]
inc ecx
add esi, 0x90
mov dword [ebp - 0x1114], ecx
cmp ecx, dword [ebp - 0x110c]
jb 0x409bd0
mov edi, dword [ebp - 0x111c]
test edi, edi
je 0x409f3c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1128]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jne 0x409f81
call fcn.0044b6b0
push eax
push esi
push str.Could_not_get_layout_for_drive_0x_02x:__s
jmp 0x409f79
cmp dword [ebp + 0xc], 0
jne 0x409f81
call fcn.0044b6b0
push eax
push esi
push str.Could_not_get_geometry_for_drive_0x_02x:__s
call fcn.0044b0b0
add esp, 0xc
test edi, edi
je 0x409f8c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a8b60
mov esp, ebp
pop ebp
ret