Function at 0x14001b8b0
Capabilities:
Check if file exists
Create directory
Set environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x48
mov rbx, rcx
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_Start...
call fcn.14002c680
mov rcx, qword [rbx + 0x80]
xor r14d, r14d
test rcx, rcx
je 0x14001b8fd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x80], r14
cmp byte [rbx + 0x14], r14b
je 0x14001b9cb
call fcn.1400197a0
test al, al
je 0x14001b9cb
call fcn.140004b20
mov rcx, rax
test rax, rax
je 0x14001c009
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rbp + 0x58], rbx
mov r13d, 1
sub r13d, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x104
or eax, r13d
jge 0x14001b95c
mov edx, 0x104
lea rcx, [rbp + 0x58]
call fcn.140005800
mov rbx, qword [rbp + 0x58]
mov r8d, 0x104
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdi, [rbx - 0x18]
test rbx, rbx
jne 0x14001b97b
mov eax, r14d
jmp 0x14001b98f
movsxd rdx, dword [rdi + 0xc]
mov rcx, rbx
call fcn.1400ea46c
test eax, eax
js 0x14001c014
cmp eax, dword [rdi + 0xc]
jg 0x14001c014
mov dword [rdi + 8], eax
mov eax, eax
mov word [rbx + rax*2], r14w
mov rcx, rbx
call fcn.140020e50
nop
mov rbx, 0xffffffffffffffff
lock xadd dword [rdi + 0x10], ebx
sub ebx, 1
jg 0x14001bfc9
mov rcx, qword [rdi]
mov rdx, rdi
jmp 0x14001bfc3
lea rdx, str.true
lea rcx, str.startfromupdater
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x60]
call fcn.1400278e0
mov rdx, qword [rax]
lea rcx, [0x140242278]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rdx, qword [rbp + 0x60]
add rdx, 0xffffffffffffffe8
mov rbx, 0xffffffffffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001ba1c
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 rcx, str.main_
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x14001ba44
mov r8d, eax
mov rdx, rcx
lea rcx, [rbp + 0x48]
call fcn.14000c240
lea rcx, [rbp - 0x28]
call fcn.140029c20
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 0x14001bffe
test rsi, rsi
je 0x14001ba9e
mov rdx, rcx
mov rcx, rsi
call fcn.1400ea46c
mov r14, rax
mov rax, qword [rbp + 0x48]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r12d
jl 0x14001bffe
lea edi, [r12 + r14]
test edi, edi
js 0x14001bffe
mov r13d, 1
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001badf
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005800
mov rax, qword [rbp + 0x48]
cmp r15, r12
ja 0x14001bae8
lea rsi, [rax + r15*2]
lea rcx, [rax + r12*2]
movsxd r8, r14d
add r8, r8
je 0x14001bb23
test rcx, rcx
je 0x14001bb0f
test rsi, rsi
je 0x14001bb08
mov rdx, rsi
call fcn.1400d9910
jmp 0x14001bb1f
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 0x14001bffe
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 - 0x28]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001bb59
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rcx, [0x140245a90]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x14001bb63
mov r8d, eax
mov rdx, rcx
lea rcx, [rbp + 0x48]
call fcn.14000c240
lea rcx, [rbp - 0x20]
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 0x14001bff3
test rsi, rsi
jne 0x14001bbb0
mov r14d, edi
jmp 0x14001bbc2
mov rdx, rcx
mov rcx, rsi
call fcn.1400ea46c
mov r14, rax
mov rax, qword [rbp + 0x48]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14001bff3
lea edi, [r15 + r14]
test edi, edi
js 0x14001bff3
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001bbfd
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005800
mov rax, qword [rbp + 0x48]
cmp r12, r15
ja 0x14001bc06
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14001bc41
test rcx, rcx
je 0x14001bc2d
test rsi, rsi
je 0x14001bc26
mov rdx, rsi
call fcn.1400d9910
jmp 0x14001bc3d
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 0x14001bff3
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 - 0x20]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001bc77
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 0x14001bcaf
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_toRun...
call fcn.14002c680
xor edx, edx
mov rcx, qword [rbp + 0x48]
call fcn.140020d80
jmp 0x14001bfae
call fcn.14002aac0
lea r8, [0x140317568]
test al, al
je 0x14001bf7b
cmp qword [0x140317580], 8
cmovae r8, qword [0x140317568]
lea rdx, [0x140317628]
cmp qword [0x140317640], 8
cmovae rdx, qword [0x140317628]
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RestoreUsingDir_toRun...
call fcn.14002c680
lea rcx, [rbp + 0x50]
call fcn.140027d10
nop
mov rax, rbx
lea rdx, str.main_
inc rax
cmp word [rdx + rax*2], 0
jne 0x14001bd23
mov r8d, eax
lea rcx, [rbp + 0x50]
call fcn.14000c240
lea rcx, [rbp - 0x18]
call fcn.140029dd0
nop
mov rsi, qword [rax]
movsxd rcx, dword [rsi - 0x10]
mov r12, rsi
mov rax, qword [rbp + 0x50]
sub r12, rax
sar r12, 1
mov r15d, dword [rax - 0x10]
test ecx, ecx
js 0x14001c02a
test rsi, rsi
jne 0x14001bd6d
mov r14d, edi
jmp 0x14001bd7f
mov rdx, rcx
mov rcx, rsi
call fcn.1400ea46c
mov r14, rax
mov rax, qword [rbp + 0x50]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14001c02a
lea edi, [r14 + r15]
test edi, edi
js 0x14001c02a
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001bdba
mov edx, edi
lea rcx, [rbp + 0x50]
call fcn.140005800
mov rax, qword [rbp + 0x50]
cmp r12, r15
ja 0x14001bdc3
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14001bdfe
test rcx, rcx
je 0x14001bdea
test rsi, rsi
je 0x14001bde3
mov rdx, rsi
call fcn.1400d9910
jmp 0x14001bdfa
xor edx, edx
call fcn.1400d9fc0
call fcn.1400e8b0c
mov dword [rax], 0x16
call fcn.1400de95c
mov rax, qword [rbp + 0x50]
cmp edi, dword [rax - 0xc]
jg 0x14001c02a
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbp + 0x50]
xor edi, edi
mov word [rax + rcx*2], di
mov rdx, qword [rbp - 0x18]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001be34
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, rbx
lea rdx, [0x140245a90]
nop
inc rax
cmp word [rdx + rax*2], 0
jne 0x14001be40
mov r8d, eax
lea rcx, [rbp + 0x50]
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 + 0x50]
sub r12, rax
sar r12, 1
mov r15d, dword [rax - 0x10]
test ecx, ecx
js 0x14001c01f
test rsi, rsi
jne 0x14001be8a
mov r14d, edi
jmp 0x14001be9c
mov rdx, rcx
mov rcx, rsi
call fcn.1400ea46c
mov r14, rax
mov rax, qword [rbp + 0x50]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14001c01f
lea edi, [r14 + r15]
test edi, edi
js 0x14001c01f
sub r13d, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, r13d
jge 0x14001bed6
mov edx, edi
lea rcx, [rbp + 0x50]
call fcn.140005800
mov rax, qword [rbp + 0x50]
cmp r12, r15
ja 0x14001bedf
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14001bf1a
test rcx, rcx
je 0x14001bf06
test rsi, rsi
je 0x14001beff
mov rdx, rsi
call fcn.1400d9910
jmp 0x14001bf16
xor edx, edx
call fcn.1400d9fc0
call fcn.1400e8b0c
mov dword [rax], 0x16
call fcn.1400de95c
mov rax, qword [rbp + 0x50]
cmp edi, dword [rax - 0xc]
jg 0x14001c01f
mov dword [rax - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbp + 0x50]
xor edi, edi
mov word [rax + rcx*2], di
mov rdx, qword [rbp - 0x10]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001bf50
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
xor edx, edx
mov rcx, qword [rbp + 0x50]
call fcn.140020d80
nop
mov rdx, qword [rbp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14001bfae
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x14001bfae
cmp qword [0x140317580], 8
cmovae r8, qword [0x140317568]
lea rdx, [0x140317608]
cmp qword [0x140317620], 8
cmovae rdx, qword [0x140317608]
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
nop
mov rdx, qword [rbp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14001bfc9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea r8, [0x140241920]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_End...
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
jmp fcn.14002c680
mov ecx, 0x80070057
call fcn.1400049a0
nop
mov ecx, 0x80070057
call fcn.1400049a0
nop
mov ecx, 0x80004005
call fcn.1400049a0
nop
mov ecx, 0x80070057
call fcn.1400049a0
nop
mov ecx, 0x80070057
call fcn.1400049a0
nop
mov ecx, 0x80070057
call fcn.1400049a0
int3