Function at 0x1400022d0
Capabilities:
Modify service
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x130
mov rax, qword [0x140044040]
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 0x14000235a
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x14000234f
inc rdx
cmp rdx, 0x1000
mov rcx, qword [rdi]
jb 0x14000234a
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002523
mov rcx, r8
call fcn.140008eb0
xor ebx, ebx
mov byte [rdi], bl
xor al, al
jmp 0x140002480
mov rdx, rdi
cmp qword [rdi + 0x18], 0x10
jb 0x140002367
mov rdx, qword [rdi]
mov r8d, 0x10022
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rsi, rax
test rax, rax
jne 0x140002389
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002315
lea r8, [rsp + 0x100]
mov edx, 1
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x1400023f7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
jne 0x14000252f
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x1400023ee
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1400023e9
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002529
mov rcx, r8
call fcn.140008eb0
xor ebx, ebx
mov byte [rdi], bl
jmp 0x14000247e
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 0x1400024b1
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x14000247b
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140002476
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002523
mov rcx, r8
call fcn.140008eb0
mov byte [rdi], 0
mov al, 1
mov qword [rdi + 0x18], 0xf
mov qword [rdi + 0x10], rbx
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140008e90
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.140001f30
mov rbx, rax
mov r8, rdi
lea rdx, str.Failed_to_modify
lea rcx, [rsp + 0xb8]
call fcn.1400034c0
nop
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.140003900
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140003960
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140001380
lea rdx, [0x1400421b0]
lea rcx, [rsp + 0x60]
call fcn.14000ad54
nop
call fcn.140013e90
int3
call fcn.140013e90
nop
mov edx, eax
lea rcx, [rsp + 0x78]
call fcn.140001f30
mov rbx, rax
mov r8, rdi
lea rdx, str.Failed_to_stop
lea rcx, [rsp + 0x98]
call fcn.1400034c0
nop
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.140003900
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.140003960
nop
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140001380
lea rdx, [0x1400421b0]
lea rcx, [rsp + 0x60]
call fcn.14000ad54
int3