Function at 0x417e80
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x45a074]
xor eax, ebp
mov dword [ebp - 4], eax
mov byte [ebp - 0x2d], 0
cmp dword [ebp + 8], 0
jne 0x417ea5
mov al, byte [ebp - 0x2d]
jmp 0x4181ca
push 0x20000000
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x417f15
mov dword [ebp - 0x40], 0x453f08
push 0x5c
mov eax, dword [ebp - 0x40]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x417ee6
mov ecx, dword [ebp - 0x3c]
add ecx, 1
mov dword [ebp - 0x44], ecx
jmp 0x417eec
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x453f68
push 0x5e
mov eax, dword [ebp - 0x44]
push eax
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor ecx, ecx
jne 0x417ebd
mov al, byte [ebp - 0x2d]
jmp 0x4181ca
push 0xf01ff
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x417f93
mov dword [ebp - 0x4c], 0x453f80
push 0x5c
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.00423700
add esp, 8
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x417f5a
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x50], edx
jmp 0x417f60
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x453fe0
push 0x64
mov ecx, dword [ebp - 0x50]
push ecx
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor edx, edx
jne 0x417f31
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [ebp - 0x2d]
jmp 0x4181ca
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0x24
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 0
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x418037
mov dword [ebp - 0x58], 0x453ff8
push 0x5c
mov eax, dword [ebp - 0x58]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
je 0x417ffc
mov ecx, dword [ebp - 0x54]
add ecx, 1
mov dword [ebp - 0x5c], ecx
jmp 0x418002
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x5c], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_:__d
push 0x70
mov eax, dword [ebp - 0x5c]
push eax
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor ecx, ecx
jne 0x417fd3
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x28], 4
je 0x418043
cmp dword [ebp - 0x28], 2
jne 0x41805e
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x4181ca
push 0
push 0
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4180dc
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x64], 0x454058
push 0x5c
mov eax, dword [ebp - 0x64]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x4180ad
mov ecx, dword [ebp - 0x60]
add ecx, 1
mov dword [ebp - 0x68], ecx
jmp 0x4180b3
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x68], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x453e04
push 0x7e
mov eax, dword [ebp - 0x68]
push eax
push 1
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x14
xor ecx, ecx
jne 0x418084
mov al, byte [ebp - 0x2d]
jmp 0x4181ca
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 0
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x4181b3
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x28], 4
jne 0x418160
mov byte [ebp - 0x2d], 1
mov dword [ebp - 0x70], 0x4540b8
push 0x5c
mov ecx, dword [ebp - 0x70]
push ecx
call fcn.00423700
add esp, 8
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x418139
mov edx, dword [ebp - 0x6c]
add edx, 1
mov dword [ebp - 0x74], edx
jmp 0x41813f
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x74], eax
push str.service_is_running
push 0x88
mov ecx, dword [ebp - 0x74]
push ecx
push 2
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor edx, edx
jne 0x418110
jmp 0x4181b3
mov dword [ebp - 0x7c], 0x454118
push 0x5c
mov eax, dword [ebp - 0x7c]
push eax
call fcn.00423700
add esp, 8
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
je 0x418189
mov ecx, dword [ebp - 0x78]
add ecx, 1
mov dword [ebp - 0x80], ecx
jmp 0x41818f
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x80], edx
push str.service_not_running
push 0x8c
mov eax, dword [ebp - 0x80]
push eax
push 1
call dword [sym.imp.libnac_base.dll_error_output]
add esp, 0x10
xor ecx, ecx
jne 0x418160
jmp 0x4181b3
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [ebp - 0x2d]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421c00
mov esp, ebp
pop ebp
ret