Function at 0x1400f6ec4
Capabilities:
Create process on windows
Delete file
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x860
mov rax, qword [0x1401f5698]
xor rax, rsp
mov qword [rsp + 0x850], rax
mov rdi, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x1400f6f4c
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1400f6f1f
mov rcx, rdi
call fcn.1400fb318
mov edx, 0x9c4
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400f6f3d
mov r9d, 0x6c
lea r8, [0x1401bd4e0]
lea edx, [r9 - 8]
mov rcx, qword [rdi + 8]
call fcn.14011a0f4
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [rdi + 8], 0
mov rcx, rdi
call fcn.1400f8d34
lea rcx, [rdi + 0x20]
mov dl, 1
call fcn.1400f8d08
mov rcx, qword [rdi + 0x5b8]
test rcx, rcx
je 0x1400f6f78
call fcn.140113e18
and qword [rdi + 0x5b8], 0
mov eax, dword [rdi + 0xd4]
sub eax, 5
cmp eax, 1
ja 0x1400f70b8
cmp qword [rdi + 0x88], 0
je 0x1400f70b8
mov rcx, rdi
call fcn.1400fbd7c
xor edx, edx
lea rcx, [0x140179a28]
call fcn.1401145e0
mov rbp, rax
mov rcx, qword [rdi + 0x88]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0x10
movsxd rbx, eax
mov edx, 2
mov rcx, rbx
call fcn.140113de8
mov rsi, rax
mov r9, qword [rdi + 0x88]
lea r8, str._c____s__
mov rdx, rbx
mov rcx, rax
call fcn.1401145a0
lea rdx, [0x140178be8]
lea rcx, str.ConEmuInUpdate
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rax, str.runas
lea rdx, str.open
cmp byte [rdi + 0xd0], 0
cmovne rdx, rax
mov dword [rsp + 0x28], 2
and qword [rsp + 0x20], 0
mov r9, rsi
mov r8, rbp
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp rax, 0x20
jg 0x1400f709e
mov r9d, eax
mov r8, qword [rdi + 0x88]
lea rdx, str.Failed_to_start_update_batch_n_s_nError_code_i
lea rcx, [rsp + 0x30]
call fcn.1400011cc
mov byte [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x140178678]
mov edx, 0x1010
lea rcx, [rsp + 0x30]
call fcn.1400297d8
mov rcx, qword [rdi + 0x88]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rax, qword [rdi + 0x40]
test rax, rax
je 0x1400f7091
cmp byte [rax + 0x68], 0
jne 0x1400f709e
mov rcx, qword [rdi + 0x80]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test rbp, rbp
je 0x1400f70ab
mov rcx, rbp
call fcn.140113e18
test rsi, rsi
je 0x1400f70b8
mov rcx, rsi
call fcn.140113e18
mov rcx, qword [rdi + 0x88]
test rcx, rcx
je 0x1400f70d1
call fcn.140113e18
and qword [rdi + 0x88], 0
mov rcx, qword [rdi + 0x80]
test rcx, rcx
je 0x1400f70ea
call fcn.140113e18
and qword [rdi + 0x80], 0
mov rbx, qword [rdi + 0x40]
test rbx, rbx
je 0x1400f710d
mov rcx, rbx
call fcn.1400fbf5c
mov edx, 0x70
mov rcx, rbx
call fcn.14012bc14
and qword [rdi + 0x40], 0
lea rcx, [rdi + 0x58]
call fcn.14000bed0
mov rcx, qword [rdi + 0x60]
test rcx, rcx
je 0x1400f7129
call fcn.140113e18
and qword [rdi + 0x60], 0
lea rcx, [rdi + 0xc0]
call fcn.140114ca4
lea rcx, [rdi + 0xb0]
call fcn.140114ca4
lea rcx, [rdi + 0xa0]
call fcn.140114ca4
lea rcx, [rdi + 0x90]
call fcn.140114ca4
nop
mov rcx, qword [rsp + 0x850]
xor rcx, rsp
call fcn.14012bda0
lea r11, [rsp + 0x860]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret