Function at 0x14000f8f0
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xc0
mov rsi, rcx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x19], xmm0
xor edi, edi
mov qword [rbp - 9], rdi
mov dword [rbp + 0x6f], edi
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
lea rdx, [rsi + 0x68]
mov r8d, 0xf003f
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r14, rax
lea r9, [rbp + 0x6f]
xor edx, edx
lea r8d, [rdi + 0x40]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x14000fae3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000fae3
mov eax, dword [rbp + 0x6f]
lea r15d, [rax + 0x40]
mov ecx, eax
mov r9, qword [rbp - 0x11]
mov rdx, r9
mov rbx, qword [rbp - 0x19]
sub rdx, rbx
sar rdx, 2
cmp rax, rdx
jae 0x14000f996
lea rax, [rbx + rax*4]
mov qword [rbp - 0x11], rax
jmp 0x14000f9de
jbe 0x14000f9de
mov rax, qword [rbp - 9]
sub rax, rbx
sar rax, 2
cmp rcx, rax
jbe 0x14000f9bd
lfence
lea r8, [rbp + 0x67]
mov rdx, rcx
lea rcx, [rbp - 0x19]
call fcn.140010830
jmp 0x14000f9da
sub rcx, rdx
lea r8, [rcx*4]
lea rbx, [r8 + r9]
xor edx, edx
mov rcx, r9
call fcn.140021ae0
mov qword [rbp - 0x11], rbx
mov rbx, qword [rbp - 0x19]
lea r9, [rbp + 0x6f]
mov r8d, r15d
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x14000fa03
lea rdx, str.error_QueryServiceConfig
xor ecx, ecx
call fcn.1400080f0
test rbx, rbx
je 0x14000fae3
mov r8d, dword [rbx + 4]
lea rdx, str.Current_startup_type_0x_x
xor ecx, ecx
call fcn.1400080f0
movzx edx, byte [rsi + 0x299]
movzx ecx, byte [rsi + 0x298]
call fcn.14001a640
mov rsi, rax
test rax, rax
jne 0x14000fa49
lea rdx, str.pSecureChannelMELSPCON_is_NULL
xor ecx, ecx
call fcn.1400080f0
jmp 0x14000fa86
mov rcx, rsi
call fcn.14001a900
test al, al
jne 0x14000fa86
xor r8d, r8d
lea rdx, str.QueryLSPCONPresent__IsLSPCONPresent_failed_hr:0x_x
xor ecx, ecx
call fcn.1400080f0
mov rcx, rsi
call fcn.14001aa60
test eax, eax
jns 0x14000fa86
lfence
mov r8d, eax
lea rdx, str.QueryLSPCONPresent__IsNativeHDCP2Present_failed_hr:0x_x
xor ecx, ecx
call fcn.1400080f0
cmp dword [rbx + 4], 2
je 0x14000fb3f
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, [0x140038128]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
mov edx, 0xffffffff
mov r9d, edx
mov r8d, 2
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x14000fb3f
lea rdx, str.Changing_startup_type_to_SERVICE_AUTO_START_Failed
xor ecx, ecx
call fcn.1400080f0
mov edi, 0x80004005
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x14000fb26
mov rdx, qword [rbp - 9]
sub rdx, rcx
and rdx, 0xfffffffffffffffc
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000fb21
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000fbfb
call fcn.14001f828
mov eax, edi
mov rbx, qword [rsp + 0x100]
add rsp, 0xc0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
lea rcx, [rbp - 0x29]
call fcn.140002ef0
nop
mov qword [rbp + 0x27], rdi
mov dword [rbp + 0x1b], 1
mov dword [rbp + 0x17], 1
lea rax, [0x140038118]
mov qword [rbp + 0x1f], rax
mov qword [rbp + 0x2f], rdi
mov qword [rbp - 1], 1
lea rax, [rbp + 0x17]
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rdi
lea r8, [rbp - 1]
mov edx, 8
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14000fba7
lea rdx, str.Changing_service_restart_triggerred_by_display_adaptor_arrival_Failed
xor ecx, ecx
call fcn.1400080f0
mov edi, 0x80004005
mov rsi, qword [rbp - 0x21]
test rsi, rsi
je 0x14000fae8
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x14000fae8
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax]
call qword [0x1400365e0]
lock xadd dword [rsi + 0xc], ebx
cmp ebx, 1
jne 0x14000fae8
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax + 8]
call qword [0x1400365e0]
jmp 0x14000fae8
call fcn.140026c50
int3