Function at 0x1400fcbb0
Capabilities:
Create service
Delete service
Modify service
Start service

Disassembly:
push rsi
push r14
sub rsp, 0x78
mov rsi, rcx
mov byte [rcx + 0x78], 0
xor ecx, ecx
xor edx, edx
mov r8d, 2
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r14, rax
test rax, rax
jne 0x1400fcbdf
add rsp, 0x78
pop r14
pop rsi
ret
cmp qword [rsi + 0x60], 0xf
mov qword [rsp + 0x90], rbx
lea rbx, [rsi + 0x48]
mov qword [rsp + 0x98], rbp
mov rdx, rbx
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0x70], r15
jbe 0x1400fcc13
mov rdx, qword [rbx]
lea rdi, [rsi + 0x48]
jmp 0x1400fcc16
mov rdi, rbx
mov r8d, reloc.WS2_32.dll_recv
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
xor r15d, r15d
mov rbp, rax
test rax, rax
jne 0x1400fcccb
mov r8d, dword [rsi + 0x70]
lea rdi, [rsi + 8]
mov rdx, qword [rsi + 0x68]
mov r9, rdi
call fcn.1400fc690
mov byte [rsi + 0x7b], al
cmp qword [rdi + 0x18], 0xf
jbe 0x1400fcc55
mov rdi, qword [rdi]
cmp qword [rbx + 0x18], 0xf
jbe 0x1400fcc5f
mov rbx, qword [rbx]
mov qword [rsp + 0x60], r15
lea r8, [0x140d5d71a]
mov qword [rsp + 0x58], r15
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x50], r15
mov rdx, rbx
mov qword [rsp + 0x48], r15
mov rcx, r14
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rbp, rax
test rax, rax
jne 0x1400fccc3
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x1400fcdee
xor al, al
lea rdi, [rsi + 0x48]
jmp 0x1400fcccd
mov al, 1
xor r8d, r8d
mov byte [rsi + 0x79], al
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x1400fcdda
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
jne 0x1400fcdbe
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp qword [rdi + 0x18], 0xf
jbe 0x1400fcd0a
mov rdi, qword [rdi]
mov r8d, reloc.WS2_32.dll_select
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x50], r15
mov edx, 0xffffffff
mov qword [rsp + 0x48], r15
mov r9d, edx
mov qword [rsp + 0x40], r15
mov r8d, 3
mov qword [rsp + 0x38], r15
mov rcx, rax
mov qword [rsp + 0x30], r15
mov rbp, rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x140d60c10]
mov edi, eax
call fcn.140041e90
lea rdx, [0x1400fc620]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x140042070]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
test edi, edi
je 0x1400fcdda
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
setne al
mov byte [rsi + 0x7a], al
jmp 0x1400fcdda
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x1400fcdda
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rsi
call fcn.1400fcbb0
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
mov rdi, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x90]
mov r15, qword [rsp + 0x70]
add rsp, 0x78
pop r14
pop rsi
ret