Function at 0x14000fa00
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 0x14000fbf3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000fbf3
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 0x14000faa6
lea rax, [rbx + rax*4]
mov qword [rbp - 0x11], rax
jmp 0x14000faee
jbe 0x14000faee
mov rax, qword [rbp - 9]
sub rax, rbx
sar rax, 2
cmp rcx, rax
jbe 0x14000facd
lfence
lea r8, [rbp + 0x67]
mov rdx, rcx
lea rcx, [rbp - 0x19]
call fcn.140010940
jmp 0x14000faea
sub rcx, rdx
lea r8, [rcx*4]
lea rbx, [r8 + r9]
xor edx, edx
mov rcx, r9
call fcn.14003e9d0
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 0x14000fb13
lea rdx, str.error_QueryServiceConfig
xor ecx, ecx
call fcn.1400081f0
test rbx, rbx
je 0x14000fbf3
mov r8d, dword [rbx + 4]
lea rdx, str.Current_startup_type_0x_x
xor ecx, ecx
call fcn.1400081f0
movzx edx, byte [rsi + 0x299]
movzx ecx, byte [rsi + 0x298]
call fcn.14001a690
mov rsi, rax
test rax, rax
jne 0x14000fb59
lea rdx, str.pSecureChannelMELSPCON_is_NULL
xor ecx, ecx
call fcn.1400081f0
jmp 0x14000fb96
mov rcx, rsi
call fcn.14001a950
test al, al
jne 0x14000fb96
xor r8d, r8d
lea rdx, str.QueryLSPCONPresent__IsLSPCONPresent_failed_hr:0x_x
xor ecx, ecx
call fcn.1400081f0
mov rcx, rsi
call fcn.14001aab0
test eax, eax
jns 0x14000fb96
lfence
mov r8d, eax
lea rdx, str.QueryLSPCONPresent__IsNativeHDCP2Present_failed_hr:0x_x
xor ecx, ecx
call fcn.1400081f0
cmp dword [rbx + 4], 2
je 0x14000fc4f
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, [0x1400576e8]
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 0x14000fc4f
lea rdx, str.Changing_startup_type_to_SERVICE_AUTO_START_Failed
xor ecx, ecx
call fcn.1400081f0
mov edi, 0x80004005
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x14000fc36
mov rdx, qword [rbp - 9]
sub rdx, rcx
and rdx, 0xfffffffffffffffc
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000fc31
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000fd0b
call fcn.14001fc00
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.140002ff0
nop
mov qword [rbp + 0x27], rdi
mov dword [rbp + 0x1b], 1
mov dword [rbp + 0x17], 1
lea rax, [0x1400576d8]
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 0x14000fcb7
lea rdx, str.Changing_service_restart_triggerred_by_display_adaptor_arrival_Failed
xor ecx, ecx
call fcn.1400081f0
mov edi, 0x80004005
mov rsi, qword [rbp - 0x21]
test rsi, rsi
je 0x14000fbf8
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x14000fbf8
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax]
call qword [case.0x1400290d6.0]
lock xadd dword [rsi + 0xc], ebx
cmp ebx, 1
jne 0x14000fbf8
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax + 8]
call qword [case.0x1400290d6.0]
jmp 0x14000fbf8
call fcn.140043930
int3