Function at 0x510c30
Capabilities:
Query service status
Stop service

Disassembly:
sub esp, 0x12c
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x128], eax
push esi
mov esi, dword [esp + 0x138]
push edi
mov edi, dword [esp + 0x138]
push 0xff
lea eax, [esp + 0x35]
push 0
push eax
mov byte [esp + 0x3c], 0
call fcn.005dfd60
push 1
push edi
call fcn.004d8010
add esp, 0x14
test eax, eax
jne 0x510c83
mov eax, 1
jmp 0x510e6a
push edi
push 1
call fcn.005001f0
add esp, 8
test eax, eax
jne 0x510ca4
push eax
push edi
call fcn.0050d920
add esp, 8
test eax, eax
je 0x510e6a
push ebx
push 1
push 0
push 0
mov dword [esp + 0x18], 0x12c
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x510e3b
push ebp
push 0xf01ff
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, eax
test ebp, ebp
je 0x510e0b
push esi
push ebp
push edi
call fcn.004e2340
lea ecx, [esp + 0x1c]
push ecx
push 1
push ebp
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x510dd7
cmp dword [esp + 0x148], 0
je 0x510df6
test esi, esi
je 0x510d24
push 0
push edi
push str.Stopping__s_n
call esi
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
push ebp
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x510d76
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea ebx, [ebx]
cmp dword [esp + 0x20], 3
jne 0x510d76
push 0x64
call ebx
sub dword [esp + 0x10], 1
je 0x510d64
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x510d40
jmp 0x510d76
test esi, esi
je 0x510d76
push 0
push 0
push str.CmdStopService_timed_out__n
call esi
add esp, 0xc
mov eax, 1
cmp dword [esp + 0x20], eax
jne 0x510dae
mov dword [esp + 0x14], eax
test esi, esi
je 0x510df6
push 0
push edi
push str._s_stopped._n
call esi
add esp, 0xc
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
jmp 0x510e65
test esi, esi
je 0x510df6
push 0
push edi
push str._s_failed_to_stop._n
call esi
add esp, 0xc
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
jmp 0x510e65
test esi, esi
je 0x510df6
lea ecx, [esp + 0x38]
push 0x100
push ecx
call fcn.004d8c20
push eax
push edi
push str.ControlService_Failed:__s___s___n
call esi
add esp, 0x14
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
jmp 0x510e65
test esi, esi
je 0x510e31
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x3c]
push 0x100
push edx
call fcn.004d8b50
push eax
push edi
push str.Open_service_failed:__s___s___n
call esi
add esp, 0x18
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebp
jmp 0x510e65
test esi, esi
je 0x510e65
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push eax
lea eax, [esp + 0x3c]
push 0x100
push eax
call fcn.004d8b50
add esp, 0xc
push eax
push str.OpenSCManager_failed:_s__n
call esi
add esp, 0xc
mov eax, dword [esp + 0x10]
pop ebx
mov ecx, dword [esp + 0x130]
pop edi
pop esi
xor ecx, esp
call fcn.005dfbbe
add esp, 0x12c
ret 0xc