Function at 0x100081f0
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100276c2
mov eax, dword fs:[0]
push eax
sub esp, 0x430
mov eax, dword [0x10033010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.10005250
mov ecx, eax
test ecx, ecx
jne 0x10008235
push 0x80004005
call fcn.10005470
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x438], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 4], 0
call fcn.10005250
mov ecx, eax
test ecx, ecx
jne 0x10008265
push 0x80004005
call fcn.10005470
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x434]
mov eax, dword [edi + 0x14]
add eax, 0x40c
push eax
call fcn.10003b60
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x428]
mov eax, dword [edi + 0x14]
add eax, 0x208
push eax
call fcn.10003b60
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.10008dc0
or ebx, 0xffffffff
test eax, eax
jne 0x100082c6
mov byte [0x100355d0], 1
mov esi, 0x490
jmp 0x100085e9
mov eax, dword [edi + 0x14]
cmp dword [eax + 0x408], 0
je 0x100083c1
mov eax, dword [ebp - 0x428]
cmp dword [eax - 0xc], 0
jl 0x1000839a
push str.http
push eax
call fcn.1000de74
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x428]
test ecx, ecx
je 0x10008306
sub ecx, eax
sar ecx, 1
je 0x10008330
cmp dword [eax - 0xc], 0
jl 0x1000839a
push 0x1002d8e8
push eax
call fcn.1000de74
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x428]
test ecx, ecx
je 0x1000839a
sub ecx, eax
sar ecx, 1
jne 0x1000839a
push str.TEMP
lea ecx, [ebp - 0x424]
call fcn.100035d0
push dword [ebp - 0x428]
push str.downloading__s
call fcn.1000a750
add esp, 4
lea eax, [ebp - 0x428]
mov ecx, esp
lea esi, [ebp - 0x424]
mov dword [ebp - 0x42c], ecx
push eax
call fcn.10003f10
mov ecx, esi
call fcn.100069a0
mov esi, eax
add esp, 4
test esi, esi
je 0x10008404
push dword [ebp - 0x424]
push str.File_download_failed:__s
push esi
call fcn.1000a900
add esp, 0xc
jmp 0x100085e9
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x424]
call fcn.10003a80
jmp 0x10008404
push 0x104
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x428]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100083e2
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x424]
call fcn.10004170
push ecx
lea ecx, [ebp - 0x424]
call fcn.10009e80
lea ecx, [ebp - 0x424]
call fcn.1000a100
mov ecx, eax
call fcn.1000a050
push dword [ebp - 0x424]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10008453
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x424]
mov esi, eax
push str.Failed:_file_not_exists__s
push esi
call fcn.1000a900
add esp, 0xc
jmp 0x100085e9
push ecx
mov ecx, esp
lea eax, [ebp - 0x424]
push eax
mov dword [ebp - 0x42c], ecx
call fcn.10003f10
call fcn.10008690
mov esi, eax
lea ecx, [ebp - 0x430]
lea eax, [ebp - 0x424]
push eax
call fcn.10003f10
mov byte [ebp - 4], 4
push 0x5c
push dword [ebp - 0x430]
call fcn.1000e1a5
add esp, 8
test eax, eax
jne 0x1000849e
or eax, 0xffffffff
jmp 0x100084a6
sub eax, dword [ebp - 0x430]
sar eax, 1
inc eax
lea ecx, [ebp - 0x430]
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.10009d80
push eax
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 5
call fcn.10003ad0
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp - 0x42c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100084eb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x430]
call fcn.1000a100
mov ecx, eax
call fcn.1000a050
push eax
lea ecx, [edi + 8]
call fcn.10003ad0
lea ecx, [ebp - 0x434]
call fcn.1000a100
mov ecx, eax
call fcn.1000a050
mov eax, dword [eax]
test esi, esi
je 0x10008572
add edi, 4
cmp dword [eax - 0xc], 0
jne 0x1000853d
push dword [ebp - 0x424]
push str.msiexec.exe__i___s_
push edi
call fcn.100046a0
add esp, 0xc
jmp 0x10008557
push dword [ebp - 0x434]
push dword [ebp - 0x424]
push str.msiexec.exe__i___s___s
push edi
call fcn.100046a0
add esp, 0x10
push dword [edi]
push str.Cannot_install_msi_package_inside_MSI._Unsupported_command:__s
push 0x65e
call fcn.1000a900
add esp, 0xc
mov esi, 0x65e
jmp 0x100085c8
cmp dword [eax - 0xc], 0
lea esi, [edi + 4]
jne 0x1000858b
lea eax, [ebp - 0x424]
mov ecx, esi
push eax
call fcn.10003ad0
jmp 0x100085a5
push dword [ebp - 0x434]
push dword [ebp - 0x424]
push str._s__s
push esi
call fcn.100046a0
add esp, 0x10
mov ecx, esi
call fcn.1000a100
mov ecx, eax
call fcn.1000a050
cmp dword [edi], 0
je 0x100085c6
mov byte [0x100355d0], 1
mov esi, 1
jmp 0x100085c8
xor esi, esi
mov byte [ebp - 4], 3
mov eax, ebx
mov edx, dword [ebp - 0x430]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x100085e9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000860a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x434]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000862b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000864c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x438]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1000866b
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000b827
mov esp, ebp
pop ebp
ret