Function at 0x1400022f0
Capabilities:
Modify service
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x130
mov rax, qword [0x140047038]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rdi, rdx
mov qword [rsp + 0xf8], rdx
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbx, rax
test rax, rax
jne 0x140002386
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x14000236f
inc rdx
cmp rdx, 0x1000
mov rcx, qword [rdi]
jb 0x14000236a
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000255b
mov rcx, r8
call fcn.140008ac0
xor ebx, ebx
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], 0xf
mov byte [rdi], bl
xor al, al
jmp 0x1400024c4
mov rdx, rdi
cmp qword [rdi + 0x18], 0x10
jb 0x140002393
mov rdx, qword [rdi]
mov r8d, 0x10022
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rsi, rax
test rax, rax
jne 0x1400023b5
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002335
lea r8, [rsp + 0x100]
mov edx, 1
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x14000242f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
jne 0x140002567
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x14000241a
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140002415
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002561
mov rcx, r8
call fcn.140008ac0
xor ebx, ebx
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], 0xf
mov byte [rdi], bl
jmp 0x1400024c2
xor ebx, ebx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
mov edx, 0xffffffff
mov r9d, edx
lea r8d, [rbx + 3]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
je 0x1400024e9
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x1400024b3
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1400024ae
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000255b
mov rcx, r8
call fcn.140008ac0
mov qword [rdi + 0x10], rbx
mov qword [rdi + 0x18], 0xf
mov byte [rdi], 0
mov al, 1
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140008aa0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov edx, eax
lea rcx, [rsp + 0xd8]
call fcn.140001ec0
mov rbx, rax
mov r8, rdi
lea rdx, str.Failed_to_modify
lea rcx, [rsp + 0xb8]
call fcn.140003480
nop
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.1400038f0
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140003950
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140001380
lea rdx, [0x140045368]
lea rcx, [rsp + 0x60]
call fcn.14000aa54
nop
call fcn.140011ee0
int3
call fcn.140011ee0
nop
mov edx, eax
lea rcx, [rsp + 0x78]
call fcn.140001ec0
mov rbx, rax
mov r8, rdi
lea rdx, str.Failed_to_stop
lea rcx, [rsp + 0x98]
call fcn.140003480
nop
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.1400038f0
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.140003950
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140001380
lea rdx, [0x140045368]
lea rcx, [rsp + 0x60]
call fcn.14000aa54
int3