Function at 0x1004f530
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2d30
call fcn.10071fa0
mov eax, dword [0x100f51d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 0x2d28], eax
test eax, eax
je 0x1004f7ef
mov eax, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
xor edi, edi
mov dword [ebp - 0x2d24], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov dword [ebp - 0x2d10], edi
mov dword [ebp - 0x2d14], ebx
mov dword [ebp - 0x2d30], esi
mov dword [ebp - 0x2d2c], eax
lea esp, [esp]
push ebx
push str..PhysicalDrive_d
lea eax, [ebp - 0x5ec]
push 0x200
push eax
call fcn.10021810
add esp, 0x10
lea eax, [ebp - 0x5ec]
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call esi
mov esi, eax
mov dword [ebp - 0x2d1c], esi
cmp esi, 0xffffffff
je 0x1004f7c6
push 0x2710
lea eax, [ebp - 0x2cfc]
mov dword [ebp - 0x2d20], 0
push 0
push eax
mov dword [ebp - 0x2d00], 0
mov dword [ebp - 0x2d08], 0
mov dword [ebp - 0x2d04], 0
call fcn.10097030
add esp, 0xc
lea eax, [ebp - 0x2d20]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2cfc]
push eax
push 0xc
lea eax, [ebp - 0x2d08]
push eax
push 0x2d1400
push esi
call dword [ebp - 0x2d24]
test eax, eax
je 0x1004f7bb
push 0x3e7
lea eax, [ebp - 0x3eb]
push 0
push eax
call fcn.10097030
mov eax, dword [ebp - 0x2ce4]
add esp, 0xc
mov byte [ebp - 0x3ec], 0
test eax, eax
jle 0x1004f795
lea edi, [ebp - 0x2cfc]
xor bh, bh
xor esi, esi
mov ecx, 1
add edi, eax
mov dword [ebp - 0x2d0c], ecx
mov eax, edi
mov dword [ebp - 0x2d18], eax
mov al, byte [eax]
test al, al
je 0x1004f745
movsx eax, al
push eax
call fcn.100a65b0
mov bl, al
movsx eax, bl
push eax
call fcn.100a6784
add esp, 8
test eax, eax
je 0x1004f6b1
mov bl, 0x30
mov cl, byte [ebp + esi - 0x3ec]
inc bh
shl cl, 4
mov byte [ebp + esi - 0x3ec], cl
lea eax, [ebx - 0x30]
cmp al, 9
jbe 0x1004f6d5
lea eax, [ebx - 0x61]
cmp al, 5
ja 0x1004f70d
lea eax, [ebx - 0x57]
or cl, al
mov byte [ebp + esi - 0x3ec], cl
cmp bh, 2
jne 0x1004f701
test cl, cl
je 0x1004f6f7
movsx eax, cl
push eax
call fcn.100a6755
add esp, 4
test eax, eax
je 0x1004f70d
inc esi
xor bh, bh
mov byte [ebp + esi - 0x3ec], bh
mov eax, dword [ebp - 0x2d18]
inc eax
jmp 0x1004f684
mov dword [ebp - 0x2d0c], 1
xor esi, esi
lea esp, [esp]
mov bl, byte [edi]
test bl, bl
je 0x1004f745
movsx eax, bl
push eax
call fcn.100a6755
add esp, 4
test eax, eax
je 0x1004f741
mov byte [ebp + esi - 0x3ec], bl
inc esi
inc edi
jmp 0x1004f720
xor ebx, ebx
jmp 0x1004f74b
mov ebx, dword [ebp - 0x2d0c]
neg ebx
sbb ebx, ebx
xor edx, edx
and ebx, esi
mov byte [ebp + ebx - 0x3ec], 0
test ebx, ebx
jle 0x1004f783
nop
mov cl, byte [ebp + edx - 0x3ec]
mov al, byte [ebp + edx - 0x3eb]
mov byte [ebp + edx - 0x3ec], al
mov byte [ebp + edx - 0x3eb], cl
add edx, 2
cmp edx, ebx
jl 0x1004f760
mov edi, dword [ebp - 0x2d10]
mov esi, dword [ebp - 0x2d1c]
mov ebx, dword [ebp - 0x2d14]
mov ecx, dword [ebp - 0x2d28]
lea eax, [ebp - 0x3ec]
push eax
mov edx, 0x64
call fcn.1003a940
test eax, eax
jne 0x1004f7bb
mov edi, 1
mov dword [ebp - 0x2d10], edi
push esi
call dword [ebp - 0x2d2c]
test edi, edi
jne 0x1004f7dc
mov esi, dword [ebp - 0x2d30]
inc ebx
mov dword [ebp - 0x2d14], ebx
cmp ebx, 0x10
jl 0x1004f590
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10071699
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.10071699
mov esp, ebp
pop ebp
ret