Function at 0x407af0
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444a90
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x455670]
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 0x407b31
xor eax, eax
jmp 0x407e2e
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.0040124e
mov eax, esi
mov byte [ebp - 4], 1
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x407b75
sub eax, ecx
push eax
push esi
lea ecx, [ebp - 0x68]
call fcn.0040181b
push 3
push 0x44c154
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 0x407c6d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push 0x44c130
push eax
call fcn.0041b420
mov edx, dword [ebp - 0x68]
mov edi, 0x10
add esp, 0xc
cmp dword [ebp - 0x54], edi
jae 0x407c04
lea edx, [ebp - 0x68]
mov eax, edx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407c10
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.0040124e
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 0x407c38
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 0x407c59
lea eax, [ebp - 0x4c]
push ebx
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
jmp 0x407df9
push 0x20004
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x94], eax
cmp eax, ebx
jne 0x407d36
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x30]
push 0x44c130
push edx
call fcn.0041b420
mov edx, dword [ebp - 0x68]
add esp, 0xc
cmp dword [ebp - 0x54], 0x10
jae 0x407cac
lea edx, [ebp - 0x68]
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407cb1
sub eax, edi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.0040124e
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 0x407cd8
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 0x407d00
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 0x407d22
lea eax, [ebp - 0x4c]
push ebx
push eax
push str.UtlSvrHelp
call fcn.00401875
add esp, 0xc
jmp 0x407dd8
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 0x407dc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push 0x44c130
push eax
call fcn.0041b420
mov edx, dword [ebp - 0x68]
mov edi, 0x10
add esp, 0xc
cmp dword [ebp - 0x54], edi
jae 0x407d7a
lea edx, [ebp - 0x68]
mov eax, edx
lea esi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x407d80
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.0040124e
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 0x407da8
sub eax, edx
push eax
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0040181b
cmp dword [ebp - 0x38], edi
jmp 0x407d1a
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 0x407df4
push eax
call esi
mov edi, 0x10
cmp dword [ebp - 0x54], edi
jb 0x407e0a
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.0041a986
add esp, 4
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], ebx
mov byte [ebp - 0x68], bl
cmp dword [ebp - 0x38], edi
jb 0x407e28
mov edx, dword [ebp - 0x4c]
push edx
call fcn.0041a986
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.0041b411
mov esp, ebp
pop ebp
ret