Function at 0x1400937d8
Capabilities:
Copy file
Create a process with modified i/o handles and window
Create directory
Create process on windows
Delete directory
Delete registry key
Get common file path
Get installed programs
Query or enumerate registry value
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [0x1402ccee0]
xor rax, rsp
mov qword [rbp + 0x590], rax
xor r14d, r14d
mov qword [rsp + 0x50], r9
mov edi, r14d
movsxd r13, r8d
mov qword [rsp + 0x68], rdx
mov r12d, ecx
call fcn.140092b38
test eax, eax
jne 0x14009385d
lea rcx, str.Requires_administrator_permissions._r_n
call fcn.140001090
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.1401a5d00
mov rbx, qword [rsp + 0x6e0]
add rsp, 0x6a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.Performing_uninstall..._r_n
test r12d, r12d
jne 0x140093870
lea rcx, str.Performing_install..._r_n
call fcn.140001090
lea rax, [rsp + 0x60]
mov dword [rsp + 0x58], r14d
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetServicesMesh_Agent
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1400939c6
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea rdx, str.ImagePath
xor r9d, r9d
mov qword [rsp + 0x20], r14
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1400939bb
mov ecx, dword [rsp + 0x58]
test ecx, ecx
je 0x1400939bb
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call fcn.1400791e8
mov rcx, qword [rsp + 0x60]
lea rdx, str.ImagePath
mov rbx, rax
xor r9d, r9d
lea rax, [rsp + 0x58]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rdx, rbx
lea rcx, str.ImagePath:__s_n
call fcn.140001090
xor edx, edx
mov dword [rbp - 0x70], 0x68
lea rcx, [rbp - 0x68]
lea r8d, [rdx + 0x60]
call fcn.1401a72b0
mov r9, rbx
lea r8, str._s__exec__try__require_service_manager_.manager.uninstallService_meshagentDiagnostic___require_task_scheduler_.delete_meshagentDiagnostic_periodicStart_.then_function__process.exit_____function__process.exit_______catch_e_process.exit____
mov edx, 0x1000
lea rcx, [0x1402cffc0]
call fcn.1400010e4
lea rax, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [0x1402cffc0]
lea rax, [rbp - 0x70]
xor r8d, r8d
mov qword [rsp + 0x40], rax
xor ecx, ecx
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call fcn.1401ad038
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.140093628
mov ebx, r14d
mov ecx, 0x64
inc ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.1400934cc
cmp eax, 3
jne 0x1400939ed
cmp ebx, 0x190
jl 0x1400939ce
lea rcx, str.Mesh_Agent
call fcn.140093414
lea rcx, [0x1402abc08]
call fcn.140093414
mov r15d, 0x104
lea rdx, [rbp + 0x240]
mov r8d, r15d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebx, eax
xor r9d, r9d
lea rax, [rbp + 0x111]
xor r8d, r8d
mov edx, 0x8026
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea esi, [r15 + 0x28]
cmp eax, 1
je 0x140093a89
mov edx, esi
mov byte [rbp + 0x110], 0x22
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov rdi, rax
cmp rax, r15
ja 0x140093a85
mov edx, esi
lea rcx, [rbp + 0x111]
sub rdx, rax
lea r8, str.Mesh_AgentMeshAgent.exe___uninstall
add rcx, rax
mov r9d, 0x26
call section..text
add rdi, 0x19
test r12d, r12d
je 0x140093b3b
cmp rdi, rbx
jne 0x140093b3b
mov r8, rdi
lea rdx, [rbp + 0x111]
lea rcx, [rbp + 0x240]
call fcn.1401a71d0
test eax, eax
jne 0x140093b3b
lea rdx, [rbp + 0x460]
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
lea rbx, [rbp + 0x460]
mov r9d, reloc.WS2_32.dll_ntohs
sub esi, eax
lea r8, [0x1402ac088]
cdqe
add rbx, rax
movsxd rdi, esi
mov rcx, rbx
mov rdx, rdi
call section..text
lea rcx, [rbp + 0x460]
call fcn.1401b4cc8
xor r8d, r8d
lea rdx, [rbp + 0x460]
lea rcx, [rbp + 0x240]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
mov r9d, 0x1e
lea r8, str.MeshAgent.exe__fulluninstall
mov rdx, rdi
mov rcx, rbx
call section..text
xor edx, edx
lea rcx, [rbp + 0x460]
jmp 0x140094472
mov edx, 1
lea rcx, [rbp + 0x110]
call fcn.1400936ec
mov r15, 0xffffffff80000002
lea rdx, [0x140231cd8]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea rdx, [0x140231cd8]
lea rcx, [r15 - 1]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionUninstallMeshCentralAgent
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test r12d, r12d
jne 0x140093bac
cmp rdi, rbx
jne 0x140093bac
mov r8, rdi
lea rdx, [rbp + 0x111]
lea rcx, [rbp + 0x240]
call fcn.1401a71d0
test eax, eax
je 0x140094405
mov ebx, r14d
mov byte [rbp + rdi + 0x111], r14b
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp + 0x111]
inc ebx
call fcn.1401b4cc8
inc eax
cmp eax, 1
jbe 0x140093bdf
cmp ebx, 0x190
jl 0x140093bb7
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov rbx, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd r15, ebx
lea r8, [rbp + 0x111]
mov r9, r15
lea rcx, [rbp]
mov edx, 0x104
call section..text
lea eax, [rbx - 3]
mov r14d, 0x101
movsxd rcx, eax
lea r8, [0x1402ac0b8]
lea rax, [rbp]
mov edx, r14d
add rcx, rax
sub rdx, r15
mov r9d, 4
call section..text
cmp r15, 0x104
jae 0x14009449a
lea rcx, [rbp]
mov byte [rbp + r15], 0
call fcn.1401b4cc8
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea edx, [r14 + 3]
lea rcx, [rbp]
call section..text
lea eax, [r15 - 3]
mov edx, r14d
movsxd rcx, eax
lea r8, str.mshx
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 5
call section..text
lea eax, [r15 + 1]
movsxd rcx, eax
cmp rcx, 0x104
jae 0x140094494
mov byte [rbp + rcx], 0
lea rcx, [rbp]
call fcn.1401b4cc8
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xfd
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea edx, [r14 + 3]
lea rcx, [rbp]
call section..text
lea eax, [r15 - 3]
mov edx, r14d
movsxd rcx, eax
lea r8, str.proxy
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 6
call section..text
lea eax, [r15 + 2]
movsxd rcx, eax
cmp rcx, 0x104
jae 0x14009448e
mov byte [rbp + rcx], 0
lea rcx, [rbp]
call fcn.1401b4cc8
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea edx, [r14 + 3]
lea rcx, [rbp]
call section..text
lea eax, [r15 - 3]
mov edx, r14d
movsxd rcx, eax
lea r8, [0x1402ac0c4]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
cmp rbx, 0x104
jae 0x140094488
lea rcx, [rbp]
mov byte [rbp + rbx], 0
call fcn.1401b4cc8
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea edx, [r14 + 3]
lea rcx, [rbp]
call section..text
lea eax, [r15 - 3]
mov edx, r14d
movsxd rcx, eax
lea r8, [0x14023b588]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
cmp rbx, 0x104
jae 0x140094482
lea rcx, [rbp]
mov byte [rbp + rbx], 0
call fcn.1401b4cc8
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xfc
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea edx, [r14 + 3]
lea rcx, [rbp]
call section..text
lea eax, [r15 - 3]
mov edx, r14d
movsxd rcx, eax
lea r8, [0x1402ac0c8]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 3
call section..text
lea r15d, [r14 + 3]
cmp rbx, r15
jae 0x14009447c
lea rcx, [rbp]
mov byte [rbp + rbx], 0
call fcn.1401b4cc8
lea rcx, [rbp + 0x111]
mov byte [rbp + rdi + 0x103], 0
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test r12d, r12d
jne 0x140093833
xor edx, edx
lea rcx, [rbp + 0x111]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140093f5f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140093f5f
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
lea rdx, str.ServiceMain.c
lea rcx, str.Access_denied__1_
mov dword [rsp + 0x20], eax
mov r8d, 0x306
call fcn.14007f3d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Access_denied__1_
mov r8d, eax
lea rcx, str.ILIBMSG:__s___d_._r_n
call fcn.140001090
jmp 0x140093833
xor ebx, ebx
mov byte [rbp + rdi + 0x103], 0x5c
lea r12d, [rbx + 1]
jmp 0x140093f97
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x140094186
mov eax, ebx
add ebx, r12d
cmp eax, 5
jg 0x14009414e
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8d, r12d
lea rdx, [rbp + 0x111]
lea rcx, [rbp + 0x240]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x140093f6f
mov rdx, r15
lea rcx, [rbp + 0x240]
call fcn.1401ade00
mov r15, rax
cmp eax, 4
jl 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x240]
mov r9, rbx
lea rcx, [rbp + 0x350]
mov edx, 0x104
call section..text
lea eax, [r15 - 3]
mov rdx, r14
movsxd rcx, eax
lea r8, [0x1402ac0b8]
lea rax, [rbp + 0x350]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea rcx, [rbp]
mov edx, 0x104
call section..text
lea eax, [r15 - 3]
mov rdx, r14
movsxd rcx, eax
lea r8, [0x1402ac0b8]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
mov r8d, r12d
lea rdx, [rbp]
lea rcx, [rbp + 0x350]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
mov r12, qword [rsp + 0x50]
test r12, r12
je 0x1400941c7
and qword [rsp + 0x50], 0
lea rcx, [rbp + 0x111]
mov rdx, rsi
call fcn.1401ade00
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x111]
mov r9, rbx
lea rcx, [rbp]
mov edx, 0x104
call section..text
lea eax, [r15 - 3]
mov rdx, r14
movsxd rcx, eax
lea r8, [0x1402ac0c4]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
movsxd rbx, dword [rbp + 0x600]
test ebx, ebx
jle 0x1400941be
lea r8, [0x140231b68]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.1401acfe0
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x1400941c7
mov r8, rbx
mov edx, 1
mov rcx, r12
call fcn.1401acc60
mov rcx, qword [rsp + 0x50]
call fcn.1401a8b70
jmp 0x1400941c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
lea rdx, str.ServiceMain.c
lea rcx, str.Error_copying_executable_file
mov dword [rsp + 0x20], eax
mov r8d, 0x30e
call fcn.14007f3d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error_copying_executable_file
jmp 0x140093f4b
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
lea rdx, str.ServiceMain.c
lea rcx, str.Access_denied__2_
mov dword [rsp + 0x20], eax
mov r8d, 0x30d
call fcn.14007f3d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Access_denied__2_
jmp 0x140093f4b
lea rcx, [rbp]
call fcn.1401b4cc8
mov r12d, 0x104
lea rcx, [rbp + 0x240]
mov edx, r12d
call fcn.1401ade00
mov r15, rax
cmp eax, 4
jl 0x140093833
movsxd rbx, r15d
lea r8, [rbp + 0x240]
mov r9, rbx
lea rcx, [rbp + 0x350]
mov edx, r12d
call section..text
lea eax, [r15 - 3]
mov rdx, r14
movsxd rcx, eax
lea r8, str.proxy
lea rax, [rbp + 0x350]
mov r15d, 6
add rcx, rax
sub rdx, rbx
mov r9d, r15d
call section..text
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.1401ade00
mov rsi, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140093833
movsxd rbx, esi
lea r8, [rbp + 0x111]
mov r9, rbx
lea rcx, [rbp]
mov edx, r12d
call section..text
lea eax, [rsi - 3]
sub r14, rbx
movsxd rcx, eax
lea r8, str.proxy
lea rax, [rbp]
mov r9d, r15d
add rcx, rax
mov rdx, r14
call section..text
mov rbx, qword [rsp + 0x68]
xor esi, esi
test rbx, rbx
je 0x1400942e2
test r13d, r13d
jle 0x1400942e2
lea r8, [0x140231b68]
mov qword [rsp + 0x50], rsi
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.1401acfe0
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x140094405
mov r8, r13
lea edx, [rsi + 1]
mov rcx, rbx
call fcn.1401acc60
mov rcx, qword [rsp + 0x50]
call fcn.1401a8b70
jmp 0x140094405
mov r8d, 1
lea rdx, [rbp]
lea rcx, [rbp + 0x350]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140094405
lea rcx, [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x140094405
mov r9, qword [rbp - 0x80]
test r9, r9
je 0x1400943e6
lea r14, [0x1402cffc0]
mov qword [rsp + 0x50], rsi
mov rdx, r14
mov qword [rsp + 0x20], 0x7d0
mov r8d, 0xfff
lea rcx, [rsp + 0x68]
call fcn.1401b3c2c
test eax, eax
jne 0x1400943dc
lea rdx, str.https
mov rcx, r14
call fcn.1401a6fc0
mov rbx, rax
test rax, rax
je 0x140094384
lea rdx, [0x1402ab438]
mov rcx, rax
call fcn.1401a6fc0
add rbx, r15
test rax, rax
je 0x140094387
mov byte [rax], sil
jmp 0x140094387
mov rbx, r14
lea r8, [0x140231b68]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.1401acfe0
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x1400943dc
test rbx, rbx
jne 0x1400943b0
mov rax, rsi
jmp 0x1400943c2
mov edx, 0x1000
mov rcx, rbx
call fcn.1401ade00
mov r9, qword [rsp + 0x50]
mov r8, rax
mov edx, 1
mov rcx, rbx
call fcn.1401acc60
mov rcx, qword [rsp + 0x50]
call fcn.1401a8b70
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1400943f6
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x140094405
call qword [sym.imp.KERNEL32.dll_GlobalFree]
call fcn.140092ce4
movzx eax, word [0x1402ac140]
lea rcx, [rbp + 0x110]
movsd xmm0, qword [str.___install]
mov edx, 1
movsd qword [rbp + rdi + 0x111], xmm0
mov word [rbp + rdi + 0x119], ax
mov al, byte [0x1402ac142]
mov byte [rbp + rdi + 0x11b], al
call fcn.1400936ec
movsd xmm0, qword [str.___start]
lea rcx, [rbp + 0x110]
mov al, byte [0x1402ac150]
mov edx, 1
movsd qword [rbp + rdi + 0x111], xmm0
mov byte [rbp + rdi + 0x119], al
call fcn.1400936ec
jmp 0x140093833
call fcn.1401a5e2c
int3
call fcn.1401a5e2c
int3
call fcn.1401a5e2c
int3
call fcn.1401a5e2c
int3
call fcn.1401a5e2c
int3
call fcn.1401a5e2c
int3