Function at 0x50615c
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2cd4
call fcn.004bcc80
mov eax, dword [0x5c30d8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
xor esi, esi
push esi
lea eax, [ebp - 0x404]
push str..PhysicalDrive_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x404]
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x506422
and dword [ebp - 0x2cd4], 0
lea eax, [ebp - 0x2b20]
push 0xc
push 0
push eax
call fcn.00507800
xor eax, eax
push 0x2710
push eax
mov dword [ebp - 0x2b20], eax
mov dword [ebp - 0x2b1c], eax
lea eax, [ebp - 0x2b14]
push eax
call fcn.00507800
add esp, 0x18
lea eax, [ebp - 0x2cd4]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2b14]
push eax
push 0xc
lea eax, [ebp - 0x2b20]
push eax
push 0x2d1400
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x506408
push 0x80
lea eax, [ebp - 0x204]
push 0
push eax
call fcn.00507800
push 0x80
lea eax, [ebp - 0x104]
push 0
push eax
call fcn.00507800
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.00507800
push 0x80
lea eax, [ebp - 0x184]
push 0
push eax
call fcn.00507800
add esp, 0x30
lea eax, [ebp - 0x84]
mov ecx, ebx
push eax
push 0
push dword [ebp - 0x2b08]
lea eax, [ebp - 0x2b14]
push eax
call fcn.0050658a
lea eax, [ebp - 0x104]
mov ecx, ebx
push eax
push 0
push dword [ebp - 0x2b04]
lea eax, [ebp - 0x2b14]
push eax
call fcn.0050658a
lea eax, [ebp - 0x184]
mov ecx, ebx
push eax
push 0
push dword [ebp - 0x2b00]
lea eax, [ebp - 0x2b14]
push eax
call fcn.0050658a
lea eax, [ebp - 0x204]
mov ecx, ebx
push eax
push 1
push dword [ebp - 0x2afc]
lea eax, [ebp - 0x2b14]
push eax
call fcn.0050658a
lea ecx, [ebp - 0x2cd0]
call fcn.00505d38
lea eax, [ebp - 0x84]
push eax
call fcn.00518d00
pop ecx
test eax, eax
je 0x506314
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x2ca8]
push eax
call fcn.00518e40
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
call fcn.00518d00
pop ecx
test eax, eax
je 0x50633a
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x2ca8]
push eax
call fcn.00518e50
pop ecx
pop ecx
lea eax, [ebp - 0x184]
push eax
lea eax, [ebp - 0x2ba8]
push eax
call fcn.00518e40
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x2c28]
push eax
call fcn.00518e40
add esp, 0x10
lea eax, [ebp - 0x2c28]
mov ecx, ebx
push eax
call fcn.0050682d
lea eax, [ebp - 0x2ca8]
mov ecx, ebx
push eax
call fcn.0050682d
lea eax, [ebp - 0x2ba8]
mov ecx, ebx
push eax
call fcn.0050682d
push 0x2710
lea eax, [ebp - 0x2b14]
push 0
push eax
call fcn.00507800
add esp, 0xc
lea eax, [ebp - 0x2cd4]
xor ecx, ecx
push ecx
push eax
push 0x2710
lea eax, [ebp - 0x2b14]
push eax
push ecx
push ecx
push 0x700a0
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x506422
mov eax, dword [ebp - 0x2afc]
mov dword [ebp - 0x2cd0], eax
mov eax, dword [ebp - 0x2af8]
mov dword [ebp - 0x2ccc], eax
xor eax, eax
cmp dword [ebp - 0x2b0c], 0xc
push 2
pop ecx
cmove eax, ecx
mov ecx, ebx
mov dword [ebp - 0x2b28], eax
lea eax, [ebp - 0x2cd0]
push eax
call fcn.00505d96
jmp 0x50641b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.004a0030
pop ecx
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, 0x10
jl 0x50617a
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bcc20
mov esp, ebp
pop ebp
ret