Function at 0x4104e0
Capabilities:
Get common file path
Get program files directory
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58b181
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x5ef60c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 1
call fcn.0045e972
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x410530
push 0x80004005
call fcn.00401fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0x10], ebx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.00469934
lea esi, [ebp + 0xc]
mov byte [ebp - 4], 3
call fcn.00410120
call fcn.0045e972
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x410571
push 0x80004005
call fcn.00401fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
push 0
mov byte [ebp - 4], 4
mov ecx, dword [ebp + 0xc]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
jle 0x410879
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4105b9
push edi
lea ecx, [ebp - 0x18]
call fcn.00401de0
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
push edi
push esi
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.005581e8
add esp, 8
test eax, eax
jl 0x41086f
cmp eax, dword [esi - 8]
jg 0x41086f
xor ecx, ecx
push ecx
lea edi, [esi - 0x10]
mov dword [esi - 0xc], eax
mov dword [ebp - 0x24], esp
mov ebx, esp
push edi
mov word [esi + eax*2], cx
call fcn.00401ff0
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 5
mov ecx, esp
mov dword [ebp - 0x14], esp
push str.VerInfo.esi
call fcn.00401a30
lea edx, [ebp - 0x1c]
push edx
mov byte [ebp - 4], 4
call fcn.0040fe90
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.00401f40
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410653
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x4106c1
push ecx
mov dword [ebp - 0x24], esp
mov ebx, esp
push edi
call fcn.00401ff0
add eax, 0x10
mov dword [ebx], eax
mov byte [ebp - 4], 7
mov ecx, esp
mov dword [ebp - 0x14], esp
push str..esi
call fcn.00401a30
lea edx, [ebp - 0x1c]
push edx
mov byte [ebp - 4], 4
call fcn.0040fe90
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.00401f40
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4106c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jne 0x41083b
call fcn.0040fe50
test eax, eax
je 0x41083b
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0
jl 0x41083b
push str._ProgramFiles_
push eax
call fcn.005592d8
add esp, 8
test eax, eax
je 0x41083b
sub eax, dword [ebp + 0xc]
sar eax, 1
cmp eax, 0xffffffff
je 0x41083b
lea ecx, [ebp - 0x18]
call fcn.00401ca0
lea edx, [ebp - 0x1c]
push edx
mov dword [ebp - 0x1c], 0
call fcn.00410ae0
add esp, 4
test eax, eax
je 0x410838
lea ecx, [ebp - 0x14]
call fcn.00401c70
push 0
push 0x26
mov bl, 9
push 0x104
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.00401e30
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.00405fb0
push 0x5b95a8
push str.__x86_
lea ecx, [ebp - 0x14]
call fcn.00407df0
mov eax, dword [ebp - 0x14]
push eax
push str._ProgramFiles_
lea ecx, [ebp + 0xc]
call fcn.00407df0
push ecx
lea edx, [ebp + 0xc]
mov ecx, esp
mov dword [ebp - 0x28], esp
push edx
call fcn.00402060
push ecx
mov byte [ebp - 4], 0xa
mov ecx, esp
mov dword [ebp - 0x2c], esp
push str.VerInfo.esi
call fcn.00401a30
lea eax, [ebp - 0x24]
push eax
mov byte [ebp - 4], bl
call fcn.0040fe90
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xb
call fcn.00401f40
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.00405900
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jne 0x410820
push ecx
lea edx, [ebp + 0xc]
mov ecx, esp
mov dword [ebp - 0x2c], esp
push edx
call fcn.00402060
push ecx
mov byte [ebp - 4], 0xc
mov ecx, esp
mov dword [ebp - 0x28], esp
push str..esi
call fcn.00401a30
lea eax, [ebp - 0x24]
push eax
mov byte [ebp - 4], bl
call fcn.0040fe90
add esp, 0xc
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xd
call fcn.00401fb0
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.00405900
lea ecx, [ebp - 0x1c]
push ecx
call fcn.00410b50
add esp, 4
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.00405900
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x10]
add edi, 0xfffffff0
push edi
call fcn.00401ff0
mov ebx, dword [ebp + 8]
add eax, 0x10
mov dword [ebx], eax
lea eax, [esi - 0x10]
add esp, 4
mov dword [ebp - 0x20], 1
mov byte [ebp - 4], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4108a8
push 0x80070057
call fcn.00401fd0
lea edi, [ebx - 0x10]
push edi
call fcn.00401ff0
mov ebx, dword [ebp + 8]
add eax, 0x10
add esp, 4
mov dword [ebx], eax
lea eax, [esi - 0x10]
mov dword [ebp - 0x20], 1
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4108b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 2
call fcn.0046995d
or edx, 0xffffffff
lea ecx, [edi + 0xc]
mov byte [ebp - 4], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4108dd
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410900
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret