Function at 0x40e080
Capabilities:
Modify service

Disassembly:
mov eax, 0x201c
call fcn.00462020
mov eax, dword [0x4d57fc]
xor eax, esp
mov dword [esp + 0x2018], eax
push ebp
push esi
push edi
push 1
push 0
push 0
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
test ebp, ebp
jne 0x40e115
movaps xmm0, xmmword [str.NvcServiceHost..]
mov esi, dword [edi + 4]
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0x20], 0x707063
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_SCM._Error__u
push 1
push 0x17e
lea eax, [esp + 0x20]
push eax
push esi
call fcn.0041e8a0
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_SCM._Error__u
push 0x15
call fcn.00407340
add esp, 0xc
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x2018]
xor ecx, esp
call fcn.00461564
add esp, 0x201c
ret
cmp dword [edi + 0x4d8], 8
lea esi, [edi + 0x4c4]
mov eax, esi
jb 0x40e128
mov eax, dword [esi]
push ebx
push 3
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x40e1a0
movaps xmm0, xmmword [str.NvcServiceHost..]
mov edi, dword [edi + 4]
movups xmmword [esp + 0x14], xmm0
mov dword [esp + 0x24], 0x707063
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x40e160
mov ecx, dword [esi]
push eax
push ecx
push str.Failed_to_open_service__ls._Error__u
push 1
push 0x189
lea eax, [esp + 0x28]
push eax
push edi
call fcn.0041eb00
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x14], 8
jb 0x40e18a
mov esi, dword [esi]
push eax
push esi
push str.Failed_to_open_service__ls._Error__u
push 0x16
call fcn.004073d0
add esp, 0x10
jmp 0x40e32c
lea eax, [esp + 0x10]
push eax
push 0x2000
lea eax, [esp + 0x30]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x40e219
movaps xmm0, xmmword [str.NvcServiceHost..]
mov edi, dword [edi + 4]
movups xmmword [esp + 0x14], xmm0
mov dword [esp + 0x24], 0x707063
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x40e1e1
mov ecx, dword [esi]
push eax
push ecx
push str.Failed_to_query_service_configuration_for__ls._Error__u
push 1
push 0x19a
lea eax, [esp + 0x28]
push eax
push edi
call fcn.0041eb00
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x14], 8
jb 0x40e20b
mov esi, dword [esi]
push eax
push esi
push str.Failed_to_query_service_configuration_for__ls._Error__u
push 0x17
jmp 0x40e31d
mov eax, dword [esp + 0x2c]
cmp eax, 3
je 0x40e261
cmp dword [esi + 0x14], 8
movaps xmm0, xmmword [str.NvcServiceHost..]
movups xmmword [esp + 0x14], xmm0
mov dword [esp + 0x24], 0x707063
jb 0x40e23e
mov esi, dword [esi]
push eax
push esi
push str.Leaving_service__ls_start_type__u_unchanged
push 3
push 0x1a1
lea eax, [esp + 0x28]
push eax
push dword [edi + 4]
call fcn.0041eb00
add esp, 0x1c
jmp 0x40e325
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x4c]
push 2
push dword [esp + 0x4c]
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
movaps xmm0, xmmword [str.NvcServiceHost..]
mov dword [esp + 0x24], 0x707063
movups xmmword [esp + 0x14], xmm0
test eax, eax
je 0x40e2d7
cmp dword [esi + 0x14], 8
jb 0x40e2a0
mov esi, dword [esi]
push esi
push str.Changed_service__ls_start_type_to_auto_start
push 3
push 0x1b3
lea eax, [esp + 0x24]
push eax
push dword [edi + 4]
call fcn.0041eb00
add esp, 0x18
mov ecx, edi
push 0x200
call fcn.0040ee10
push 0x100
mov ecx, edi
call fcn.0040ee10
jmp 0x40e325
mov edi, dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x40e2ea
mov ecx, dword [esi]
push eax
push ecx
push str.Failed_to_change_service_to_auto_start_for__ls._Error__u
push 1
push 0x1c3
lea eax, [esp + 0x28]
push eax
push edi
call fcn.0041eb00
add esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi + 0x14], 8
jb 0x40e314
mov esi, dword [esi]
push eax
push esi
push str.Failed_to_change_service_to_auto_start_for__ls._Error__u
push 0x18
call fcn.004073d0
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 + 0x2028]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00461564
add esp, 0x201c
ret