Function at 0x1400baa00
Capabilities:
Create service
Delete service
Start service

Disassembly:
push r13
push r14
sub rsp, 0xb8
mov rax, qword [0x140237008]
xor rax, rsp
mov qword [rsp + 0x90], rax
xor edx, edx
mov r13, rcx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r14, rax
test rax, rax
jne 0x1400baa55
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
test eax, eax
jle 0x1400bac90
movzx eax, ax
or eax, 0xc0070000
jmp 0x1400bac90
mov qword [rsp + 0xb0], rsi
xor esi, esi
xor eax, eax
mov qword [rsp + 0xa8], rdi
lock cmpxchg qword [0x1402447c8], rsi
mov rdi, rax
je 0x1400bab67
lock inc dword [rax - 8]
mov r8, qword [r13 + 0x48]
lea rcx, str.__s___ras___s_
mov rdx, qword [rdi + 8]
mov qword [rsp + 0xd8], rbx
mov qword [rsp + 0xe0], rbp
mov qword [rsp + 0xa0], r15
call sym.ProcessHacker.exe_PhFormatString
mov rdx, qword [r13 + 0x48]
mov rbx, rax
lea rax, [0x1401b790c]
mov r9d, 0xf01ff
mov qword [rsp + 0x60], rax
mov r8, rdx
lea rax, str.LocalSystem
mov rcx, qword [rbx + 8]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rcx
mov rcx, r14
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xffffffff
lea rcx, [rbx - 0x10]
mov ebp, eax
mov edx, esi
lock xadd dword [rcx + 8], edx
cmp edx, 1
jne 0x1400bab2d
call fcn.1400fbcc0
lea rcx, [rdi - 0x10]
mov eax, esi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1400bab45
nop dword [rax]
call fcn.1400fbcc0
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r15, r15
jne 0x1400bab9c
test ebp, ebp
jle 0x1400bab60
movzx ebp, bp
or ebp, 0xc0070000
mov eax, ebp
jmp 0x1400bac68
mov rcx, qword [0x140241948]
xor edx, edx
call sym.ProcessHacker.exe_PhGetDllFileName
mov rdi, rax
xor eax, eax
lock cmpxchg qword [0x1402447c8], rdi
jne 0x1400bab89
lock inc dword [rdi - 8]
test rdi, rdi
jne 0x1400baa7f
mov eax, 0xc0000229
jmp 0x1400bac80
nop dword [rax]
call fcn.1400ba840
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rdx, qword [r13 + 0x48]
lea rcx, str.BaseNamedObjects_
call sym.ProcessHacker.exe_PhConcatStrings2
mov r14, rax
mov edi, 0x32
movzx ecx, word [rax]
mov word [rsp + 0x80], cx
movzx ecx, word [rax]
add cx, 2
mov word [rsp + 0x82], cx
mov rcx, qword [rax + 8]
mov qword [rsp + 0x88], rcx
nop word [rax + rax]
lea rcx, [rsp + 0x80]
call fcn.14007a400
mov ebx, eax
test eax, eax
jns 0x1400bac2b
lea rdx, [rsp + 0x78]
mov qword [rsp + 0x78], 0xfffffffffff0bdc0
call fcn.1400fb5e0
add edi, 0xffffffff
jne 0x1400bac00
lea rcx, [r14 - 0x10]
lock xadd dword [rcx + 8], esi
cmp esi, 1
jne 0x1400bac3e
call fcn.1400fbcc0
nop
test ebx, ebx
js 0x1400bac58
mov rdx, r13
mov ecx, 0xc
call fcn.14007a720
mov ebx, eax
call fcn.14007a5e0
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov rbx, qword [rsp + 0xd8]
mov rbp, qword [rsp + 0xe0]
mov r15, qword [rsp + 0xa0]
mov rsi, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xa8]
mov rcx, qword ds:[rsp + 0x90]
xor rcx, rsp
call fcn.1401848a0
add rsp, 0xb8
pop r14
pop r13
ret