Function at 0x405175
Capabilities:
Get disk information
Get storage device properties

Disassembly:
push ebp
sub esp, 0xb3c
lea ebp, [esp - 4]
mov eax, dword [0x48f5fc]
xor eax, ebp
mov dword [ebp + 0xb3c], eax
push 0x5c
mov eax, 0x46d46f
call fcn.00452617
mov eax, dword [ebp + 0xb48]
push 9
pop ecx
mov esi, str..PhysicalDriveN
lea edi, [ebp + 0xb0c]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xb4c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xb50]
xor ebx, ebx
mov dword [ebp - 0x20], eax
mov byte [ebp - 0xd], bl
mov word [ebp + 0xb34], 0x20
mov word [ebp + 0xb36], 0x3a
mov word [ebp + 0xb38], 0x5c
mov word [ebp + 0xb3a], bx
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
xor ecx, ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ebx
or edi, 0xffffffff
cmp byte [ebp - 0xd], bl
jne 0x405409
mov edx, dword [ebp - 0x24]
xor eax, eax
inc eax
shl eax, cl
test edx, eax
je 0x4053f9
lea eax, [ebp + 0xb34]
add ecx, 0x41
push eax
mov word [ebp + 0xb34], cx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x40523f
cmp eax, 6
jne 0x4053f9
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push 3
push ebx
add eax, 0x30
inc dword [ebp - 0x14]
push 3
mov word [ebp + 0xb2e], ax
push ebx
lea eax, [ebp + 0xb0c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x4053f9
push 0xc
lea eax, [ebp]
push ebx
push eax
mov dword [ebp - 0x28], ebx
call fcn.0044a540
mov esi, 0x800
push esi
lea eax, [ebp + 0xc]
push ebx
push eax
mov dword [ebp], ebx
mov dword [ebp + 4], ebx
call fcn.0044a540
add esp, 0x18
push ebx
lea eax, [ebp - 0x28]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0xc
lea eax, [ebp]
push eax
push 0x2d1400
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4053ea
mov esi, 0xff
push esi
lea eax, [ebp + 0xa0d]
push ebx
push eax
mov byte [ebp + 0xa0c], bl
call fcn.0044a540
push esi
lea eax, [ebp + 0x80d]
push ebx
push eax
mov byte [ebp + 0x80c], bl
call fcn.0044a540
push esi
lea eax, [ebp + 0x90d]
push ebx
push eax
mov byte [ebp + 0x90c], bl
call fcn.0044a540
mov eax, dword [ebp + 0x1c]
push ebx
lea esi, [ebp + 0x80c]
lea ecx, [ebp + 0xc]
call fcn.00404b67
mov eax, dword [ebp + 0x20]
push ebx
lea esi, [ebp + 0x90c]
lea ecx, [ebp + 0xc]
call fcn.00404b67
mov eax, dword [ebp + 0x24]
push 1
lea esi, [ebp + 0xa0c]
lea ecx, [ebp + 0xc]
call fcn.00404b67
movsx eax, byte [ebp + 0xa0c]
push eax
call fcn.0044b8d9
add esp, 0x34
test eax, eax
jne 0x40535f
movsx eax, byte [ebp + 0xa1f]
push eax
call fcn.0044b8d9
test eax, eax
pop ecx
je 0x4053f0
lea eax, [ebp + 0xa0c]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00409bc1
mov ecx, dword [ebp - 0x30]
push edi
push ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0040981f
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], edi
call fcn.0040974d
lea eax, [ebp + 0x80c]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00409bc1
mov ecx, dword [ebp - 0x2c]
push edi
push ebx
push eax
mov dword [ebp - 4], esi
call fcn.0040981f
push ebx
push esi
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], edi
call fcn.0040974d
lea eax, [ebp + 0x90c]
push eax
lea ecx, [ebp - 0x68]
call fcn.00409bc1
mov ecx, dword [ebp - 0x20]
push edi
push ebx
push eax
mov dword [ebp - 4], 2
call fcn.0040981f
push ebx
push esi
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], edi
call fcn.0040974d
mov byte [ebp - 0xd], 1
jmp 0x4053f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
inc ecx
cmp ecx, 0x20
mov dword [ebp - 0x18], ecx
jl 0x405201
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xb3c]
xor ecx, ebp
call fcn.0044a0e3
add ebp, 0xb40
leave
ret