Function at 0x407880
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4447f0
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x454670]
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 esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
xor ebx, ebx
cmp esi, ebx
jne 0x4078c1
xor eax, eax
jmp 0x407bbe
mov eax, 0xf
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x9c], ebx
mov dword [edi], 1
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 0x4c], bl
push 0x10
push str.GetSvrStartType_
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], ebx
mov byte [ebp - 0x68], bl
call fcn.00401253
mov eax, esi
mov byte [ebp - 4], 1
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x407905
sub eax, ecx
push eax
push esi
lea ecx, [ebp - 0x68]
call fcn.0040181b
push 3
push 0x44b07c
lea ecx, [ebp - 0x68]
call fcn.0040181b
xor eax, eax
push 0x20000
push str.ServicesActive
push ebx
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x98], eax
cmp eax, ebx
jne 0x4079fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push 0x44b058
push eax
call fcn.0041b190
mov edx, dword [ebp - 0x68]
mov edi, 0x10
add esp, 0xc
cmp dword [ebp - 0x54], edi
jae 0x407994
lea edx, [ebp - 0x68]
mov eax, edx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4079a0
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.00401253
push 0x20
push str.OpenSCManager_FAILED_with_ErrNo
lea ecx, [ebp - 0x4c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4079c8
sub eax, edx
push eax
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0040181b
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], edi
jae 0x4079e9
lea eax, [ebp - 0x4c]
push ebx
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
jmp 0x407b89
push 0x20004
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x94], eax
cmp eax, ebx
jne 0x407ac6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x30]
push 0x44b058
push edx
call fcn.0041b190
mov edx, dword [ebp - 0x68]
add esp, 0xc
cmp dword [ebp - 0x54], 0x10
jae 0x407a3c
lea edx, [ebp - 0x68]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407a41
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.00401253
push 0xc
push str.OpenService_
lea ecx, [ebp - 0x4c]
call fcn.0040181b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407a68
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x4c]
call fcn.0040181b
push 0x14
push str.__FAILED_with_ErrNo
lea ecx, [ebp - 0x4c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407a90
sub eax, edx
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x407ab2
lea eax, [ebp - 0x4c]
push ebx
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
jmp 0x407b68
lea ecx, [ebp - 0x9c]
push ecx
push 0x24
lea edx, [ebp - 0x8c]
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x407b56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push 0x44b058
push eax
call fcn.0041b190
mov edx, dword [ebp - 0x68]
mov edi, 0x10
add esp, 0xc
cmp dword [ebp - 0x54], edi
jae 0x407b0a
lea edx, [ebp - 0x68]
mov eax, edx
lea esi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407b10
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.00401253
push 0x27
push str.QueryServiceStatusEx_FAILED_with_ErrNo
lea ecx, [ebp - 0x4c]
call fcn.0040181b
lea eax, [ebp - 0x30]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407b38
sub eax, edx
push eax
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], edi
jmp 0x407aaa
mov edx, dword [ebp - 0x88]
mov dword [edi], edx
mov dword [ebp - 0x90], 1
mov eax, dword [ebp - 0x98]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
mov eax, dword [ebp - 0x94]
cmp eax, ebx
je 0x407b84
push eax
call esi
mov edi, 0x10
cmp dword [ebp - 0x54], edi
jb 0x407b9a
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.0041a6fe
add esp, 4
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], ebx
mov byte [ebp - 0x68], bl
cmp dword [ebp - 0x38], edi
jb 0x407bb8
mov edx, dword [ebp - 0x4c]
push edx
call fcn.0041a6fe
add esp, 4
mov eax, dword [ebp - 0x90]
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.0041b181
mov esp, ebp
pop ebp
ret