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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da3a4
mov eax, dword fs:[0]
push eax
sub esp, 0x294
mov eax, dword [0x51b170]
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 dword [ebp - 4], 0
mov dword [ebp - 0x26c], 0
mov dword [0x52661c], 0
mov dword [0x526620], 0
call fcn.0041b350
mov dword [0x52661c], eax
push 0x208
lea eax, [ebp - 0x264]
mov dword [ebp - 4], 0
push 0
mov ebx, 1
push eax
mov dword [ebp - 0x26c], ebx
call fcn.004b1bf0
add esp, 0xc
lea eax, [ebp - 0x264]
push eax
push 0
push 0
push 8
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor eax, eax
mov dword [ebp - 0x290], 0
lea ecx, [ebp - 0x264]
mov byte [ebp - 0x28c], 0
mov dword [ebp - 0x288], 0x4fe210
lea edx, [ecx + 2]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ca22
sub ecx, edx
lea eax, [ebp - 0x264]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00417920
lea eax, [ebp - 0x290]
push eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x284]
call fcn.00405160
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40ca98
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ca8e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cdb4
push edx
push ecx
call fcn.00499ae0
add esp, 8
mov ecx, dword [ebp - 0x280]
mov esi, dword [ebp - 0x284]
mov dword [ebp - 0x270], esi
mov dword [ebp - 0x27c], esi
mov dword [ebp - 0x278], ecx
test ecx, ecx
je 0x40cad2
add ecx, 4
mov eax, 1
lock xadd dword [ecx], eax
mov esi, dword [ebp - 0x27c]
mov dword [ebp - 0x270], esi
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x294], 0
mov byte [ebp - 4], 3
nop word [eax + eax]
mov dword [ebp - 0x274], ebx
test esi, esi
je 0x40cd70
cmp dword [esi + 0x28], 0
je 0x40cd70
lea edx, [ebp - 0x290]
mov ecx, esi
call fcn.00405130
test al, al
je 0x40cc22
cmp byte [ebp - 0x28c], 0
jne 0x40cc22
xor eax, eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x28]
push 4
push str..lnk
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], al
call fcn.004180a0
mov byte [ebp - 4], 5
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x40cb9b
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
lea esi, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
add edi, eax
cmp dword [ebp - 0x14], 0x10
cmovae esi, dword [ebp - 0x28]
call fcn.004583a0
push eax
lea eax, [ebp - 0x5c]
push eax
push edi
push esi
call fcn.00457b80
mov esi, dword [ebp - 0x270]
add esp, 0x10
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x40cbd3
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40cbc9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cdb4
push edx
push ecx
call fcn.00499ae0
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 6
or ebx, 2
mov ecx, esi
push eax
mov dword [ebp - 0x26c], ebx
call fcn.004587f0
mov ebx, dword [ebp - 0x274]
lea ecx, [ebp - 0x5c]
push ecx
or ebx, 6
mov ecx, eax
mov dword [ebp - 0x26c], ebx
call fcn.00458420
mov byte [ebp - 0x265], 1
test eax, eax
je 0x40cc29
mov byte [ebp - 0x265], 0
test bl, 4
je 0x40cc85
mov edx, dword [ebp - 0x2c]
and ebx, 0xfffffffb
mov dword [ebp - 0x26c], ebx
cmp edx, 8
jb 0x40cc71
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cc67
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cdb4
push edx
push ecx
call fcn.00499ae0
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 3
test bl, 2
je 0x40ccd4
mov edx, dword [ebp - 0x48]
and ebx, 0xfffffffd
mov dword [ebp - 0x26c], ebx
cmp edx, 8
jb 0x40ccd4
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ccca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cdb4
push edx
push ecx
call fcn.00499ae0
add esp, 8
cmp byte [ebp - 0x265], 0
je 0x40cd4e
mov edx, esi
lea ecx, [ebp - 0x44]
call fcn.0040b3b0
mov byte [ebp - 4], 7
mov al, byte [ebp - 0x2c]
test al, al
je 0x40cd10
lea eax, [ebp - 0x44]
push eax
call fcn.004235f0
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x2a0]
push eax
call fcn.00423670
mov al, byte [ebp - 0x2c]
mov byte [ebp - 4], 3
test al, al
je 0x40cd4e
mov edx, dword [ebp - 0x30]
cmp edx, 8
jb 0x40cd4e
mov ecx, dword [ebp - 0x44]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cd44
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cdb4
push edx
push ecx
call fcn.00499ae0
add esp, 8
lea eax, [ebp - 0x27c]
push 0
push eax
call fcn.00456640
mov esi, dword [ebp - 0x27c]
add esp, 8
mov dword [ebp - 0x270], esi
jmp 0x40caf0
lea ecx, [ebp - 0x294]
call fcn.00403820
lea ecx, [ebp - 0x278]
call fcn.00403820
lea ecx, [ebp - 0x280]
call fcn.00403820
mov eax, 0x52661c
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.004996e8
mov esp, ebp
pop ebp
ret 4
call fcn.004bbc5b
int3