Function at 0x405730
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565318
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x5c3678]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x30], edi
call fcn.0040ede0
mov eax, dword [0x5cc90c]
mov edx, dword [eax + 0xc]
mov ecx, 0x5cc90c
call edx
add eax, 0x10
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
push eax
xor ebx, ebx
push str..PhysicalDrive_u
lea edi, [ebp - 0x28]
mov dword [ebp - 4], ebx
call fcn.004235e0
mov ecx, dword [ebp - 0x28]
add esp, 8
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push ecx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405911
push ebx
xor eax, eax
lea edx, [ebp - 0x2c]
push edx
push 8
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x3c]
push eax
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 0x2d1400
push esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4058f9
mov eax, dword [ebp - 0x38]
push 0x5cc9fe
push eax
mov dword [ebp - 0x24], eax
call fcn.0053d8d6
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x4058f9
mov edx, dword [ebp - 0x24]
push edx
push ebx
push edi
call fcn.00544310
mov ecx, dword [ebp - 0x24]
add esp, 0xc
push ebx
lea eax, [ebp - 0x2c]
push eax
push ecx
push edi
push 0xc
lea edx, [ebp - 0x20]
push edx
push 0x2d1400
push esi
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4058f9
mov eax, dword [edi + 0x18]
cmp eax, ebx
je 0x4058f9
cmp eax, dword [ebp - 0x24]
jae 0x4058f9
lea ecx, [eax + edi]
lea eax, [ebp - 0x24]
push eax
call fcn.0040e430
lea ecx, [ebp - 0x24]
push ecx
mov byte [ebp - 4], 1
call fcn.004116c0
push eax
call fcn.00411740
mov edx, dword [ebp - 0x24]
mov eax, edx
lea ecx, [eax + 1]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], ebx
mov byte [ebp - 0x54], bl
mov dword [ebp - 0x34], ecx
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405890
sub eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x58]
push eax
push edx
call fcn.00422b90
mov edx, dword [ebp - 0x30]
push edx
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 2
call fcn.00404c30
add esp, 8
cmp dword [ebp - 0x40], 0x10
jb 0x4058ca
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.0053c152
add esp, 4
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], ebx
mov byte [ebp - 0x54], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4058f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, ebx
je 0x405904
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x405911
push edi
call fcn.0053d6b6
add esp, 4
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + 0x14], ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x28]
setne bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405940
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053c15d
mov esp, ebp
pop ebp
ret