Function at 0x140001230
Capabilities:
Persist via windows service
Set registry value
Terminate process

Disassembly:
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0x90
mov rax, qword [0x140007008]
xor rax, rsp
mov qword [rbp + 0x4f], rax
mov rcx, qword [0x1400076c8]
lea r8, [rbp + 0x27]
mov rdx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegConnectRegistryA]
test eax, eax
je 0x14000127f
mov edx, eax
lea rcx, str.____RegConnectRegistryA:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str.___Connecting_to_Services_registry_hive_n
call fcn.140001010
mov rcx, qword [rbp + 0x27]
lea rax, [rbp + 0x1f]
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
mov r8d, 0xc
lea rdx, str.SYSTEMCurrentControlSetServices
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1400012cc
mov edx, eax
lea rcx, str.____RegOpenKeyExA:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rdx, qword [0x1400076f8]
lea rcx, str.___Creating_Service_key__s_n
call fcn.140001010
mov rdx, qword [0x1400076f8]
lea rax, [rbp + 0x2f]
mov qword [rsp + 0x40], rax
xor ecx, ecx
lea rax, [rbp + 0x17]
mov dword [rbp + 0x2f], ecx
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], rcx
xor r8d, r8d
mov qword [rbp + 0x17], rcx
mov rcx, qword [rbp + 0x1f]
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], 4
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x140001341
mov edx, eax
lea rcx, str.____Service_Key:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str.___Setting_Service_to_Auto_start_n
call fcn.140001010
mov rcx, qword [rbp + 0x17]
lea rax, [rbp + 0x33]
mov dword [rsp + 0x28], 4
lea r8, str.Start
mov r9d, 4
mov qword [rsp + 0x20], rax
xor edx, edx
mov dword [rbp + 0x33], 2
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x140001399
mov edx, eax
lea rcx, str.____Auto_Start_Key:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str.___Setting_Service_Type_n
call fcn.140001010
mov rcx, qword [rbp + 0x17]
lea rax, [rbp + 0x37]
mov dword [rsp + 0x28], 4
lea r8, str.Type
mov r9d, 4
mov qword [rsp + 0x20], rax
xor edx, edx
mov dword [rbp + 0x37], 0x10
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x1400013f1
mov edx, eax
lea rcx, str.____Service_Type:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str.___Setting_Recovery_Action_n
call fcn.140001010
mov rcx, qword [rbp + 0x17]
lea rax, [rbp + 0x3b]
mov dword [rsp + 0x28], 4
lea r8, str.ErrorControl
mov r9d, 4
mov qword [rsp + 0x20], rax
xor edx, edx
mov dword [rbp + 0x3b], 1
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x140001449
mov edx, eax
lea rcx, str.____Recovery:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str.___Setting_Service_to_run_with_Local_System_n
call fcn.140001010
mov eax, dword [0x140004750]
lea r8, str.ObjectName
movsd xmm0, qword [str.LocalSystem]
mov r9d, 1
mov rcx, qword [rbp + 0x17]
xor edx, edx
mov dword [rbp + 0x47], eax
lea rax, [rbp + 0x3f]
mov dword [rsp + 0x28], 0xc
mov qword [rsp + 0x20], rax
movsd qword [rbp + 0x3f], xmm0
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x1400014b0
mov edx, eax
lea rcx, str.____Local_System_Key:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rdx, qword [0x1400076d8]
lea rcx, str.___Setting_Service_DisplayName_to__s_n
mov qword [rsp + 0xa0], rbx
call fcn.140001010
mov rcx, qword [0x1400076d8]
mov rbx, 0xffffffffffffffff
mov rax, rbx
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x1400014e0
inc eax
lea r8, str.DisplayName
mov dword [rsp + 0x28], eax
mov r9d, 1
mov qword [rsp + 0x20], rcx
xor edx, edx
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x140001528
mov edx, eax
lea rcx, str.____DisplayName:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rdx, qword [0x140007700]
lea rcx, str.___Setting_Service_Description_to__s_n
call fcn.140001010
mov rcx, qword [0x140007700]
mov rax, rbx
inc rax
cmp byte [rcx + rax], 0
jne 0x140001545
inc eax
lea r8, str.Description
mov dword [rsp + 0x28], eax
mov r9d, 1
mov qword [rsp + 0x20], rcx
xor edx, edx
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x14000158d
mov edx, eax
lea rcx, str.____Description:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rdx, qword [0x1400076e8]
lea rcx, str.___Setting_Service_Path_to__s_n
call fcn.140001010
mov rax, qword [0x1400076e8]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400015a7
mov rcx, qword [rbp + 0x17]
lea r8, str.ImagePath
inc ebx
mov r9d, 2
mov dword [rsp + 0x28], ebx
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueA]
test eax, eax
je 0x1400015ef
mov edx, eax
lea rcx, str.____Service_Path:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rcx, qword [rbp + 0x1f]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140001614
mov edx, eax
lea rcx, str.____RegCloseKey:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, str._nThe_service_will_be_executed_when_the_machine_is_rebooted._n
call fcn.140001010
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.1400021a0
add rsp, 0x90
pop rbp
ret