Function at 0x4058d2
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x41feb0
call fcn.0041f700
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 0x40592e
mov ecx, esi
mov byte [ebp + 0xf], bl
call fcn.004058a0
cmp dword [ebp + 8], ebx
jne 0x405901
xor eax, eax
jmp 0x40590a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push dword [ebp + 8]
mov ecx, esi
push eax
call fcn.00407111
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 0x405935
xor al, al
jmp 0x405ac2
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 0x405ab6
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 0x405a5c
mov eax, dword [ebp + 8]
mov byte [eax + 0x9fff], bl
mov ecx, dword [ebp + 8]
cmp ecx, ebx
mov dword [ebp - 0x14], ecx
je 0x405a5c
mov eax, dword [ecx + 0x10]
cmp eax, ebx
je 0x4059fb
cmp eax, edi
jae 0x4059fb
add eax, ecx
lea ecx, [esi + 8]
push eax
call fcn.004069f1
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
cmp eax, ebx
je 0x405a17
cmp eax, edi
jae 0x405a17
mov ecx, dword [ebp + 8]
add eax, ecx
lea ecx, [esi + 4]
push eax
call fcn.004069f1
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
cmp eax, ebx
je 0x405a33
cmp eax, edi
jae 0x405a33
mov ecx, dword [ebp + 8]
add eax, ecx
lea ecx, [esi + 0xc]
push eax
call fcn.004069f1
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x14]
cmp eax, ebx
je 0x405a4f
cmp eax, edi
jae 0x405a4f
mov ecx, dword [ebp + 8]
add eax, ecx
lea ecx, [esi + 0x10]
push eax
call fcn.004069f1
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 0x405aad
mov eax, dword [ebp + 8]
mov byte [eax + 0x9fff], bl
lea eax, [ebp + 8]
test eax, eax
je 0x405aad
lea eax, [ebp + 0x18]
lea ecx, [esi + 4]
push eax
call fcn.004069f1
mov byte [ebp + 0xf], 1
push dword [ebp + 8]
call fcn.0041f68a
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