Function at 0x1401704f0
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0xe0
mov qword [rbp + 0x27], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
mov rax, qword [0x140415a10]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor dil, dil
lea rcx, [rbp - 0x19]
call fcn.140170920
nop
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x1401707d5
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], 0
jne 0x140170543
test rax, rax
je 0x1401707d5
lea r8, [0x14034f2fc]
lea rcx, [rbp - 0x19]
call fcn.1401fda10
mov rbx, rax
mov edx, dword [rax + 0xc]
lea rcx, [rbp - 0x19]
call fcn.1401fcb40
movsxd r9, dword [rbx + 0xc]
mov eax, dword [rbp - 0x11]
inc eax
movsxd rdx, eax
mov r8, qword [rbx]
mov rcx, qword [rbp - 0x19]
call fcn.1402ba94c
mov edx, dword [rbx + 0xc]
lea rcx, [rbp - 0x19]
call fcn.1401fde50
lea rdx, [0x14034f2fc]
lea rcx, [rbp - 0x19]
call fcn.1401fb190
mov rbx, rax
mov edx, dword [rax + 0xc]
lea rcx, [rbp - 0x19]
call fcn.1401fcb40
movsxd r9, dword [rbx + 0xc]
mov eax, dword [rbp - 0x11]
inc eax
movsxd rdx, eax
mov r8, qword [rbx]
mov rcx, qword [rbp - 0x19]
call fcn.1402ba94c
mov edx, dword [rbx + 0xc]
lea rcx, [rbp - 0x19]
call fcn.1401fde50
lea rdx, str.__sophos
lea rcx, [rbp - 0x19]
call fcn.1401fb190
mov rbx, rax
mov edx, dword [rax + 0xc]
lea rcx, [rbp - 0x19]
call fcn.1401fcb40
movsxd r9, dword [rbx + 0xc]
mov eax, dword [rbp - 0x11]
inc eax
movsxd rdx, eax
mov r8, qword [rbx]
mov rcx, qword [rbp - 0x19]
call fcn.1402ba94c
mov edx, dword [rbx + 0xc]
lea rcx, [rbp - 0x19]
call fcn.1401fde50
mov r8d, 0xf003f
lea rdx, [0x1403503b0]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x140170660
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, [0x140358800]
lea rdx, str._ls___failed__error__d_
lea ecx, [rsi + 2]
call fcn.14016fab0
jmp 0x1401707d1
xor r14d, r14d
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r14
mov rax, qword [rbp - 0x19]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
lea r8, str.Sophos_Clean_Service
lea rdx, str.Sophos_Clean_Service
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140170710
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x1401706ea
lea r8, str.Sophos_Clean_Service
lea rdx, str._ls_already_exists
lea ecx, [rbx + 1]
call fcn.14016fab0
jmp 0x1401707c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, [0x1403587e0]
lea rdx, str._ls___failed__error__d_
mov ecx, 2
call fcn.14016fab0
jmp 0x1401707c8
lea r8, str.Sophos_Clean_Service
lea rdx, str.Service__ls_installed
mov ecx, 1
call fcn.14016fab0
lea rax, str.Provides_Sophos_Clean_control
mov qword [rbp - 9], rax
lea r8, [rbp - 9]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140170758
lea rdx, str.Failed_to_set_service_description
lea ecx, [rax + 2]
call fcn.14016fab0
mov dword [rbp + 0x2f], 1
mov dword [rbp + 0x33], 0x1d4c0
mov dword [rbp + 0x37], 1
mov qword [rbp + 0x3b], 0x1d4c0
mov dword [rbp + 0x43], r14d
mov dword [rbp + 0x17], 3
mov dword [rbp - 1], 0x15180
mov qword [rbp + 0xf], r14
mov qword [rbp + 7], r14
lea rax, [rbp + 0x2f]
mov qword [rbp + 0x1f], rax
lea r8, [rbp - 1]
mov edx, 2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1401707bc
lea rdx, str.Failed_to_set_service_actions
lea ecx, [rax + 2]
call fcn.14016fab0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dil, 1
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rbp - 0x19]
cmp dword [rbp - 0x11], 0
jle 0x1401707e0
call fcn.1402b7350
movzx eax, dil
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.1402b6d40
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret