Function at 0x40f9c0
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x2ce8
call fcn.00441e50
mov eax, dword [0x569338]
xor eax, esp
mov dword [esp + 0x2ce4], eax
mov eax, dword [esp + 0x2cec]
push ebx
push ebp
mov dword [esp + 0x14], eax
xor ebx, ebx
push esi
xor eax, eax
push edi
mov dword [esp + 0x18], eax
nop
push eax
lea ecx, [esp + 0x3e4]
push 0x560708
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea edx, [esp + 0x3f8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40fcec
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
push 0x2710
mov dword [esp + 0x30], eax
lea eax, [esp + 0x5e4]
push ebx
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.00433df0
add esp, 0xc
push ebx
lea ecx, [esp + 0x18]
push ecx
push 0x2710
lea edx, [esp + 0x5ec]
push edx
push 0xc
lea eax, [esp + 0x38]
push eax
push 0x2d1400
push ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40fcd1
push 0x7f
lea ecx, [esp + 0x365]
push ebx
push ecx
call fcn.00433df0
add esp, 0xc
push 0x7f
lea edx, [esp + 0x265]
push ebx
push edx
call fcn.00433df0
add esp, 0xc
push 0x7f
lea eax, [esp + 0x1e5]
push ebx
push eax
call fcn.00433df0
add esp, 0xc
push 0x7f
lea ecx, [esp + 0x2e5]
push ebx
push ecx
call fcn.00433df0
mov eax, dword [esp + 0x5f8]
add esp, 0xc
cmp eax, ebx
mov byte [esp + 0x1e0], bl
jle 0x40faf8
push ebx
lea edi, [esp + 0x1e4]
lea ecx, [esp + 0x5e4]
call fcn.0040f850
mov eax, dword [esp + 0x5f0]
cmp eax, ebx
mov byte [esp + 0x260], bl
jle 0x40fb1e
push ebx
lea edi, [esp + 0x264]
lea ecx, [esp + 0x5e4]
call fcn.0040f850
mov eax, dword [esp + 0x5f4]
cmp eax, ebx
mov byte [esp + 0x2e0], bl
jle 0x40fb44
push ebx
lea edi, [esp + 0x2e4]
lea ecx, [esp + 0x5e4]
call fcn.0040f850
mov eax, dword [esp + 0x5f8]
cmp eax, ebx
mov byte [esp + 0x360], bl
jle 0x40fb6b
push 1
lea edi, [esp + 0x364]
lea ecx, [esp + 0x5e4]
call fcn.0040f850
lea esi, [esp + 0x30]
call fcn.0040f7a0
lea eax, [esp + 0x1e0]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fb80
sub eax, edx
je 0x40fba2
xor eax, eax
nop
mov cl, byte [esp + eax + 0x1e0]
mov byte [esp + eax + 0x58], cl
add eax, 1
cmp cl, bl
jne 0x40fb90
lea eax, [esp + 0x260]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fbb0
sub eax, edx
je 0x40fbf2
lea eax, [esp + 0x260]
mov edx, eax
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fbc6
lea edi, [esp + 0x58]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
cmp cl, bl
jne 0x40fbd8
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
jmp 0x40fc00
mov cl, byte [esp + eax + 0x2e0]
mov byte [esp + eax + 0x158], cl
add eax, 1
cmp cl, bl
jne 0x40fc00
xor eax, eax
jmp 0x40fc20
mov cl, byte [esp + eax + 0x360]
mov byte [esp + eax + 0xd8], cl
add eax, 1
cmp cl, bl
jne 0x40fc20
lea esi, [esp + 0xd8]
call fcn.0040fe50
lea esi, [esp + 0x58]
call fcn.0040fe50
lea esi, [esp + 0x158]
call fcn.0040fe50
push 0x2710
lea edx, [esp + 0x5e4]
push ebx
push edx
call fcn.00433df0
add esp, 0xc
push ebx
lea eax, [esp + 0x18]
push eax
push 0x2710
lea ecx, [esp + 0x5ec]
push ecx
push ebx
push ebx
push 0x700a0
push ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40fcec
mov edx, dword [esp + 0x5f8]
mov eax, dword [esp + 0x5fc]
xor ecx, ecx
cmp dword [esp + 0x5e8], 0xc
mov dword [esp + 0x30], edx
setne cl
lea edx, [esp + 0x30]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x1c]
push edx
sub ecx, 1
and ecx, 2
mov dword [esp + 0x1dc], ecx
call fcn.004101f0
jmp 0x40fce5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.004304ed
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, 0x10
mov dword [esp + 0x18], eax
jl 0x40f9f0
mov ecx, dword [esp + 0x2cf4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0042d085
add esp, 0x2ce8
ret 4