Function at 0x1008ae8
Capabilities:
Get common file path
Get disk information
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x101803c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x324], edi
mov eax, edi
test edi, edi
jne 0x1008b14
mov eax, 0x10017b0
push eax
push 0x1002d60
call fcn.0100d383
mov eax, dword [ebp + 8]
shr eax, 3
and al, 1
test byte [ebp + 8], 0x80
pop ecx
pop ecx
mov byte [ebp - 0x318], al
mov ebx, 0x1001a24
mov esi, 0x209
je 0x1008c84
push 0x1002d20
call fcn.0100d383
pop ecx
test edi, edi
jne 0x1008b9a
push esi
lea eax, [ebp - 0x210]
push eax
push 0x1002d14
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x1008b9a
push 0x1002d0c
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
push dword [ebp - 0x318]
lea eax, [ebp - 0x210]
push eax
call fcn.01007ec3
pop ecx
pop ecx
test eax, eax
jne 0x1008b9a
xor al, al
jmp 0x1008dd2
cmp byte [ebp + 0x10], 0
jne 0x1008c84
and dword [ebp - 0x31c], 0
lea eax, [ebp - 0x31c]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne 0x1008c84
lea eax, [ebp - 0x320]
push eax
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x1008c78
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x320]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x1008c66
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x210]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x1008c18
push ebx
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
push 0x1002cf8
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
test edi, edi
je 0x1008c4a
push ebx
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
push edi
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
push dword [ebp - 0x318]
lea eax, [ebp - 0x210]
push eax
call fcn.01007ec3
pop ecx
pop ecx
test eax, eax
je 0x1008b93
mov eax, dword [ebp - 0x31c]
push dword [ebp - 0x320]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x31c]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
test dword [ebp + 8], 0x100
je 0x1008d4e
push 0x1002cb0
call fcn.0100d383
test edi, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
pop ecx
jne 0x1008ce2
push esi
lea eax, [ebp - 0x210]
push eax
call edi
test eax, eax
je 0x1008ce2
push 0x1002d0c
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
push dword [ebp - 0x318]
lea eax, [ebp - 0x210]
push eax
call fcn.01007ec3
pop ecx
pop ecx
test eax, eax
je 0x1008b93
cmp byte [ebp + 0x10], 0
jne 0x1008d4e
push esi
lea eax, [ebp - 0x210]
push eax
call edi
test eax, eax
je 0x1008d4e
push 0x1002ca0
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
cmp dword [ebp - 0x324], 0
je 0x1008d32
push ebx
push esi
lea eax, [ebp - 0x210]
push eax
call fcn.010073d2
push dword [ebp - 0x324]
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.010073d2
push dword [ebp - 0x318]
lea eax, [ebp - 0x210]
push eax
call fcn.01007ec3
pop ecx
pop ecx
test eax, eax
je 0x1008b93
test dword [ebp + 8], 0x200
je 0x1008dd0
push 0x1002c78
call fcn.0100d383
pop ecx
push 0x41
pop edi
mov esi, 0x104
push edi
push 0x1002c70
lea eax, [ebp - 0x314]
push esi
push eax
call fcn.0100742b
add esp, 0x10
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x1008dc7
push 0x1002c64
push edi
push 0x1002c5c
lea eax, [ebp - 0x314]
push esi
push eax
call fcn.0100742b
push dword [ebp - 0x318]
lea eax, [ebp - 0x314]
push eax
call fcn.01007ec3
add esp, 0x1c
test eax, eax
je 0x1008b93
inc edi
lea eax, [edi - 0x41]
cmp eax, 0x1a
jl 0x1008d6a
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100d419
leave
ret