Function at 0x140051260
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x118
lea rbp, [rsp + 0x40]
and rbp, 0xffffffffffffffe0
mov rax, qword [0x1401deb80]
xor rax, rsp
mov qword [rbp + 0xc0], rax
mov r8d, 0xf003f
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rbp + 0x20], rax
cmp qword [rbp + 0x20], 0
jne 0x14005130a
lea rax, [rbp]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 1]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 2]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp]
movzx r8d, byte [rbp + 1]
movzx edx, byte [rbp + 2]
lea rcx, [rbp + 0x60]
call fcn.140051a10
mov rcx, rax
call fcn.140051570
xor r9d, r9d
xor r8d, r8d
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x14005154d
mov rcx, qword [rsp + 0x130]
call fcn.14002c880
mov r8d, 0xf01ff
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rbp + 0x10], rax
cmp qword [rbp + 0x10], 0
jne 0x1400513a6
lea rax, [rbp + 3]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 4]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 5]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 3]
movzx r8d, byte [rbp + 4]
movzx edx, byte [rbp + 5]
lea rcx, [rbp + 0x50]
call fcn.140051940
mov rcx, rax
call fcn.140051780
xor r9d, r9d
xor r8d, r8d
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x14005154d
lea rdx, [rbp + 0x28]
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [rbp + 0x2c], 1
je 0x14005150e
cmp dword [rbp + 0x2c], 3
je 0x14005150e
lea r8, [rbp + 0x28]
mov edx, 1
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x14005145d
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rax, [rbp + 6]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 7]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 8]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 6]
movzx r8d, byte [rbp + 7]
movzx edx, byte [rbp + 8]
lea rcx, [rbp + 0x80]
call fcn.140051a90
mov rcx, rax
call fcn.140051570
xor r9d, r9d
xor r8d, r8d
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x14005154d
mov dword [rbp + 0x18], 0
cmp dword [rbp + 0x2c], 1
je 0x14005148d
mov eax, dword [rbp + 0x18]
inc eax
mov dword [rbp + 0x18], eax
lea rdx, [rbp + 0x28]
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ecx, gethostbyname
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140051464
cmp dword [rbp + 0x18], 0x50
jle 0x14005150e
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rax, [rbp + 9]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0xa]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
lea rax, [rbp + 0xb]
mov rdi, rax
xor eax, eax
mov ecx, 1
rep stosb byte [rdi], al
movzx r9d, byte [rbp + 9]
movzx r8d, byte [rbp + 0xa]
movzx edx, byte [rbp + 0xb]
lea rcx, [rbp + 0xa0]
call fcn.140051b10
mov rcx, rax
call fcn.140051570
xor r9d, r9d
xor r8d, r8d
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x14005154d
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140051534
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x14005154d
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov rcx, qword [rbp + 0xc0]
xor rcx, rsp
call fcn.140149a30
add rsp, 0x118
pop rdi
pop rbp
ret