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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x250
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov r14, r8
mov rbx, rdx
lea rdx, str.SYSTEMCurrentControlSet_services_s
lea rcx, [rsp + 0x130]
call fcn.140008c70
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbp, rax
test rax, rax
je 0x1400096fe
xor esi, esi
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
mov r9d, 0xf01ff
xor r8d, r8d
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rdi, rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x118], xmm0
mov qword [rsp + 0x118], rsi
mov dword [rsp + 0x120], esi
mov qword [rsp + 0x128], rsi
lea r8, [rsp + 0x130]
lea rcx, [rsp + 0x118]
call fcn.140008d00
mov qword [rsp + 0x110], rsi
mov rdx, rbx
lea rcx, [rsp + 0x80]
call fcn.140009a90
mov r15, rax
call fcn.140001a00
mov rcx, rax
test rax, rax
je 0x140009725
mov rax, qword [rax]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x70], rax
lea rdx, [0x1400c0698]
lea rbx, [rsi - 1]
cmp rdx, 0x10000
jae 0x1400095d0
movzx edx, dx
lea rcx, [rsp + 0x70]
call fcn.140002900
jmp 0x1400095ea
mov rax, rbx
inc rax
cmp byte [rdx + rax], 0
jne 0x1400095d3
mov r8d, eax
lea rcx, [rsp + 0x70]
call fcn.140002a90
nop
mov r8, qword [r15]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x110]
call fcn.140009b40
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000961f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea rax, [rsp + 0x88]
mov rcx, qword [rsp + 0x80]
cmp rcx, rax
je 0x14000963a
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rsp + 0x110]
test rax, rax
je 0x140009682
mov rcx, rbx
nop word [rax + rax]
inc rcx
cmp byte [rax + rcx], 0
jne 0x140009650
inc ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
mov r9d, 2
xor r8d, r8d
lea rdx, str.ImagePath
mov rcx, qword [rsp + 0x118]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test rdi, rdi
jne 0x1400096a1
mov r8d, 0xf01ff
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x1400096af
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rdi, rdi
setne sil
mov rdx, qword [rsp + 0x110]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x1400096e9
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
nop
mov rcx, qword [rsp + 0x118]
test rcx, rcx
je 0x1400096fc
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.140073640
mov rbx, qword [rsp + 0x280]
add rsp, 0x250
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140001860
int3