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

Disassembly:
push 0x82c
mov eax, 0x48db7f
call fcn.00467830
mov edi, ecx
push str.Setup_DefaultPath
lea ecx, [ebp - 0x81c]
call fcn.004027ab
lea eax, [ebp - 0x81c]
push eax
lea eax, [ebp - 0x838]
xor ebx, ebx
push eax
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.0040607d
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x81c]
cmp ecx, ebx
je 0x4097bc
call fcn.00402844
cmp dword [ebp - 0x830], ebx
sete al
cmp al, bl
sete al
cmp al, bl
je 0x4097e0
cmp dword [ebp - 0x834], ebx
sete al
cmp al, bl
sete al
cmp al, bl
jne 0x4097f7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x838]
call fcn.004028fc
mov eax, ebx
call fcn.004678b3
ret
mov edi, 0x4c4f30
push edi
lea ecx, [ebp - 0x81c]
call fcn.00401ce4
push edi
lea ecx, [ebp - 0x828]
mov byte [ebp - 4], 3
call fcn.00401ce4
push str.Root
lea ecx, [ebp - 0x820]
mov byte [ebp - 4], 4
call fcn.004027ab
push ebx
lea ecx, [ebp - 0x81c]
push ecx
push eax
lea ecx, [ebp - 0x838]
mov byte [ebp - 4], 5
call fcn.0040559b
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x820]
cmp ecx, ebx
je 0x409857
call fcn.00402844
push 0x4a20a0
lea ecx, [ebp - 0x820]
call fcn.004027ab
push ebx
lea ecx, [ebp - 0x828]
push ecx
push eax
lea ecx, [ebp - 0x838]
mov byte [ebp - 4], 6
call fcn.0040559b
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x820]
cmp ecx, ebx
je 0x409892
call fcn.00402844
push str.ForceCreateFolder
lea ecx, [ebp - 0x820]
call fcn.004027ab
push ebx
lea ecx, [esi + 0x178]
push ecx
push eax
lea ecx, [ebp - 0x838]
mov byte [ebp - 4], 7
call fcn.0040559b
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x820]
cmp ecx, ebx
je 0x4098cd
call fcn.00402844
push 0x800
lea eax, [ebp - 0x814]
push ebx
push eax
call fcn.004670a0
mov ecx, dword [ebp - 0x81c]
add esp, 0xc
push 0x400
lea eax, [ebp - 0x814]
call fcn.0040eb5e
pop ecx
test eax, eax
jne 0x40990f
push 1
push 0x26
lea eax, [ebp - 0x814]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [ebp - 0x828]
cmp dword [eax - 0xc], ebx
je 0x409929
push eax
lea eax, [ebp - 0x814]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x409981
push dword [ebp - 0x814]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x4c]
mov edi, dword [esi + 0x128]
mov ecx, edx
mov dword [ebp - 0x820], eax
shrd eax, ecx, 0x14
mov dword [ebp - 0x824], eax
mov eax, edi
cdq
shr ecx, 0x14
cmp ecx, edx
ja 0x409981
jb 0x409968
cmp dword [ebp - 0x824], eax
jae 0x409981
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x54]
movzx eax, ax
cmp ax, bx
je 0x409981
mov word [ebp - 0x814], ax
lea eax, [ebp - 0x814]
lea ecx, [esi + 0x174]
push eax
call fcn.004025eb
push str.CanChange
lea ecx, [ebp - 0x820]
mov byte [ebp - 0x815], 1
call fcn.004027ab
push eax
lea eax, [ebp - 0x838]
push eax
lea ecx, [ebp - 0x815]
mov byte [ebp - 4], 8
call fcn.0040548f
mov ecx, dword [ebp - 0x820]
cmp ecx, ebx
je 0x4099d6
call fcn.00402844
mov dword [ebp - 0x820], ebx
mov ecx, dword [ebp - 0x828]
xor eax, eax
cmp byte [ebp - 0x815], bl
setne al
add ecx, 0xfffffff0
mov dword [esi + 0x130], eax
call fcn.004023e9
mov ecx, dword [ebp - 0x81c]
add ecx, 0xfffffff0
call fcn.004023e9
xor ebx, ebx
inc ebx
jmp 0x4097e0