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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xe0
mov r12, r8
mov r13, rdx
mov rdi, rcx
lea rdx, str.ServicesActive
xor ebx, ebx
xor ecx, ecx
mov r14d, r9d
lea r8d, [rbx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r15, rax
test rax, rax
je 0x140011fac
lea r8d, [rbx + 0x10]
mov qword [rsp + 0x110], rsi
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
je 0x140011d20
mov rdx, rdi
lea rcx, str.____s_service_already_registered_n
call fcn.14000afb0
jmp 0x140011f02
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x140011f85
mov rdx, rdi
lea rcx, str.____s_service_not_present_n
call fcn.14000afb0
mov qword [rsp + 0x60], rbx
mov r9d, 0x60010
mov qword [rsp + 0x58], rbx
mov r8, r13
mov qword [rsp + 0x50], rbx
mov rcx, r15
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rsi, rax
test rax, rax
je 0x140011f76
mov rdx, rdi
lea rcx, str.____s_service_successfully_registered_n
call fcn.14000afb0
xor r9d, r9d
mov dword [rbp - 0x49], ebx
lea rax, [rbp + 0x77]
mov word [rbp - 0x45], 0x100
lea r8, [rbp - 0x39]
mov dword [rbp - 0x11], 0x201fd
mov rcx, rsi
mov qword [rbp - 0xd], 2
lea edx, [r9 + 4]
mov qword [rbp - 1], rbx
mov qword [rbp + 7], rbx
mov dword [rbp + 0xf], 5
mov qword [rbp + 0x17], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceObjectSecurity]
test eax, eax
jne 0x140011eee
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140011eee
mov edx, dword [rbp + 0x77]
lea ecx, [rax - 0x3a]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
test rax, rax
je 0x140011eee
mov r9d, dword [rbp + 0x77]
lea rax, [rbp + 0x77]
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, 4
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceObjectSecurity]
test eax, eax
je 0x140011ed0
lea rax, [rbp + 0x17]
xor r9d, r9d
mov qword [rsp + 0x50], rax
lea rcx, [rbp - 0x49]
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 0x140011ed0
lea rax, [rbp - 0x41]
xor edx, edx
mov qword [rsp + 0x40], rax
lea r9, [rbp - 0x11]
lea rax, [rbp + 0x77]
xor ecx, ecx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
lea r8d, [rdx + 1]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_BuildSecurityDescriptorW]
test eax, eax
jne 0x140011ec6
mov r8, qword [rbp - 0x41]
lea edx, [rax + 4]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_SetServiceObjectSecurity]
mov rcx, qword [rbp - 0x41]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp + 0x17]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
je 0x140011eee
mov rdx, rdi
lea rcx, str.____s_service_ACL_to_everyone_n
call fcn.14000afb0
jmp 0x140011f02
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_service_install___kull_m_service_addWorldToSD__0x_08x__n
call fcn.14000afb0
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov ebx, eax
test eax, eax
je 0x140011f30
mov rdx, rdi
lea rcx, str.____s_service_started_n
call fcn.14000afb0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140011f99
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x140011f57
mov rdx, rdi
lea rcx, str.____s_service_already_started_n
call fcn.14000afb0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140011f99
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_service_install___StartService__0x_08x__n
call fcn.14000afb0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140011f99
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_service_install___CreateService__0x_08x__n
jmp 0x140011f92
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_kull_m_service_install___OpenService__0x_08x__n
mov edx, eax
call fcn.14000afb0
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x110]
jmp 0x140011fc0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR_kull_m_service_install___OpenSCManager_create___0x_08x__n
call fcn.14000afb0
lea r11, [rsp + 0xe0]
mov eax, ebx
mov rbx, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret