Function at 0x41d1a0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4810b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push esi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x41d27f
lea eax, [ebp - 0x28]
mov ecx, 0x4a9a88
push eax
call fcn.004046a0
mov dword [0x4a9f24], 1
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 4], ebx
jb 0x41d1fa
mov eax, dword [eax]
push eax
push 0x48649c
push 0x4a9a88
call fcn.0040e7e0
push str.ERROR:_Service__
push 0x48649c
push eax
call fcn.0040e7e0
push dword [ebp + 8]
push 0x48649c
push eax
call fcn.0040e7e0
push str.__failed_to_start___OpenSCManager_ERC:
push 0x48649c
push eax
call fcn.0040e7e0
add esp, 0x30
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x486544
push esi
call fcn.0040e7e0
push eax
call fcn.0040d5b0
mov eax, dword [ebp - 0x14]
add esp, 0x10
cmp eax, 0x10
jb 0x41d26d
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404120
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
push edi
push 0xf01ff
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
mov ecx, 0x4a9a88
test edi, edi
je 0x41d4ec
lea eax, [ebp - 0x28]
push eax
call fcn.004046a0
mov dword [0x4a9f24], 1
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 4], 1
jb 0x41d2c1
mov eax, dword [eax]
push eax
push 0x48649c
push 0x4a9a88
call fcn.0040e7e0
push str.INFO:_Starting__
push 0x48649c
push eax
call fcn.0040e7e0
push esi
push 0x48649c
push eax
call fcn.0040e7e0
push str.__SERVICE
push 0x48649c
push eax
call fcn.0040e7e0
push eax
call fcn.0040d5b0
mov eax, dword [ebp - 0x14]
add esp, 0x34
mov dword [ebp - 4], 0xffffffff
cmp eax, 0x10
jb 0x41d322
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404120
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x41d453
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call esi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x5c]
push eax
push edi
call ebx
test eax, eax
je 0x41d36a
mov eax, dword [ebp - 0x58]
cmp eax, 2
jne 0x41d36d
push 0x64
call esi
lea eax, [ebp - 0x5c]
push eax
push edi
call ebx
test eax, eax
jne 0x41d353
mov eax, dword [ebp - 0x58]
xor ebx, ebx
mov ecx, 0x4a9a88
cmp eax, 4
lea eax, [ebp - 0x28]
push eax
sete bl
call fcn.004046a0
test ebx, ebx
je 0x41d3ed
mov dword [0x4a9f24], 1
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 4], 2
jb 0x41d3a0
mov eax, dword [eax]
push eax
push 0x48649c
push 0x4a9a88
call fcn.0040e7e0
push str.INFO:_Service__
push 0x48649c
push eax
call fcn.0040e7e0
mov ecx, dword [ebp + 8]
push ecx
push 0x48649c
push eax
call fcn.0040e7e0
push str.__STARTED.
push 0x48649c
push eax
call fcn.0040e7e0
push eax
call fcn.0040d5b0
add esp, 0x34
jmp 0x41d4d6
mov dword [0x4a9f24], 1
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 4], 3
jb 0x41d406
mov eax, dword [eax]
push eax
push 0x48649c
push 0x4a9a88
call fcn.0040e7e0
push str.ERROR:_Service__
push 0x48649c
push eax
call fcn.0040e7e0
mov ecx, dword [ebp + 8]
push ecx
push 0x48649c
push eax
call fcn.0040e7e0
push str.__FAILED.
push 0x48649c
push eax
call fcn.0040e7e0
push eax
call fcn.0040d5b0
add esp, 0x34
jmp 0x41d4d6
lea eax, [ebp - 0x28]
mov ecx, 0x4a9a88
push eax
call fcn.004046a0
mov dword [0x4a9f24], 1
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 4], 4
jb 0x41d47a
mov eax, dword [eax]
push eax
push 0x48649c
push 0x4a9a88
call fcn.0040e7e0
push str.ERROR:_Service__
push 0x48649c
push eax
call fcn.0040e7e0
push esi
push 0x48649c
push eax
call fcn.0040e7e0
push str.__FAILED___ERC:
push 0x48649c
push eax
call fcn.0040e7e0
add esp, 0x30
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x486544
push esi
call fcn.0040e7e0
push eax
call fcn.0040d5b0
add esp, 0x10
lea ecx, [ebp - 0x28]
call fcn.004058c0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
jmp 0x41d585
lea eax, [ebp - 0x40]
push eax
call fcn.004046a0
mov dword [0x4a9f24], 1
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 4], 5
jb 0x41d50e
mov eax, dword [eax]
push eax
push 0x48649c
push 0x4a9a88
call fcn.0040e7e0
push str.ERROR:_Service__
push 0x48649c
push eax
call fcn.0040e7e0
push esi
push 0x48649c
push eax
call fcn.0040e7e0
push str.__FAILED___ERC:
push 0x48649c
push eax
call fcn.0040e7e0
add esp, 0x30
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x486544
push esi
call fcn.0040e7e0
push eax
call fcn.0040d5b0
mov ecx, dword [ebp - 0x2c]
add esp, 0x10
cmp ecx, 0x10
jb 0x41d57f
inc ecx
push ecx
push dword [ebp - 0x40]
lea ecx, [ebp - 0x40]
call fcn.00404120
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x10]
call esi
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret