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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100259a2
mov eax, dword fs:[0]
push eax
sub esp, 0x430
mov eax, dword [0x1003000c]
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.10001520
mov ecx, eax
test ecx, ecx
jne 0x100088c5
push 0x80004005
call fcn.10001170
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.10001520
mov ecx, eax
test ecx, ecx
jne 0x100088f5
push 0x80004005
call fcn.10001170
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.10004230
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x428]
mov eax, dword [edi + 0x14]
add eax, 0x208
push eax
call fcn.10004230
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.10009430
or esi, 0xffffffff
test eax, eax
jne 0x10008956
mov byte [0x10031510], 1
mov ebx, 0x490
jmp 0x10008c61
mov eax, dword [edi + 0x14]
cmp dword [eax + 0x408], 0
je 0x10008a51
mov eax, dword [ebp - 0x428]
cmp dword [eax - 0xc], 0
jl 0x10008a2a
push str.http
push eax
call fcn.1000c354
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x428]
test ecx, ecx
je 0x10008996
sub ecx, eax
sar ecx, 1
je 0x100089c0
cmp dword [eax - 0xc], 0
jl 0x10008a2a
push 0x1002c640
push eax
call fcn.1000c354
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x428]
test ecx, ecx
je 0x10008a2a
sub ecx, eax
sar ecx, 1
jne 0x10008a2a
push str.TEMP
lea ecx, [ebp - 0x424]
call fcn.10003ca0
push dword [ebp - 0x428]
push str.downloading__s
call fcn.10005650
add esp, 4
lea eax, [ebp - 0x428]
mov ecx, esp
lea ebx, [ebp - 0x424]
mov dword [ebp - 0x42c], ecx
push eax
call fcn.10004690
mov ecx, ebx
call fcn.100070c0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10008a94
push dword [ebp - 0x424]
push str.File_download_failed:__s
push ebx
call fcn.100056b0
add esp, 0xc
jmp 0x10008c61
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.10004150
jmp 0x10008a94
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 0x10008a72
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x424]
call fcn.10004580
push ecx
lea ecx, [ebp - 0x424]
call fcn.1000a2f0
lea ecx, [ebp - 0x424]
call fcn.1000a570
mov ecx, eax
call fcn.1000a4c0
push dword [ebp - 0x424]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10008ae3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x424]
mov ebx, eax
push str.Failed:_file_not_exists__s
push ebx
call fcn.100056b0
add esp, 0xc
jmp 0x10008c61
push ecx
mov ecx, esp
lea eax, [ebp - 0x424]
push eax
mov dword [ebp - 0x42c], ecx
call fcn.10004690
call fcn.10008d10
mov ebx, eax
lea ecx, [ebp - 0x430]
lea eax, [ebp - 0x424]
push eax
call fcn.10004690
mov byte [ebp - 4], 4
push 0x5c
push dword [ebp - 0x430]
call fcn.1000d3e5
add esp, 8
test eax, eax
jne 0x10008b2e
or eax, 0xffffffff
jmp 0x10008b36
sub eax, dword [ebp - 0x430]
sar eax, 1
inc eax
lea ecx, [ebp - 0x430]
push eax
lea eax, [ebp - 0x42c]
push eax
call fcn.1000a1f0
push eax
lea ecx, [ebp - 0x430]
mov byte [ebp - 4], 5
call fcn.100041a0
mov byte [ebp - 4], 4
mov eax, esi
mov edx, dword [ebp - 0x42c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10008b7b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x430]
call fcn.1000a570
mov ecx, eax
call fcn.1000a4c0
push eax
lea ecx, [edi + 8]
call fcn.100041a0
lea ecx, [ebp - 0x434]
call fcn.1000a570
mov ecx, eax
call fcn.1000a4c0
lea esi, [edi + 4]
mov eax, dword [eax]
test ebx, ebx
je 0x10008be0
cmp dword [eax - 0xc], 0
jne 0x10008bcd
push dword [ebp - 0x424]
push str.msiexec.exe__i___s_
push esi
call fcn.10004d70
add esp, 0xc
jmp 0x10008c10
push dword [ebp - 0x434]
push dword [ebp - 0x424]
push str.msiexec.exe__i___s___s
jmp 0x10008c07
cmp dword [eax - 0xc], 0
jne 0x10008bf6
lea eax, [ebp - 0x424]
mov ecx, esi
push eax
call fcn.100041a0
jmp 0x10008c10
push dword [ebp - 0x434]
push dword [ebp - 0x424]
push str._s__s
push esi
call fcn.10004d70
add esp, 0x10
mov ecx, esi
call fcn.1000a570
mov ecx, eax
call fcn.1000a4c0
mov ecx, dword [edi]
mov edx, 1
movzx eax, byte [0x10031510]
test ecx, ecx
mov byte [ebp - 4], 3
cmovne eax, edx
mov edx, dword [ebp - 0x430]
xor ebx, ebx
mov byte [0x10031510], al
test ecx, ecx
setne bl
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10008c61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, esi
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10008c82
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, esi
mov edx, dword [ebp - 0x434]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10008ca3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, esi
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10008cc4
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], esi
dec esi
test esi, esi
jg 0x10008ce3
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.1000aa33
mov esp, ebp
pop ebp
ret