Function at 0x14001ff60
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 [0x140200d38]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r14d, r8d
mov rdi, rdx
mov qword [rbp - 0x58], rdx
xor r15b, r15b
mov rcx, qword [rcx + 8]
xor r12d, r12d
test rcx, rcx
je 0x14002017e
cmp qword [rdx + 0x18], 8
jb 0x14001ffb5
mov rdx, qword [rdx]
mov r8d, r9d
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, 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 0x14002001d
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], rsi
mov rbx, r12
mov qword [rbp + 0x10], rbx
test rcx, rcx
je 0x140020059
mov qword [rbp - 0x28], rdx
mov rax, qword [rcx + 8]
mov qword [rbp - 0x20], rax
lea rbx, [rbp - 0x28]
mov qword [rbp + 0x10], rbx
lea rax, [rsp + 0x68]
cmp rcx, rax
je 0x140020059
mov edx, 0x10
call fcn.1401218ec
mov rbx, qword [rbp + 0x10]
test rsi, rsi
je 0x140020147
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, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x1400200cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400200cb
mov edx, dword [rbp - 0x50]
lea r8, [rbp - 0x48]
lea rcx, [rbp - 0x48]
call fcn.140021af0
mov rbx, qword [rbp - 0x48]
lea r9, [rbp - 0x50]
mov r8d, dword [rbp - 0x50]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
setne r15b
test eax, eax
je 0x1400200cb
cmp r14d, dword [rbx + 4]
je 0x140020109
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, rsi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
setne r15b
mov rcx, qword [rbp - 0x48]
test rcx, rcx
je 0x140020143
mov rdx, qword [rbp - 0x38]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002013e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400201f7
call fcn.1401218ec
mov rbx, qword [rbp + 0x10]
cmp qword [rbp - 0x30], 0
je 0x140020162
test rbx, rbx
je 0x1400201eb
mov rcx, qword [rbp - 0x30]
call qword [rbx + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp + 0x10]
test rbx, rbx
je 0x14002017e
lea rax, [rbp - 0x28]
cmp rbx, rax
je 0x14002017e
mov edx, 0x10
mov rcx, rbx
call fcn.1401218ec
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 8
jb 0x1400201b9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x1400201b4
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400201f1
mov rcx, r8
call fcn.1401218ec
mov qword [rdi + 0x10], r12
mov qword [rdi + 0x18], 7
mov word [rdi], r12w
movzx eax, r15b
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140121cc0
add rsp, 0x130
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1400ffb0c
nop
call fcn.1401431ac
nop
call fcn.1401431ac
int3