Function at 0x1400091f0
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov rax, qword [0x14004c018]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov rdi, r8
mov r15, rdx
mov rsi, rcx
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x20]
call fcn.14000ddf0
xor r9d, r9d
lea r8, [rbp - 0x20]
mov edx, 0x104
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x14000926a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
lea rcx, str.___Error_0x_lx_converting__s_path_to_absolute_..._n
mov edx, eax
mov ebx, eax
call fcn.140001010
mov eax, ebx
jmp 0x14000955a
mov r8d, 3
mov qword [rsp + 0x348], r14
lea rdx, str.ServicesActive
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
je 0x140009538
mov r8d, 0x10
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x1400092c1
mov rdx, rsi
lea rcx, str.____s_service_already_registered_n
call fcn.140001010
jmp 0x1400094ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x140009517
mov rdx, rsi
lea rcx, str.____s_service_was_not_present_n
call fcn.140001010
xor ebx, ebx
lea rax, [rbp - 0x20]
mov qword [rsp + 0x60], rbx
mov r9d, 0x60010
mov qword [rsp + 0x58], rbx
mov r8, r15
mov qword [rsp + 0x50], rbx
mov rdx, rsi
mov qword [rsp + 0x48], rbx
mov rcx, r14
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
je 0x140009508
mov rdx, rsi
lea rcx, str.____s_service_is_successfully_registered_n
call fcn.140001010
lea rax, [rsp + 0x70]
mov dword [rbp - 0x50], ebx
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x48]
mov word [rbp - 0x4c], 0x100
lea edx, [rbx + 4]
mov dword [rbp - 0x80], 0x201fd
mov rcx, rdi
mov qword [rbp - 0x7c], 2
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x68], rbx
mov dword [rbp - 0x60], 5
mov qword [rbp - 0x58], rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceObjectSecurity]
test eax, eax
jne 0x1400094a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400094a0
mov edx, dword [rsp + 0x70]
lea ecx, [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test rax, rax
je 0x1400094a0
mov r9d, dword [rsp + 0x70]
lea rax, [rsp + 0x70]
mov r8, r15
mov qword [rsp + 0x20], rax
lea edx, [rbx + 4]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceObjectSecurity]
test eax, eax
je 0x140009482
lea rax, [rbp - 0x58]
xor r9d, r9d
mov qword [rsp + 0x50], rax
lea rcx, [rbp - 0x50]
mov dword [rsp + 0x48], ebx
xor r8d, r8d
mov dword [rsp + 0x40], ebx
mov dl, 1
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x140009482
lea rax, [rsp + 0x78]
xor edx, edx
mov qword [rsp + 0x40], rax
lea r9, [rbp - 0x80]
lea rax, [rsp + 0x70]
xor ecx, ecx
mov qword [rsp + 0x38], rax
lea r8d, [rbx + 1]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_BuildSecurityDescriptorW]
test eax, eax
jne 0x140009478
mov r8, qword [rsp + 0x78]
lea edx, [rbx + 4]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_SetServiceObjectSecurity]
mov rcx, qword [rsp + 0x78]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x1400094a0
mov rdx, rsi
lea rcx, str.____s_service_ACL_configured_to_for_Everyone_n
call fcn.140001010
jmp 0x1400094ac
lea rcx, str.____ServiceAddEveryoneAccess
call fcn.140013f14
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x1400094c7
lea rcx, str.____s_service_started_n
jmp 0x1400094db
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x1400094f9
lea rcx, str.____s_service_already_started_n
mov rdx, rsi
call fcn.140001010
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140009552
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____ERROR_ServiceInstall___StartService__0x_08x__n
jmp 0x140009545
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____ERROR_ServiceInstall___CreateService__0x_08x__n
jmp 0x140009524
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____ERROR_ServiceInstall___OpenService__0x_08x__n
mov edx, eax
call fcn.140001010
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140009552
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____ERROR_ServiceInstall___OpenSCManager_create___0x_08x__n
mov edx, eax
call fcn.140001010
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14, qword [rsp + 0x348]
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.14000cb50
add rsp, 0x300
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret