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

Disassembly:
sub esp, 0x794
push ebx
mov ebx, dword [esp + 0x79c]
push ebp
mov ebp, dword [esp + 0x7a4]
mov eax, dword [ebp]
push esi
xor esi, esi
cmp eax, esi
push edi
mov edx, ebx
mov dword [esp + 0x18], esi
jbe 0x4013d0
xor eax, eax
mov edi, edx
mov ecx, 0x21
add edx, 0x84
rep stosd dword es:[edi], eax
mov eax, dword [ebp]
inc esi
cmp esi, eax
jb 0x4013b7
lea eax, [esp + 0x43c]
push eax
push 0x80
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [esp + 0x43c], 0
lea esi, [esp + 0x43c]
mov dword [esp + 0x10], esi
je 0x401751
mov ebp, dword [sym.imp.USER32.dll_wsprintfW]
lea edi, [ebx + 0x44]
mov dword [esp + 0x14], edi
jmp 0x401410
mov esi, dword [esp + 0x10]
cmp word [esi], 0x43
jb 0x40172f
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 2
je 0x40142f
cmp eax, 3
jne 0x40172f
xor edx, edx
mov dx, word [esi]
lea ecx, [esp + 0x28]
push ecx
push edx
call fcn.00401230
add esp, 8
test eax, eax
je 0x40172f
push esi
lea eax, [esp + 0x40]
push str.__s
push eax
call ebp
lea ecx, [esp + 0x48]
push ecx
call fcn.00406154
add esp, 0x10
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea edx, [esp + 0x54]
push edx
mov word [esp + eax*2 + 0x56], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x1c], ebx
je 0x40172f
push 0x227
call fcn.00406740
add esp, 4
mov esi, eax
xor eax, eax
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x3c]
push eax
push 0x227
push esi
push 0xc
lea ecx, [esp + 0x40]
push ecx
push 0x2d1400
push ebx
mov dword [esi + 4], 0x227
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x401724
cmp dword [esi + 0x1c], 7
jne 0x401724
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x7a8]
push edx
push eax
push ebx
push ecx
call fcn.004012f0
add esp, 0x10
test eax, eax
jne 0x40172b
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x18], eax
xor eax, eax
mov ax, word [edx]
push eax
call fcn.004066bf
movzx ecx, ax
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x28]
push eax
push ebx
mov dword [esp + ecx*4 + 0x648], ebx
call fcn.00401190
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
push eax
mov dword [edi + 4], ecx
mov byte [edi - 0x44], bl
lea ecx, [esp + 0x50]
xor ebx, ebx
push 0x40e340
push ecx
mov dword [edi], edx
mov word [edi - 0x42], bx
mov word [edi - 0x40], bx
call ebp
lea edx, [esp + 0x58]
push edx
call fcn.00406154
mov word [esp + eax*2 + 0x5a], bx
lea eax, [esp + 0x5c]
push eax
call fcn.00406154
lea ecx, [esp + 0x60]
push ecx
add edi, 8
push edi
mov word [esp + eax*2 + 0x66], bx
call fcn.004066a3
lea edx, [esp + 0x268]
push 0x40e350
push edx
call fcn.004066a3
mov edi, dword [esi + 0xc]
add esp, 0x34
cmp edi, ebx
je 0x401611
cmp byte [edi + esi], 0
je 0x401611
mov al, byte [esi + edi]
test al, al
je 0x4015f9
mov edi, edi
cmp edi, dword [esi + 4]
jae 0x4015f9
movzx eax, al
push eax
lea ecx, [esp + 0x540]
push 0x40e348
push ecx
call ebp
lea edx, [esp + 0x548]
push edx
lea eax, [esp + 0x24c]
push eax
call fcn.00406679
mov al, byte [esi + edi + 1]
add esp, 0x14
inc edi
test al, al
jne 0x4015c0
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x23c]
push ecx
add edx, 0xffffffc2
push edx
call fcn.004066a3
add esp, 8
lea eax, [esp + 0x23c]
push 0x40e350
push eax
call fcn.004066a3
mov edi, dword [esi + 0x10]
add esp, 8
cmp edi, ebx
je 0x401691
cmp byte [edi + esi], 0
je 0x401691
mov al, byte [esi + edi]
test al, al
je 0x401679
lea ebx, [ebx]
cmp edi, dword [esi + 4]
jae 0x401679
movzx ecx, al
push ecx
lea edx, [esp + 0x540]
push 0x40e348
push edx
call ebp
lea eax, [esp + 0x548]
push eax
lea ecx, [esp + 0x24c]
push ecx
call fcn.00406679
mov al, byte [esi + edi + 1]
add esp, 0x14
inc edi
test al, al
jne 0x401640
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x23c]
push edx
add eax, 0xffffffd4
push eax
call fcn.004066a3
add esp, 8
lea ecx, [esp + 0x23c]
push 0x40e350
push ecx
call fcn.004066a3
mov edi, dword [esi + 0x14]
add esp, 8
cmp edi, ebx
je 0x401711
cmp byte [edi + esi], 0
je 0x401711
mov al, byte [esi + edi]
test al, al
je 0x4016f9
lea ebx, [ebx]
cmp edi, dword [esi + 4]
jae 0x4016f9
movzx edx, al
push edx
lea eax, [esp + 0x540]
push 0x40e348
push eax
call ebp
lea ecx, [esp + 0x548]
push ecx
lea edx, [esp + 0x24c]
push edx
call fcn.00406679
mov al, byte [esi + edi + 1]
add esp, 0x14
inc edi
test al, al
jne 0x4016c0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x23c]
push eax
add ecx, 0xfffffff6
push ecx
call fcn.004066a3
add esp, 8
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
add eax, 0x84
mov dword [esp + 0x14], eax
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x10]
push esi
call fcn.00406154
lea esi, [esi + eax*2 + 2]
add esp, 4
cmp word [esi], 0
mov dword [esp + 0x10], esi
jne 0x40140c
mov ebp, dword [esp + 0x7ac]
mov eax, dword [esp + 0x18]
xor edx, edx
test eax, eax
setne dl
pop edi
pop esi
mov dword [ebp], eax
pop ebp
pop ebx
mov eax, edx
add esp, 0x794
ret