Function at 0x405843
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x420270
call fcn.0041fac0
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
cmp esi, ebx
mov dword [ebp - 0x10], esp
je 0x40589f
mov ecx, esi
mov byte [ebp + 0xf], bl
call fcn.00405811
cmp dword [ebp + 8], ebx
jne 0x405872
xor eax, eax
jmp 0x40587b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp + 8]
mov ecx, esi
push eax
call fcn.00407138
mov eax, dword [esi]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x4058a6
xor al, al
jmp 0x405a33
xor eax, eax
lea edi, [ebp - 0x40]
mov dword [ebp - 0x44], ebx
push ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], ebx
push eax
lea eax, [ebp - 0x44]
push 0x18
push eax
push ebx
push ebx
push 0x70000
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, ebx
je 0x405a27
mov eax, dword [ebp - 0x3c]
push 0xc
mov dword [esi + 0x14], eax
lea eax, [ebp - 0x2c]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov edi, 0xa000
mov dword [ebp - 0x2c], ebx
push edi
mov dword [ebp - 0x28], ebx
mov dword [ebp + 8], ebx
mov dword [ebp - 4], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
or dword [ebp - 4], 0xffffffff
add esp, 0x10
mov dword [ebp + 8], eax
push edi
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push ebx
push eax
push 0x9fff
lea eax, [ebp - 0x2c]
push dword [ebp + 8]
push 0xc
push eax
push 0x2d1400
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4059cd
mov eax, dword [ebp + 8]
mov byte [eax + 0x9fff], bl
mov ecx, dword [ebp + 8]
cmp ecx, ebx
mov dword [ebp - 0x14], ecx
je 0x4059cd
mov eax, dword [ecx + 0x10]
cmp eax, ebx
je 0x40596c
cmp eax, edi
jae 0x40596c
add eax, ecx
lea ecx, [esi + 8]
push eax
call fcn.00406a18
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
cmp eax, ebx
je 0x405988
cmp eax, edi
jae 0x405988
mov ecx, dword [ebp + 8]
add eax, ecx
lea ecx, [esi + 4]
push eax
call fcn.00406a18
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
cmp eax, ebx
je 0x4059a4
cmp eax, edi
jae 0x4059a4
mov ecx, dword [ebp + 8]
add eax, ecx
lea ecx, [esi + 0xc]
push eax
call fcn.00406a18
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x14]
cmp eax, ebx
je 0x4059c0
cmp eax, edi
jae 0x4059c0
mov ecx, dword [ebp + 8]
add eax, ecx
lea ecx, [esi + 0x10]
push eax
call fcn.00406a18
mov eax, dword [ebp - 0x14]
mov byte [ebp + 0xf], 1
mov eax, dword [eax + 0x1c]
mov dword [esi + 0x18], eax
push edi
push ebx
push dword [ebp + 8]
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
push ebx
push eax
push 0x9fff
push dword [ebp + 8]
push ebx
push ebx
push 0x2d0c10
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x405a1e
mov eax, dword [ebp + 8]
mov byte [eax + 0x9fff], bl
lea eax, [ebp + 8]
test eax, eax
je 0x405a1e
lea eax, [ebp + 0x18]
lea ecx, [esi + 4]
push eax
call fcn.00406a18
mov byte [ebp + 0xf], 1
push dword [ebp + 8]
call fcn.0041fa48
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp + 0xf]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8