Function at 0x66201c22
Capabilities:
Query environment variable
Set environment variable

Disassembly:
mov eax, 0x66216072
call fcn.6620b838
sub esp, 0x638
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x644]
push eax
xor ebx, ebx
push str.TS_SBCLEANUP
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x66201c72
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.66203260
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, bl
mov dword fs:[0], ecx
pop ebx
leave
ret
or esi, 0xffffffff
push esi
push str.TS_PARENT_HANDLE
lea ecx, [ebp - 0x43c]
call fcn.66203530
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 1
call fcn.66202d60
mov ecx, dword [ebp + 0xb8]
push ebx
mov byte [ebp - 4], 2
call fcn.66203610
push ebx
lea eax, [ebp - 0x38c]
push eax
push dword [ebp - 0x43c]
call fcn.662039e0
add esp, 0xc
test eax, eax
jl 0x66201ce0
push dword [ebp - 0x38c]
call fcn.6620b8f0
pop ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
lea ecx, [ebp - 0x38c]
call fcn.66203610
push esi
push str.TS_UPDATE_COMPLETE
lea ecx, [ebp - 0x43c]
call fcn.662032c0
push ebx
lea eax, [ebp - 0x38c]
push eax
push dword [ebp - 0x43c]
call fcn.662039e0
add esp, 0xc
cmp eax, ebx
mov edi, 0x66217544
jl 0x66201e32
lea eax, [ebp - 0x38c]
push eax
lea ecx, [ebp - 0xcc]
call fcn.662034b0
push ebx
push ebx
push esi
push edi
push 1
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 3
call fcn.66202f40
push ebx
push ebx
push esi
push str..ase
push 1
lea ecx, [ebp - 0xcc]
call fcn.66202f40
sub esp, 0xb0
lea eax, [ebp - 0xcc]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.662034b0
sub esp, 0xb0
lea eax, [ebp - 0x38c]
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
mov byte [ebp - 4], 4
call fcn.662034b0
mov byte [ebp - 4], 3
call fcn.662016fc
add esp, 0x160
lea eax, [ebp - 0x38c]
push eax
lea ecx, [ebp - 0xcc]
call fcn.66203280
push ebx
push ebx
push esi
push edi
push 1
lea ecx, [ebp - 0xcc]
call fcn.66202f40
push ebx
push ebx
push esi
push str..asd
push 1
lea ecx, [ebp - 0xcc]
call fcn.66202f40
sub esp, 0xb0
lea eax, [ebp - 0xcc]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.662034b0
sub esp, 0xb0
lea eax, [ebp - 0x38c]
mov ecx, esp
mov dword [ebp - 0x14], esp
push eax
mov byte [ebp - 4], 5
call fcn.662034b0
mov byte [ebp - 4], 3
call fcn.662016fc
add esp, 0x160
push ebx
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 2
call fcn.66203260
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0xd], bl
call fcn.66202d60
push ebx
mov esi, str.TS_UPDATE__u
lea eax, [ebp - 0xcc]
push esi
push eax
mov byte [ebp - 4], 6
call fcn.66203680
add esp, 0xc
lea ecx, [ebp - 0x2dc]
call fcn.66202d60
jmp 0x66201fae
push ebx
push 0x3b
call fcn.66202a70
mov ecx, dword [ebp - 0x2dc]
mov dword [ebp - 0x18], eax
lea eax, [ecx + eax*2 + 2]
push 0xffffffffffffffff
push eax
lea ecx, [ebp - 0x22c]
call fcn.66203530
mov ecx, dword [ebp + 0xb8]
mov byte [ebp - 4], 8
cmp dword [ecx + 4], ebx
jne 0x66201ed1
lea eax, [ebp - 0x22c]
push eax
call fcn.66203280
mov ecx, dword [ebp + 0xb8]
push 0xffffffffffffffff
push ebx
call fcn.66202ae0
mov ecx, dword [ebp + 0xb8]
push eax
call fcn.66202ec0
mov ecx, dword [ebp + 0xb8]
push eax
call fcn.66203610
push dword [ebp - 0x18]
lea ecx, [ebp - 0x2dc]
call fcn.66203610
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x17c]
call fcn.662034b0
push ebx
push 3
push 0xffffffffffffffff
push str..old
push 1
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 9
call fcn.66202f40
lea eax, [ebp - 0x17c]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x2dc]
push eax
call fcn.662019fb
add esp, 0xc
cmp eax, ebx
je 0x66201fdc
push ebx
push dword [ebp - 0xcc]
mov byte [ebp - 0xd], 1
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 8
call fcn.66203260
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 7
call fcn.66203260
lea ecx, [ebp - 0x2dc]
mov byte [ebp - 4], 6
call fcn.66203260
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 2
call fcn.66203260
inc dword [ebp - 0x14]
lea ecx, [ebp - 0xcc]
call fcn.66202d60
push dword [ebp - 0x14]
lea eax, [ebp - 0xcc]
push esi
push eax
mov byte [ebp - 4], 6
call fcn.66203680
add esp, 0xc
lea ecx, [ebp - 0x2dc]
call fcn.66202d60
push ebx
lea eax, [ebp - 0x2dc]
push eax
push dword [ebp - 0xcc]
mov byte [ebp - 4], 7
call fcn.662039e0
add esp, 0xc
cmp eax, ebx
lea ecx, [ebp - 0x2dc]
jge 0x66201e6d
mov byte [ebp - 0xe], 1
jmp 0x66202006
lea ecx, [ebp - 0x17c]
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 4], 8
call fcn.66203260
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 7
call fcn.66203260
lea ecx, [ebp - 0x2dc]
mov byte [ebp - 4], 6
call fcn.66203260
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 2
call fcn.66203260
cmp byte [ebp - 0xd], bl
je 0x662020f0
cmp byte [ebp - 0xe], bl
je 0x662020f9
push dword [ebp + 0xb8]
lea ecx, [ebp - 0x17c]
call fcn.662034b0
push ebx
push ebx
push 0xffffffffffffffff
push edi
push 1
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 0xa
call fcn.66202f40
push ebx
push ebx
push 0xffffffffffffffff
push 0x6621748c
push 1
lea ecx, [ebp - 0x17c]
call fcn.66202f40
sub esp, 0xb0
lea eax, [ebp - 0x17c]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.662034b0
sub esp, 0xb0
mov ecx, esp
mov dword [ebp - 0x14], esp
push dword [ebp + 0xb8]
mov byte [ebp - 4], 0xb
call fcn.662034b0
mov byte [ebp - 4], 0xa
call fcn.662016fc
push dword [ebp + 0xb8]
call fcn.662017ba
add esp, 0x164
call fcn.66201961
sub esp, 0xb0
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.662034b0
call fcn.66201a94
add esp, 0xb0
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 2
call fcn.66203260
jmp 0x6620228a
cmp byte [ebp - 0xe], bl
jne 0x6620228a
mov eax, dword [ebp + 0xb8]
cmp dword [eax + 4], ebx
je 0x6620226b
push eax
lea ecx, [ebp - 0x17c]
call fcn.662034b0
push ebx
push ebx
push 0xffffffffffffffff
push edi
push 1
lea ecx, [ebp - 0x17c]
mov byte [ebp - 4], 0xc
call fcn.66202f40
push ebx
push ebx
push 0xffffffffffffffff
push 0x6621748c
push 1
lea ecx, [ebp - 0x17c]
call fcn.66202f40
sub esp, 0xb0
lea eax, [ebp - 0x17c]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.662034b0
sub esp, 0xb0
mov ecx, esp
mov dword [ebp - 0x1c], esp
push dword [ebp + 0xb8]
mov byte [ebp - 4], 0xd
call fcn.662034b0
mov byte [ebp - 4], 0xc
call fcn.662015d2
add esp, 0x160
lea ecx, [ebp - 0xcc]
call fcn.66202d60
push dword [ebp - 0x14]
lea eax, [ebp - 0xcc]
push esi
push eax
mov byte [ebp - 4], 0xe
call fcn.66203680
add esp, 0xc
lea ecx, [ebp - 0x22c]
call fcn.66202d60
jmp 0x6620220a
push ebx
push dword [ebp - 0xcc]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 0xe
call fcn.66203260
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 0xc
call fcn.66203260
inc dword [ebp - 0x14]
lea ecx, [ebp - 0xcc]
call fcn.66202d60
push dword [ebp - 0x14]
lea eax, [ebp - 0xcc]
push esi
push eax
mov byte [ebp - 4], 0xe
call fcn.66203680
add esp, 0xc
lea ecx, [ebp - 0x22c]
call fcn.66202d60
push ebx
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0xcc]
mov byte [ebp - 4], 0xf
call fcn.662039e0
add esp, 0xc
cmp eax, ebx
jge 0x662021af
lea ecx, [ebp - 0x22c]
mov byte [ebp - 4], 0xe
call fcn.66203260
lea ecx, [ebp - 0xcc]
mov byte [ebp - 4], 0xc
call fcn.66203260
push ebx
push str.AppSync
push str.Appsync_failed_to_upgrade_older_package.___________________________Older_package_is_locked_by_some_process.___________________________Please_close_all_the_applications_using___________________________older_package_and_restart_the_upgrade.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp - 0x17c]
mov byte [ebp - 0xd], 1
mov byte [ebp - 4], 2
call fcn.66203260
sub esp, 0xb0
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
call fcn.662034b0
call fcn.66201a94
add esp, 0xb0
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 1
call fcn.66203260
lea ecx, [ebp - 0x43c]
mov byte [ebp - 4], bl
call fcn.66203260
mov bl, byte [ebp - 0xd]
jmp 0x66201c55