Function at 0x140085840
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r15
lea rbp, [rsp - 0xbe0]
sub rsp, 0xce0
xorps xmm0, xmm0
mov rsi, rcx
lea rcx, [rbp + 0x1d0]
xor edx, edx
mov r8d, 0x208
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
call fcn.14014e180
xor edx, edx
lea rcx, [rbp - 0x40]
mov r8d, 0x208
call fcn.14014e180
mov r8d, 0x104
lea rdx, [rbp + 0x1d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdx, [rbp - 0x40]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
xor r12d, r12d
mov ebx, 0x103
lea rdi, [r12 - 1]
test eax, eax
jne 0x14008591b
mov r9, rdi
lea r8, [rbp + 0x1d0]
mov edx, ebx
lea rcx, [rbp - 0x40]
call fcn.14003c5c8
lea edx, [rdi + 0x5d]
lea rcx, [rbp - 0x40]
call fcn.140031060
test rax, rax
je 0x14008590c
lea rcx, [rbp - 0x40]
sub rax, rcx
sar rax, 1
jmp 0x14008590e
mov eax, edi
movsxd rcx, eax
test eax, eax
je 0x14008591b
mov word [rbp + rcx*2 - 0x40], r12w
lea rcx, [rbp - 0x40]
nop
cmp word [rcx], r12w
je 0x140085932
add rcx, 2
sub rbx, 1
jne 0x140085920
jmp 0x14008595b
lea r8, str.mtuninstall.bat
mov rdx, rcx
sub r8, rcx
nop
movzx eax, word [r8 + rdx]
mov word [rdx], ax
lea rdx, [rdx + 2]
test ax, ax
je 0x14008595b
sub rbx, 1
jne 0x140085940
mov word [rcx], r12w
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x800
call fcn.14014e180
mov rax, qword [rsi + 0xa8]
test byte [rax + 0x850], 1
je 0x1400859d3
mov rbx, qword [0x1401f33a8]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, [rbp - 0x40]
mov r8, rdi
mov qword [rsp + 0x40], rcx
lea r9, str.cd_r_n__S___processwait:_u_r_ndel__Q___S__r_nrd___S__r_ndel__Q___S__r_n
mov qword [rsp + 0x38], rbx
lea rcx, [rbp + 0x1d0]
mov qword [rsp + 0x30], rcx
mov edx, 0x7ff
mov dword [rsp + 0x28], eax
lea rcx, [rbp + 0x3e0]
lea rax, [rbp + 0x1d0]
mov qword [rsp + 0x20], rax
call fcn.140005670
jmp 0x140085a19
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, [rbp - 0x40]
mov r8, rdi
mov qword [rsp + 0x38], rcx
lea r9, str.cd_r_n__S___processwait:_u_r_ndel__Q___S__r_ndel__Q___S__r_n
lea rcx, [rbp + 0x1d0]
mov edx, 0x7ff
mov qword [rsp + 0x30], rcx
lea rcx, [rbp + 0x3e0]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x1d0]
mov qword [rsp + 0x20], rax
call fcn.140005670
test eax, eax
sete r15b
test r15b, r15b
je 0x140085b57
mov qword [rsp + 0xd18], r14
lea rax, [rbp + 0x3e0]
inc rdi
cmp byte [rax + rdi], r12b
jne 0x140085a37
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp - 0x40]
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140085b51
mov rsi, rdi
mov rbx, r12
test rdi, rdi
je 0x140085ade
nop dword [rax]
nop word [rax + rax]
mov r8d, 0xfffffff
mov dword [rbp + 0xc10], r12d
cmp rsi, r8
mov qword [rsp + 0x20], r12
lea rdx, [rbp + 0x3e0]
mov rcx, r14
cmovb r8d, esi
lea r9, [rbp + 0xc10]
add rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140085ad7
mov eax, dword [rbp + 0xc10]
add rbx, rax
sub rsi, rax
jne 0x140085a90
jmp 0x140085ade
mov dword [rbp + 0xc10], r12d
lock add qword [0x1401f4d68], rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rbx, rdi
jne 0x140085b51
lea rax, str.Open
mov dword [rsp + 0x50], WSAStartup
mov qword [rsp + 0x60], rax
lea rcx, [rsp + 0x50]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x68], rax
mov dword [rbp - 0x80], r12d
mov dword [rsp + 0x54], 0x40
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
setne al
mov r14, qword [rsp + 0xd18]
mov rbx, qword [rsp + 0xd20]
add rsp, 0xce0
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
movzx eax, r15b
jmp 0x140085b32
movzx eax, r15b
jmp 0x140085b3a