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

Disassembly:
sub esp, 0x448
push esi
mov esi, dword [esp + 0x454]
test esi, esi
je 0x40a929
push ebx
push ebp
push edi
lea eax, [esp + 0x258]
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 + 0x24], eax
xor ebx, ebx
test byte [esp + 0x10], 1
je 0x40a862
mov edx, dword [esp + 0x258]
lea eax, [ebx + 0x41]
and edx, 0xff
cmp eax, edx
je 0x40a862
push eax
lea eax, [esp + 0x3c]
push str.._c:
push eax
call sub.MSVCRT.dll_sprintf
lea ecx, [esp + 0x38]
lea edx, [esp + 0x44]
push ecx
push edx
call fcn.0040b880
add esp, 0x14
test eax, eax
je 0x40a862
test esi, esi
jle 0x40a862
mov eax, dword [esp + 0x464]
mov dword [esp + 0x20], esi
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [eax + ecx*2]
mov eax, dword [esp + 0x45c]
shl edx, 4
lea ebp, [edx + eax + 0x62c]
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebp - 4]
cmp ecx, eax
jne 0x40a846
mov edx, dword [esp + 0x30]
mov eax, dword [ebp]
cmp edx, eax
jne 0x40a846
mov eax, dword [ebp - 0x414]
test eax, eax
je 0x40a7eb
mov ecx, dword [ebp - 0x40c]
test ecx, ecx
je 0x40a7e7
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x28]
neg eax
sbb al, al
push ecx
and al, 0xb5
lea edx, [esp + 0x5c]
add al, 0xec
push 0x200
mov byte [esp + 0x27], al
push edx
lea eax, [esp + 0x20]
push 0xc
lea ecx, [esp + 0x48]
push eax
push ecx
mov byte [esp + 0x36], 0xa0
call fcn.0040b8f0
add esp, 0x18
test eax, eax
je 0x40a784
lea edx, [esp + 0x38]
push edx
call fcn.0040bc50
add esp, 4
test eax, eax
je 0x40a784
mov ecx, 0x200
lea edi, [ebp - 0x404]
lea esi, [esp + 0x58]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40a76c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40a784
lea ecx, [ebp - 0x62c]
lea eax, [ebp - 0x62c]
test ecx, ecx
jne 0x40a811
lea edx, [esp + 0x28]
lea eax, [esp + 0x58]
push edx
push 0x200
push eax
lea ecx, [esp + 0x20]
push 0xc
lea edx, [esp + 0x48]
push ecx
push edx
mov byte [esp + 0x36], 0xb0
call fcn.0040b8f0
add esp, 0x18
test eax, eax
je 0x40a827
lea eax, [esp + 0x38]
push eax
call fcn.0040bc50
add esp, 4
test eax, eax
je 0x40a827
mov ecx, 0x200
lea edi, [ebp - 0x204]
lea esi, [esp + 0x58]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40a7db
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40a827
lea eax, [ebp - 0x624]
jmp 0x40a80d
test eax, eax
jne 0x40a807
mov eax, dword [ebp - 0x40c]
test eax, eax
je 0x40a7fd
lea eax, [ebp - 0x624]
jmp 0x40a80d
mov dword [ebp - 0x414], 1
lea eax, [ebp - 0x62c]
test eax, eax
je 0x40a827
cmp byte [eax], 0
je 0x40a81e
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a816
mov cl, bl
add cl, 0x41
mov byte [eax], cl
jmp 0x40a846
mov cl, byte [ebp - 0x62c]
lea eax, [ebp - 0x62c]
test cl, cl
je 0x40a83f
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a837
mov dl, bl
add dl, 0x41
mov byte [eax], dl
mov eax, dword [esp + 0x20]
add ebp, 0x830
dec eax
mov dword [esp + 0x20], eax
jne 0x40a6cc
mov esi, dword [esp + 0x460]
mov ecx, dword [esp + 0x10]
inc ebx
shr ecx, 1
cmp ebx, 0x1a
mov dword [esp + 0x10], ecx
jl 0x40a651
mov edi, dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
call edi
cmp dword [esp + 0x24], eax
je 0x40a8cf
test esi, esi
jle 0x40a8c0
mov eax, dword [esp + 0x464]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea eax, [eax + ecx*2]
mov ecx, dword [esp + 0x45c]
shl eax, 4
add eax, ecx
mov ecx, esi
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 0x40a8a7
call edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x10], eax
jmp 0x40a64f
pop edi
pop ebp
test esi, esi
mov cl, 0x61
pop ebx
jle 0x40a929
mov eax, dword [esp + 0x458]
mov edx, eax
shl edx, 6
add edx, eax
lea eax, [eax + edx*2]
mov edx, dword [esp + 0x450]
shl eax, 4
lea eax, [eax + edx + 8]
mov edx, esi
lea esi, [eax - 8]
test esi, esi
jne 0x40a921
test eax, eax
jne 0x40a921
mov esi, dword [eax + 0x210]
test esi, esi
je 0x40a913
mov byte [eax - 8], cl
inc cl
mov esi, dword [eax + 0x218]
test esi, esi
je 0x40a921
mov byte [eax], cl
inc cl
add eax, 0x830
dec edx
jne 0x40a8f9
pop esi
add esp, 0x448
ret