Function at 0x10021bf2
Capabilities:
Get storage device properties

Disassembly:
push ebp
lea ebp, [esp - 0x2c60]
mov eax, 0x2ce0
call fcn.10076ab0
mov eax, dword [0x101f1dd0]
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 0x10021ea1
push 0xc
lea eax, [ebp + 0x140]
push ebx
push eax
mov dword [ebp - 0x80], ebx
call fcn.10076580
push esi
lea eax, [ebp + 0x14c]
push ebx
push eax
mov dword [ebp + 0x140], ebx
mov dword [ebp + 0x144], ebx
call fcn.10076580
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 0x10021e85
push 0x7f
lea eax, [ebp + 0x2a5d]
push ebx
push eax
mov byte [ebp + 0x2a5c], bl
call fcn.10076580
push 0x7f
lea eax, [ebp + 0x2b5d]
push ebx
push eax
mov byte [ebp + 0x2b5c], bl
call fcn.10076580
push 0x7f
lea eax, [ebp + 0x2bdd]
push ebx
push eax
mov byte [ebp + 0x2bdc], bl
call fcn.10076580
push 0x7f
lea eax, [ebp + 0x2add]
push ebx
push eax
mov byte [ebp + 0x2adc], bl
call fcn.10076580
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.1002113c
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.1002113c
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.1002113c
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.1002113c
lea ecx, [ebp - 0x70]
call fcn.100210e9
lea eax, [ebp + 0x2bdc]
push eax
call fcn.100757d0
test eax, eax
pop ecx
jbe 0x10021dae
lea eax, [ebp + 0x2bdc]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.10076ae0
pop ecx
pop ecx
lea eax, [ebp + 0x2b5c]
push eax
call fcn.100757d0
test eax, eax
pop ecx
jbe 0x10021dd1
lea eax, [ebp + 0x2b5c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.10076af0
pop ecx
pop ecx
lea eax, [ebp + 0x2adc]
push eax
lea eax, [ebp + 0xb8]
push eax
call fcn.10076ae0
lea eax, [ebp + 0x2a5c]
push eax
lea eax, [ebp + 0x38]
push eax
call fcn.10076ae0
mov ecx, dword [ebp - 0x74]
add esp, 0x10
lea eax, [ebp + 0x38]
push eax
call fcn.100212be
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x48]
push eax
call fcn.100212be
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0xb8]
push eax
call fcn.100212be
push esi
lea eax, [ebp + 0x14c]
push ebx
push eax
call fcn.10076580
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 0x10021ea1
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 0x10021e77
mov dword [ebp + 0x138], ebx
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
push eax
call fcn.10021ad1
jmp 0x10021e98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.1007bd58
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 0x10021c27
mov ecx, dword [ebp + 0x2c5c]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.10075e13
add ebp, 0x2c60
leave
ret