Function at 0x4b8298
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 0x4b859d
xor eax, eax
push ebp
push 0x4b8596
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 0x4b8318
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b859d
mov eax, dword [ebp - 0x18]
call sub.rtl250.bpl__System_AllocMem_qqri
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4b857f
xor eax, eax
push ebp
push 0x4b8578
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 0x4b836b
cmp dword [ebp - 0x1c], 0
jne 0x4b837a
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b859d
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x1c]
jae 0x4b8562
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 0x4b8553
cmp esi, 3
je 0x4b8553
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 0x4b8553
xor eax, eax
push ebp
push 0x4b854c
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 0x4b8535
mov eax, dword [ebp - 4]
call fcn.004b87c0
cmp eax, dword [ebp - 0x38]
jne 0x4b8535
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
jne 0x4b842e
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b8562
cmp dword [ebp - 0x6c], 1
jne 0x4b844c
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 0x4b859d
lea eax, [ebp - 0x70]
push eax
push 1
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_ControlService
test eax, eax
jne 0x4b8469
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b8562
cmp dword [ebp - 8], 0
jbe 0x4b8508
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4b8508
cmp dword [ebp - 8], 0xffffffff
je 0x4b84a0
mov eax, dword [0x424294]
call fcn.00424404
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
jmp 0x4b8502
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
jmp 0x4b8502
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 0x4b8508
cmp edi, dword [ebp - 0x5c]
ja 0x4b8508
cmp dword [ebp - 8], 0xffffffff
je 0x4b8502
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 0x4b84fe
cmp eax, dword [esp]
pop edx
pop eax
jae 0x4b8502
jmp 0x4b8508
pop edx
pop eax
jl 0x4b8508
cmp dword [ebp - 0x6c], 1
jne 0x4b84b0
cmp dword [ebp - 8], 0
je 0x4b8529
lea eax, [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4b8529
cmp dword [ebp - 0x6c], 1
je 0x4b8529
xor eax, eax
jmp 0x4b852b
mov al, 1
mov byte [ebp - 9], al
call sub.rtl250.bpl__System__TryFinallyExit_qqrv
jmp 0x4b8562
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b8553
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 0x4b838b
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b857f
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 0x4b859d
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