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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc14
push ebx
push esi
push edi
lea esi, [ebp - 0x2e0]
mov eax, 0x430d8c
call fcn.0040dbb0
push esi
mov esi, 0x4136e3
lea edi, [ebp - 0x3ec]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
pop esi
lea eax, [ebp - 0x3ec]
push eax
push 0
push 0
push 0x1a
push 0
call sub.SHFOLDER.DLL_SHGetFolderPathA
mov word [esi + 0x10], 0x18
mov edx, str.31EE27GTOD4C3KDGOY5MJH
lea eax, [ebp - 0x278]
call fcn.0040dfdc
inc dword [esi + 0x1c]
lea edx, [ebp - 0x278]
mov eax, 0x432b30
call fcn.0040e068
dec dword [esi + 0x1c]
lea eax, [ebp - 0x278]
mov edx, 2
call fcn.0040e040
mov word [esi + 0x10], 0x30
lea edx, [ebp - 0x3ec]
lea eax, [ebp - 4]
call fcn.0040dea4
inc dword [esi + 0x1c]
mov word [esi + 0x10], 0x24
mov word [esi + 0x10], 0x3c
lea eax, [ebp - 0x27c]
call fcn.00402f2c
push eax
inc dword [esi + 0x1c]
cmp dword [ebp - 4], 0
je 0x404018
mov edx, dword [ebp - 4]
mov edx, dword [edx - 4]
jmp 0x40401a
xor edx, edx
lea eax, [ebp - 4]
mov ecx, 1
call fcn.0040e1ac
lea edi, [ebp - 0x27c]
push edi
lea eax, [ebp - 0x280]
mov dl, 0x5c
call fcn.0040454c
inc dword [esi + 0x1c]
lea edx, [ebp - 0x280]
pop eax
call fcn.0040e114
push eax
dec dword [esi + 0x1c]
lea eax, [ebp - 0x280]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x27c]
mov edx, 2
call fcn.0040e040
pop ecx
test cl, cl
je 0x4040ad
mov word [esi + 0x10], 0x48
lea eax, [ebp - 0x284]
mov dl, 0x5c
call fcn.0040454c
inc dword [esi + 0x1c]
lea edx, [ebp - 0x284]
lea eax, [ebp - 4]
call fcn.0040e07c
dec dword [esi + 0x1c]
lea eax, [ebp - 0x284]
mov edx, 2
call fcn.0040e040
mov word [esi + 0x10], 0x54
lea edi, [ebp - 0x274]
xor eax, eax
mov ecx, 0x270
rep stosb byte es:[edi], al
lea eax, [ebp - 0x274]
mov ebx, eax
lea eax, [ebx + 0x14]
call fcn.00402f2c
inc dword [esi + 0x1c]
inc dword [esi + 0x1c]
mov word [esi + 0x10], 0x24
mov word [esi + 0x10], 0x60
lea eax, [ebp - 0x28c]
call fcn.00402f2c
push eax
inc dword [esi + 0x1c]
mov edx, 0x430406
lea eax, [ebp - 0x288]
call fcn.0040dea4
inc dword [esi + 0x1c]
lea edx, [ebp - 0x288]
lea eax, [ebp - 4]
pop ecx
call fcn.0040e090
lea eax, [ebp - 0x28c]
mov eax, dword [eax]
lea ecx, [ebp - 0x274]
mov edx, 0x1ff
call sub.rtl190.bpl__System_Sysutils_FindFirst_qqrx20System_UnicodeStringir26System_Sysutils_TSearchRec
mov ebx, eax
dec dword [esi + 0x1c]
lea eax, [ebp - 0x28c]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x288]
mov edx, 2
call fcn.0040e040
mov word [esi + 0x10], 0x6c
mov edx, 0x43040a
lea eax, [ebp - 0x290]
call fcn.0040dfdc
inc dword [esi + 0x1c]
lea edx, [ebp - 0x290]
mov eax, 0x432b30
call fcn.0040e068
dec dword [esi + 0x1c]
lea eax, [ebp - 0x290]
mov edx, 2
call fcn.0040e040
test ebx, ebx
jne 0x4044ca
test byte [ebp - 0x264], 0x10
je 0x4044b5
mov word [esi + 0x10], 0x78
mov edx, 0x43043c
lea eax, [ebp - 0x294]
call fcn.0040dea4
inc dword [esi + 0x1c]
lea edx, [ebp - 0x294]
lea eax, [ebp - 0x260]
call fcn.0040e114
test al, al
je 0x404234
mov edx, 0x43043e
lea eax, [ebp - 0x298]
call fcn.0040dea4
inc dword [esi + 0x1c]
lea edx, [ebp - 0x298]
lea eax, [ebp - 0x260]
call fcn.0040e114
test al, al
lea eax, [ebp - 0x298]
setne cl
and ecx, 1
mov edx, 2
push ecx
dec dword [esi + 0x1c]
call fcn.0040e040
pop ecx
test ecx, ecx
je 0x404234
cmp dword [ebp - 0x260], 0
je 0x40422d
mov edi, dword [ebp - 0x260]
mov eax, dword [edi - 4]
jmp 0x40422f
xor eax, eax
cmp eax, 5
je 0x404238
xor edx, edx
jmp 0x40423d
mov edx, 1
push edx
dec dword [esi + 0x1c]
lea eax, [ebp - 0x294]
mov edx, 2
call fcn.0040e040
pop ecx
test cl, cl
je 0x4044b5
mov edi, dword [0x4137e7]
lea edx, [ebp - 0x260]
mov dword [ebp - 0x2e8], edi
lea eax, [ebp - 0x29c]
mov di, word [0x4137eb]
mov word [ebp - 0x2e4], di
mov word [esi + 0x10], 0x24
mov word [esi + 0x10], 0x90
call fcn.004045ec
add dword [esi + 0x1c], 2
cmp dword [eax], 0
jne 0x4042a1
mov ebx, 0x430441
jmp 0x4042a3
mov ebx, dword [eax]
xor eax, eax
push esi
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [ebp - 0x2e8]
xchg edi, esi
mov edx, ecx
mov eax, edi
shr ecx, 2
lea eax, [ebp - 0x29c]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, 2
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
sub dword [esi + 0x1c], 2
call fcn.00404598
mov word [esi + 0x10], 0x24
xor edx, edx
lea eax, [ebp - 0x2e8]
mov cl, byte [eax]
mov ebx, 5
mov word [esi + 0x10], 0x24
sub ebx, edx
mov bl, byte [ebp + ebx - 0x2e9]
mov byte [eax], bl
mov ebx, 5
sub ebx, edx
mov byte [ebp + ebx - 0x2e9], cl
inc edx
inc eax
cmp edx, 2
jl 0x4042ec
mov word [esi + 0x10], 0x9c
lea eax, [ebp - 0x2a0]
call fcn.00402f2c
mov ecx, eax
inc dword [esi + 0x1c]
lea edx, [ebp - 0x260]
lea eax, [ebp - 4]
call fcn.0040e090
lea edx, [ebp - 0x2a0]
lea eax, [ebp - 0x2a8]
push edx
call fcn.00402f2c
push eax
inc dword [esi + 0x1c]
mov edx, 0x430442
lea eax, [ebp - 0x2a4]
call fcn.0040dea4
inc dword [esi + 0x1c]
lea edx, [ebp - 0x2a4]
pop ecx
pop eax
call fcn.0040e090
lea edx, [ebp - 0x2a8]
lea eax, [ebp - 0x2b0]
push edx
call fcn.00402f2c
push eax
inc dword [esi + 0x1c]
lea edx, [ebp - 0x2e8]
lea eax, [ebp - 0x2ac]
call fcn.0040dea4
inc dword [esi + 0x1c]
lea edx, [ebp - 0x2ac]
pop ecx
pop eax
call fcn.0040e090
lea edx, [ebp - 0x2b0]
lea eax, [ebp - 0x2b8]
push edx
call fcn.00402f2c
push eax
inc dword [esi + 0x1c]
mov edx, 0x430444
lea eax, [ebp - 0x2b4]
call fcn.0040dea4
inc dword [esi + 0x1c]
lea edx, [ebp - 0x2b4]
pop ecx
pop eax
call fcn.0040e090
lea eax, [ebp - 0x2b8]
mov dl, 1
mov eax, dword [eax]
call sub.rtl190.bpl__System_Sysutils_FileExists_qqrx20System_UnicodeStringo
push eax
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2b8]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2b4]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2b0]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2ac]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2a8]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2a4]
mov edx, 2
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2a0]
mov edx, 2
call fcn.0040e040
pop ecx
test cl, cl
je 0x4044b5
mov eax, 1
mov edx, 2
push eax
lea eax, [ebp - 0x260]
dec dword [esi + 0x1c]
dec dword [esi + 0x1c]
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0040e040
pop eax
mov edx, dword [esi]
mov dword fs:[0], edx
jmp 0x404544
lea eax, [ebp - 0x274]
call sub.rtl190.bpl__System_Sysutils_FindNext_qqrr26System_Sysutils_TSearchRec
mov ebx, eax
test ebx, ebx
je 0x404199
mov word [esi + 0x10], 0xa8
mov edx, str.NT9GAAIEIPR1E19SF3FUS0E0
lea eax, [ebp - 0x2bc]
call fcn.0040dfdc
inc dword [esi + 0x1c]
lea edx, [ebp - 0x2bc]
mov eax, 0x432b30
call fcn.0040e068
dec dword [esi + 0x1c]
lea eax, [ebp - 0x2bc]
mov edx, 2
call fcn.0040e040
lea eax, [ebp - 0x274]
call sub.rtl190.bpl__System_Sysutils_FindClose_qqrr26System_Sysutils_TSearchRec
xor eax, eax
mov edx, 2
push eax
lea eax, [ebp - 0x260]
dec dword [esi + 0x1c]
dec dword [esi + 0x1c]
call fcn.0040e040
dec dword [esi + 0x1c]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0040e040
pop eax
mov edx, dword [esi]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret