Function at 0x401680
Capabilities:
Get disk information
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x26c
push ebp
mov ebp, ecx
push esi
push edi
lea edi, [ebp + 4]
mov ecx, 0xa7e2
xor eax, eax
mov dword [esp + 0xc], ebp
rep stosd dword es:[edi], eax
mov ecx, 7
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x27c]
lea esi, [esp + 0x3c]
cmp eax, 1
jne 0x4016ca
xor eax, eax
mov cl, al
add cl, 0x41
mov byte [esi], cl
inc esi
inc eax
cmp eax, 0x1a
jl 0x4016ba
jmp 0x4016ef
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
test eax, eax
jbe 0x4016ef
xor ecx, ecx
mov edx, 1
shl edx, cl
test eax, edx
je 0x4016e9
mov dl, cl
add dl, 0x41
mov byte [esi], dl
inc esi
inc ecx
cmp ecx, 0x1a
jl 0x4016d6
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
xor eax, eax
mov byte [esi], 0
repne scasb al, byte es:[edi]
mov al, byte [esp + 0x3c]
not ecx
dec ecx
test al, al
mov dword [esp + 0x30], ecx
je 0x401a0e
test ecx, ecx
mov dword [esp + 0x20], 0
jle 0x401a0e
push ebx
mov ecx, dword [esp + 0x24]
xor eax, eax
mov dword [esp + 0x28], eax
lea edx, [esp + 0x18]
movsx edi, byte [esp + ecx + 0x40]
push edi
mov dword [esp + 0x30], eax
push 0x408120
push edx
mov dword [esp + 0x3c], eax
lea ebx, [edi - 0x41]
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, ebx
add esp, 0xc
shl eax, 4
add eax, ebx
push 0x64
lea ecx, [esp + 0x1c]
lea eax, [ebx + eax*4]
shl eax, 3
sub eax, ebx
lea esi, [eax + eax*2]
shl esi, 2
lea ebp, [esi + ebp + 0x68]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
mov edx, dword [esp + 0x10]
sub eax, 2
push ebp
mov dword [esi + edx + 0xcc], eax
call fcn.004065b6
mov eax, dword [esp + 0x14]
add esp, 4
lea edx, [esp + 0x18]
mov ecx, dword [esi + eax + 0xcc]
push edi
add ecx, esi
push str._c:_
push edx
mov byte [ecx + eax + 0x68], 0
call dword [sym.imp.USER32.dll_wsprintfA]
push str.FLOPPY
push ebp
call fcn.00401f40
add esp, 0x14
test eax, eax
jne 0x401820
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov edi, dword [esp + 0x10]
mov word [esi + edi + 0xd2], ax
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, edi
call fcn.00401ae0
mov byte [esi + edi + 0xd0], al
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x28]
mov ecx, edi
push edx
push eax
call fcn.00401a40
mov ecx, dword [esp + 0x28]
mov dword [esi + edi + 0xd4], ecx
mov edx, dword [esp + 0x2c]
mov dword [esi + edi + 0xd8], edx
mov eax, dword [esp + 0x30]
mov dword [esi + edi + 0xdc], eax
jmp 0x401824
mov edi, dword [esp + 0x10]
lea edi, [esi + edi + 4]
push 0x64
lea ecx, [esp + 0x1c]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointA]
push edi
call fcn.004065b6
add esp, 4
lea edx, [esp + 0x74]
push 0x104
push str.PlusDriveFsdVolume
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esp + 0x74]
push eax
call fcn.004065b6
lea ecx, [esp + 0x78]
push ecx
push ebp
call fcn.00401f40
add esp, 0xc
test eax, eax
je 0x40191a
push eax
lea edx, [esp + 0x17c]
push str.._s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x178]
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40191a
xor eax, eax
lea ecx, [esp + 0x38]
push eax
push ecx
lea edx, [esp + 0x28]
push 2
push edx
push eax
push eax
push 0x80006168
push edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x58], eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40190f
mov eax, dword [esp + 0x20]
cmp ax, 0x5a
jbe 0x4018ea
add eax, 0xffe0
mov dword [esp + 0x20], eax
and eax, 0xffff
sub eax, 0x41
cmp ebx, eax
jne 0x40190f
mov eax, dword [esp + 0x10]
push 0x64
push ebp
lea ecx, [esi + eax + 0xd0b]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test edi, edi
je 0x40191a
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea edx, [esp + 0x78]
push str.NDVDISK
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esp + 0x74]
push eax
call fcn.004065b6
lea ecx, [esp + 0x78]
push ecx
push ebp
call fcn.00401f40
add esp, 0xc
test eax, eax
je 0x4019f4
push eax
lea edx, [esp + 0x64]
push str.._s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x60]
push 0
push 0x20000000
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4019e9
lea ecx, [esp + 0x3c]
push 0
push ecx
lea edx, [esp + 0x1c]
push 1
push edx
push 0
push 0
push 0x8000600c
push edi
mov byte [esp + 0x34], 0
mov dword [esp + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4019e9
mov al, byte [esp + 0x14]
cmp al, 0x5a
jbe 0x4019c0
add al, 0xe0
mov byte [esp + 0x14], al
mov eax, dword [esp + 0x14]
and eax, 0xff
sub eax, 0x41
cmp ebx, eax
jne 0x4019e9
mov ecx, dword [esp + 0x10]
push 0x64
push ebp
lea edx, [esi + ecx + 0xd0b]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
test edi, edi
je 0x4019f4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x401721
pop ebx
lea esi, [ebp + 4]
mov ecx, ebp
push esi
call fcn.00401c00
push esi
mov ecx, ebp
call fcn.00401db0
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x26c
ret 4