Function at 0x140024fe0
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, [0x140284a60]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_Start...
call fcn.140039ff0
mov rcx, qword [rbx + 0xa0]
xor r14d, r14d
test rcx, rcx
je 0x14002502d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0xa0], r14
cmp byte [rbx + 0x14], r14b
je 0x1400250fb
call fcn.140022f20
test al, al
je 0x1400250fb
call fcn.140004ca0
mov rcx, rax
test rax, rax
je 0x140025739
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 0x14002508c
mov edx, 0x104
lea rcx, [rbp + 0x58]
call fcn.140005980
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 0x1400250ab
mov eax, r14d
jmp 0x1400250bf
movsxd rdx, dword [rdi + 0xc]
mov rcx, rbx
call fcn.14025660c
test eax, eax
js 0x140025744
cmp eax, dword [rdi + 0xc]
jg 0x140025744
mov dword [rdi + 8], eax
mov eax, eax
mov word [rbx + rax*2], r14w
mov rcx, rbx
call fcn.14002aa50
nop
mov rbx, 0xffffffffffffffff
lock xadd dword [rdi + 0x10], ebx
sub ebx, 1
jg 0x1400256f9
mov rcx, qword [rdi]
mov rdx, rdi
jmp 0x1400256f3
lea rdx, str.true
lea rcx, str.startfromupdater
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x60]
call fcn.140034fe0
mov rdx, qword [rax]
lea rcx, [0x140284f78]
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 0x14002514c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
lea rdx, [0x14028b2b0]
lea rcx, [0x14028b2b8]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rcx, [rbp + 0x48]
call fcn.140035410
nop
lea rcx, str.main_
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x140025174
mov r8d, eax
mov rdx, rcx
lea rcx, [rbp + 0x48]
call fcn.1400127b0
lea rcx, [rbp - 0x28]
call fcn.140037530
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 0x14002572e
test rsi, rsi
je 0x1400251ce
mov rdx, rcx
mov rcx, rsi
call fcn.14025660c
mov r14, rax
mov rax, qword [rbp + 0x48]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r12d
jl 0x14002572e
lea edi, [r12 + r14]
test edi, edi
js 0x14002572e
mov r13d, 1
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14002520f
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005980
mov rax, qword [rbp + 0x48]
cmp r15, r12
ja 0x140025218
lea rsi, [rax + r15*2]
lea rcx, [rax + r12*2]
movsxd r8, r14d
add r8, r8
je 0x140025253
test rcx, rcx
je 0x14002523f
test rsi, rsi
je 0x140025238
mov rdx, rsi
call fcn.140245860
jmp 0x14002524f
xor edx, edx
call fcn.140245f10
call fcn.1402549dc
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024a82c
mov rax, qword [rbp + 0x48]
cmp edi, dword [rax - 0xc]
jg 0x14002572e
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 0x140025289
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
lea rcx, [0x140284c9c]
mov rax, rbx
inc rax
cmp word [rcx + rax*2], 0
jne 0x140025293
mov r8d, eax
mov rdx, rcx
lea rcx, [rbp + 0x48]
call fcn.1400127b0
lea rcx, [rbp - 0x20]
call fcn.140034df0
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 0x140025723
test rsi, rsi
jne 0x1400252e0
mov r14d, edi
jmp 0x1400252f2
mov rdx, rcx
mov rcx, rsi
call fcn.14025660c
mov r14, rax
mov rax, qword [rbp + 0x48]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x140025723
lea edi, [r15 + r14]
test edi, edi
js 0x140025723
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x14002532d
mov edx, edi
lea rcx, [rbp + 0x48]
call fcn.140005980
mov rax, qword [rbp + 0x48]
cmp r12, r15
ja 0x140025336
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x140025371
test rcx, rcx
je 0x14002535d
test rsi, rsi
je 0x140025356
mov rdx, rsi
call fcn.140245860
jmp 0x14002536d
xor edx, edx
call fcn.140245f10
call fcn.1402549dc
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024a82c
mov rax, qword [rbp + 0x48]
cmp edi, dword [rax - 0xc]
jg 0x140025723
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 0x1400253a7
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 0x1400253df
lea r8, [0x140284a60]
lea rdx, str.Updater:
lea rcx, str.RunUpdatedApp_toRun...
call fcn.140039ff0
xor edx, edx
mov rcx, qword [rbp + 0x48]
call fcn.14002a980
jmp 0x1400256de
call fcn.140038470
lea r8, [0x1403685a8]
test al, al
je 0x1400256ab
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x1403685a8]
lea rdx, [0x140368668]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae rdx, qword [0x140368668]
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
lea r8, [0x140284a60]
lea rdx, str.Updater:
lea rcx, str.RestoreUsingDir_toRun...
call fcn.140039ff0
lea rcx, [rbp + 0x50]
call fcn.140035410
nop
mov rax, rbx
lea rdx, str.main_
inc rax
cmp word [rdx + rax*2], 0
jne 0x140025453
mov r8d, eax
lea rcx, [rbp + 0x50]
call fcn.1400127b0
lea rcx, [rbp - 0x18]
call fcn.1400376e0
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 0x14002575a
test rsi, rsi
jne 0x14002549d
mov r14d, edi
jmp 0x1400254af
mov rdx, rcx
mov rcx, rsi
call fcn.14025660c
mov r14, rax
mov rax, qword [rbp + 0x50]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14002575a
lea edi, [r14 + r15]
test edi, edi
js 0x14002575a
mov edx, r13d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, edx
jge 0x1400254ea
mov edx, edi
lea rcx, [rbp + 0x50]
call fcn.140005980
mov rax, qword [rbp + 0x50]
cmp r12, r15
ja 0x1400254f3
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14002552e
test rcx, rcx
je 0x14002551a
test rsi, rsi
je 0x140025513
mov rdx, rsi
call fcn.140245860
jmp 0x14002552a
xor edx, edx
call fcn.140245f10
call fcn.1402549dc
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024a82c
mov rax, qword [rbp + 0x50]
cmp edi, dword [rax - 0xc]
jg 0x14002575a
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 0x140025564
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
mov rax, rbx
lea rdx, [0x140284c9c]
nop
inc rax
cmp word [rdx + rax*2], 0
jne 0x140025570
mov r8d, eax
lea rcx, [rbp + 0x50]
call fcn.1400127b0
lea rcx, [rbp - 0x10]
call fcn.140034df0
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 0x14002574f
test rsi, rsi
jne 0x1400255ba
mov r14d, edi
jmp 0x1400255cc
mov rdx, rcx
mov rcx, rsi
call fcn.14025660c
mov r14, rax
mov rax, qword [rbp + 0x50]
mov ecx, 0x7fffffff
sub ecx, r14d
cmp ecx, r15d
jl 0x14002574f
lea edi, [r14 + r15]
test edi, edi
js 0x14002574f
sub r13d, dword [rax - 8]
mov ecx, dword [rax - 0xc]
sub ecx, edi
or ecx, r13d
jge 0x140025606
mov edx, edi
lea rcx, [rbp + 0x50]
call fcn.140005980
mov rax, qword [rbp + 0x50]
cmp r12, r15
ja 0x14002560f
lea rsi, [rax + r12*2]
lea rcx, [rax + r15*2]
movsxd r8, r14d
add r8, r8
je 0x14002564a
test rcx, rcx
je 0x140025636
test rsi, rsi
je 0x14002562f
mov rdx, rsi
call fcn.140245860
jmp 0x140025646
xor edx, edx
call fcn.140245f10
call fcn.1402549dc
mov dword [rax], reloc.WS2_32.dll_shutdown
call fcn.14024a82c
mov rax, qword [rbp + 0x50]
cmp edi, dword [rax - 0xc]
jg 0x14002574f
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 0x140025680
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
xor edx, edx
mov rcx, qword [rbp + 0x50]
call fcn.14002a980
nop
mov rdx, qword [rbp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400256de
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
jmp 0x1400256de
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae r8, qword [0x1403685a8]
lea rdx, [0x140368648]
cmp qword [reloc.WS2_32.dll_getsockopt], 8
cmovae rdx, qword [0x140368648]
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 0x1400256f9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
lea r8, [0x140284a60]
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.140039ff0
mov ecx, 0x80070057
call fcn.140004b20
nop
mov ecx, 0x80070057
call fcn.140004b20
nop
mov ecx, 0x80004005
call fcn.140004b20
nop
mov ecx, 0x80070057
call fcn.140004b20
nop
mov ecx, 0x80070057
call fcn.140004b20
nop
mov ecx, 0x80070057
call fcn.140004b20
int3