Function at 0x140022670
Capabilities:
Modify service

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov rax, qword [0x14022b078]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r14d, r8d
mov rbx, rdx
mov qword [rbp - 0x58], rdx
xor r15b, r15b
mov rcx, qword [rcx + 8]
xor r12d, r12d
test rcx, rcx
je 0x1400228a4
cmp qword [rdx + 0x18], 8
jb 0x1400226c5
mov rdx, qword [rdx]
mov r8d, r9d
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
xor eax, eax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rax
mov qword [rbp], rax
mov qword [rbp + 8], rax
mov qword [rbp + 0x10], rax
mov qword [rbp - 0x60], r12
mov rcx, r12
lea rdx, vtable.std::_Func_impl_no_alloc_int____cdecl___struct_SC_HANDLE______ptr64___int__struct_SC_HANDLE______ptr64_.0
cmp qword [sym.imp.ADVAPI32.dll_CloseServiceHandle], rax
je 0x14002272d
mov qword [rsp + 0x68], rdx
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x68]
mov qword [rbp - 0x60], rax
lea rcx, [rsp + 0x68]
mov qword [rbp - 0x30], rdi
mov rax, r12
mov qword [rbp + 0x10], rax
test rcx, rcx
je 0x140022769
mov qword [rbp - 0x28], rdx
mov rax, qword [rcx + 8]
mov qword [rbp - 0x20], rax
lea rax, [rbp - 0x28]
mov qword [rbp + 0x10], rax
lea rdx, [rsp + 0x68]
cmp rcx, rdx
je 0x140022769
mov edx, 0x10
call fcn.14013f180
mov rax, qword [rbp + 0x10]
test rdi, rdi
je 0x140022862
mov dword [rbp - 0x50], r12d
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], r12
lea r9, [rbp - 0x50]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x1400227e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400227e6
mov eax, dword [rbp - 0x50]
test eax, eax
je 0x1400227e6
mov edx, eax
lea r8, [rbp - 0x48]
lea rcx, [rbp - 0x48]
call fcn.140024280
mov rsi, qword [rbp - 0x48]
lea r9, [rbp - 0x50]
mov r8d, dword [rbp - 0x50]
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
setne r15b
test eax, eax
je 0x1400227e6
test rsi, rsi
je 0x1400227e6
cmp r14d, dword [rsi + 4]
je 0x140022824
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov r9d, 0xffffffff
mov r8d, r14d
mov edx, r9d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
setne r15b
mov rcx, qword [rbp - 0x48]
test rcx, rcx
je 0x14002285e
mov rdx, qword [rbp - 0x38]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140022859
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14002291d
call fcn.14013f180
mov rax, qword [rbp + 0x10]
cmp qword [rbp - 0x30], 0
je 0x140022888
test rax, rax
je 0x140022911
mov rcx, qword [rbp - 0x30]
mov rax, qword [rax + 8]
call qword [case.0x14001c280.0]
mov qword [rbp - 0x30], r12
mov rax, qword [rbp + 0x10]
test rax, rax
je 0x1400228a4
lea rcx, [rbp - 0x28]
cmp rax, rcx
je 0x1400228a4
mov edx, 0x10
mov rcx, rax
call fcn.14013f180
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x1400228df
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x1400228da
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140022917
mov rcx, r8
call fcn.14013f180
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], 7
mov word [rbx], r12w
movzx eax, r15b
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.14013f550
add rsp, 0x130
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.14011cfe0
nop
call fcn.14016111c
nop
call fcn.14016111c
int3