Function at 0x4a12c0
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e8240
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x534008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
push 4
push 0
push 0
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x58], esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x54], ebx
test ebx, ebx
jne 0x4a13ab
cmp dword [0x539ac4], eax
je 0x4a1394
push ecx
mov ecx, 0x539ac4
call fcn.004b2890
mov eax, dword [0x539ac4]
cmp byte [eax + 0x54], bl
je 0x4a1394
cmp dword [eax + 0x58], 2
jb 0x4a1394
mov bl, byte [eax + 0x5c]
lea ecx, [ebp - 0x28]
call fcn.0040a090
push 0x1c
push str.Open_service_manager_failed
mov dword [ebp - 4], 0
call fcn.0040a960
push 0x37d
push str.RC::DM::RCServiceDManager::IsServiceRunning
push str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinopcdomain_src_system_service_rcservicedmanager.cpp
lea eax, [ebp - 0x28]
mov ecx, 0x539ac4
push eax
push 2
call fcn.004b3160
test bl, bl
je 0x4a1385
lea eax, [ebp - 0x28]
mov ecx, 0x539ac4
push eax
call fcn.004b3480
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.00409f90
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esi], 0
mov dword [edi], 0xa803b9
mov dword [edi + 4], eax
jmp 0x4a14ae
push 5
push dword [ebp - 0x50]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x4a1467
cmp dword [0x539ac4], eax
je 0x4a1447
push ecx
mov ecx, 0x539ac4
call fcn.004b2890
mov eax, dword [0x539ac4]
cmp byte [eax + 0x54], 0
je 0x4a1447
cmp dword [eax + 0x58], 2
jb 0x4a1447
mov bl, byte [eax + 0x5c]
lea ecx, [ebp - 0x28]
call fcn.0040a090
push 0x1c
push str.Open_service_manager_failed
mov dword [ebp - 4], 1
call fcn.0040a960
push 0x387
push str.RC::DM::RCServiceDManager::IsServiceRunning
push str.d:jenkinsworkspacepc_2345mpcsafe_build_rhinopcdomain_src_system_service_rcservicedmanager.cpp
lea eax, [ebp - 0x28]
mov ecx, 0x539ac4
push eax
push 2
call fcn.004b3160
test bl, bl
je 0x4a1435
lea eax, [ebp - 0x28]
mov ecx, 0x539ac4
push eax
call fcn.004b3480
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.00409f90
mov ebx, dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x58]
push ebx
mov byte [eax], 0
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [edi], 0xa803b9
mov dword [edi + 4], esi
jmp 0x4a14ae
lea ecx, [ebp - 0x5c]
push ecx
push 0x24
lea ecx, [ebp - 0x4c]
push ecx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x4a148b
mov eax, dword [ebp - 0x48]
cmp eax, 2
je 0x4a1490
cmp eax, 4
je 0x4a1490
mov byte [esi], 0
jmp 0x4a1493
mov byte [esi], 1
push dword [ebp - 0x50]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
mov dword [edi], 0
mov dword [edi + 4], 0xffffffff
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b5f0c
mov esp, ebp
pop ebp
ret 0xc