Function at 0x406fc0
Capabilities:
Modify service

Disassembly:
mov eax, 0x200c
call fcn.0040f9d0
mov eax, dword [0x447170]
xor eax, esp
mov dword [esp + 0x2008], eax
push esi
push edi
push 1
push 0
push 0
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esp + 8], eax
test eax, eax
jne 0x40703e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push str.Failed_to_open_SCM._Error__lu
push 1
push 0xfe
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerNvcServiceHost.cpp
push dword [edi + 8]
call fcn.0040d3f0
add esp, 0x18
call esi
push eax
push str.Failed_to_open_SCM._Error__lu
push 0x15
call fcn.00403670
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x2008]
xor ecx, esp
call fcn.0040e41a
add esp, 0x200c
ret
push ebx
push ebp
push 3
lea ebx, [edi + 0x360]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebp, eax
test ebp, ebp
jne 0x40709a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push ebx
push str.Failed_to_open_service__S._Error__lu
push 1
push 0x109
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerNvcServiceHost.cpp
push dword [edi + 8]
call fcn.0040d3f0
add esp, 0x1c
call esi
push eax
push ebx
push str.Failed_to_open_service__S._Error__lu
push 0x16
call fcn.00403670
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0x10
jmp 0x4071b2
lea eax, [esp + 0x14]
push eax
push 0x2000
lea eax, [esp + 0x20]
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x4070ea
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push ebx
push str.Failed_to_query_service_configuration_for__S._Error__lu
push 1
push 0x11a
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerNvcServiceHost.cpp
push dword [edi + 8]
call fcn.0040d3f0
add esp, 0x1c
call esi
push eax
push ebx
push str.Failed_to_query_service_configuration_for__S._Error__lu
push 0x17
jmp 0x4071a1
mov eax, dword [esp + 0x1c]
cmp eax, 3
je 0x407116
push eax
push ebx
push str.Leaving_service__S_start_type__lu_unchanged
push 3
push 0x122
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerNvcServiceHost.cpp
push dword [edi + 8]
call fcn.0040d3f0
add esp, 0x1c
jmp 0x4071a9
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x3c]
push 2
push dword [esp + 0x3c]
push ebp
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x407170
push ebx
push str.Changed_service__S_start_type_to_auto_start
push 3
push 0x134
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerNvcServiceHost.cpp
push dword [edi + 8]
call fcn.0040d3f0
add esp, 0x18
mov ecx, edi
push 0x200
call fcn.00407920
push 0x100
mov ecx, edi
call fcn.00407920
jmp 0x4071a9
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
push ebx
push str.Failed_to_change_service_to_auto_start_for__S._Error__lu
push 1
push 0x144
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerNvcServiceHost.cpp
push dword [edi + 8]
call fcn.0040d3f0
add esp, 0x1c
call esi
push eax
push ebx
push str.Failed_to_change_service_to_auto_start_for__S._Error__lu
push 0x18
call fcn.00403670
add esp, 0x10
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call esi
push dword [esp + 0x10]
call esi
mov ecx, dword [esp + 0x2018]
pop ebp
pop ebx
pop edi
pop esi
xor ecx, esp
call fcn.0040e41a
add esp, 0x200c
ret