Function at 0x408670
Capabilities:
Modify service

Disassembly:
mov eax, 0x200c
call fcn.0042e2a0
mov eax, dword [0x49a134]
xor eax, esp
mov dword [esp + 0x2008], eax
push ebp
push esi
push 1
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
test ebp, ebp
jne 0x4086ef
mov esi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_SCM._Error__u
push 1
push 0x1a7
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
push esi
call fcn.00418480
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_SCM._Error__u
push 0x15
call fcn.00404a10
add esp, 0xc
pop esi
pop ebp
mov ecx, dword [esp + 0x2008]
xor ecx, esp
call fcn.0042e063
add esp, 0x200c
ret
push ebx
push edi
push 3
lea edi, [esi + 0x6c8]
push edi
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x408748
mov esi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_open_service__ls._Error__u
push 1
push 0x1b2
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
push esi
call fcn.00418480
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_open_service__ls._Error__u
push 0x16
call fcn.00404a10
add esp, 0x10
jmp 0x408869
lea eax, [esp + 0x14]
push eax
push 0x2000
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x40879b
mov esi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_query_service_configuration_for__ls._Error__u
push 1
push 0x1c3
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
push esi
call fcn.00418480
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_query_service_configuration_for__ls._Error__u
push 0x17
jmp 0x40885a
mov eax, dword [esp + 0x1c]
cmp eax, 3
je 0x4087c7
push eax
push edi
push str.Leaving_service__ls_start_type__u_unchanged
push 3
push 0x1cb
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
push dword [esi + 4]
call fcn.00418480
add esp, 0x1c
jmp 0x408862
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 ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov ecx, dword [esi + 4]
mov dword [esp + 0x10], ecx
test eax, eax
je 0x408826
push edi
push str.Changed_service__ls_start_type_to_auto_start
push 3
push 0x1dd
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
push ecx
call fcn.00418480
add esp, 0x18
mov ecx, esi
push 0x200
call fcn.00409180
push 0x100
mov ecx, esi
call fcn.00409180
jmp 0x408862
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_change_service_to_auto_start_for__ls._Error__u
push 1
push 0x1ed
push str.C:dvsp4_build_swgcompdev_srcNvContainercontainerwindowsNvcServiceHost.cpp
push dword [esp + 0x28]
call fcn.00418480
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_change_service_to_auto_start_for__ls._Error__u
push 0x18
call fcn.00404a10
add esp, 0x10
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [esp + 0x2018]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.0042e063
add esp, 0x200c
ret