Function at 0x14001fad0
Capabilities:
Check if file exists
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, [0x140281a50]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_Start...
call fcn.140036e10
mov rcx, qword [rbx + 0xa0]
xor r14d, r14d
test rcx, rcx
je 0x14001fb1d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0xa0], r14
cmp byte [rbx + 0x14], r14b
je 0x14001fbeb
call fcn.14001da10
test al, al
je 0x14001fbeb
call fcn.140004c80
mov rcx, rax
test rax, rax
je 0x140020229
mov rax, qword [rax]
call qword [rax + Ordinal_26]
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 0x14001fb7c
mov edx, 0x104
lea rcx, [rbp + 0x58]
call fcn.140005960
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 0x14001fb9b
mov eax, r14d
jmp 0x14001fbaf
movsxd rdx, dword [rdi + 0xc]
mov rcx, rbx
call fcn.140253bac
test eax, eax
js 0x140020234
cmp eax, dword [rdi + 0xc]
jg 0x140020234
mov dword [rdi + 8], eax
mov eax, eax
mov word [rbx + rax*2], r14w
mov rcx, rbx
call fcn.140025dd0
nop
mov rbx, 0xffffffffffffffff
lock xadd dword [rdi + 0x10], ebx
sub ebx, 1
jg 0x1400201e9
mov rcx, qword [rdi]
mov rdx, rdi
jmp 0x1400201e3
lea rdx, str.true
lea rcx, str.startfromupdater
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x60]
call fcn.140031ad0
mov rdx, qword [rax]
lea rcx, [0x1402824c8]
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 0x14001fc3c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
lea rdx, [0x140287e00]
lea rcx, [0x140287e08]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x48]
call fcn.140031f00
nop
lea rcx, str.main_
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x14001fc64
mov r8d, eax
mov rdx, rcx
lea rcx, [rbp + 0x48]
call fcn.14000cce0
lea rcx, [rbp - 0x28]
call fcn.140034020
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 0x14002021e
test rsi, rsi
je 0x14001fcbe
mov rdx, rcx
mov rcx, rsi
call fcn.140253bac
mov r14, rax
mov rax, qword [rbp + 0x48]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r12d
jl 0x14002021e
lea edi, [r12 + r14]
test edi, edi
js 0x14002021e
mov r13d, 1
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001fcff
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005960
mov rax, qword [rbp + 0x48]
cmp r15, r12
ja 0x14001fd08
lea rsi, [rax + r15*2]
lea rcx, [rax + r12*2]
movsxd r8, r14d
add r8, r8
je 0x14001fd43
test rcx, rcx
je 0x14001fd2f
test rsi, rsi
je 0x14001fd28
mov rdx, rsi
call fcn.1402430d0
jmp 0x14001fd3f
xor edx, edx
call fcn.140243780
call fcn.14025224c
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024809c
mov rax, qword [rbp + 0x48]
cmp edi, dword [rax - 0xc]
jg 0x14002021e
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 0x14001fd79
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
lea rcx, [0x140285d80]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x14001fd83
mov r8d, eax
mov rdx, rcx
lea rcx, [rbp + 0x48]
call fcn.14000cce0
lea rcx, [rbp - 0x20]
call fcn.1400318e0
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 0x140020213
test rsi, rsi
jne 0x14001fdd0
mov r14d, edi
jmp 0x14001fde2
mov rdx, rcx
mov rcx, rsi
call fcn.140253bac
mov r14, rax
mov rax, qword [rbp + 0x48]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x140020213
lea edi, [r15 + r14]
test edi, edi
js 0x140020213
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001fe1d
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005960
mov rax, qword [rbp + 0x48]
cmp r12, r15
ja 0x14001fe26
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14001fe61
test rcx, rcx
je 0x14001fe4d
test rsi, rsi
je 0x14001fe46
mov rdx, rsi
call fcn.1402430d0
jmp 0x14001fe5d
xor edx, edx
call fcn.140243780
call fcn.14025224c
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024809c
mov rax, qword [rbp + 0x48]
cmp edi, dword [rax - 0xc]
jg 0x140020213
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 0x14001fe97
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14001fecf
lea r8, [0x140281a50]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_toRun...
call fcn.140036e10
xor edx, edx
mov rcx, qword [rbp + 0x48]
call fcn.140025d00
jmp 0x1400201ce
call fcn.140034f60
lea r8, [0x1403645a8]
test al, al
je 0x14002019b
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x1403645a8]
lea rdx, [0x140364668]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae rdx, qword [0x140364668]
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
lea r8, [0x140281a50]
lea rdx, str.Updater:
lea rcx, str.RestoreUsingDir_toRun...
call fcn.140036e10
lea rcx, [rbp + 0x50]
call fcn.140031f00
nop
mov rax, rbx
lea rdx, str.main_
inc rax
cmp word [rdx + rax*2], 0
jne 0x14001ff43
mov r8d, eax
lea rcx, [rbp + 0x50]
call fcn.14000cce0
lea rcx, [rbp - 0x18]
call fcn.1400341d0
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 0x14002024a
test rsi, rsi
jne 0x14001ff8d
mov r14d, edi
jmp 0x14001ff9f
mov rdx, rcx
mov rcx, rsi
call fcn.140253bac
mov r14, rax
mov rax, qword [rbp + 0x50]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14002024a
lea edi, [r14 + r15]
test edi, edi
js 0x14002024a
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14001ffda
mov edx, edi
lea rcx, [rbp + 0x50]
call fcn.140005960
mov rax, qword [rbp + 0x50]
cmp r12, r15
ja 0x14001ffe3
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14002001e
test rcx, rcx
je 0x14002000a
test rsi, rsi
je 0x140020003
mov rdx, rsi
call fcn.1402430d0
jmp 0x14002001a
xor edx, edx
call fcn.140243780
call fcn.14025224c
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024809c
mov rax, qword [rbp + 0x50]
cmp edi, dword [rax - 0xc]
jg 0x14002024a
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 0x140020054
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
mov rax, rbx
lea rdx, [0x140285d80]
nop
inc rax
cmp word [rdx + rax*2], 0
jne 0x140020060
mov r8d, eax
lea rcx, [rbp + 0x50]
call fcn.14000cce0
lea rcx, [rbp - 0x10]
call fcn.1400318e0
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 0x14002023f
test rsi, rsi
jne 0x1400200aa
mov r14d, edi
jmp 0x1400200bc
mov rdx, rcx
mov rcx, rsi
call fcn.140253bac
mov r14, rax
mov rax, qword [rbp + 0x50]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14002023f
lea edi, [r14 + r15]
test edi, edi
js 0x14002023f
sub r13d, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, r13d
jge 0x1400200f6
mov edx, edi
lea rcx, [rbp + 0x50]
call fcn.140005960
mov rax, qword [rbp + 0x50]
cmp r12, r15
ja 0x1400200ff
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14002013a
test rcx, rcx
je 0x140020126
test rsi, rsi
je 0x14002011f
mov rdx, rsi
call fcn.1402430d0
jmp 0x140020136
xor edx, edx
call fcn.140243780
call fcn.14025224c
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024809c
mov rax, qword [rbp + 0x50]
cmp edi, dword [rax - 0xc]
jg 0x14002023f
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 0x140020170
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
xor edx, edx
mov rcx, qword [rbp + 0x50]
call fcn.140025d00
nop
mov rdx, qword [rbp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400201ce
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
jmp 0x1400201ce
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x1403645a8]
lea rdx, [0x140364648]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae rdx, qword [0x140364648]
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 0x1400201e9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
lea r8, [0x140281a50]
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.140036e10
mov ecx, 0x80070057
call fcn.140004b00
nop
mov ecx, 0x80070057
call fcn.140004b00
nop
mov ecx, 0x80004005
call fcn.140004b00
nop
mov ecx, 0x80070057
call fcn.140004b00
nop
mov ecx, 0x80070057
call fcn.140004b00
nop
mov ecx, 0x80070057
call fcn.140004b00
int3