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

Disassembly:
push rsi
push r13
sub rsp, 0xa8
mov r13, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 2
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x1400a64c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1400a684c
movzx eax, ax
or eax, 0xc0070000
add rsp, 0xa8
pop r13
pop rsi
ret
mov rdx, qword [0x140192448]
lea rcx, str.__s___ras___s_
mov r8, qword [r13 + 0x48]
mov qword [rsp + 0xc0], rbx
mov qword [rsp + 0xa0], rbp
mov rdx, qword [rdx + 8]
mov qword [rsp + 0x98], rdi
mov qword [rsp + 0x80], r15
call sym.4yUlCM3HuVsHzW5CaCX.exe_PhFormatString
mov rdx, qword [r13 + 0x48]
mov rbx, rax
lea rax, [0x14013e488]
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
xor eax, eax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rcx
mov rcx, rsi
mov dword [rsp + 0x30], eax
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 rbp, 0xffffffffffffffff
lea rcx, [rbx - 0x10]
mov edi, eax
mov edx, ebp
lock xadd dword [rcx + 8], edx
cmp edx, 1
jne 0x1400a6588
call fcn.1400d9400
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r15, r15
jne 0x1400a65aa
test edi, edi
jle 0x1400a65a3
movzx edi, di
or edi, 0xc0070000
mov eax, edi
jmp 0x1400a682c
mov qword [rsp + 0x90], r12
mov qword [rsp + 0x88], r14
call fcn.1400a62f0
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]
movzx r8d, byte [0x14018dbaa]
lea r9, str.BaseNamedObjects_
mov rsi, qword [r13 + 0x48]
cmp r8b, 1
jb 0x1400a666c
mov rdx, r9
mov rcx, r9
and rdx, 0xfffffffffffffff1
xorps xmm1, xmm1
and ecx, 0xf
je 0x1400a6629
xorps xmm0, xmm0
pcmpeqw xmm0, xmmword [rdx]
pmovmskb eax, xmm0
sar eax, cl
bsf ecx, eax
mov dword [rsp + 0xc8], ecx
je 0x1400a6625
mov edx, ecx
shr rdx, 1
jmp 0x1400a6671
add rdx, 0x10
xorps xmm0, xmm0
pcmpeqw xmm0, xmmword [rdx]
pmovmskb eax, xmm0
bsf ecx, eax
mov dword [rsp + 0xc8], ecx
jne 0x1400a665c
add rdx, 0x10
movdqa xmm0, xmm1
pcmpeqw xmm0, xmmword [rdx]
pmovmskb eax, xmm0
bsf ecx, eax
mov dword [rsp + 0xc8], ecx
je 0x1400a6640
sub rdx, r9
mov eax, ecx
sar rdx, 1
shr rax, 1
add rdx, rax
jmp 0x1400a6671
mov edx, 0x12
lea r12, [rdx + rdx]
cmp r8b, 1
jb 0x1400a66fc
mov rax, rsi
mov ecx, esi
and rax, 0xfffffffffffffff1
xorps xmm1, xmm1
and ecx, 0xf
je 0x1400a66b4
xorps xmm0, xmm0
pcmpeqw xmm0, xmmword [rax]
pmovmskb edx, xmm0
sar edx, cl
bsf ecx, edx
mov dword [rsp + 0xc8], ecx
je 0x1400a66b0
mov eax, ecx
shr rax, 1
jmp 0x1400a670a
add rax, 0x10
xorps xmm0, xmm0
pcmpeqw xmm0, xmmword [rax]
pmovmskb ecx, xmm0
bsf edx, ecx
mov dword [rsp + 0xc8], edx
jne 0x1400a66ec
nop dword [rax + rax]
add rax, 0x10
movdqa xmm0, xmm1
pcmpeqw xmm0, xmmword [rax]
pmovmskb ecx, xmm0
bsf edx, ecx
mov dword [rsp + 0xc8], edx
je 0x1400a66d0
sub rax, rsi
mov ecx, edx
sar rax, 1
shr rcx, 1
add rax, rcx
jmp 0x1400a670a
mov rax, rbp
nop
inc rax
cmp word [rsi + rax*2], 0
jne 0x1400a6700
mov rdx, qword [0x140191180]
lea rdi, [rax + rax]
lea rbx, [rdi + r12]
lea rcx, [rbx + 0x12]
call sym.4yUlCM3HuVsHzW5CaCX.exe_PhCreateObject
mov r14, rax
lea rdx, str.BaseNamedObjects_
mov r8, r12
lea rcx, [rax + 0x10]
mov qword [rax], rbx
mov qword [rax + 8], rcx
xor eax, eax
mov word [rcx + rbx], ax
mov rcx, qword [r14 + 8]
call fcn.1401317c0
mov rcx, qword [r14 + 8]
mov r8, rdi
add rcx, r12
mov rdx, rsi
call fcn.1401317c0
movzx eax, word [r14]
mov edi, 0xa
mov r12, qword [rsp + 0x90]
mov word [rsp + 0x70], ax
movzx eax, word [r14]
mov word [rsp + 0x72], ax
mov rax, qword [r14 + 8]
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x70]
call fcn.140077d00
mov ebx, eax
test eax, eax
jns 0x1400a67b4
lea rdx, [rsp + 0xd0]
mov qword [rsp + 0xd0], 0xfffffffffff85ee0
xor ecx, ecx
call qword [sym.imp.ntdll.dll_NtDelayExecution]
add edi, 0xffffffff
jne 0x1400a6783
lea rcx, [r14 - 0x10]
lock xadd dword [rcx + 8], ebp
mov r14, qword [rsp + 0x88]
cmp ebp, 1
jne 0x1400a67cf
call fcn.1400d9400
test ebx, ebx
js 0x1400a6821
mov rdx, r13
mov ecx, 0xc
call fcn.140077fd0
mov rcx, qword [0x140192238]
mov ebx, eax
test rcx, rcx
je 0x1400a67ff
call qword [sym.imp.ntdll.dll_RtlDestroyHeap]
xor edi, edi
mov qword [0x140192238], rdi
jmp 0x1400a6801
xor edi, edi
mov rcx, qword [0x140192230]
test rcx, rcx
je 0x1400a681a
call qword [sym.imp.ntdll.dll_NtClose]
mov qword [0x140192230], rdi
mov qword [0x140192240], rdi
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, ebx
mov rdi, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xc0]
mov r15, qword [rsp + 0x80]
add rsp, 0xa8
pop r13
pop rsi
ret