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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43acd7
mov eax, dword fs:[0]
push eax
sub esp, 0x640
mov eax, dword [0x448050]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x644], eax
mov dword [ebp - 0x630], ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 0xc]
mov edx, 0x43f498
mov ecx, eax
lea esp, [esp]
mov si, word [ecx]
cmp si, word [edx]
jne 0x40a0f6
cmp si, bx
je 0x40a0f2
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x40a0f6
add ecx, 4
add edx, 4
cmp si, bx
jne 0x40a0d0
xor ecx, ecx
jmp 0x40a0fb
sbb ecx, ecx
sbb ecx, 0xffffffff
cmp ecx, ebx
sete cl
cmp cl, bl
je 0x40a119
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
jmp 0x40a155
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x40a13e
mov eax, 0x104
lea ecx, [ebp + 0xc]
call fcn.00405330
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x420]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x40a146
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x63c], eax
mov byte [ebp - 4], 1
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x634], eax
mov byte [ebp - 4], 2
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [ebp - 0x62c], eax
lea ecx, [ebp - 0x420]
push ecx
mov byte [ebp - 4], 3
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea edx, [ebp - 0x628]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x40a1c1
lea edx, [ebp - 0x628]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
push ebx
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [0x44c36c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
cmp eax, ebx
jne 0x40a206
call fcn.004054b0
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x638]
push edx
mov ebx, eax
call fcn.00409ce0
add esp, 8
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x638]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x40a316
push ecx
lea eax, [ecx - 0x10]
mov dword [ebp - 0x630], esp
mov esi, esp
call fcn.004054c0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x630]
call fcn.00406d70
add esp, 4
lea edi, [ebp - 0x62c]
mov byte [ebp - 4], 5
call fcn.00405920
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a28c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x62c]
cmp dword [ecx - 0xc], 0
jne 0x40a2ae
push str.__C_263__CC_434
lea edx, [ebp - 0x62c]
push edx
mov ebx, 0x10
call fcn.00405be0
mov eax, dword [0x44c36c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x40a2c7
call fcn.004054b0
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x630]
push edx
mov esi, eax
call fcn.00409b20
add esp, 8
lea edi, [ebp - 0x634]
mov byte [ebp - 4], 6
call fcn.00405920
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a37a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40a37a
mov eax, 0x44c370
lea edi, [ebp - 0x634]
call fcn.00405920
push 0x43f9a4
lea ecx, [ebp - 0x62c]
push ecx
mov ebx, 4
call fcn.00405be0
mov eax, dword [0x44c390]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ebx, [ebp - 0x62c]
call fcn.00405390
push 5
push str.__CC
call fcn.00405390
mov ecx, dword [0x44c384]
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x40a373
push 4
push str.null
jmp 0x40a375
push eax
push ecx
call fcn.00405390
mov edx, dword [ebp - 0x634]
push edx
lea eax, [ebp - 0x218]
push eax
push str._s_s.lnk
lea edi, [ebp - 0x63c]
call fcn.0040b730
mov esi, dword [ebp - 0x62c]
add esp, 8
add esi, 0xfffffff0
mov eax, esi
mov dword [ebp - 0x630], esp
mov edi, esp
call fcn.004054c0
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 7
mov ebx, dword [ebp - 0x63c]
push ecx
add ebx, 0xfffffff0
mov eax, ebx
mov dword [ebp - 0x648], esp
mov edi, esp
call fcn.004054c0
add eax, 0x10
mov dword [edi], eax
push ecx
mov ecx, esp
mov byte [ebp - 4], 8
mov dword [ebp - 0x640], esp
push ecx
lea ecx, [ebp - 0x420]
call fcn.00405cd0
mov byte [ebp - 4], 4
call fcn.00409e20
add esp, 0xc
test eax, eax
je 0x40a413
lea eax, [ebp - 0x634]
mov edi, 0x44c344
call fcn.00405920
cmp dword [0x44c310], 0
jne 0x40a4e5
mov eax, esi
call fcn.004054c0
mov edi, dword [ebp - 0x644]
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x638]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a458
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a475
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x634]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a49b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a4b8
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a4de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x40a7ff
push 0
push 7
lea ecx, [ebp - 0x218]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [0x44c36c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x40a511
call fcn.004054b0
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x630]
push ecx
mov ebx, eax
call fcn.00409ce0
add esp, 8
lea edi, [ebp - 0x638]
mov byte [ebp - 4], 9
call fcn.00405920
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a55e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x638]
cmp dword [eax - 0xc], 0
je 0x40a64b
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x640], esp
mov esi, esp
call fcn.004054c0
add eax, 0x10
mov dword [esi], eax
lea esi, [ebp - 0x630]
call fcn.00406d70
add esp, 4
lea edi, [ebp - 0x62c]
mov byte [ebp - 4], 0xa
call fcn.00405920
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a5c7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x62c]
cmp dword [ecx - 0xc], 0
jne 0x40a5e3
mov edx, str.__C_263__CC_434
lea edi, [ebp - 0x62c]
call fcn.00405c90
mov eax, dword [0x44c36c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
jne 0x40a5fc
call fcn.004054b0
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x630]
push ecx
mov esi, eax
call fcn.00409b20
add esp, 8
lea edi, [ebp - 0x634]
mov byte [ebp - 4], 0xb
call fcn.00405920
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x630]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a6ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40a6ba
mov eax, 0x44c370
lea edi, [ebp - 0x634]
call fcn.00405920
push 0x43f9a4
lea ecx, [ebp - 0x62c]
push ecx
mov ebx, 4
call fcn.00405be0
mov eax, dword [0x44c390]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ebx, [ebp - 0x62c]
call fcn.00405390
push 5
push str.__CC
call fcn.00405390
mov ecx, dword [0x44c384]
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x40a6ad
mov edx, str.null
mov eax, ebx
call fcn.00405450
jmp 0x40a6ba
push eax
push ecx
lea ebx, [ebp - 0x62c]
call fcn.00405390
mov edx, dword [ebp - 0x634]
push edx
lea eax, [ebp - 0x218]
push eax
push str._s_s.lnk
lea edi, [ebp - 0x63c]
call fcn.0040b730
mov esi, dword [ebp - 0x62c]
add esp, 8
add esi, 0xfffffff0
mov eax, esi
mov dword [ebp - 0x640], esp
mov edi, esp
call fcn.004054c0
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 0xc
mov edi, dword [ebp - 0x63c]
push ecx
add edi, 0xfffffff0
mov eax, edi
mov dword [ebp - 0x648], esp
mov ebx, esp
call fcn.004054c0
add eax, 0x10
mov dword [ebx], eax
push ecx
mov ecx, esp
mov dword [ebp - 0x64c], esp
push ecx
lea ecx, [ebp - 0x420]
mov byte [ebp - 4], 0xd
call fcn.00405cd0
mov byte [ebp - 4], 4
call fcn.00409e20
add esp, 0xc
mov eax, esi
call fcn.004054c0
mov ebx, dword [ebp - 0x644]
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x638]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a777
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a794
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x634]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a7ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a7d7
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a7fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00424761
mov esp, ebp
pop ebp
ret