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

Disassembly:
push rbp
push r14
sub rsp, 0x78
xor edx, edx
mov byte [rcx + 0x78], 0
mov rbp, rcx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r14, rax
test rax, rax
jne 0x1400b46cd
add rsp, 0x78
pop r14
pop rbp
ret
cmp qword [rbp + 0x60], 0x10
mov qword [rsp + 0x90], rbx
lea rbx, [rbp + 0x48]
mov qword [rsp + 0x98], rsi
mov rdx, rbx
mov qword [rsp + 0x70], r15
jb 0x1400b46f3
mov rdx, qword [rbx]
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0xa0], rdi
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
xor r15d, r15d
mov rsi, rax
test rax, rax
jne 0x1400b47b1
mov r8d, dword [rbp + 0x70]
lea rdi, [rbp + 8]
mov rdx, qword [rbp + 0x68]
mov r9, rdi
call fcn.1400b4120
test al, al
setne al
mov byte [rbp + 0x7b], al
cmp qword [rdi + 0x18], 0x10
jb 0x1400b473f
mov rdi, qword [rdi]
cmp qword [rbx + 0x18], 0x10
mov rdx, rbx
jb 0x1400b474c
mov rdx, qword [rbx]
mov qword [rsp + 0x60], r15
lea r8, [0x140cbfe9a]
mov qword [rsp + 0x58], r15
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x50], r15
mov rcx, r14
mov qword [rsp + 0x48], r15
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 rsi, rax
test rax, rax
jne 0x1400b47ad
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x1400b48d4
xor al, al
jmp 0x1400b47b3
mov al, 1
xor r8d, r8d
mov byte [rbp + 0x79], al
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x1400b48c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x422
jne 0x1400b48a4
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp qword [rbx + 0x18], 0x10
jb 0x1400b47f0
mov rbx, qword [rbx]
mov r8d, reloc.WS2_32.dll_select
mov rdx, rbx
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 rsi, 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, [0x140cc2c0c]
mov edi, eax
call fcn.14000c090
lea rdx, [0x1400b40e0]
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, [0x14000c260]
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 0x1400b48c0
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
setne al
mov byte [rbp + 0x7a], al
jmp 0x1400b48c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x1400b48c0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbp
call fcn.1400b46a0
mov rcx, rsi
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 rsi, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x90]
mov r15, qword [rsp + 0x70]
add rsp, 0x78
pop r14
pop rbp
ret