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

Disassembly:
mov eax, 0x66216072
call fcn.6620b838
lea eax, [ebp - 0x644]
add esp, 0xfffff9c8
push ebx
push esi
xor ebx, ebx
push edi
push 0x104
push eax
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 al, bl
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
or esi, 0xffffffff
lea ecx, [ebp - 0x43c]
push esi
push str.TS_PARENT_HANDLE
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
sub esp, 0xfffffff4
or 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
lea ecx, [ebp - 0x43c]
push esi
push str.TS_UPDATE_COMPLETE
call fcn.662032c0
push ebx
lea eax, [ebp - 0x38c]
push eax
push dword [ebp - 0x43c]
call fcn.662039e0
sub esp, 0xfffffff4
cmp eax, ebx
mov edi, 0x66217544
jl 0x66201e32
lea eax, [ebp - 0x38c]
push eax
lea ecx, [ebp - 0xcc]
call fcn.662034b0
lea ecx, [ebp - 0xcc]
push ebx
push ebx
push esi
push edi
push 1
mov byte [ebp - 4], 3
call fcn.66202f40
push ebx
push ebx
lea ecx, [ebp - 0xcc]
push esi
push str..ase
push 1
call fcn.66202f40
sub esp, 0xb0
mov dword [ebp - 0x18], esp
lea eax, [ebp - 0xcc]
mov ecx, esp
push eax
call fcn.662034b0
lea eax, [ebp - 0x38c]
sub esp, 0xb0
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
lea eax, [ebp - 0x38c]
lea ecx, [ebp - 0xcc]
add esp, 0x160
push eax
call fcn.66203280
lea ecx, [ebp - 0xcc]
push ebx
push ebx
push esi
push edi
push 1
call fcn.66202f40
push ebx
lea ecx, [ebp - 0xcc]
push ebx
push esi
push str..asd
push 1
call fcn.66202f40
add esp, 0xffffff50
mov ecx, esp
mov dword [ebp - 0x18], esp
lea eax, [ebp - 0xcc]
push eax
call fcn.662034b0
lea eax, [ebp - 0x38c]
sub esp, 0xb0
mov dword [ebp - 0x14], esp
mov ecx, 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]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xcc]
call fcn.66203260
lea ecx, [ebp - 0xcc]
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0xd], bl
call fcn.66202d60
mov esi, str.TS_UPDATE__u
push ebx
push esi
lea eax, [ebp - 0xcc]
push eax
mov byte [ebp - 4], 6
call fcn.66203680
lea ecx, [ebp - 0x2dc]
sub esp, 0xfffffff4
call fcn.66202d60
jmp 0x66201fae
push ebx
push 0x3b
call fcn.66202a70
mov ecx, dword [ebp - 0x2dc]
mov dword [ebp - 0x18], eax
push 0xffffffffffffffff
lea eax, [ecx + eax*2 + 2]
lea ecx, [ebp - 0x22c]
push eax
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
lea ecx, [ebp - 0x17c]
push 3
push 0xffffffffffffffff
push str..old
push 1
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
sub esp, 0xfffffff4
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
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x22c]
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]
push esi
lea eax, [ebp - 0xcc]
push eax
mov byte [ebp - 4], 6
call fcn.66203680
sub esp, 0xfffffff4
lea ecx, [ebp - 0x2dc]
call fcn.66202d60
lea eax, [ebp - 0x2dc]
push ebx
push eax
push dword [ebp - 0xcc]
mov byte [ebp - 4], 7
call fcn.662039e0
lea ecx, [ebp - 0x2dc]
add esp, 0xc
cmp eax, ebx
jge 0x66201e6d
mov byte [ebp - 0xe], 1
jmp 0x66202006
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
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
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xcc]
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
lea ecx, [ebp - 0x17c]
push 0xffffffffffffffff
push edi
push 1
mov byte [ebp - 4], 0xa
call fcn.66202f40
lea ecx, [ebp - 0x17c]
push ebx
push ebx
push 0xffffffffffffffff
push 0x6621748c
push 1
call fcn.66202f40
lea eax, [ebp - 0x17c]
add esp, 0xffffff50
mov dword [ebp - 0x18], esp
mov ecx, esp
push eax
call fcn.662034b0
add esp, 0xffffff50
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
sub esp, 0xfffffe9c
call fcn.66201961
lea eax, [ebp + 8]
sub esp, 0xb0
mov dword [ebp - 0x18], esp
mov ecx, esp
push eax
call fcn.662034b0
call fcn.66201a94
mov byte [ebp - 4], 2
sub esp, 0xffffff50
lea ecx, [ebp - 0x17c]
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
lea ecx, [ebp - 0x17c]
push ebx
push ebx
push 0xffffffffffffffff
push edi
push 1
mov byte [ebp - 4], 0xc
call fcn.66202f40
push ebx
push ebx
push 0xffffffffffffffff
lea ecx, [ebp - 0x17c]
push 0x6621748c
push 1
call fcn.66202f40
sub esp, 0xb0
lea eax, [ebp - 0x17c]
mov dword [ebp - 0x18], esp
mov ecx, esp
push eax
call fcn.662034b0
add esp, 0xffffff50
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
lea ecx, [ebp - 0xcc]
sub esp, 0xfffffea0
call fcn.66202d60
push dword [ebp - 0x14]
lea eax, [ebp - 0xcc]
push esi
push eax
mov byte [ebp - 4], 0xe
call fcn.66203680
lea ecx, [ebp - 0x22c]
sub esp, 0xfffffff4
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
lea ecx, [ebp - 0xcc]
inc dword [ebp - 0x14]
call fcn.66202d60
lea eax, [ebp - 0xcc]
push dword [ebp - 0x14]
push esi
push eax
mov byte [ebp - 4], 0xe
call fcn.66203680
lea ecx, [ebp - 0x22c]
add esp, 0xc
call fcn.66202d60
lea eax, [ebp - 0x22c]
push ebx
push eax
push dword [ebp - 0xcc]
mov byte [ebp - 4], 0xf
call fcn.662039e0
sub esp, 0xfffffff4
cmp eax, ebx
jge 0x662021af
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x22c]
call fcn.66203260
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0xcc]
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
mov dword [ebp - 0x1c], esp
mov ecx, esp
lea eax, [ebp + 8]
push eax
call fcn.662034b0
call fcn.66201a94
sub esp, 0xffffff50
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 1
call fcn.66203260
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x43c]
call fcn.66203260
mov bl, byte [ebp - 0xd]
jmp 0x66201c55