Function at 0x960020
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x13c
mov eax, dword [0xb196ec]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0xff
lea eax, [esp + 0x45]
push 0
push eax
mov dword [esp + 0x1c], esi
mov byte [esp + 0x4c], 0
call fcn.00a7ffb0
add esp, 0xc
push 1
push esi
call fcn.00956740
add esp, 8
test eax, eax
jne 0x96008b
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00a78f21
mov esp, ebp
pop ebp
ret 0xc
push 1
mov ecx, esi
call fcn.00954c00
add esp, 4
test eax, eax
jne 0x9600bf
xor edi, edi
mov ecx, esi
call fcn.009620b0
test eax, eax
jne 0x9600bf
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00a78f21
mov esp, ebp
pop ebp
ret 0xc
push 1
push 0
push 0
mov dword [esp + 0x20], 0x12c
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [esp + 0x20], eax
test eax, eax
je 0x960268
push 0xf01ff
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
je 0x96022e
push esi
mov ecx, edi
call fcn.0095fe80
lea ecx, [esp + 0x24]
push ecx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x9601e9
cmp dword [ebp + 0x10], 0
je 0x96021a
test ebx, ebx
je 0x96013b
push 0
push esi
push str.Stopping__s_n
call ebx
add esp, 0xc
lea edx, [esp + 0x24]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x96018a
jmp 0x960150
cmp dword [esp + 0x28], 3
jne 0x96018a
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
sub dword [esp + 0x14], 1
je 0x960178
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x960150
jmp 0x96018a
test ebx, ebx
je 0x96018a
push 0
push 0
push str.CmdStopService_timed_out__n
call ebx
add esp, 0xc
mov eax, 1
cmp dword [esp + 0x28], eax
jne 0x9601c1
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x96021a
push 0
push esi
push str._s_stopped._n
call ebx
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x960292
test ebx, ebx
je 0x96021a
push 0
push esi
push str._s_failed_to_stop._n
call ebx
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x960292
test ebx, ebx
je 0x96021a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov edi, eax
lea esi, [esp + 0x44]
call fcn.00960a40
mov ecx, dword [esp + 0x14]
add esp, 4
push eax
push ecx
push str.ControlService_Failed:__s___s___n
call ebx
mov edi, dword [esp + 0x28]
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x960292
test ebx, ebx
je 0x96025b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100
mov edi, eax
lea esi, [esp + 0x44]
call fcn.00960a40
mov edx, dword [esp + 0x14]
add esp, 4
push eax
push edx
push str.Open_service_failed:__s___s___n
call ebx
add esp, 0xc
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x960292
test ebx, ebx
je 0x960292
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x100
mov edi, eax
lea esi, [esp + 0x48]
call fcn.00960a40
add esp, 4
push eax
push str.OpenSCManager_failed:_s__n
call ebx
add esp, 0xc
mov ecx, dword [esp + 0x144]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00a78f21
mov esp, ebp
pop ebp
ret 0xc