Function at 0x408054
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 3
add esp, 0xfffff004
push eax
dec eax
jne 0x40805d
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], 9
xor dword [ebp - 0xc], 0x85
mov ecx, dword [ebp - 0xc]
lea ecx, [ecx + ecx*2]
mov dword [ebp - 0xc], ecx
inc dword [ebp - 0xc]
push dword [ebp - 0xc]
push 0x510c91
call fcn.00503370
add esp, 8
xor eax, eax
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push 0x510c9a
lea edx, [ebp - 0x124]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0
lea ecx, [ebp - 0x124]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x4082db
xor eax, eax
mov dword [ebp - 0x14], eax
shl dword [ebp - 0xc], 6
inc dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
add edx, edx
mov dword [ebp - 0xc], edx
push dword [ebp - 0xc]
push 0x510cae
call fcn.00503370
add esp, 8
push 0xc
push 0
lea ecx, [ebp - 0x130]
push ecx
call fcn.00500848
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x130], eax
xor edx, edx
mov dword [ebp - 0x12c], edx
push 0x2710
push 0
lea ecx, [ebp - 0x2840]
push ecx
call fcn.00500848
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
push 0x2710
lea edx, [ebp - 0x2840]
push edx
push 0xc
lea ecx, [ebp - 0x130]
push ecx
push 0x2d1400
push dword [ebp - 8]
call sub.KERNEL32.DLL_DeviceIoControl
test eax, eax
je 0x408208
lea eax, [ebp - 0x2840]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
mov ecx, dword [edx + 0x18]
lea eax, [ebp - 0x2840]
add ecx, eax
push ecx
call fcn.00407e00
pop ecx
push eax
lea edx, [ebp - 0x2c28]
push edx
call fcn.005009d0
add esp, 8
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x10]
lea edx, [ebp - 0x2840]
add eax, edx
push eax
lea ecx, [ebp - 0x3010]
push ecx
call fcn.005009d0
add esp, 8
mov eax, dword [ebp + 8]
cmp byte [eax], 0
jne 0x408210
movsx edx, byte [ebp - 0x2c28]
push edx
call fcn.005052d0
pop ecx
test eax, eax
jne 0x4081ea
movsx ecx, byte [ebp - 0x2c15]
push ecx
call fcn.005052d0
pop ecx
test eax, eax
je 0x408210
push dword [ebp + 0xc]
lea eax, [ebp - 0x2c28]
push eax
push dword [ebp + 8]
call fcn.00500ba8
add esp, 0xc
mov dword [ebp - 4], 1
jmp 0x408210
call sub.KERNEL32.DLL_GetLastError
mov dword [ebp - 0x1c], eax
shl dword [ebp - 0xc], 6
inc dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
add edx, edx
mov dword [ebp - 0xc], edx
push dword [ebp - 0xc]
push 0x510cb7
call fcn.00503370
add esp, 8
push 0x2710
push 0
lea ecx, [ebp - 0x2840]
push ecx
call fcn.00500848
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 0x4082d3
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.005009d0
add esp, 8
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0
jne 0x4082d3
movsx eax, byte [ebp - 0x33f8]
push eax
call fcn.005052d0
pop ecx
test eax, eax
jne 0x4082b7
movsx edx, byte [ebp - 0x33e5]
push edx
call fcn.005052d0
pop ecx
test eax, eax
je 0x4082d3
push dword [ebp + 0xc]
lea ecx, [ebp - 0x33f8]
push ecx
push dword [ebp + 8]
call fcn.00500ba8
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 0x4080a9
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret