Function at 0x40a2f0
Capabilities:
Get common file path
Get disk information

Disassembly:
sub esp, 0x450
push esi
push edi
mov edi, dword [esp + 0x460]
test edi, edi
je 0x40a5e0
push ebx
push ebp
lea eax, [esp + 0x260]
push 0x200
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov byte [esp + 0x14], 0xdf
mov dword [esp + 0x18], ecx
mov byte [esp + 0x15], 0x10
mov dword [esp + 0x1c], ecx
mov byte [esp + 0x16], cl
mov byte [esp + 0x17], 2
mov byte [esp + 0x18], cl
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
xor ebx, ebx
test byte [esp + 0x10], 1
je 0x40a545
mov edx, dword [esp + 0x260]
lea esi, [ebx + 0x41]
and edx, 0xff
cmp esi, edx
je 0x40a545
push esi
lea eax, [esp + 0x30]
push str._c:_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 4
je 0x40a545
push esi
lea edx, [esp + 0x44]
push str.._c:
push edx
call sub.MSVCRT.dll_sprintf
lea eax, [esp + 0x40]
lea ecx, [esp + 0x4c]
push eax
push ecx
call fcn.0040b880
add esp, 0x14
test eax, eax
je 0x40a545
test edi, edi
jle 0x40a545
mov edx, dword [esp + 0x464]
mov dword [esp + 0x24], edi
lea ebp, [edx + 0x62c]
mov eax, dword [esp + 0x34]
mov ecx, dword [ebp - 4]
cmp eax, ecx
jne 0x40a529
mov ecx, dword [esp + 0x38]
mov eax, dword [ebp]
cmp ecx, eax
jne 0x40a529
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40a4ce
mov ecx, dword [ebp - 0x40c]
test ecx, ecx
je 0x40a4ca
lea edx, [esp + 0x28]
lea eax, [esp + 0x60]
push edx
push 0x200
push eax
lea ecx, [esp + 0x20]
push 0xc
lea edx, [esp + 0x50]
push ecx
push edx
mov byte [esp + 0x37], 0xec
mov byte [esp + 0x36], 0xa0
call fcn.0040b8f0
add esp, 0x18
test eax, eax
je 0x40a478
mov ecx, 0x200
lea edi, [ebp - 0x404]
lea esi, [esp + 0x60]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40a464
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40a478
lea ecx, [ebp - 0x62c]
lea eax, [ebp - 0x62c]
test ecx, ecx
jne 0x40a4f4
lea edx, [esp + 0x28]
lea eax, [esp + 0x60]
push edx
push 0x200
push eax
lea ecx, [esp + 0x20]
push 0xc
lea edx, [esp + 0x50]
push ecx
push edx
mov byte [esp + 0x36], 0xb0
call fcn.0040b8f0
add esp, 0x18
test eax, eax
je 0x40a50a
mov ecx, 0x200
lea edi, [ebp - 0x204]
lea esi, [esp + 0x60]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40a4be
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40a50a
lea eax, [ebp - 0x624]
jmp 0x40a4f0
test eax, eax
jne 0x40a4ea
mov eax, dword [ebp - 0x40c]
test eax, eax
je 0x40a4e0
lea eax, [ebp - 0x624]
jmp 0x40a4f0
mov dword [ebp - 0x414], 1
lea eax, [ebp - 0x62c]
test eax, eax
je 0x40a50a
cmp byte [eax], 0
je 0x40a501
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a4f9
mov cl, bl
add cl, 0x41
mov byte [eax], cl
jmp 0x40a529
mov cl, byte [ebp - 0x62c]
lea eax, [ebp - 0x62c]
test cl, cl
je 0x40a522
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a51a
mov dl, bl
add dl, 0x41
mov byte [eax], dl
mov eax, dword [esp + 0x24]
add ebp, 0x830
dec eax
mov dword [esp + 0x24], eax
jne 0x40a3df
mov edi, dword [esp + 0x468]
mov ecx, dword [esp + 0x10]
inc ebx
shr ecx, 1
cmp ebx, 0x1a
mov dword [esp + 0x10], ecx
jl 0x40a351
mov esi, dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
call esi
cmp dword [esp + 0x20], eax
je 0x40a59c
test edi, edi
jle 0x40a58d
mov eax, dword [esp + 0x464]
mov ecx, edi
mov ebx, eax
xor edx, edx
mov dword [ebx], edx
mov dword [ebx + 4], edx
lea ebx, [eax + 8]
add eax, 0x830
dec ecx
mov dword [ebx], edx
mov dword [ebx + 4], edx
jne 0x40a574
call esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
jmp 0x40a34f
pop ebp
mov cl, 0x61
test edi, edi
pop ebx
jle 0x40a5e0
mov eax, dword [esp + 0x45c]
mov edx, edi
add eax, 8
lea esi, [eax - 8]
test esi, esi
jne 0x40a5d8
test eax, eax
jne 0x40a5d8
mov esi, dword [eax + 0x210]
test esi, esi
je 0x40a5ca
mov byte [eax - 8], cl
inc cl
mov esi, dword [eax + 0x218]
test esi, esi
je 0x40a5d8
mov byte [eax], cl
inc cl
add eax, 0x830
dec edx
jne 0x40a5b0
pop edi
pop esi
add esp, 0x450
ret