Function at 0x40b83d
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
push 0x66c
mov eax, 0x483208
call fcn.0044bb29
mov esi, ecx
push ecx
push 0x493270
push ecx
lea ecx, [ebp - 0x660]
call fcn.0040c93d
push 0x4a7da0
xor ebx, ebx
push 0x4a71e4
mov dword [ebp - 4], ebx
call fcn.0044d439
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x66c]
call fcn.00402ed1
lea eax, [ebp - 0x66c]
mov byte [ebp - 4], 1
mov ecx, dword [esi + 0x68]
push eax
lea eax, [ebp - 0x678]
push eax
call fcn.00417b6f
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x66c]
lea ecx, [ecx - 0x10]
call fcn.00401aec
mov esi, dword [ebp - 0x678]
mov edi, dword [ebp - 0x674]
jmp 0x40b8d7
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 0x54]
push str.InstallPath
push dword [eax]
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40b8db
add esi, 4
cmp esi, edi
jne 0x40b8bc
push ebx
push 0x4a71e0
push 0x4a6dec
push ebx
push dword [esi]
call fcn.0044dd40
mov edi, eax
add esp, 0x14
test edi, edi
je 0x40bafa
lea eax, [ebp - 0x664]
mov ecx, edi
push eax
call fcn.0041b35e
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x664]
cmp dword [eax - 0xc], 0
je 0x40b9d3
push 0x49248c
push eax
call fcn.00459de3
pop ecx
pop ecx
test eax, eax
je 0x40b9d3
push dword [ebp - 0x664]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call ebx
test eax, eax
jne 0x40b96d
push 0x104
lea ecx, [ebp - 0x664]
call fcn.00401c03
push 0x104
lea ecx, [ebp - 0x664]
mov esi, eax
call fcn.00401d22
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push dword [ebp - 0x664]
call ebx
xor ebx, ebx
test eax, eax
jne 0x40b9c1
push 0x208
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.0044cd20
add esp, 0xc
lea eax, [ebp - 0x218]
push ebx
push 0x26
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
call fcn.0045631c
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x664]
call fcn.00401d4a
mov eax, dword [ebp - 0x664]
mov dword [ebp - 0x640], eax
mov byte [ebp - 0x638], bl
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
lea ecx, [ebp - 0x660]
call fcn.0040c724
cmp eax, 1
jne 0x40baec
call fcn.004031a6
mov ecx, eax
call fcn.00401ae9
mov esi, eax
mov edx, 0x493280
mov ecx, esi
call fcn.0041f340
push ebx
or edx, 0xffffffff
mov ecx, esi
call fcn.0041ee90
pop ecx
mov edx, eax
lea ecx, [ebp - 0x66c]
call fcn.00403c5d
push 0xfffffffffffffffe
pop edx
mov ecx, esi
mov byte [ebp - 4], 5
call fcn.0041e600
lea eax, [ebp - 0x42e]
push eax
lea ecx, [ebp - 0x668]
call fcn.00401de7
mov byte [ebp - 4], 6
push dword [ebp - 0x66c]
push dword [ebp - 0x668]
call fcn.0040bd9f
test al, al
jne 0x40bac2
mov eax, dword [ebp - 0x668]
mov edx, dword [eax - 0xc]
lea ecx, [edx - 1]
test ecx, ecx
js 0x40bb40
cmp ecx, edx
jg 0x40bb40
cmp word [eax + ecx*2], 0x5c
je 0x40baad
test ecx, ecx
js 0x40bb40
cmp ecx, edx
jg 0x40bb40
cmp word [eax + ecx*2], 0x2f
je 0x40baad
mov esi, 0x493348
push esi
call fcn.0045631c
pop ecx
push eax
push esi
lea ecx, [ebp - 0x668]
call fcn.0040c811
mov eax, dword [ebp - 0x66c]
lea ecx, [ebp - 0x668]
push dword [eax - 0xc]
push eax
call fcn.0040c811
lea eax, [ebp - 0x668]
mov ecx, edi
push eax
call fcn.0041b1ad
mov ecx, dword [ebp - 0x668]
lea ecx, [ecx - 0x10]
call fcn.00401aec
mov ecx, dword [ebp - 0x66c]
lea ecx, [ecx - 0x10]
call fcn.00401aec
mov ecx, dword [ebp - 0x664]
lea ecx, [ecx - 0x10]
call fcn.00401aec
mov ecx, dword [ebp - 0x678]
test ecx, ecx
je 0x40bb2a
mov eax, dword [ebp - 0x670]
sub eax, ecx
and eax, 0xfffffffc
push eax
push ecx
call fcn.004036ce
pop ecx
pop ecx
mov dword [ebp - 0x678], ebx
mov dword [ebp - 0x674], ebx
mov dword [ebp - 0x670], ebx
push dword [ebp - 0x224]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
call fcn.0044bae4
ret 0x10
push 0x80070057
call fcn.00401d06
int3