Function at 0x1400013f0
Capabilities:
Create service
Delete service
Query service status
Start service
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
mov rdi, rdx
cmp ecx, 2
jne 0x140001982
mov rdx, qword [rdx + 8]
lea rcx, [rbp - 0x70]
call fcn.140001a40
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0x10
jb 0x140001447
mov rax, qword [rax]
cmp r8, 1
jne 0x140001464
lea rdx, [0x140003424]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x140001464
mov bl, 1
jmp 0x140001466
xor bl, bl
mov rdx, qword [rbp - 0x58]
cmp rdx, 0x10
jb 0x1400014a4
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000149f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000149f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002114
lea rcx, [rbp - 0x70]
test bl, bl
je 0x140001774
call fcn.1400011c0
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x40], xmm1
mov r8d, 7
lea rdx, [0x140003428]
lea rcx, [rbp - 0x50]
call fcn.140001ef0
nop
lea r8, [rbp - 0x50]
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x70]
call fcn.140001b60
nop
lea r8, [rsp + 0x70]
cmp qword [rbp - 0x78], 8
cmovae r8, qword [rsp + 0x70]
mov edx, 0x104
lea rcx, [rbp - 0x30]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
xor ebx, ebx
test rax, rax
jne 0x14000153c
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x140003470]
jmp 0x1400015c7
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
lea rax, [rbp - 0x30]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
mov r9d, 0xf01ff
lea r8, str.HandleDemoteBypass
lea rdx, str.HandleDemoteBypass
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
test rax, rax
jne 0x1400015ae
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x140003470]
jmp 0x1400015c7
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x140003460]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001ce0
lea rdx, [0x140001eb0]
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::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x14000160c
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x140003490]
jmp 0x140001671
mov r8d, 0xf01ff
lea rdx, str.HandleDemoteBypass
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
jne 0x14000162e
xor ecx, ecx
jmp 0x140001643
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, rsi
test eax, eax
jne 0x14000165b
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x140003490]
jmp 0x140001671
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x140003480]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001ce0
lea rdx, [0x140001eb0]
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::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x1400016d2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400016cd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400016cd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002114
movdqa xmm0, xmmword [0x140003510]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], bx
mov rdx, qword [rbp - 0x38]
cmp rdx, 8
jb 0x140001728
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001722
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001722
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002114
nop
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x1400019a5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000176a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000176a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002114
jmp 0x1400019a5
mov rdx, qword [rdi + 8]
call fcn.140001a40
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0x10
jb 0x14000178b
mov rax, qword [rax]
cmp r8, 1
jne 0x1400017a8
lea rdx, [0x1400034a0]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x1400017a8
mov bl, 1
jmp 0x1400017aa
xor bl, bl
mov rdx, qword [rbp - 0x58]
cmp rdx, 0x10
jb 0x1400017e8
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400017e3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400017e3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002114
test bl, bl
je 0x1400019a5
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x14000180f
xor ecx, ecx
jmp 0x1400018ce
mov r8d, 0xf01ff
lea rdx, str.HandleDemoteBypass
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140001834
xor ecx, ecx
jmp 0x1400018c5
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400018c2
mov eax, dword [rsp + 0x74]
dec eax
test eax, 0xfffffffd
je 0x1400018a7
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400018c2
xor ebx, ebx
cmp dword [rsp + 0x74], 1
je 0x1400018a7
nop dword [rax]
nop word [rax + rax]
inc ebx
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ecx, 0x32
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rsp + 0x74], 1
jne 0x140001880
cmp ebx, 0x50
jg 0x1400018c2
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x1400034a8]
jmp 0x1400018db
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x1400034b8]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001ce0
lea rdx, [0x140001eb0]
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::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x140001920
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x1400034d8]
jmp 0x140001989
mov r8d, 0xf01ff
lea rdx, str.HandleDemoteBypass
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140001942
xor ecx, ecx
jmp 0x140001952
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rdi
test eax, eax
jne 0x14000196a
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x1400034d8]
jmp 0x140001989
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [0x1400034c8]
jmp 0x140001989
lea rdx, [0x1400034e8]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001ce0
lea rdx, [0x140001eb0]
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::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
xor eax, eax
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.1400020b0
lea r11, [rsp + 0x2f0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret