Function at 0x407020
Capabilities:
Modify service

Disassembly:
mov eax, 0x200c
call fcn.0040fa50
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 0x40709e
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.0040d470
add esp, 0x18
call esi
push eax
push str.Failed_to_open_SCM._Error__lu
push 0x15
call fcn.00403680
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x2008]
xor ecx, esp
call fcn.0040e49c
add esp, 0x200c
ret
push ebx
push ebp
push 3
lea ebx, [edi + 0x364]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebp, eax
test ebp, ebp
jne 0x4070fa
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.0040d470
add esp, 0x1c
call esi
push eax
push ebx
push str.Failed_to_open_service__S._Error__lu
push 0x16
call fcn.00403680
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0x10
jmp 0x407212
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 0x40714a
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.0040d470
add esp, 0x1c
call esi
push eax
push ebx
push str.Failed_to_query_service_configuration_for__S._Error__lu
push 0x17
jmp 0x407201
mov eax, dword [esp + 0x1c]
cmp eax, 3
je 0x407176
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.0040d470
add esp, 0x1c
jmp 0x407209
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 0x4071d0
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.0040d470
add esp, 0x18
mov ecx, edi
push 0x200
call fcn.00407980
push 0x100
mov ecx, edi
call fcn.00407980
jmp 0x407209
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.0040d470
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.00403680
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.0040e49c
add esp, 0x200c
ret