Function at 0x41d3da
Capabilities:
Query service status
Start service

Disassembly:
push 0x19c
mov eax, 0x58ce22
call fcn.00540b26
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
mov dword [ebp - 0x1a4], esi
call fcn.0041cd1f
mov edi, eax
mov dword [ebp - 0x1a8], edi
pop ecx
test edi, edi
je 0x41d6e3
lea eax, [ebp - 0x198]
push esi
push eax
call fcn.0041eaa8
pop ecx
pop ecx
cmp dword [eax + 0x14], 8
jb 0x41d422
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.00406537
test edi, edi
je 0x41d675
lea eax, [ebp - 0x19c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x41d60a
mov eax, dword [ebp - 0x198]
cmp eax, 4
je 0x41d606
cmp eax, 7
je 0x41d5bc
cmp eax, 6
je 0x41d5bc
cmp eax, 2
je 0x41d595
cmp eax, 5
je 0x41d595
cmp eax, 1
je 0x41d533
push dword [ebp + 0xc]
lea eax, [ebp - 0x1a0]
push 1
push esi
push eax
call fcn.0041d907
add esp, 0x10
test al, al
jne 0x41d52d
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xc8]
call fcn.0040bc1a
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 2
push str.Unable_to_start_service_
push eax
call fcn.004014b9
pop ecx
pop ecx
push str._state.
push dword [ebp - 0x198]
mov ecx, eax
call fcn.0041c5b4
add esp, 4
push eax
push str._as_it_is_stuck_in_the
push esi
push ecx
call fcn.00401499
pop ecx
pop ecx
push eax
call fcn.004014b9
pop ecx
pop ecx
push eax
call fcn.004014b9
pop ecx
pop ecx
push eax
call fcn.004014b9
pop ecx
pop ecx
lea ecx, [ebp - 0xc8]
call fcn.0040be01
jmp 0x41d5b1
mov edi, dword [ebp - 0x1a0]
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x41d595
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1a4], eax
cmp eax, 0x420
je 0x41d606
call fcn.0040c312
push 2
push eax
lea ecx, [ebp - 0xc8]
call fcn.0040bc1a
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 1
push str.Failed_to_start_service_
push eax
call fcn.004014b9
pop ecx
pop ecx
push dword [ebp - 0x1a4]
push str._due_to_error
push esi
jmp 0x41d64a
cmp dword [ebp + 0xc], ebx
jbe 0x41d606
push dword [ebp + 0xc]
lea eax, [ebp - 0x1a0]
push 4
push esi
push eax
call fcn.0041d907
add esp, 0x10
mov bl, al
mov edi, dword [ebp - 0x1a0]
jmp 0x41d66c
call fcn.0040c312
push 2
push eax
lea ecx, [ebp - 0xc8]
call fcn.0040bc1a
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], ebx
push str.Service_
push eax
call fcn.004014b9
pop ecx
pop ecx
push str._started__but_in_a_paused_state.
push esi
push eax
call fcn.00401499
pop ecx
pop ecx
push eax
call fcn.004014b9
pop ecx
pop ecx
lea ecx, [ebp - 0xc8]
call fcn.0040be01
mov bl, 1
jmp 0x41d66c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0xc8]
mov esi, eax
call fcn.0040bc1a
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 3
push str.Failed_to_query_service_
push eax
call fcn.004014b9
pop ecx
pop ecx
push esi
push str._due_to_error
push dword [ebp - 0x1a4]
push eax
call fcn.00401499
pop ecx
pop ecx
push eax
call fcn.004014b9
pop ecx
pop ecx
mov ecx, eax
call fcn.0040438f
lea ecx, [ebp - 0xc8]
call fcn.0040be01
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x41d6d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push str.AgentErrors.log
lea ecx, [ebp - 0x180]
mov esi, eax
call fcn.0040bc1a
lea eax, [ebp - 0x180]
mov dword [ebp - 4], 4
push str.Failed_to_open_service_
push eax
call fcn.004014b9
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.00401499
pop ecx
pop ecx
push eax
call fcn.004014b9
pop ecx
pop ecx
mov ecx, eax
call fcn.0040438f
lea ecx, [ebp - 0x180]
call fcn.0040be01
push dword [ebp - 0x1a8]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, bl
call fcn.00540ad0
ret