Function at 0x454140
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x4ed018]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x45417b
push str.Inst_QueryServiceRunningStatus:_invalid_parameter
push 1
call fcn.00446b80
add esp, 8
mov eax, 0x8420
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push esi
push edi
push str.Inst_QueryServiceRunningStatus:_Attempting_to_query_service:__s
push 0x20
call fcn.00446b80
add esp, 0xc
push 0x20000
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x454217
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x454204
cmp eax, 0x57
je 0x4541fd
cmp eax, 0x429
je 0x4541cd
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed
push eax
push 1
call fcn.00447040
add esp, 0xc
jmp case.default.0x45432f
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed:_ERROR_DATABASE_DOES_NOT_EXIST
push 1
call fcn.00446b80
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed:_system_config_appears_to_be_corrupt
push 1
call fcn.00446b80
add esp, 0x10
pop esi
mov eax, 0x8420
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed:_ERROR_INVALID_PARAMETER
jmp 0x4541d2
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed:_ERROR_ACCESS_DENIED
push 1
call fcn.00446b80
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed:_you_must_be_an_administrator
jmp 0x4541de
push str.Inst_QueryServiceRunningStatus:_Service_Manager_successfully_opened
push 0x10
call fcn.00446b80
add esp, 8
push 4
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x4542a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
ja 0x454264
je 0x45425d
mov ecx, eax
sub ecx, 5
je 0x454256
sub ecx, 1
jne 0x45426b
push str.Inst_QueryServiceRunningStatus:_Service_could_not_be_opened:_ERROR_INVALID_HANDLE
jmp 0x45428c
push str.Inst_QueryServiceRunningStatus:_Service_Manager_open_failed:_ERROR_ACCESS_DENIED
jmp 0x45428c
push str.Inst_QueryServiceRunningStatus:_Service_could_not_be_opened:_ERROR_INVALID_NAME
jmp 0x45428c
cmp eax, 0x424
je 0x454287
push str.Inst_QueryServiceRunningStatus:_Service_could_not_be_opened
push eax
push 1
call fcn.00447040
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp case.default.0x45432f
push str.Inst_QueryServiceRunningStatus:_Service_could_not_be_opened:_ERROR_SERVICE_DOES_NOT_EXIST
push 1
call fcn.00446b80
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp case.default.0x45432f
push str.Inst_QueryServiceRunningStatus:_Service_successfully_opened
push 0x10
call fcn.00446b80
add esp, 8
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4542f6
push str.Inst_QueryServiceRunningStatus:_Could_not_query_service_status
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
call fcn.00446e90
add esp, 0xc
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0xc]
push dword [ebp - 0x1c]
call fcn.00454110
add esp, 4
push eax
push str.Inst_QueryServiceRunningStatus:_service_status:__s_cp0x_08x
push 0x20
call fcn.00446b80
mov eax, dword [ebp - 0x1c]
add esp, 0x10
dec eax
cmp eax, 6
ja case.default.0x45432f
jmp dword [eax*4 + 0x4543cc]
pop esi
mov eax, 0x8404
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 0x8405
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 0x8408
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 0x8409
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 0x840a
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 0x8411
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401bd5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x8410
pop esi
xor ecx, ebp
pop edi
call fcn.00401bd5
mov esp, ebp
pop ebp
ret