Function at 0x10021f6d
Capabilities:
Get storage device properties

Disassembly:
push ebp
lea ebp, [esp - 0x2c60]
mov eax, 0x2ce0
call fcn.100860f0
mov eax, dword [0x10207390]
xor eax, ebp
mov dword [ebp + 0x2c5c], eax
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ebx
mov esi, 0x2710
push dword [ebp - 0x78]
lea eax, [ebp + 0x285c]
push str..PhysicalDrive_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea eax, [ebp + 0x285c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x7c], eax
je 0x1002221c
push 0xc
lea eax, [ebp + 0x140]
push ebx
push eax
mov dword [ebp - 0x80], ebx
call fcn.10085bc0
push esi
lea eax, [ebp + 0x14c]
push ebx
push eax
mov dword [ebp + 0x140], ebx
mov dword [ebp + 0x144], ebx
call fcn.10085bc0
add esp, 0x18
push ebx
lea eax, [ebp - 0x80]
push eax
push esi
lea eax, [ebp + 0x14c]
push eax
push 0xc
lea eax, [ebp + 0x140]
push eax
push 0x2d1400
push dword [ebp - 0x7c]
call edi
test eax, eax
je 0x10022200
push 0x7f
lea eax, [ebp + 0x2a5d]
push ebx
push eax
mov byte [ebp + 0x2a5c], bl
call fcn.10085bc0
push 0x7f
lea eax, [ebp + 0x2b5d]
push ebx
push eax
mov byte [ebp + 0x2b5c], bl
call fcn.10085bc0
push 0x7f
lea eax, [ebp + 0x2bdd]
push ebx
push eax
mov byte [ebp + 0x2bdc], bl
call fcn.10085bc0
push 0x7f
lea eax, [ebp + 0x2add]
push ebx
push eax
mov byte [ebp + 0x2adc], bl
call fcn.10085bc0
mov ecx, dword [ebp - 0x74]
add esp, 0x30
lea eax, [ebp + 0x2bdc]
push eax
push ebx
push dword [ebp + 0x158]
lea eax, [ebp + 0x14c]
push eax
call fcn.100214d6
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0x2b5c]
push eax
push ebx
push dword [ebp + 0x15c]
lea eax, [ebp + 0x14c]
push eax
call fcn.100214d6
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0x2adc]
push eax
push ebx
push dword [ebp + 0x160]
lea eax, [ebp + 0x14c]
push eax
call fcn.100214d6
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0x2a5c]
push eax
push 1
push dword [ebp + 0x164]
lea eax, [ebp + 0x14c]
push eax
call fcn.100214d6
lea ecx, [ebp - 0x70]
call fcn.10021483
lea eax, [ebp + 0x2bdc]
push eax
call fcn.10084e70
test eax, eax
pop ecx
jbe 0x10022129
lea eax, [ebp + 0x2bdc]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.10086120
pop ecx
pop ecx
lea eax, [ebp + 0x2b5c]
push eax
call fcn.10084e70
test eax, eax
pop ecx
jbe 0x1002214c
lea eax, [ebp + 0x2b5c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.10086130
pop ecx
pop ecx
lea eax, [ebp + 0x2adc]
push eax
lea eax, [ebp + 0xb8]
push eax
call fcn.10086120
lea eax, [ebp + 0x2a5c]
push eax
lea eax, [ebp + 0x38]
push eax
call fcn.10086120
mov ecx, dword [ebp - 0x74]
add esp, 0x10
lea eax, [ebp + 0x38]
push eax
call fcn.10021658
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x48]
push eax
call fcn.10021658
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0xb8]
push eax
call fcn.10021658
push esi
lea eax, [ebp + 0x14c]
push ebx
push eax
call fcn.10085bc0
add esp, 0xc
push ebx
lea eax, [ebp - 0x80]
push eax
push esi
lea eax, [ebp + 0x14c]
push eax
push ebx
push ebx
push 0x700a0
push dword [ebp - 0x7c]
call edi
test eax, eax
je 0x1002221c
cmp dword [ebp + 0x154], 0xc
mov eax, dword [ebp + 0x164]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x168]
mov dword [ebp - 0x6c], eax
mov dword [ebp + 0x138], 2
je 0x100221f2
mov dword [ebp + 0x138], ebx
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
push eax
call fcn.10021e4c
jmp 0x10022213
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.1008b858
pop ecx
pop ecx
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0x78]
cmp dword [ebp - 0x78], 0x10
jl 0x10021fa2
mov ecx, dword [ebp + 0x2c5c]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.1008545e
add ebp, 0x2c60
leave
ret