Function at 0x408c7c
Capabilities:
Get common file path
Get startup folder

Disassembly:
mov eax, 0x47d04d
call fcn.0047bf90
sub esp, 0x450
push ebx
push esi
push edi
mov esi, fcn.00409b57
mov dword [ebp - 0x10], esp
push esi
push fcn.00409b1a
push 0x20
lea eax, [ebp - 0x358]
xor edi, edi
push 0x18
push eax
mov dword [ebp - 0x18], edi
call fcn.0047c173
and byte [ebp - 0x19], 0
or dword [ebp - 0x24], 0xffffffff
lea eax, [ebp - 0x45c]
xor ebx, ebx
push eax
push edi
inc ebx
push edi
push 0x25
mov dword [ebp - 4], ebx
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jge 0x408cf8
lea eax, [ebp - 0x50]
push 0x4ae3c0
push eax
call fcn.0042783a
pop ecx
lea eax, [ebp - 0x50]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x45c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberA]
cmp eax, edi
jl 0x408d1a
cmp eax, 0x19
jg 0x408d1a
push eax
call fcn.00409a02
pop ecx
mov dword [ebp - 0x24], eax
jmp 0x408d46
lea eax, [ebp - 0x58]
push 0x4ae3c0
push eax
call fcn.0042783a
pop ecx
lea eax, [ebp - 0x58]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, 0x408d3e
ret
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], ebx
call fcn.00409b1a
cmp dword [ebp - 0x24], 0
mov byte [ebp - 4], 4
jl 0x408ebf
mov eax, dword [ebp + 0xc]
mov byte [eax], bl
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x24]
call fcn.0040901a
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00408c07
test al, al
je 0x408d92
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x3c]
push eax
call fcn.00409b9b
mov dword [ebp - 0x18], ebx
jmp 0x408fbc
xor eax, eax
cmp dword [ebp - 0x28], eax
jl 0x408e83
jg 0x408da8
cmp dword [ebp - 0x2c], eax
jbe 0x408e83
mov dword [ebp - 0x14], eax
lea edi, [ebp - 0x358]
push edi
push dword [ebp - 0x14]
call fcn.0040944f
inc dword [ebp - 0x14]
pop ecx
add edi, 0x18
cmp dword [ebp - 0x14], 0x20
pop ecx
jl 0x408db1
or dword [ebp - 0x48], 0xffffffff
or dword [ebp - 0x44], 0xffffffff
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x358]
mov byte [ebp - 0x19], bl
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
call fcn.00408c07
test al, al
je 0x408e5c
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp - 0x2c]
jne 0x408e5c
mov ecx, dword [eax + 0x14]
cmp ecx, dword [ebp - 0x28]
jne 0x408e5c
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x40], ebx
push ecx
push eax
call fcn.0042b1e2
pop ecx
test al, al
pop ecx
je 0x408e19
mov dword [ebp - 0x40], 2
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x20]
add eax, 4
push eax
call fcn.0042b1e2
pop ecx
test al, al
pop ecx
je 0x408e32
inc dword [ebp - 0x40]
cmp dword [ebp - 0x40], 3
je 0x408f33
cmp dword [ebp - 0x40], 2
jne 0x408e50
cmp dword [ebp - 0x44], 0
jge 0x408e5c
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x44], eax
jmp 0x408e5c
cmp dword [ebp - 0x48], 0
jge 0x408e5c
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x48], eax
inc dword [ebp - 0x14]
add dword [ebp - 0x20], 0x18
cmp dword [ebp - 0x14], 0x20
jl 0x408de0
mov eax, dword [ebp - 0x44]
test eax, eax
jge 0x408f3b
mov eax, dword [ebp - 0x48]
test eax, eax
jge 0x408f3b
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x24]
call fcn.004096f9
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00408c07
test al, al
lea eax, [ebp - 0x3c]
push eax
jne 0x408fb1
push dword [ebp - 0x24]
call fcn.00409575
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00408c07
test al, al
jne 0x408fad
mov eax, dword [ebp + 0xc]
and byte [eax], 0
and dword [ebp + 0xc], 0
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x24]
je 0x408eef
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 0xc]
call fcn.0040901a
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00408c07
test al, al
jne 0x408fad
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x20
jl 0x408ec9
and dword [ebp + 0xc], 0
lea eax, [ebp - 0x358]
mov dword [ebp - 0x20], eax
cmp byte [ebp - 0x19], 0
jne 0x408f18
push dword [ebp - 0x20]
push dword [ebp + 0xc]
call fcn.0040944f
pop ecx
pop ecx
mov ecx, dword [ebp - 0x20]
call fcn.00408c07
test al, al
jne 0x408f38
inc dword [ebp + 0xc]
add dword [ebp - 0x20], 0x18
cmp dword [ebp + 0xc], 0x20
jl 0x408f05
jmp 0x408f47
mov eax, dword [ebp - 0x14]
jmp 0x408f3b
mov eax, dword [ebp + 0xc]
lea eax, [eax + eax*2]
lea eax, [ebp + eax*8 - 0x358]
jmp 0x408fb0
and dword [ebp + 0xc], 0
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x24]
je 0x408f6d
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 0xc]
call fcn.004096f9
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00408c07
test al, al
jne 0x408fad
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x20
jl 0x408f4b
and dword [ebp + 0xc], 0
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x24]
je 0x408f9c
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 0xc]
call fcn.00409575
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00408c07
test al, al
jne 0x408fad
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x20
jl 0x408f7a
lea ecx, [ebp - 0x3c]
call fcn.00408fee
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp + 8]
call fcn.00409b9b
mov dword [ebp - 0x18], ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], bl
call fcn.00409b57
and byte [ebp - 4], 0
push esi
push 0x20
lea eax, [ebp - 0x358]
push 0x18
push eax
call fcn.0047c07f
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret