Function at 0x40fd20
Capabilities:
Get common file path
Get program files directory
Get startup folder

Disassembly:
push 0xffffffffffffffff
push 0x447296
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10c
mov eax, dword [0x45eef8]
push ebp
push esi
push edi
mov esi, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x120], 0
mov dword [esp + 0xc], eax
lea eax, [esp + 0x14]
push 0x104
push eax
mov byte [esp + 0x128], 1
call fcn.0042b6bf
add esp, 8
lea ecx, [esp + 0x14]
push ecx
push 0x45db60
push esi
call fcn.00437677
add esp, 0xc
mov ecx, esi
push 0x45d328
call fcn.004390be
push 0x104
push 0x104
lea ecx, [esp + 0x14]
call fcn.00439112
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
mov eax, dword [edx - 8]
push eax
call fcn.00439112
push eax
lea ecx, [esi + 4]
call fcn.00438e6b
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
push 0x104
lea ecx, [esp + 0x10]
call fcn.00439112
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0xc]
mov eax, dword [eax - 8]
push eax
call fcn.00439112
push eax
lea ecx, [esi + 0x14]
call fcn.00438e6b
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
push 0x104
push 0x104
lea ecx, [esp + 0x14]
call fcn.00439112
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, dword [esp + 0xc]
lea edi, [esi + 0x1c]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0xc]
push eax
call fcn.00439112
push eax
mov ecx, edi
call fcn.00438e6b
push 0x45d328
mov ecx, edi
call fcn.004390be
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
push 0
push 0x26
push 0x104
lea ecx, [esp + 0x18]
call fcn.00439112
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push eax
push 0
call edi
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
lea ebp, [esi + 0x18]
mov eax, dword [edx - 8]
push eax
call fcn.00439112
push eax
mov ecx, ebp
call fcn.00438e6b
push 0x45d328
mov ecx, ebp
call fcn.004390be
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
push 0
push 0x1a
push 0x104
lea ecx, [esp + 0x18]
call fcn.00439112
push eax
push 0
call edi
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0xc]
lea ebp, [esi + 0x24]
mov eax, dword [eax - 8]
push eax
call fcn.00439112
push eax
mov ecx, ebp
call fcn.00438e6b
push 0x45d328
mov ecx, ebp
call fcn.004390be
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
push 0
push 0x23
push 0x104
lea ecx, [esp + 0x18]
call fcn.00439112
push eax
push 0
call edi
mov ecx, dword [esp + 0xc]
lea ebp, [esi + 0x28]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0xc]
push eax
call fcn.00439112
push eax
mov ecx, ebp
call fcn.00438e6b
push 0x45d328
mov ecx, ebp
call fcn.004390be
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
push 0
push 0x28
push 0x104
lea ecx, [esp + 0x18]
call fcn.00439112
push eax
push 0
call edi
mov edx, dword [esp + 0xc]
add esi, 0x20
mov eax, dword [edx - 8]
push eax
lea ecx, [esp + 0x10]
call fcn.00439112
push eax
mov ecx, esi
call fcn.00438e6b
push 0x45d328
mov ecx, esi
call fcn.004390be
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
call fcn.00439161
lea ecx, [esp + 0xc]
mov byte [esp + 0x120], 0
call fcn.00438d2e
lea ecx, [esp + 0x10]
mov dword [esp + 0x120], 0xffffffff
call fcn.00438d2e
mov ecx, dword [esp + 0x118]
pop edi
pop esi
mov al, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x118
ret