Function at 0x49d460
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d19c6
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x645624]
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 ebx, ecx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
push 0
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 4
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x70], esi
test esi, esi
jne 0x49d5cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x15
push str.OpenSCManager_Failed:
lea ecx, [ebp - 0x40]
mov esi, eax
call fcn.0045f8d0
push esi
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x88]
call fcn.0049d290
add esp, 4
mov esi, eax
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x49d54f
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x49d534
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00459720
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.0045fb00
mov eax, dword [ebp - 0x74]
cmp eax, 0x10
jb 0x49d56a
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.00459720
lea eax, [ebp - 0x28]
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], 0
mov ecx, ebx
push eax
mov byte [ebx], 0
call fcn.0045fb00
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x49d59b
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00459720
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp ecx, 0x10
jb 0x49d6f0
inc ecx
push ecx
push dword [ebp - 0x40]
lea ecx, [ebp - 0x40]
call fcn.00459720
jmp 0x49d6f0
push 4
push str.AGSService
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x6c], edi
test edi, edi
jne 0x49d62d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x70]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x13
push str.OpenService_Failed:
lea ecx, [ebp - 0x40]
call fcn.0045f8d0
push esi
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x88]
call fcn.0049d290
add esp, 4
lea ecx, [ebp - 0x28]
push eax
call fcn.004674d0
lea ecx, [ebp - 0x88]
call fcn.0045e7f0
jmp 0x49d6c4
lea eax, [ebp - 0x44]
push eax
push 0x24
lea eax, [ebp - 0x68]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x49d66a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push dword [ebp - 0x6c]
call esi
push str.QueryServiceStatus_Failed:
lea ecx, [ebp - 0x40]
call fcn.0045f890
push edi
jmp 0x49d603
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov eax, dword [ebp - 0x64]
dec eax
cmp eax, 6
ja case.default.0x49d67f
jmp dword [eax*4 + 0x49d710]
push str.Service_Stopped
jmp 0x49d6bc
push str.Service_Start_Pending
jmp 0x49d6bc
push str.Service_Stop_Pending
jmp 0x49d6bc
push str.Service_Running
jmp 0x49d6bc
push str.Service_Continue_Pending
jmp 0x49d6bc
push str.Service_Pause_Pending
jmp 0x49d6bc
push str.Service_Paused
jmp 0x49d6bc
push str.Service_Status_Unknown
lea ecx, [ebp - 0x28]
call fcn.0045f890
mov dword [ebx + 0x14], 0xf
lea eax, [ebp - 0x28]
mov dword [ebx + 0x10], 0
mov ecx, ebx
push eax
mov byte [ebx], 0
call fcn.0045fb00
lea ecx, [ebp - 0x28]
call fcn.0045e7f0
lea ecx, [ebp - 0x40]
call fcn.0045e7f0
mov eax, ebx
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.0057b676
mov esp, ebp
pop ebp
ret