Function at 0x14001c040
Capabilities:
Check if file exists
Set environment variable

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x30
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RunUsingApp_Start...
call fcn.14002c680
lea rdx, str.true
lea rcx, str.startfromupdater
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x50]
call fcn.1400278e0
mov rdx, qword [rax]
lea rcx, [0x140242278]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, qword [rbp + 0x50]
add rdx, 0xffffffffffffffe8
mov rbx, 0xffffffffffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001c0c2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rdx, [0x1402472f0]
lea rcx, [0x1402472f8]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x48]
call fcn.140027d10
nop
lea rdx, str.main_
mov rax, rbx
nop word [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x14001c0f0
mov r8d, eax
lea rcx, [rbp + 0x48]
call fcn.14000c240
lea rcx, [rbp + 0x58]
call fcn.140029dd0
nop
mov rsi, qword [rax]
movsxd rcx, dword [rsi - 0x10]
mov r15, rsi
mov rax, qword [rbp + 0x48]
sub r15, rax
sar r15, 1
mov r12d, dword [rax - 0x10]
test ecx, ecx
js 0x14001c3fc
xor edx, edx
test rsi, rsi
jne 0x14001c13c
mov r14d, edx
jmp 0x14001c14e
mov rdx, rcx
mov rcx, rsi
call fcn.1400ea46c
mov r14, rax
mov rax, qword [rbp + 0x48]
mov r13d, 0x7fffffff
mov ecx, r13d
sub ecx, r14d
cmp ecx, r12d
jl 0x14001c3fc
lea edi, [r12 + r14]
test edi, edi
js 0x14001c3fc
mov edx, 1
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001c18f
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005800
mov rax, qword [rbp + 0x48]
cmp r15, r12
ja 0x14001c198
lea rsi, [rax + r15*2]
lea rcx, [rax + r12*2]
movsxd r8, r14d
add r8, r8
je 0x14001c1d3
test rcx, rcx
je 0x14001c1bf
test rsi, rsi
je 0x14001c1b8
mov rdx, rsi
call fcn.1400d9910
jmp 0x14001c1cf
xor edx, edx
call fcn.1400d9fc0
call fcn.1400e8b0c
mov dword [rax], 0x16
call fcn.1400de95c
mov rax, qword [rbp + 0x48]
cmp edi, dword [rax - 0xc]
jg 0x14001c3fc
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbp + 0x48]
xor edi, edi
mov word [rax + rcx*2], di
mov rdx, qword [rbp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001c209
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rdx, [0x140245a90]
mov rax, rbx
inc rax
cmp word [rdx + rax*2], 0
jne 0x14001c213
mov r8d, eax
lea rcx, [rbp + 0x48]
call fcn.14000c240
lea rcx, [rbp - 0x10]
call fcn.1400276f0
nop
mov rsi, qword [rax]
movsxd rcx, dword [rsi - 0x10]
mov r12, rsi
mov rax, qword [rbp + 0x48]
sub r12, rax
sar r12, 1
mov r15d, dword [rax - 0x10]
test ecx, ecx
js 0x14001c3f1
test rsi, rsi
jne 0x14001c25d
mov r14d, edi
jmp 0x14001c26f
mov rdx, rcx
mov rcx, rsi
call fcn.1400ea46c
mov r14, rax
mov rax, qword [rbp + 0x48]
sub r13d, r14d
cmp r13d, r15d
jl 0x14001c3f1
lea edi, [r15 + r14]
test edi, edi
js 0x14001c3f1
mov edx, 1
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001c2a7
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005800
mov rax, qword [rbp + 0x48]
cmp r12, r15
ja 0x14001c2b0
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14001c2eb
test rcx, rcx
je 0x14001c2d7
test rsi, rsi
je 0x14001c2d0
mov rdx, rsi
call fcn.1400d9910
jmp 0x14001c2e7
xor edx, edx
call fcn.1400d9fc0
call fcn.1400e8b0c
mov dword [rax], 0x16
call fcn.1400de95c
mov rax, qword [rbp + 0x48]
cmp edi, dword [rax - 0xc]
jg 0x14001c3f1
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbp + 0x48]
xor edx, edx
mov word [rax + rcx*2], dx
mov rdx, qword [rbp - 0x10]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001c321
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14001c33c
xor edx, edx
mov rcx, qword [rbp + 0x48]
call fcn.140020d80
jmp 0x14001c3a6
lea r8, [0x140241920]
mov rdx, qword [rbp + 0x48]
lea rcx, str.RunUsingApp_Path_File_Not_Exists:
call fcn.14002c680
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RunUsingApp_ERR_MSG_FAIL_RUN_REINSTALL...
call fcn.14002c680
lea r8, [0x140317548]
cmp qword [0x140317560], 8
cmovae r8, qword [0x140317548]
lea rdx, [0x1403175e8]
cmp qword [0x140317600], 8
cmovae rdx, qword [0x1403175e8]
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RunUsingApp_End...
call fcn.14002c680
nop
mov rdx, qword [rbp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14001c3dc
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80070057
call fcn.1400049a0
nop
mov ecx, 0x80070057
call fcn.1400049a0
int3