Function at 0x40ef13
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4afdde
mov eax, dword fs:[0]
push eax
sub esp, 0x834
mov eax, dword [0x4ed820]
xor eax, esp
mov dword [esp + 0x82c], eax
push ebx
push edi
mov eax, dword [0x4ed820]
xor eax, esp
push eax
lea eax, [esp + 0x840]
mov dword fs:[0], eax
mov edi, ecx
push str.Setup_DefaultPath
lea ecx, [esp + 0x14]
call fcn.00402953
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x28]
xor ebx, ebx
push eax
mov ecx, edi
mov dword [esp + 0x850], ebx
call fcn.00411c50
mov byte [esp + 0x848], 2
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x40ef91
call fcn.004029ec
cmp dword [esp + 0x2c], ebx
sete al
cmp al, bl
sete al
cmp al, bl
je 0x40efb1
cmp dword [esp + 0x28], ebx
sete al
cmp al, bl
sete al
cmp al, bl
jne 0x40efe7
or dword [esp + 0x848], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00402aa4
mov eax, ebx
mov ecx, dword [esp + 0x840]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [esp + 0x82c]
xor ecx, esp
call fcn.0047021a
mov esp, ebp
pop ebp
ret
mov edi, 0x4f39f8
push edi
lea ecx, [esp + 0x14]
call fcn.004028e9
push edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x84c], 3
call fcn.004028e9
push str.Root
lea ecx, [esp + 0x18]
mov byte [esp + 0x84c], 4
call fcn.00402953
push ebx
lea ecx, [esp + 0x14]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 5
call fcn.00411280
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f04b
call fcn.004029ec
push 0x4cf560
lea ecx, [esp + 0x18]
call fcn.00402953
push ebx
lea ecx, [esp + 0x24]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 6
call fcn.00411280
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f086
call fcn.004029ec
push str.ForceCreateFolder
lea ecx, [esp + 0x18]
call fcn.00402953
push ebx
lea ecx, [esi + 0x160]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 7
call fcn.00411280
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f0c3
call fcn.004029ec
push 0x800
lea eax, [esp + 0x38]
push ebx
push eax
call fcn.004701a0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0x400
lea eax, [esp + 0x38]
call fcn.0040cffc
pop ecx
test eax, eax
jne 0x40f0fd
push 1
push 0x26
lea eax, [esp + 0x3c]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [esp + 0x20]
cmp dword [eax - 0xc], ebx
je 0x40f113
push eax
lea eax, [esp + 0x38]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40f161
push dword [esp + 0x34]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x4c]
mov edi, dword [esi + 0x110]
mov dword [esp + 0x14], eax
mov ecx, edx
shrd eax, ecx, 0x14
mov dword [esp + 0x14], eax
mov eax, edi
cdq
shr ecx, 0x14
cmp ecx, edx
ja 0x40f161
jb 0x40f14a
cmp dword [esp + 0x14], eax
jae 0x40f161
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x54]
movzx eax, ax
cmp ax, bx
je 0x40f161
mov word [esp + 0x34], ax
lea eax, [esp + 0x34]
lea ecx, [esi + 0x15c]
push eax
call fcn.0040285e
push str.CanChange
lea ecx, [esp + 0x18]
mov byte [esp + 0x13], 1
call fcn.00402953
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x17]
mov byte [esp + 0x850], 8
call fcn.00411021
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f1ac
call fcn.004029ec
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x20]
xor eax, eax
cmp byte [esp + 0xf], bl
setne al
add ecx, 0xfffffff0
mov dword [esi + 0x118], eax
call fcn.0040290e
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.0040290e
xor ebx, ebx
inc ebx
jmp 0x40efb1