Function at 0x407290
Capabilities:
Get disk information
Get disk size
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x430244]
push ebx
push esi
push edi
mov dword [ebp - 0x2ac], eax
mov ebx, 0x41
lea eax, [ebp - 0x29c]
mov dword [ebp - 0x2a4], 0
push eax
push ecx
or esi, 0xffffffff
xor edi, edi
call fcn.0040dea0
test eax, eax
cmove edi, dword [ebp - 0x29c]
push edi
push str.GetPhysicalDriveCount:__d
call fcn.0040c4e0
add esp, 0x10
xor eax, eax
test edi, edi
jle 0x407303
nop
cmp eax, 0x80
jge 0x407303
mov dword [ebp + eax*4 - 0x288], eax
inc eax
cmp eax, edi
jl 0x4072f0
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
push eax
push str.Logical_Drives:_0x_x
mov dword [ebp - 0x298], eax
call fcn.0040c4e0
mov eax, dword [ebp - 0x298]
add esp, 8
test eax, eax
je 0x40738e
test al, 1
je 0x407380
mov ecx, ebx
call fcn.00407150
mov esi, eax
push esi
push ebx
push str._C______d
call fcn.0040c4e0
add esp, 0xc
test esi, esi
js 0x40737a
xor eax, eax
test edi, edi
jle 0x407364
lea ecx, [ecx]
cmp dword [ebp + eax*4 - 0x288], esi
je 0x407360
inc eax
cmp eax, edi
jl 0x407350
jmp 0x407364
cmp eax, edi
jl 0x40737a
push eax
push str.Add_phy_d_to_list
call fcn.0040c4e0
add esp, 8
mov dword [ebp + edi*4 - 0x288], esi
inc edi
mov eax, dword [ebp - 0x298]
inc ebx
shr eax, 1
mov dword [ebp - 0x298], eax
jne 0x407327
or esi, 0xffffffff
xor ecx, ecx
mov dword [ebp - 0x2a8], ecx
test edi, edi
jle 0x4076be
mov eax, dword [ebp - 0x2ac]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0x10
mov dword [ebp - 0x2a0], eax
jmp 0x4073c0
cmp dword [ebp - 0x2a4], 0x80
jae 0x4076be
cmp esi, 0xffffffff
je 0x4073e2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x2a8]
push dword [ebp + ecx*4 - 0x288]
lea eax, [ebp - 0x88]
push str..PhysicalDrive_d
push 0x80
push eax
call fcn.004136cf
add esp, 0x10
lea eax, [ebp - 0x88]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x29c], esi
call ebx
push eax
lea eax, [ebp - 0x88]
push eax
push esi
push str.Create_file_Handle:_p__s_status:_u
call fcn.0040c4e0
add esp, 0x10
cmp esi, 0xffffffff
je 0x4076a9
push 0
lea eax, [ebp - 0x298]
push eax
push 8
lea eax, [ebp - 0x2b8]
push eax
push 0
push 0
push 0x7405c
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x407482
call ebx
push eax
push str.DeviceIoControl_IOCTL_DISK_GET_LENGTH_INFO_failed_error:_u
call fcn.0040c4e0
add esp, 8
jmp 0x4076a9
push dword [ebp - 0x2b4]
push dword [ebp - 0x2b8]
push dword [ebp - 0x2a8]
push str.PHYSICALDRIVE_d_size__llu_bytes
call fcn.0040c4e0
add esp, 0x10
mov dword [ebp - 0x294], 0
lea eax, [ebp - 0x298]
mov dword [ebp - 0x290], 0
push 0
push eax
push 8
lea eax, [ebp - 0x2c0]
push eax
push 0xc
lea eax, [ebp - 0x294]
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4074fb
push dword [ebp - 0x298]
call ebx
push eax
push str.DeviceIoControl1_error:_u_dwBytes:_u
call fcn.0040c4e0
add esp, 0xc
jmp 0x4076a9
mov esi, dword [ebp - 0x2bc]
push esi
cmp esi, 0x28
jae 0x40751f
push str.Invalid_DevDescHeader.Size:_u
call fcn.0040c4e0
mov esi, dword [ebp - 0x29c]
add esp, 8
jmp 0x4076a9
call fcn.00413be0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40754f
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call ebx
push eax
push str.failed_to_malloc_error:_u_len:_u
call fcn.0040c4e0
mov esi, dword [ebp - 0x29c]
add esp, 0xc
jmp 0x4076a9
push 0
lea eax, [ebp - 0x298]
push eax
push esi
mov esi, dword [ebp - 0x29c]
lea eax, [ebp - 0x294]
push ebx
push 0xc
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4075a1
push dword [ebp - 0x298]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeviceIoControl2_error:_u_dwBytes:_u
call fcn.0040c4e0
add esp, 0xc
push ebx
call fcn.00413ba8
add esp, 4
jmp 0x4076a3
mov ecx, dword [ebp - 0x2a0]
mov eax, dword [ebp - 0x2a8]
mov dword [ecx - 0xc], eax
mov eax, dword [ebp - 0x2b8]
mov dword [ecx], eax
mov eax, dword [ebp - 0x2b4]
mov dword [ecx + 4], eax
mov al, byte [ebx + 8]
mov byte [ecx + 8], al
movzx eax, byte [ebx + 0xa]
mov dword [ecx + 0xc], eax
mov eax, dword [ebx + 0x1c]
mov dword [ecx + 0x210], eax
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4075ff
add eax, ebx
lea esi, [ecx + 0x10]
push eax
push 0x80
push esi
call fcn.00413978
add esp, 0xc
mov ecx, esi
call fcn.0040de30
mov ecx, dword [ebp - 0x2a0]
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x407624
add eax, ebx
lea esi, [ecx + 0x90]
push eax
push 0x80
push esi
call fcn.00413978
add esp, 0xc
mov ecx, esi
call fcn.0040de30
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40764f
mov esi, dword [ebp - 0x2a0]
add eax, ebx
push eax
add esi, 0x110
push 0x80
push esi
call fcn.00413978
add esp, 0xc
mov ecx, esi
call fcn.0040de30
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x40767b
mov esi, dword [ebp - 0x2a0]
lea eax, [ecx + ebx]
push eax
add esi, 0x190
push 0x80
push esi
call fcn.00413978
add esp, 0xc
mov ecx, esi
call fcn.0040de30
add dword [ebp - 0x2a0], 0x490
inc dword [ebp - 0x2a4]
push ebx
call fcn.00413ba8
add esp, 4
push dword [ebp - 0x29c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or esi, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x2a8]
inc ecx
mov dword [ebp - 0x2a8], ecx
cmp ecx, edi
jl 0x4073c0
mov eax, dword [ebp - 0x2a4]
test eax, eax
jle 0x40771e
mov edi, dword [ebp - 0x2ac]
mov ebx, eax
add edi, 0x10
mov edx, dword [edi + 4]
lea ecx, [edi + 0x10]
mov esi, dword [edi]
lea eax, [ecx + 0x80]
push eax
push ecx
push edx
push esi
push edx
push esi
call fcn.0040dd80
mov ecx, dword [edi + 0x210]
add esp, 8
push eax
push dword [edi + 0xc]
call fcn.0040dc00
push eax
push dword [edi - 0xc]
push str.PhyDrv:_d_BusType:__4s_Removable:_u_Size:_dGB__llu__Name:_s__s
call fcn.0040c4e0
add esp, 0x24
lea edi, [edi + 0x490]
dec ebx
jne 0x4076d3
mov eax, dword [ebp - 0x2a4]
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov dword [0x430248], eax
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004136c0
mov esp, ebp
pop ebp
ret