Function at 0x1400ea340
Capabilities:
Delete service
Stop service
Terminate process

Disassembly:
push rdi
sub rsp, 0x3c0
mov rax, qword [0x140209b48]
xor rax, rsp
mov qword [rsp + 0x3b0], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov rdi, rax
je 0x1400ea5a8
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x3d0], rbx
mov qword [rsp + 0x3d8], rbp
call fcn.1400012c0
lea rdx, [0x1401b2850]
lea rcx, [rsp + 0x80]
call fcn.140175d10
call fcn.1400cd3c0
test rax, rax
je 0x1400ea3ce
call fcn.1400cd3c0
lea rdx, str.___s_
lea rcx, [rsp + 0x80]
mov r8, rax
call fcn.140176950
mov r8, qword [rsp + 0x88]
cmp byte [r8], 0
je 0x1400ea402
nop
movzx eax, byte [r8]
cmp al, 0x5c
je 0x1400ea3ec
cmp al, 0x2f
jne 0x1400ea3f0
mov byte [r8], 0x20
add r8, 1
cmp byte [r8], 0
jne 0x1400ea3e0
mov r8, qword [rsp + 0x88]
lea rcx, [rsp + 0x1a0]
mov edx, 0x101
call fcn.14017a370
lea rcx, [rsp + 0x80]
call fcn.140175010
lea rdx, [rsp + 0x1a0]
mov r8d, 0x20
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov rbp, rax
je 0x1400ea4ee
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x1400ea4e5
lea r8d, [rax + 4]
lea rdx, [rsp + 0x1a0]
mov rcx, rdi
mov qword [rsp + 0x3e0], rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov rsi, rax
je 0x1400ea4dd
lea rax, [rsp + 0x30]
lea r8, [rsp + 0x38]
mov r9d, 0x24
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [0x140200a40]
test eax, eax
je 0x1400ea4d4
mov r8d, dword [rsp + 0x54]
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
test rax, rax
mov rbx, rax
je 0x1400ea4d4
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x3e0]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rdx, [rsp + 0x1a0]
mov r8d, 0x10000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, qword [rsp + 0x3d8]
test rax, rax
mov rbx, rax
je 0x1400ea561
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400ea556
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x430
je 0x1400ea556
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [0x1401fd5f8]
mov edx, reloc.WS2_32.dll_recv
mov r9, qword [r8 + 0x20a0]
mov r8, qword [r8]
xor ecx, ecx
mov dword [rsp + 0x20], eax
call fcn.1400d47d0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400ea595
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x1400ea595
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [0x1401fd5f8]
mov edx, reloc.WS2_32.dll_recv
mov r9, qword [r8 + 0x2078]
mov r8, qword [r8]
xor ecx, ecx
mov dword [rsp + 0x20], eax
call fcn.1400d47d0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x3d0]
jmp 0x1400ea5cf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, qword [0x1401fd5f8]
mov edx, reloc.WS2_32.dll_recv
mov r9, qword [r8 + 0x2088]
mov r8, qword [r8]
xor ecx, ecx
mov dword [rsp + 0x20], eax
call fcn.1400d47d0
mov rcx, qword [rsp + 0x3b0]
xor rcx, rsp
call fcn.1401a6ae0
add rsp, 0x3c0
pop rdi
ret