Function at 0x41d8df
Capabilities:
Query service status
Start service

Disassembly:
push 0x19c
mov eax, 0x592a48
call fcn.0054669f
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
mov dword [ebp - 0x1a4], esi
call fcn.0041d224
mov edi, eax
mov dword [ebp - 0x1a8], edi
pop ecx
test edi, edi
je 0x41dbe8
lea eax, [ebp - 0x198]
push esi
push eax
call fcn.0041efad
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x41d927
mov eax, dword [eax]
push reloc.WS2_32.dll_recv
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
lea ecx, [ebp - 0x198]
mov dword [ebp - 0x1a0], edi
call fcn.00406687
test edi, edi
je 0x41db7a
lea eax, [ebp - 0x19c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41db0f
mov eax, dword [ebp - 0x198]
cmp eax, 4
je 0x41db0b
cmp eax, 7
je 0x41dac1
cmp eax, 6
je 0x41dac1
cmp eax, 2
je 0x41da9a
cmp eax, 5
je 0x41da9a
cmp eax, 1
je 0x41da38
push dword [ebp + 0xc]
lea eax, [ebp - 0x1a0]
push 1
push esi
push eax
call fcn.0041de0c
add esp, 0x10
test al, al
jne 0x41da32
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xc8]
call fcn.0040bd69
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 2
push str.Unable_to_start_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push str._state.
push dword [ebp - 0x198]
mov ecx, eax
call fcn.0041cab9
add esp, 4
push eax
push str._as_it_is_stuck_in_the
push esi
push ecx
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
lea ecx, [ebp - 0xc8]
call fcn.0040bf50
jmp 0x41dab6
mov edi, dword [ebp - 0x1a0]
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x41da9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1a4], eax
cmp eax, 0x420
je 0x41db0b
call fcn.0040c461
push 2
push eax
lea ecx, [ebp - 0xc8]
call fcn.0040bd69
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 1
push str.Failed_to_start_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push dword [ebp - 0x1a4]
push str._due_to_error
push esi
jmp 0x41db4f
cmp dword [ebp + 0xc], ebx
jbe 0x41db0b
push dword [ebp + 0xc]
lea eax, [ebp - 0x1a0]
push 4
push esi
push eax
call fcn.0041de0c
add esp, 0x10
mov bl, al
mov edi, dword [ebp - 0x1a0]
jmp 0x41db71
call fcn.0040c461
push 2
push eax
lea ecx, [ebp - 0xc8]
call fcn.0040bd69
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], ebx
push str.Service_
push eax
call fcn.00401609
pop ecx
pop ecx
push str._started__but_in_a_paused_state.
push esi
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
lea ecx, [ebp - 0xc8]
call fcn.0040bf50
mov bl, 1
jmp 0x41db71
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xc8]
mov esi, eax
call fcn.0040bd69
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 3
push str.Failed_to_query_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push esi
push str._due_to_error
push dword [ebp - 0x1a4]
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0xc8]
call fcn.0040bf50
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x41dbdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0x180]
mov esi, eax
call fcn.0040bd69
lea eax, [ebp - 0x180]
mov dword [ebp - 4], 4
push str.Failed_to_open_service_
push eax
call fcn.00401609
pop ecx
pop ecx
push esi
push str._so_that_it_can_be_started_due_to_error
push dword [ebp - 0x1a4]
push eax
call fcn.004015e9
pop ecx
pop ecx
push eax
call fcn.00401609
pop ecx
pop ecx
mov ecx, eax
call fcn.004044df
lea ecx, [ebp - 0x180]
call fcn.0040bf50
push dword [ebp - 0x1a8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
call fcn.00546649
ret