Function at 0x409da0
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44fcad
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x462080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 1
push 0
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x409e03
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, str.OpenSCManager_failed___d__n
push edi
push eax
call fcn.00402f70
add esp, 8
jmp 0x409f71
cmp dword [esi + 0x14], 7
jbe 0x409e0b
mov esi, dword [esi]
push 0x34
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x409e37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, str.OpenService_failed___d__n
push edi
push eax
call fcn.00402f70
add esp, 8
jmp 0x409f71
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push ebx
call edi
test eax, eax
jne 0x409e62
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, str.QueryServiceStatusEx_error...
jmp 0x409f55
mov eax, dword [ebp - 0x34]
cmp eax, 4
jne 0x409e9e
mov edx, str.Stopping_service...
call fcn.0040f560
push eax
call fcn.0040f820
add esp, 4
lea eax, [ebp - 0x38]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x409e9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x409f50
mov eax, dword [ebp - 0x34]
cmp eax, 1
sete cl
xor esi, esi
cmp eax, 1
je 0x409eec
nop dword [eax + eax]
inc esi
cmp esi, 0xa
jg 0x409eec
mov edx, str.Waiting_for_service_stop.
call fcn.0040f560
push eax
call fcn.0040f820
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x14]
push eax
push 0x24
lea eax, [ebp - 0x38]
push eax
push 0
push ebx
call edi
cmp dword [ebp - 0x34], 1
sete cl
jne 0x409eb0
test cl, cl
je 0x409f4d
mov edx, str.Service_stopped.
call fcn.0040f560
push eax
call fcn.0040f820
mov ecx, dword [ebp + 0x2c]
add esp, 4
test ecx, ecx
je 0x409fa7
mov eax, dword [ecx]
call dword [eax + 8]
mov edx, str.Starting_service...
mov edi, eax
call fcn.0040f560
push eax
call fcn.0040f820
add esp, 4
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x409f3e
mov edx, str.Service_started.
jmp 0x409f55
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, str.Service_failed_to_start.
jmp 0x409f55
or edi, 0xffffffff
mov edx, str.cant_stop_service_error...
call fcn.0040f560
push eax
call fcn.0040f820
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 4
push ebx
call esi
push dword [ebp - 0x3c]
call esi
mov ecx, dword [ebp + 0x2c]
test ecx, ecx
je 0x409f89
mov esi, dword [ecx]
lea eax, [ebp + 8]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042aee2
mov esp, ebp
pop ebp
ret
call fcn.00411cad
int3