Function at 0x4b82e0
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov byte [ebp - 9], 0
push 0xf003f
push 0
push 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4b85e5
xor eax, eax
push ebp
push 0x4b85de
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x14], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, 3
mov edx, 0x30
mov eax, dword [ebp - 0x10]
call fcn.0041952c
cmp dword [ebp - 0x18], 0
jne 0x4b8360
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b85e5
mov eax, dword [ebp - 0x18]
call sub.rtl250.bpl__System_AllocMem_qqri
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4b85c7
xor eax, eax
push ebp
push 0x4b85c0
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
mov ecx, 3
mov edx, 0x30
mov eax, dword [ebp - 0x10]
call fcn.0041952c
test al, al
je 0x4b83b3
cmp dword [ebp - 0x1c], 0
jne 0x4b83c2
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b85e5
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jae 0x4b85aa
mov ebx, dword [ebp - 0x24]
add ebx, ebx
add ebx, ebx
lea ebx, [ebx + ebx*8]
add ebx, dword [ebp - 0x14]
mov esi, dword [ebx + 0xc]
cmp esi, 1
je 0x4b859b
cmp esi, 3
je 0x4b859b
push 0x24
mov eax, dword [ebx]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4b859b
xor eax, eax
push ebp
push 0x4b8594
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x54]
xor ecx, ecx
mov edx, 0x24
call fcn.004029b0
lea eax, [ebp - 0x18]
push eax
push 0x24
lea eax, [ebp - 0x54]
push eax
push 0
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatusEx
test eax, eax
je 0x4b857d
mov eax, dword [ebp - 4]
call fcn.004b8808
cmp eax, dword [ebp - 0x38]
jne 0x4b857d
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
jne 0x4b8476
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b85aa
cmp dword [ebp - 0x6c], 1
jne 0x4b8494
mov byte [ebp - 9], 1
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b85e5
lea eax, [ebp - 0x70]
push eax
push 1
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_ControlService
test eax, eax
jne 0x4b84b1
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b85aa
cmp dword [ebp - 8], 0
jbe 0x4b8550
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4b8550
cmp dword [ebp - 8], 0xffffffff
je 0x4b84e8
mov eax, dword [0x424294]
call fcn.00424404
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
jmp 0x4b854a
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
jmp 0x4b854a
mov edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_Sleep
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4b8550
cmp edi, dword [ebp - 0x5c]
ja 0x4b8550
cmp dword [ebp - 8], 0xffffffff
je 0x4b854a
mov eax, dword [0x424294]
call fcn.00424404
sub eax, dword [ebp - 0x30]
sbb edx, dword [ebp - 0x2c]
push edx
push eax
mov eax, dword [ebp - 8]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x4b8546
cmp eax, dword [esp]
pop edx
pop eax
jae 0x4b854a
jmp 0x4b8550
pop edx
pop eax
jl 0x4b8550
cmp dword [ebp - 0x6c], 1
jne 0x4b84f8
cmp dword [ebp - 8], 0
je 0x4b8571
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4b8571
cmp dword [ebp - 0x6c], 1
je 0x4b8571
xor eax, eax
jmp 0x4b8573
mov al, 1
mov byte [ebp - 9], al
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b85aa
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b859b
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jb 0x4b83d3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b85c7
mov eax, dword [ebp - 0x14]
call sub.rtl250.bpl__System__FreeMem_qqrpv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b85e5
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_CloseServiceHandle
ret
movzx eax, byte [ebp - 9]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret