Function at 0x1400817e4
Capabilities:
Copy file
Create directory
Delete directory
Delete registry key
Get common file path
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 - 0x3d0]
sub rsp, 0x4d0
mov rax, qword [0x1401ff510]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov qword [rsp + 0x30], r9
mov r13, rdx
movsxd r12, r8d
mov r15d, ecx
xor edi, edi
call fcn.140081640
lea rcx, str.Mesh_Agent
call fcn.140081428
lea rcx, [0x1401e3a28]
call fcn.140081428
mov esi, 0x104
lea rdx, [rbp + 0x1a0]
mov r8d, esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebx, eax
xor r9d, r9d
lea rax, [rbp + 0x71]
xor r8d, r8d
mov edx, 0x8026
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea r14d, [rsi + 0x28]
cmp eax, 1
je 0x1400818ba
mov edx, r14d
mov byte [rbp + 0x70], 0x22
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov rdi, rax
cmp rax, rsi
ja 0x1400818b6
mov edx, r14d
lea rcx, [rbp + 0x71]
sub rdx, rax
lea r8, str.Mesh_AgentMeshAgent.exe___uninstall
add rcx, rax
mov r9d, 0x26
call section..text
add rdi, 0x19
lea rcx, [rbp + 0x70]
call fcn.140081704
lea rdx, str.SoftwareOpen_SourceMeshAgent2
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea rdx, str.SoftwareOpen_SourceMeshAgent2
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
cmp rdi, rbx
jne 0x14008190b
mov r8, rdi
lea rdx, [rbp + 0x71]
lea rcx, [rbp + 0x1a0]
call fcn.14015dad0
test eax, eax
je 0x14008213c
lea rcx, [rbp + 0x71]
mov byte [rbp + rdi + 0x71], 0
call fcn.14016b580
mov rdx, r14
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov rbx, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd r14, ebx
lea r8, [rbp + 0x71]
mov r9, r14
lea rcx, [rsp + 0x60]
mov rdx, rsi
call section..text
lea eax, [rbx - 3]
mov esi, 0x101
movsxd rcx, eax
lea r8, [0x1401e3b00]
lea rax, [rsp + 0x60]
mov edx, esi
add rcx, rax
sub rdx, r14
mov r9d, 4
call section..text
cmp r14, 0x104
jae 0x1400821ad
lea rcx, [rsp + 0x60]
mov byte [rsp + r14 + 0x60], 0
call fcn.14016b580
lea edx, [rsi + 0x2b]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov r14, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x71]
mov r9, rbx
lea edx, [rsi + 3]
lea rcx, [rsp + 0x60]
call section..text
lea eax, [r14 - 3]
mov edx, esi
movsxd rcx, eax
lea r8, str.mshx
lea rax, [rsp + 0x60]
sub rdx, rbx
add rcx, rax
mov r9d, 5
call section..text
lea eax, [r14 + 1]
movsxd rcx, eax
cmp rcx, 0x104
jae 0x1400821a7
mov byte [rsp + rcx + 0x60], 0
lea rcx, [rsp + 0x60]
call fcn.14016b580
lea edx, [rsi + 0x2b]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov r14, rax
lea ecx, [rax - 4]
cmp ecx, 0xfd
ja 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x71]
mov r9, rbx
lea edx, [rsi + 3]
lea rcx, [rsp + 0x60]
call section..text
lea eax, [r14 - 3]
mov edx, esi
movsxd rcx, eax
lea r8, str.proxy
lea rax, [rsp + 0x60]
sub rdx, rbx
add rcx, rax
mov r9d, 6
call section..text
lea eax, [r14 + 2]
movsxd rcx, eax
cmp rcx, 0x104
jae 0x1400821a1
mov byte [rsp + rcx + 0x60], 0
lea rcx, [rsp + 0x60]
call fcn.14016b580
test r15d, r15d
je 0x140081bff
lea edx, [rsi + 0x2b]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov rbx, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd r14, ebx
lea r8, [rbp + 0x71]
mov r9, r14
lea edx, [rsi + 3]
lea rcx, [rsp + 0x60]
call section..text
lea eax, [rbx - 3]
mov edx, esi
movsxd rcx, eax
lea r8, [0x1401e3b0c]
lea rax, [rsp + 0x60]
sub rdx, r14
add rcx, rax
mov r9d, 4
call section..text
cmp r14, 0x104
jae 0x14008219b
lea rcx, [rsp + 0x60]
mov byte [rsp + r14 + 0x60], 0
call fcn.14016b580
lea edx, [rsi + 0x2b]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov rbx, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd r14, ebx
lea r8, [rbp + 0x71]
mov r9, r14
lea edx, [rsi + 3]
lea rcx, [rsp + 0x60]
call section..text
lea eax, [rbx - 3]
mov edx, esi
movsxd rcx, eax
lea r8, [0x1401dddc8]
lea rax, [rsp + 0x60]
sub rdx, r14
add rcx, rax
mov r9d, 4
call section..text
cmp r14, 0x104
jae 0x140082195
lea rcx, [rsp + 0x60]
mov byte [rsp + r14 + 0x60], 0
call fcn.14016b580
lea edx, [rsi + 0x2b]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov r14, rax
lea ecx, [rax - 4]
cmp ecx, 0xfc
ja 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x71]
mov r9, rbx
lea edx, [rsi + 3]
lea rcx, [rsp + 0x60]
call section..text
lea eax, [r14 - 3]
mov edx, esi
movsxd rcx, eax
lea r8, [0x1401e3b10]
lea rax, [rsp + 0x60]
sub rdx, rbx
add rcx, rax
mov r9d, 3
call section..text
cmp rbx, 0x104
jae 0x14008218f
lea rcx, [rsp + 0x60]
mov byte [rsp + rbx + 0x60], 0
call fcn.14016b580
lea rcx, [rbp + 0x71]
mov byte [rbp + rdi + 0x63], 0
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test r15d, r15d
jne 0x140081c70
xor edx, edx
lea rcx, [rbp + 0x71]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x140081c9a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140081c9a
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, 0x289
call fcn.14006e59c
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
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.14015c600
mov rbx, qword [rsp + 0x510]
add rsp, 0x4d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov byte [rbp + rdi + 0x63], 0x5c
xor ebx, ebx
jmp 0x140081cca
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x140081ebb
mov eax, ebx
inc ebx
cmp eax, 5
jg 0x140081e83
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8d, 1
lea rdx, [rbp + 0x71]
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x140081ca3
mov r15d, 0x104
lea rcx, [rbp + 0x1a0]
mov edx, r15d
call fcn.1401646ec
mov r14, rax
cmp eax, 4
jl 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x1a0]
mov r9, rbx
lea rcx, [rbp + 0x2b0]
mov edx, r15d
call section..text
lea eax, [r14 - 3]
mov rdx, rsi
movsxd rcx, eax
lea r8, [0x1401e3b00]
lea rax, [rbp + 0x2b0]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
lea edx, [r15 + 0x28]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov r14, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x71]
mov r9, rbx
lea rcx, [rsp + 0x60]
mov edx, r15d
call section..text
lea eax, [r14 - 3]
mov rdx, rsi
movsxd rcx, eax
lea r8, [0x1401e3b00]
lea rax, [rsp + 0x60]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
mov r8d, 1
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
mov r15, qword [rsp + 0x30]
test r15, r15
je 0x140081efd
and qword [rsp + 0x30], 0
lea rcx, [rbp + 0x71]
mov edx, 0x12c
call fcn.1401646ec
mov r14, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x71]
mov r9, rbx
lea rcx, [rsp + 0x60]
mov edx, 0x104
call section..text
lea eax, [r14 - 3]
mov rdx, rsi
movsxd rcx, eax
lea r8, [0x1401e3b0c]
lea rax, [rsp + 0x60]
sub rdx, rbx
add rcx, rax
mov r9d, 4
call section..text
movsxd rbx, dword [rbp + 0x430]
test ebx, ebx
jle 0x140081ef3
lea r8, [0x1401d5b80]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.1401638e0
mov r9, qword [rsp + 0x30]
test r9, r9
je 0x140081efd
mov r8, rbx
mov edx, 1
mov rcx, r15
call fcn.140163560
mov rcx, qword [rsp + 0x30]
call fcn.14015f470
jmp 0x140081efd
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, 0x291
call fcn.14006e59c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error_copying_executable_file
jmp 0x140081c61
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, 0x290
call fcn.14006e59c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Access_denied__2_
jmp 0x140081c61
lea rcx, [rsp + 0x60]
call fcn.14016b580
mov r15d, 0x104
lea rcx, [rbp + 0x1a0]
mov edx, r15d
call fcn.1401646ec
mov r14, rax
cmp eax, 4
jl 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x1a0]
mov r9, rbx
lea rcx, [rbp + 0x2b0]
mov edx, r15d
call section..text
lea eax, [r14 - 3]
mov rdx, rsi
movsxd rcx, eax
lea r8, str.proxy
lea rax, [rbp + 0x2b0]
sub rdx, rbx
add rcx, rax
mov r9d, 6
call section..text
lea edx, [r15 + 0x28]
lea rcx, [rbp + 0x71]
call fcn.1401646ec
mov r14, rax
lea ecx, [rax - 4]
cmp ecx, 0xff
ja 0x140081c70
movsxd rbx, r14d
lea r8, [rbp + 0x71]
mov r9, rbx
lea rcx, [rsp + 0x60]
mov edx, r15d
call section..text
lea eax, [r14 - 3]
sub rsi, rbx
movsxd rcx, eax
lea r8, str.proxy
lea rax, [rsp + 0x60]
mov r9d, 6
add rcx, rax
mov rdx, rsi
call section..text
xor esi, esi
test r13, r13
je 0x140082012
test r12d, r12d
jle 0x140082012
lea r8, [0x1401d5b80]
mov qword [rsp + 0x30], rsi
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.1401638e0
mov r9, qword [rsp + 0x30]
test r9, r9
je 0x14008213c
mov r8, r12
lea edx, [rsi + 1]
mov rcx, r13
call fcn.140163560
mov rcx, qword [rsp + 0x30]
call fcn.14015f470
jmp 0x14008213c
mov r15d, 1
lea rdx, [rsp + 0x60]
mov r8d, r15d
lea rcx, [rbp + 0x2b0]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x14008213c
lea rcx, [rsp + 0x38]
call qword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x14008213c
mov r9, qword [rsp + 0x48]
test r9, r9
je 0x14008211c
lea r14, [0x1402030c0]
mov qword [rsp + 0x30], rsi
mov rdx, r14
mov qword [rsp + 0x20], 0x7d0
mov r8d, 0xfff
lea rcx, [rsp + 0x58]
call fcn.14016a50c
test eax, eax
jne 0x140082111
lea rdx, str.https
mov rcx, r14
call fcn.14015d8c0
mov rbx, rax
test rax, rax
je 0x1400820ba
lea rdx, [0x1401e32e8]
mov rcx, rax
call fcn.14015d8c0
add rbx, 6
test rax, rax
je 0x1400820bd
mov byte [rax], sil
jmp 0x1400820bd
mov rbx, r14
lea r8, [0x1401d5b80]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.1401638e0
mov r9, qword [rsp + 0x30]
test r9, r9
je 0x140082111
test rbx, rbx
jne 0x1400820e7
mov rax, rsi
jmp 0x1400820f9
mov edx, 0x1000
mov rcx, rbx
call fcn.1401646ec
mov r9, qword [rsp + 0x30]
mov r8, rax
mov rdx, r15
mov rcx, rbx
call fcn.140163560
mov rcx, qword [rsp + 0x30]
call fcn.14015f470
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x14008212c
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14008213c
call qword [sym.imp.KERNEL32.dll_GlobalFree]
movzx eax, word [0x1401e3b88]
lea rcx, [rbp + 0x70]
movsd xmm0, qword [str.___install]
movsd qword [rbp + rdi + 0x71], xmm0
mov word [rbp + rdi + 0x79], ax
mov al, byte [0x1401e3b8a]
mov byte [rbp + rdi + 0x7b], al
call fcn.140081704
movsd xmm0, qword [str.___start]
lea rcx, [rbp + 0x70]
mov al, byte [0x1401e3b98]
movsd qword [rbp + rdi + 0x71], xmm0
mov byte [rbp + rdi + 0x79], al
call fcn.140081704
jmp 0x140081c70
call fcn.14015c72c
int3
call fcn.14015c72c
int3
call fcn.14015c72c
int3
call fcn.14015c72c
int3
call fcn.14015c72c
int3
call fcn.14015c72c
int3