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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b4a29
mov eax, dword fs:[0]
push eax
sub esp, 0x834
mov eax, dword [0x4f2be0]
xor eax, esp
mov dword [esp + 0x82c], eax
push ebx
push edi
mov eax, dword [0x4f2be0]
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.00402a0f
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.00411d27
mov byte [esp + 0x848], 2
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x40eff1
call fcn.00402aa8
cmp dword [esp + 0x2c], ebx
sete al
cmp al, bl
sete al
cmp al, bl
je 0x40f011
cmp dword [esp + 0x28], ebx
sete al
cmp al, bl
sete al
cmp al, bl
jne 0x40f047
or dword [esp + 0x848], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00402b60
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.00474a8a
mov esp, ebp
pop ebp
ret
mov edi, 0x4f8ce0
push edi
lea ecx, [esp + 0x14]
call fcn.004029af
push edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x84c], 3
call fcn.004029af
push str.Root
lea ecx, [esp + 0x18]
mov byte [esp + 0x84c], 4
call fcn.00402a0f
push ebx
lea ecx, [esp + 0x14]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 5
call fcn.00411357
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f0ab
call fcn.00402aa8
push 0x4d4490
lea ecx, [esp + 0x18]
call fcn.00402a0f
push ebx
lea ecx, [esp + 0x24]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 6
call fcn.00411357
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f0e6
call fcn.00402aa8
push str.ForceCreateFolder
lea ecx, [esp + 0x18]
call fcn.00402a0f
push ebx
lea ecx, [esi + 0x160]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 7
call fcn.00411357
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f123
call fcn.00402aa8
push 0x800
lea eax, [esp + 0x38]
push ebx
push eax
call fcn.00474a10
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0x400
lea eax, [esp + 0x38]
call fcn.0040d067
pop ecx
test eax, eax
jne 0x40f15d
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 0x40f173
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 0x40f1c1
push dword [esp + 0x34]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
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 0x40f1c1
jb 0x40f1aa
cmp dword [esp + 0x14], eax
jae 0x40f1c1
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x58]
movzx eax, ax
cmp ax, bx
je 0x40f1c1
mov word [esp + 0x34], ax
lea eax, [esp + 0x34]
lea ecx, [esi + 0x15c]
push eax
call fcn.004028fb
push str.CanChange
lea ecx, [esp + 0x18]
mov byte [esp + 0x13], 1
call fcn.00402a0f
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x17]
mov byte [esp + 0x850], 8
call fcn.004110f8
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f20c
call fcn.00402aa8
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.004029d4
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.004029d4
xor ebx, ebx
inc ebx
jmp 0x40f011