Function at 0x1401005a0
Capabilities:
Create service
Modify service
Persist via windows service
Set registry value
Start service

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push r12
sub rsp, 0x8d0
mov rax, qword [0x1402e0068]
xor rax, rsp
mov qword [rsp + 0x8c0], rax
xor r12d, r12d
mov rbp, rcx
lea rdx, [rsp + 0xb2]
mov dword [rcx], r12d
xor ecx, ecx
mov r8d, 0x400
mov ebx, r12d
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, 0x22
mov r11d, eax
mov word [rsp + 0xb0], dx
lea eax, [r11 + 1]
lea ecx, [r11 + 2]
mov word [rsp + rax*2 + 0xb0], dx
mov eax, 0x20
mov word [rsp + rcx*2 + 0xb0], ax
mov rax, r11
lea rcx, str.service
add rax, rax
sub rax, rcx
lea rdx, [rsp + rax + 0xb6]
nop dword [rax]
movzx eax, word [rcx]
add rcx, 2
mov word [rdx + rcx - 2], ax
test ax, ax
jne 0x140100630
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x14010085e
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
lea r8, str.TTXN_GotoHTTP_Agent
lea rdx, [0x14023d620]
mov r9d, 0xf01ff
mov rcx, rsi
mov dword [rsp + 0x28], 2
mov qword [rsp + 0x8f8], rdi
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x14010074c
lea rdx, [0x14023d620]
mov r8d, 0xf01ff
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x14010073c
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140100709
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x14010070e
mov ebx, 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsp + 0x88]
mov edx, 0x82
bts eax, 0x1a
mov rcx, rdi
mov dword [rbp], eax
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1401007a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0x3000000
mov dword [rbp], eax
jmp 0x1401007a5
lea rax, str.TTXN_GotoHTTP_agent_client._http:__gotohttp.com.
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x70], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x14010078a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x14010078f
mov ebx, 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
bts eax, 0x19
mov dword [rbp], eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rax, [rsp + 0x80]
lea r9, [0x14023ce88]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x70]
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x2001f
mov dword [rsp + 0x78], 1
mov dword [rsp + 0x20], r12d
mov qword [rsp + 0x70], r12
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov rdi, qword [rsp + 0x8f8]
test eax, eax
jne 0x14010084c
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
lea rdx, str.SoftwareSASGeneration
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x14010084c
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14010086b
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x14010086b
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14010086b
call qword [sym.imp.KERNEL32.dll_GetLastError]
bts eax, 0x18
mov dword [rbp], eax
mov eax, ebx
mov rcx, qword [rsp + 0x8c0]
xor rcx, rsp
call fcn.1401e6720
mov rbx, qword [rsp + 0x900]
add rsp, 0x8d0
pop r12
pop rsi
pop rbp
ret