Function at 0x14009217c
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 [0x140271510]
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.1400914dc
test eax, eax
jne 0x140092201
lea rcx, str.Requires_administrator_permissions._r_n
call fcn.140001090
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.14016d990
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 0x140092214
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 0x14009236a
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 0x14009235f
mov ecx, dword [rsp + 0x58]
test ecx, ecx
je 0x14009235f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call fcn.1400780d8
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.14016ef40
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, [0x140275180]
call fcn.1400010e4
lea rax, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x48], rax
lea rdx, [0x140275180]
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.140174cc8
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.140091fcc
mov ebx, r14d
mov ecx, 0x64
inc ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140091e70
cmp eax, 3
jne 0x140092391
cmp ebx, 0x190
jl 0x140092372
lea rcx, str.Mesh_Agent
call fcn.140091db8
lea rcx, [0x140254388]
call fcn.140091db8
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 0x14009242d
mov edx, esi
mov byte [rbp + 0x110], 0x22
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov rdi, rax
cmp rax, r15
ja 0x140092429
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 0x1400924df
cmp rdi, rbx
jne 0x1400924df
mov r8, rdi
lea rdx, [rbp + 0x111]
lea rcx, [rbp + 0x240]
call fcn.14016ee60
test eax, eax
jne 0x1400924df
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, [0x140254808]
cdqe
add rbx, rax
movsxd rdi, esi
mov rcx, rbx
mov rdx, rdi
call section..text
lea rcx, [rbp + 0x460]
call fcn.14017c938
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 0x140092e16
mov edx, 1
lea rcx, [rbp + 0x110]
call fcn.140092090
mov r15, 0xffffffff80000002
lea rdx, [0x1401e8f48]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea rdx, [0x1401e8f48]
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 0x140092550
cmp rdi, rbx
jne 0x140092550
mov r8, rdi
lea rdx, [rbp + 0x111]
lea rcx, [rbp + 0x240]
call fcn.14016ee60
test eax, eax
je 0x140092da9
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.14017c938
inc eax
cmp eax, 1
jbe 0x140092583
cmp ebx, 0x190
jl 0x14009255b
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov rbx, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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, [0x140254838]
lea rax, [rbp]
mov edx, r14d
add rcx, rax
sub rdx, r15
mov r9d, 4
call section..text
cmp r15, 0x104
jae 0x140092e3e
lea rcx, [rbp]
mov byte [rbp + r15], 0
call fcn.14017c938
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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 0x140092e38
mov byte [rbp + rcx], 0
lea rcx, [rbp]
call fcn.14017c938
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xfd
ja 0x1400921d7
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 0x140092e32
mov byte [rbp + rcx], 0
lea rcx, [rbp]
call fcn.14017c938
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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, [0x140254844]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
cmp rbx, 0x104
jae 0x140092e2c
lea rcx, [rbp]
mov byte [rbp + rbx], 0
call fcn.14017c938
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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, [0x1401f2680]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
cmp rbx, 0x104
jae 0x140092e26
lea rcx, [rbp]
mov byte [rbp + rbx], 0
call fcn.14017c938
mov rdx, rsi
lea rcx, [rbp + 0x111]
call fcn.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xfc
ja 0x1400921d7
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, [0x140254848]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 3
call section..text
lea r15d, [r14 + 3]
cmp rbx, r15
jae 0x140092e20
lea rcx, [rbp]
mov byte [rbp + rbx], 0
call fcn.14017c938
lea rcx, [rbp + 0x111]
mov byte [rbp + rdi + 0x103], 0
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test r12d, r12d
jne 0x1400921d7
xor edx, edx
lea rcx, [rbp + 0x111]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140092903
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140092903
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.14007ddcc
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 0x1400921d7
xor ebx, ebx
mov byte [rbp + rdi + 0x103], 0x5c
lea r12d, [rbx + 1]
jmp 0x14009293b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x140092b2a
mov eax, ebx
add ebx, r12d
cmp eax, 5
jg 0x140092af2
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 0x140092913
mov rdx, r15
lea rcx, [rbp + 0x240]
call fcn.140175a7c
mov r15, rax
cmp eax, 4
jl 0x1400921d7
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, [0x140254838]
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.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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, [0x140254838]
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 0x140092b6b
and qword [rsp + 0x50], 0
lea rcx, [rbp + 0x111]
mov rdx, rsi
call fcn.140175a7c
mov r15, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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, [0x140254844]
lea rax, [rbp]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
movsxd rbx, dword [rbp + 0x600]
test ebx, ebx
jle 0x140092b62
lea r8, [0x1401e8df8]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.140174c70
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x140092b6b
mov r8, rbx
mov edx, 1
mov rcx, r12
call fcn.1401748f0
mov rcx, qword [rsp + 0x50]
call fcn.140170800
jmp 0x140092b6b
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.14007ddcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error_copying_executable_file
jmp 0x1400928ef
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.14007ddcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Access_denied__2_
jmp 0x1400928ef
lea rcx, [rbp]
call fcn.14017c938
mov r12d, 0x104
lea rcx, [rbp + 0x240]
mov edx, r12d
call fcn.140175a7c
mov r15, rax
cmp eax, 4
jl 0x1400921d7
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.140175a7c
mov rsi, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x1400921d7
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 0x140092c86
test r13d, r13d
jle 0x140092c86
lea r8, [0x1401e8df8]
mov qword [rsp + 0x50], rsi
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.140174c70
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x140092da9
mov r8, r13
lea edx, [rsi + 1]
mov rcx, rbx
call fcn.1401748f0
mov rcx, qword [rsp + 0x50]
call fcn.140170800
jmp 0x140092da9
mov r8d, 1
lea rdx, [rbp]
lea rcx, [rbp + 0x350]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140092da9
lea rcx, [rsp + 0x70]
call qword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x140092da9
mov r9, qword [rbp - 0x80]
test r9, r9
je 0x140092d8a
lea r14, [0x140275180]
mov qword [rsp + 0x50], rsi
mov rdx, r14
mov qword [rsp + 0x20], 0x7d0
mov r8d, 0xfff
lea rcx, [rsp + 0x68]
call fcn.14017b89c
test eax, eax
jne 0x140092d80
lea rdx, str.https
mov rcx, r14
call fcn.14016ec50
mov rbx, rax
test rax, rax
je 0x140092d28
lea rdx, [0x140253bb8]
mov rcx, rax
call fcn.14016ec50
add rbx, r15
test rax, rax
je 0x140092d2b
mov byte [rax], sil
jmp 0x140092d2b
mov rbx, r14
lea r8, [0x1401e8df8]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.140174c70
mov r9, qword [rsp + 0x50]
test r9, r9
je 0x140092d80
test rbx, rbx
jne 0x140092d54
mov rax, rsi
jmp 0x140092d66
mov edx, 0x1000
mov rcx, rbx
call fcn.140175a7c
mov r9, qword [rsp + 0x50]
mov r8, rax
mov edx, 1
mov rcx, rbx
call fcn.1401748f0
mov rcx, qword [rsp + 0x50]
call fcn.140170800
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140092d9a
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x140092da9
call qword [sym.imp.KERNEL32.dll_GlobalFree]
call fcn.140091688
movzx eax, word [0x1402548c0]
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 [0x1402548c2]
mov byte [rbp + rdi + 0x11b], al
call fcn.140092090
movsd xmm0, qword [str.___start]
lea rcx, [rbp + 0x110]
mov al, byte [0x1402548d0]
mov edx, 1
movsd qword [rbp + rdi + 0x111], xmm0
mov byte [rbp + rdi + 0x119], al
call fcn.140092090
jmp 0x1400921d7
call fcn.14016dabc
int3
call fcn.14016dabc
int3
call fcn.14016dabc
int3
call fcn.14016dabc
int3
call fcn.14016dabc
int3
call fcn.14016dabc
int3