Function at 0x406080
Capabilities:
Enumerate disk volumes
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3a0
mov eax, dword [0x5512ec]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0x394], eax
or esi, 0xffffffff
mov eax, dword [ebp + 0xc]
push 0x80
mov dword [ebp - 0x398], eax
lea eax, [ebp - 0x29c]
push 0
push eax
mov dword [ebp - 0x39c], edx
mov dword [ebp - 0x378], ecx
mov dword [ebp - 0x370], ebx
mov dword [ebp - 0x384], 0
mov dword [ebp - 0x388], 1
mov dword [ebp - 0x368], 0xffffffff
mov dword [ebp - 0x37c], esi
mov dword [ebp - 0x38c], 0
call fcn.004ab0f0
add esp, 0xc
mov dword [ebp - 0x390], 0x10
xor edi, edi
mov dword [ebp - 0x36c], edi
push 4
push 0x10
call fcn.004b6706
add esp, 8
mov dword [ebp - 0x380], eax
test eax, eax
jne 0x406139
push str.Could_not_allocate_string_array
call fcn.0044b0b0
add esp, 4
mov eax, dword [ebp - 0x378]
test eax, eax
js 0x4066b7
cmp eax, 0x80
jb 0x406155
cmp eax, 0xc0
jbe 0x406172
push 0x109
push str.D:_a_rufus_rufus_srcdrive.c
push str._DriveIndex___DRIVE_INDEX_MIN____DriveIndex___DRIVE_INDEX_MAX_
call fcn.004dfbbc
mov eax, dword [ebp - 0x378]
add esp, 0xc
add eax, 0xffffff80
cmp eax, 0x40
ja 0x4066b7
xor eax, eax
mov dword [ebp - 0x374], eax
nop word [eax + eax]
test eax, eax
lea eax, [ebp - 0x114]
push 0x104
push eax
jne 0x4061d1
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeA]
mov dword [ebp - 0x37c], eax
cmp eax, 0xffffffff
jne 0x4061e0
test ebx, ebx
jne 0x4066b7
call fcn.0044b6b0
push eax
push str.Could_not_access_first_GUID_volume:__s
call fcn.0044b0b0
add esp, 8
jmp 0x4066b7
push esi
call dword [sym.imp.KERNEL32.dll_FindNextVolumeA]
test eax, eax
je 0x40660d
lea esi, [ebp - 0x114]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4061f0
sub esi, ecx
cmp esi, 4
ja 0x406215
push 0x11d
push str.D:_a_rufus_rufus_srcdrive.c
push str.len___4
call fcn.004dfbbc
add esp, 0xc
push 4
lea eax, [ebp - 0x114]
push 0x52a618
push eax
call fcn.004e18db
add esp, 0xc
test eax, eax
je 0x406246
push 0x11e
push str.D:_a_rufus_rufus_srcdrive.c
push str.safe_strnicmp_volume_name__volume_start__4___0
call fcn.004dfbbc
add esp, 0xc
cmp byte [ebp + esi - 0x115], 0x5c
lea ebx, [ebp + esi - 0x115]
je 0x40626e
push 0x11f
push str.D:_a_rufus_rufus_srcdrive.c
push str.volume_name_len___1___
call fcn.004dfbbc
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x406289
cmp eax, 3
jne 0x4065d0
dec esi
cmp esi, 0x104
jae 0x40672c
push 0x104
lea eax, [ebp - 0x21c]
mov byte [ebp + esi - 0x114], 0
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
jne 0x4062e8
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x4065d6
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x114]
push eax
push str.Failed_to_get_device_path_for_GUID_volume__s:__s
call fcn.0044b0b0
add esp, 0xc
jmp 0x4065d6
xor esi, esi
nop word [eax + eax]
mov edx, dword [esi*4 + 0x526254]
test edx, edx
jne 0x4062ff
xor ecx, ecx
jmp 0x40630d
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406304
sub ecx, edi
push ecx
push edx
lea eax, [ebp - 0x21c]
push eax
call fcn.004e18db
add esp, 0xc
test eax, eax
je 0x406382
inc esi
cmp esi, 2
jb 0x4062f0
sub esp, 0x18
lea ecx, [ebp - 0x114]
call fcn.0044c1c0
mov esi, eax
add esp, 0x18
mov dword [ebp - 0x368], esi
cmp esi, 0xffffffff
jne 0x4063b0
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x40636a
call fcn.0044b6b0
push eax
lea eax, [ebp - 0x114]
push eax
push str.Could_not_open_GUID_volume__s:__s
call fcn.0044b0b0
add esp, 0xc
mov eax, dword [ebp - 0x374]
mov edi, dword [ebp - 0x36c]
inc eax
mov esi, dword [ebp - 0x37c]
jmp 0x406180
cmp esi, 2
jae 0x406328
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x4063a5
lea eax, [ebp - 0x21c]
push eax
push str.Skipping_GUID_volume_for__s
call fcn.0044b0b0
add esp, 8
mov edi, dword [ebp - 0x36c]
jmp 0x4065d6
push 0
lea eax, [ebp - 0x38c]
push eax
push 0xc8
lea eax, [ebp - 0x364]
push eax
push 0
push 0
push 0x560000
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x406584
cmp dword [ebp - 0x38c], 0
je 0x406584
test esi, esi
je 0x4063fe
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov dword [ebp - 0x368], esi
mov eax, dword [ebp - 0x364]
test eax, eax
jne 0x406431
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x406426
lea eax, [ebp - 0x114]
push eax
push str.Ignoring_volume__s_because_it_has_no_extents...
call fcn.0044b0b0
add esp, 8
mov edi, dword [ebp - 0x36c]
jmp 0x4065dc
cmp eax, 1
je 0x40645f
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x406426
lea eax, [ebp - 0x114]
push eax
push str.Ignoring_volume__s_because_it_has_more_than_one_extent__RAID__...
call fcn.0044b0b0
mov edi, dword [ebp - 0x36c]
add esp, 8
jmp 0x4065dc
mov eax, dword [ebp - 0x378]
mov edi, dword [ebp - 0x36c]
add eax, 0xffffff80
cmp dword [ebp - 0x35c], eax
jne 0x4065c8
cmp edi, 0x10
je 0x4065f9
cmp dword [ebp - 0x39c], 0
je 0x40648f
mov byte [ebx], 0x5c
mov ebx, dword [ebp - 0x380]
mov eax, dword [ebp - 0x354]
mov ecx, dword [ebp - 0x350]
mov dword [ebp + edi*8 - 0x29c], eax
mov dword [ebp + edi*8 - 0x298], ecx
test ebx, ebx
je 0x406524
mov eax, dword [ebp - 0x390]
cmp edi, eax
jne 0x4064f8
add eax, eax
mov esi, ebx
mov dword [ebp - 0x390], eax
shl eax, 2
push eax
push ebx
call fcn.004b70e5
mov ebx, eax
add esp, 8
mov dword [ebp - 0x380], ebx
test ebx, ebx
jne 0x4064f8
push esi
call fcn.004d1211
add esp, 4
push str.Could_not_reallocate_string_array
call fcn.0044b0b0
add esp, 4
jmp 0x406524
lea eax, [ebp - 0x114]
push eax
call fcn.004e03cf
add esp, 4
mov dword [ebx + edi*4], eax
test eax, eax
jne 0x40651d
push str.Could_not_store_string_in_array
call fcn.0044b0b0
add esp, 4
jmp 0x406524
inc edi
mov dword [ebp - 0x36c], edi
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x4065d6
cmp dword [ebp - 0x388], ebx
je 0x406559
mov dword [ebp - 0x388], ebx
cmp dword [0x5a29d4], ebx
je 0x4065d6
push str.Windows_volumes_from_this_device:
call fcn.0044b0b0
add esp, 4
cmp dword [0x5a29d4], 0
je 0x4065d6
push dword [ebp - 0x350]
lea eax, [ebp - 0x114]
push dword [ebp - 0x354]
push eax
push str.__s___lld
call fcn.0044b0b0
add esp, 0x10
jmp 0x4065d6
mov ebx, dword [ebp - 0x370]
test ebx, ebx
jne 0x4065ac
test eax, eax
je 0x406599
mov eax, str._empty_data_
jmp 0x40659e
call fcn.0044b6b0
push eax
push str.Could_not_get_Disk_Extents:__s
call fcn.0044b0b0
add esp, 8
test esi, esi
je 0x4065c0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov dword [ebp - 0x368], esi
mov edi, dword [ebp - 0x36c]
jmp 0x4065dc
mov ebx, dword [ebp - 0x370]
jmp 0x4065dc
mov ebx, dword [ebp - 0x370]
mov esi, dword [ebp - 0x368]
mov eax, dword [ebp - 0x374]
inc eax
mov dword [ebp - 0x374], eax
cmp esi, 0xffffffff
jne 0x40662f
mov esi, dword [ebp - 0x37c]
jmp 0x406190
push 0x10
push str.Error:_Trying_to_process_a_disk_with_more_than__d_partitions_
call fcn.0044b0b0
add esp, 8
jmp 0x4066a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x40662f
test ebx, ebx
jne 0x40662f
call fcn.0044b6b0
push eax
push str.Could_not_access_next_GUID_volume:__s
call fcn.0044b0b0
add esp, 8
test edi, edi
je 0x4066a5
mov edx, dword [ebp - 0x394]
xor ecx, ecx
mov esi, dword [ebp - 0x398]
mov eax, edx
or eax, esi
je 0x406706
cmp edx, dword [ebp + ecx*8 - 0x29c]
jne 0x406661
cmp esi, dword [ebp + ecx*8 - 0x298]
je 0x4066fe
inc ecx
cmp ecx, edi
jb 0x40664b
mov ecx, dword [ebp - 0x378]
push ebx
push esi
push edx
mov edx, dword [ebp - 0x39c]
call fcn.00406740
mov ecx, eax
add esp, 0xc
mov dword [ebp - 0x384], ecx
test ecx, ecx
je 0x4066a5
push 0x20
push ecx
call fcn.004aa320
add esp, 8
test eax, eax
je 0x4066a5
push str.Warning:_Using_physical_device_to_access_partition_data
call fcn.0044b0b0
add esp, 4
mov eax, dword [ebp - 0x37c]
cmp eax, 0xffffffff
je 0x4066b7
push eax
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
mov ebx, dword [ebp - 0x380]
test ebx, ebx
je 0x4066de
xor esi, esi
test edi, edi
je 0x4066de
push dword [ebx + esi*4]
call fcn.004d1211
mov dword [ebx + esi*4], 0
add esp, 4
inc esi
cmp esi, edi
jb 0x4066c7
push ebx
call fcn.004d1211
mov ecx, dword [ebp - 8]
add esp, 4
mov eax, dword [ebp - 0x384]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004a8b60
mov esp, ebp
pop ebp
ret
cmp ecx, edi
jae 0x406666
mov eax, dword [ebp - 0x380]
mov eax, dword [eax + ecx*4]
test eax, eax
jne 0x40671b
mov dword [ebp - 0x384], eax
jmp 0x4066a5
push eax
call fcn.004e03cf
mov dword [ebp - 0x384], eax
jmp 0x4066a2
call fcn.004a8c90
int3