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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b549f
mov eax, dword fs:[0]
push eax
sub esp, 0x834
mov eax, dword [0x4f3bd0]
xor eax, esp
mov dword [esp + 0x82c], eax
push ebx
push edi
mov eax, dword [0x4f3bd0]
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.0040285b
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.00411cbb
mov byte [esp + 0x848], 2
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
je 0x40ef04
call fcn.004028f4
cmp dword [esp + 0x2c], ebx
sete al
cmp al, bl
sete al
cmp al, bl
je 0x40ef24
cmp dword [esp + 0x28], ebx
sete al
cmp al, bl
sete al
cmp al, bl
jne 0x40ef5a
or dword [esp + 0x848], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.004029ac
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.0047549a
mov esp, ebp
pop ebp
ret
mov edi, 0x4f9e00
push edi
lea ecx, [esp + 0x14]
call fcn.004027fb
push edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x84c], 3
call fcn.004027fb
push str.Root
lea ecx, [esp + 0x18]
mov byte [esp + 0x84c], 4
call fcn.0040285b
push ebx
lea ecx, [esp + 0x14]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 5
call fcn.004112c8
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40efbe
call fcn.004028f4
push 0x4d4830
lea ecx, [esp + 0x18]
call fcn.0040285b
push ebx
lea ecx, [esp + 0x24]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 6
call fcn.004112c8
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40eff9
call fcn.004028f4
push str.ForceCreateFolder
lea ecx, [esp + 0x18]
call fcn.0040285b
push ebx
lea ecx, [esi + 0x160]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x854], 7
call fcn.004112c8
mov byte [esp + 0x848], 4
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f036
call fcn.004028f4
push 0x800
lea eax, [esp + 0x38]
push ebx
push eax
call fcn.00475420
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0x400
lea eax, [esp + 0x38]
call fcn.0040d05e
pop ecx
test eax, eax
jne 0x40f070
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 0x40f086
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 0x40f0d4
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 0x40f0d4
jb 0x40f0bd
cmp dword [esp + 0x14], eax
jae 0x40f0d4
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x58]
movzx eax, ax
cmp ax, bx
je 0x40f0d4
mov word [esp + 0x34], ax
lea eax, [esp + 0x34]
lea ecx, [esi + 0x15c]
push eax
call fcn.00402766
push str.CanChange
lea ecx, [esp + 0x18]
mov byte [esp + 0x13], 1
call fcn.0040285b
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x17]
mov byte [esp + 0x850], 8
call fcn.00411069
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40f11f
call fcn.004028f4
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.00402820
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.00402820
xor ebx, ebx
inc ebx
jmp 0x40ef24