Function at 0x40fd70
Capabilities:
Create service
Modify service
Start service

Disassembly:
push 0xffffffffffffffff
push 0x507ee0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
push edi
mov eax, dword [0x543c98]
mov dword [esp + 0x18], 2
mov dword [esp + 0xc], eax
push 0xc0000000
push 0
push 0
mov byte [esp + 0x24], 3
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x40fddf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x10]
push str.OpenSCManager_failed__errno__d_
push ecx
call fcn.004e3c81
mov edx, dword [esp + 0x18]
push edi
push 1
push edx
call fcn.0041e3a0
add esp, 0x18
jmp 0x40ff0f
mov eax, dword [esp + 0x24]
push reloc.OLEAUT32.dll_SafeArrayGetUBound
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40fe54
mov ecx, dword [esp + 0x20]
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
push 1
push 3
push 0x110
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x40feca
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
push edx
push eax
lea ecx, [esp + 0x14]
push str.StartInstallService___OpenService_ChangeServiceConfig_failed__ServiceName:__s__image_file:__s_n
push ecx
call fcn.004e3c81
mov edx, dword [esp + 0x1c]
push 0
push 1
push edx
call fcn.0041e3a0
add esp, 0x1c
jmp 0x40ff03
call ebp
cmp eax, 0x424
jne 0x40ffc0
mov eax, dword [esp + 0x20]
push 0
mov ecx, dword [esp + 0x2c]
push 0
mov edx, dword [esp + 0x2c]
push 0
push 0
push 0
push eax
push 1
push 3
push 0x110
push 0xf01ff
push ecx
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
jne 0x40feca
call ebp
push eax
mov eax, dword [esp + 0x28]
push str.c:_tempRInstSvr.exe
push eax
lea ecx, [esp + 0x18]
push str.StartInstallService___CreateService_failed__ServiceName:__s__image_file:__s__Errorcode:__d_n
push ecx
call fcn.004e3c81
mov edx, dword [esp + 0x20]
push esi
push 1
push edx
call fcn.0041e3a0
add esp, 0x20
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40ff0f
lea eax, [esp + 0x2c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40ff60
call ebp
push eax
lea ecx, [esp + 0x10]
push str.StartService_failed__errno__d_
push ecx
call fcn.004e3c81
mov edx, dword [esp + 0x18]
push 0
push 1
push edx
call fcn.0041e3a0
add esp, 0x18
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 2
call fcn.004ea741
lea ecx, [esp + 0x20]
mov byte [esp + 0x18], 1
call fcn.004ea741
lea ecx, [esp + 0x24]
mov byte [esp + 0x18], 0
call fcn.004ea741
lea ecx, [esp + 0x28]
mov dword [esp + 0x18], 0xffffffff
call fcn.004ea741
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 2
call fcn.004ea741
lea ecx, [esp + 0x20]
mov byte [esp + 0x18], 1
call fcn.004ea741
lea ecx, [esp + 0x24]
mov byte [esp + 0x18], 0
call fcn.004ea741
lea ecx, [esp + 0x28]
mov dword [esp + 0x18], 0xffffffff
call fcn.004ea741
pop edi
pop esi
mov eax, 1
pop ebp
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x14]
push str.StartInstallService___OpenService_failed__ServiceName:__s__image_file:__s_n
push edx
call fcn.004e3c81
mov eax, dword [esp + 0x1c]
push 0
push 1
push eax
call fcn.0041e3a0
add esp, 0x1c
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 2
call fcn.004ea741
lea ecx, [esp + 0x20]
mov byte [esp + 0x18], 1
call fcn.004ea741
lea ecx, [esp + 0x24]
mov byte [esp + 0x18], 0
call fcn.004ea741
lea ecx, [esp + 0x28]
mov dword [esp + 0x18], 0xffffffff
call fcn.004ea741
mov ecx, dword [esp + 0x10]
pop edi
pop esi
mov eax, 2
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10