Function at 0x140005950
Capabilities:
Delete service
Modify service
Pause service
Stop service

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x1d0
mov dword [rsp + 0x70], 0
mov dword [rsp + 0x80], 0
mov dword [rsp + 0x74], 0
lea rax, [rsp + 0xc0]
mov rdi, rax
xor eax, eax
mov ecx, 0x104
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x1e0]
mov qword [rsp + 0x88], rax
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x88]
movzx eax, byte [rax]
mov byte [rsp + 0x60], al
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0x60]
mov byte [rax], cl
mov rax, qword [rsp + 0x88]
inc rax
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x78]
inc rax
mov qword [rsp + 0x78], rax
cmp byte [rsp + 0x60], 0
jne 0x1400059bb
cmp qword [rsp + 0x1e8], 0
jne 0x140005aa4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenSCManager_SERVICE_ALL_failed__0x_X_
call fcn.140002fc0
mov r8d, 0x20
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov qword [rsp + 0x1e8], rax
cmp qword [rsp + 0x1e8], 0
jne 0x140005a99
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenSCManager_SERVICE_STOP_failed__0x_X_
call fcn.140002fc0
mov r8d, 0x40
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov qword [rsp + 0x1e8], rax
cmp qword [rsp + 0x1e8], 0
jne 0x140005a97
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenSCManager_SERVICE_PAUSE_CONTINUE_failed__0x_X_
call fcn.140002fc0
mov eax, dword [rsp + 0x70]
jmp 0x140005cc0
jmp 0x140005aa4
mov dword [rsp + 0x80], 1
mov r8d, 0xf01ff
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x1e8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jne 0x140005b28
mov r8d, 0x20
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x1e8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jne 0x140005b26
mov r8d, 0x40
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x1e8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
jne 0x140005b26
xor eax, eax
jmp 0x140005cc0
jmp 0x140005b30
mov dword [rsp + 0x74], 1
lea r8, [rsp + 0x98]
mov edx, 1
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140005b6a
lea rdx, [rsp + 0xc0]
lea rcx, str.___Service___s__STOPPED
call fcn.140002fc0
mov dword [rsp + 0x70], 1
jmp 0x140005ba2
lea r8, [rsp + 0x98]
mov edx, 2
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140005ba2
lea rdx, [rsp + 0xc0]
lea rcx, str.___Service___s__PAUSED
call fcn.140002fc0
mov dword [rsp + 0x70], 1
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [rsp + 0x74], 0
je 0x140005cbc
mov r8d, 2
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x1e8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140005c65
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8d, 4
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x140005c46
jmp 0x140005c5a
lea rdx, [rsp + 0xc0]
lea rcx, str.___Service___s__Disable_successfully.
call fcn.140002fc0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r8d, 0x10020
mov rdx, qword [rsp + 0x1e0]
mov rcx, qword [rsp + 0x1e8]
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140005cbc
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x140005cb1
lea rdx, [rsp + 0xc0]
lea rcx, str.___Service___s__Delete_successfully.
call fcn.140002fc0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [rsp + 0x70]
add rsp, 0x1d0
pop rdi
ret