Function at 0x407ed8
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 3
add esp, 0xfffff004
push eax
dec eax
jne 0x407ee1
mov eax, dword [ebp - 4]
add esp, 0xfffffc0c
xor eax, eax
mov dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], 0xa
and dword [ebp - 0xc], 2
push dword [ebp - 0xc]
push 0x50dc91
call fcn.005004e0
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x10], ecx
push dword [ebp - 0x10]
push 0x50dc9a
lea eax, [ebp - 0x124]
push eax
call sub.USER32.DLL_wsprintfA
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0
lea edx, [ebp - 0x124]
push edx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x408140
xor ecx, ecx
mov dword [ebp - 0x14], ecx
inc dword [ebp - 0xc]
xor dword [ebp - 0xc], 2
push dword [ebp - 0xc]
push 0x50dcae
call fcn.005004e0
add esp, 8
push 0xc
push 0
lea eax, [ebp - 0x130]
push eax
call fcn.004fd9b8
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x130], edx
xor ecx, ecx
mov dword [ebp - 0x12c], ecx
push 0x2710
push 0
lea eax, [ebp - 0x2840]
push eax
call fcn.004fd9b8
add esp, 0xc
push 0
lea edx, [ebp - 0x14]
push edx
push 0x2710
lea ecx, [ebp - 0x2840]
push ecx
push 0xc
lea eax, [ebp - 0x130]
push eax
push 0x2d1400
push dword [ebp - 8]
call sub.KERNEL32.DLL_DeviceIoControl
test eax, eax
je 0x408075
lea edx, [ebp - 0x2840]
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x18]
lea edx, [ebp - 0x2840]
add eax, edx
push eax
call fcn.00407c9c
pop ecx
push eax
lea ecx, [ebp - 0x2c28]
push ecx
call fcn.004fdb40
add esp, 8
mov eax, dword [ebp - 0x18]
mov edx, dword [eax + 0x10]
lea ecx, [ebp - 0x2840]
add edx, ecx
push edx
lea eax, [ebp - 0x3010]
push eax
call fcn.004fdb40
add esp, 8
mov edx, dword [ebp + 8]
cmp byte [edx], 0
jne 0x40807d
movsx ecx, byte [ebp - 0x2c28]
push ecx
call fcn.00502440
pop ecx
test eax, eax
jne 0x408057
movsx eax, byte [ebp - 0x2c15]
push eax
call fcn.00502440
pop ecx
test eax, eax
je 0x40807d
push dword [ebp + 0xc]
lea edx, [ebp - 0x2c28]
push edx
push dword [ebp + 8]
call fcn.004fdd18
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x40807d
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0xc]
xor dword [ebp - 0xc], 2
push dword [ebp - 0xc]
push 0x50dcb7
call fcn.005004e0
add esp, 8
push 0x2710
push 0
lea ecx, [ebp - 0x2840]
push ecx
call fcn.004fd9b8
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
push 0x2710
lea edx, [ebp - 0x2840]
push edx
push 0
push 0
push 0x2d0c10
push dword [ebp - 8]
call sub.KERNEL32.DLL_DeviceIoControl
test eax, eax
je 0x408138
lea ecx, [ebp - 0x2840]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
add eax, 0x10
push eax
lea edx, [ebp - 0x33f8]
push edx
call fcn.004fdb40
add esp, 8
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0
jne 0x408138
movsx eax, byte [ebp - 0x33f8]
push eax
call fcn.00502440
pop ecx
test eax, eax
jne 0x40811c
movsx edx, byte [ebp - 0x33e5]
push edx
call fcn.00502440
pop ecx
test eax, eax
je 0x408138
push dword [ebp + 0xc]
lea ecx, [ebp - 0x33f8]
push ecx
push dword [ebp + 8]
call fcn.004fdd18
add esp, 0xc
mov dword [ebp - 4], 1
push dword [ebp - 8]
call sub.KERNEL32.DLL_CloseHandle
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x10
jl 0x407f1e
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret