Function at 0x140009640
Capabilities:
Modify service

Disassembly:
push rbx
push rbp
push rdi
mov eax, 0x2080
call fcn.140026ec0
sub rsp, rax
mov rax, qword [0x1400b1318]
xor rax, rsp
mov qword [rsp + 0x2070], rax
xor edx, edx
mov rbx, rcx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
jne 0x1400096c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 8]
lea rdi, str.Failed_to_open_SCM._Error__u
mov dword [rsp + 0x28], eax
lea r9d, [rbp + 1]
mov r8d, 0x1a7
mov qword [rsp + 0x20], rdi
lea rdx, str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
call fcn.1400170d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
lea ecx, [rbp + 0x15]
mov r8d, eax
call fcn.140004fb0
jmp 0x1400098e9
lea rdi, [rbx + 0x780]
mov qword [rsp + 0x20a8], rsi
mov rdx, rdi
mov r8d, 3
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
jne 0x140009743
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 8]
lea rsi, str.Failed_to_open_service__ls._Error__u
mov dword [rsp + 0x30], eax
lea rdx, str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
mov qword [rsp + 0x28], rdi
mov r9d, 1
mov r8d, 0x1b2
mov qword [rsp + 0x20], rsi
call fcn.1400170d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8, rdi
mov rdx, rsi
mov r9d, eax
mov ecx, 0x16
call fcn.140004fb0
jmp 0x1400098d8
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20b0], r14
mov r8d, 0x2000
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x1400097af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 8]
lea r14, str.Failed_to_query_service_configuration_for__ls._Error__u
mov dword [rsp + 0x30], eax
lea rdx, str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
mov qword [rsp + 0x28], rdi
mov r9d, 1
mov r8d, 0x1c3
mov qword [rsp + 0x20], r14
call fcn.1400170d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x17
jmp 0x1400098b9
mov rax, qword [rsp + 0x74]
cmp eax, 3
je 0x1400097ef
mov rcx, qword [rbx + 8]
lea rdx, str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
mov dword [rsp + 0x30], eax
mov r9d, 3
lea rax, str.Leaving_service__ls_start_type__u_unchanged
mov qword [rsp + 0x28], rdi
mov r8d, 0x1cb
mov qword [rsp + 0x20], rax
call fcn.1400170d0
jmp 0x1400098c7
mov r9d, dword [rsp + 0x78]
xor eax, eax
mov edx, dword [rsp + 0x70]
mov rcx, rsi
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
lea r8d, [rax + 2]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x140009877
mov rcx, qword [rbx + 8]
lea rax, str.Changed_service__ls_start_type_to_auto_start
mov qword [rsp + 0x28], rdi
lea rdx, str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
mov r9d, 3
mov qword [rsp + 0x20], rax
mov r8d, 0x1dd
call fcn.1400170d0
mov edx, 0x200
mov rcx, rbx
call fcn.14000a280
mov edx, 0x100
mov rcx, rbx
call fcn.14000a280
jmp 0x1400098c7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 8]
lea r14, str.Failed_to_change_service_to_auto_start_for__ls._Error__u
mov dword [rsp + 0x30], eax
lea rdx, str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
mov qword [rsp + 0x28], rdi
mov r9d, 1
mov r8d, 0x1ed
mov qword [rsp + 0x20], r14
call fcn.1400170d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x18
mov r9d, eax
mov r8, rdi
mov rdx, r14
call fcn.140004fb0
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r14, qword [rsp + 0x20b0]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x20a8]
mov rcx, qword [rsp + 0x2070]
xor rcx, rsp
call fcn.140026d60
add rsp, 0x2080
pop rdi
pop rbp
pop rbx
ret