Function at 0x4af980
Capabilities:
Query service status

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5319c5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1b0
mov eax, dword [0x566090]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x1a8], eax
push 1
push str.ServicesActive
push 0
mov dword [ebp - 0x1ac], str.wersvc
mov dword [eax], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x1b8], edi
mov dword [ebp - 4], 0
test edi, edi
jne 0x4afc4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1b0], eax
lea edx, [ebp - 0x80]
xor eax, eax
mov dword [ebp - 0x80], 0x80728045
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x7c], 0x806f8072
mov dword [ebp - 0x78], 0x802c8072
mov dword [ebp - 0x74], 0x80638020
mov dword [ebp - 0x70], 0x806c8061
mov dword [ebp - 0x6c], 0x8069806c
mov dword [ebp - 0x68], 0x8067806e
mov dword [ebp - 0x64], 0x804f8020
mov dword [ebp - 0x60], 0x80658070
mov dword [ebp - 0x5c], 0x8053806e
mov dword [ebp - 0x58], 0x804d8043
mov dword [ebp - 0x54], 0x806e8061
mov dword [ebp - 0x50], 0x80678061
mov dword [ebp - 0x4c], 0x80728065
mov dword [ebp - 0x48], 0x803a8057
mov dword [ebp - 0x44], 0x807b8020
mov dword [ebp - 0x40], 0x8000807d
mov word [ebp - 0x3c], ax
call fcn.00419a70
mov byte [ebp - 4], 1
lea eax, [ebp - 0xa0]
cmp dword [ebp - 0x8c], 8
lea edx, [ebp - 0x1ac]
lea ecx, [ebp - 0xb8]
cmovae eax, dword [ebp - 0xa0]
mov dword [ebp - 0x1ac], eax
lea eax, [ebp - 0x1b0]
push eax
call fcn.0041d930
add esp, 4
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.00444e70
mov byte [ebp - 4], 3
lea edi, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
lea ecx, [ebp - 0x11c]
mov edx, str.GetServiceState
mov dword [ebp - 0x20], 0x290028
cmovae edi, dword [ebp - 0x38]
mov dword [ebp - 0x1c], 0x2d0020
mov dword [ebp - 0x18], 0x20
call fcn.004b6330
mov edx, str._BDREINIT__::
lea ecx, [ebp - 0xfc]
mov esi, eax
call fcn.00419450
push esi
mov edx, eax
lea ecx, [ebp - 0x158]
call fcn.004b63b0
add esp, 4
lea ecx, [ebp - 0x20]
mov edx, eax
push ecx
lea ecx, [ebp - 0x1a0]
call fcn.004b64b0
add esp, 4
mov esi, eax
call fcn.00441aa0
push edi
push 0
push esi
push 8
push eax
call fcn.0043ebb0
mov edx, dword [ebp - 0x24]
add esp, 0x14
cmp edx, 8
jb 0x4afb97
mov ecx, dword [ebp - 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4afb8d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01a1
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov edx, dword [ebp - 0xa4]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
cmp edx, 8
jb 0x4afbeb
mov ecx, dword [ebp - 0xb8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4afbe1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01a1
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov edx, dword [ebp - 0x8c]
xor eax, eax
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 7
mov word [ebp - 0xb8], ax
cmp edx, 8
jb 0x4afc48
mov ecx, dword [ebp - 0xa0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4afc3e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01a1
push edx
push ecx
call fcn.004fc7e0
add esp, 8
xor al, al
jmp 0x4afe6d
push 4
push str.wersvc
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1b4], esi
mov byte [ebp - 4], 4
test esi, esi
jne 0x4afe8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1b0], eax
lea eax, [ebp - 0xb8]
push eax
call fcn.004b01c0
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 8
jb 0x4afc95
mov eax, dword [eax]
mov dword [ebp - 0x1a8], eax
lea edx, [ebp - 0x1a8]
lea eax, [ebp - 0x1ac]
push eax
lea eax, [ebp - 0x1b0]
push eax
lea ecx, [ebp - 0xa0]
call fcn.0048f0d0
add esp, 8
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 6
call fcn.00444e70
mov byte [ebp - 4], 7
lea eax, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
lea ecx, [ebp - 0x11c]
mov edx, str.GetServiceState
mov dword [ebp - 0x20], 0x290028
cmovae eax, dword [ebp - 0x38]
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1c], 0x2d0020
mov dword [ebp - 0x18], 0x20
call fcn.004b6330
mov edx, str._BDREINIT__::
mov dword [ebp - 0x1a8], eax
lea ecx, [ebp - 0xfc]
call fcn.00419450
push dword [ebp - 0x1a8]
mov edx, eax
lea ecx, [ebp - 0x158]
call fcn.004b63b0
add esp, 4
lea ecx, [ebp - 0x20]
mov edx, eax
push ecx
lea ecx, [ebp - 0x1a0]
call fcn.004b64b0
add esp, 4
mov dword [ebp - 0x1a8], eax
call fcn.00441aa0
push dword [ebp - 0x1ac]
push 0
push dword [ebp - 0x1a8]
push 8
push eax
call fcn.0043ebb0
mov edx, dword [ebp - 0x24]
add esp, 0x14
cmp edx, 8
jb 0x4afda2
mov ecx, dword [ebp - 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4afd98
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01a6
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov edx, dword [ebp - 0x8c]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
cmp edx, 8
jb 0x4afdf6
mov ecx, dword [ebp - 0xa0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4afdec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01a6
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov edx, dword [ebp - 0xa4]
xor eax, eax
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 7
mov word [ebp - 0xa0], ax
cmp edx, 8
jb 0x4b0161
mov ecx, dword [ebp - 0xb8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4afe4d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01a6
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov byte [ebp - 0x1a1], 0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov al, byte [ebp - 0x1a1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004fc7af
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
lea eax, [ebp - 0x1bc]
mov dword [ebp - 0xbc], 0
push eax
push 0x24
lea eax, [ebp - 0xdc]
xorps xmm0, xmm0
push eax
push 0
push esi
movups xmmword [ebp - 0xdc], xmm0
movups xmmword [ebp - 0xcc], xmm0
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x4b017e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1a8], eax
lea edx, [ebp - 0x88]
xor eax, eax
mov dword [ebp - 0x88], 0x80728045
lea ecx, [ebp - 0xb8]
mov dword [ebp - 0x84], 0x806f8072
mov dword [ebp - 0x80], 0x802c8072
mov dword [ebp - 0x7c], 0x80638020
mov dword [ebp - 0x78], 0x806c8061
mov dword [ebp - 0x74], 0x8069806c
mov dword [ebp - 0x70], 0x8067806e
mov dword [ebp - 0x6c], 0x80518020
mov dword [ebp - 0x68], 0x80658075
mov dword [ebp - 0x64], 0x80798072
mov dword [ebp - 0x60], 0x80658053
mov dword [ebp - 0x5c], 0x80768072
mov dword [ebp - 0x58], 0x80638069
mov dword [ebp - 0x54], 0x80538065
mov dword [ebp - 0x50], 0x80618074
mov dword [ebp - 0x4c], 0x80758074
mov dword [ebp - 0x48], 0x803a8073
mov dword [ebp - 0x44], 0x807b8020
mov dword [ebp - 0x40], 0x8000807d
mov word [ebp - 0x3c], ax
call fcn.00419a70
mov byte [ebp - 4], 8
lea eax, [ebp - 0xb8]
cmp dword [ebp - 0xa4], 8
lea edx, [ebp - 0x1ac]
lea ecx, [ebp - 0xa0]
cmovae eax, dword [ebp - 0xb8]
mov dword [ebp - 0x1ac], eax
lea eax, [ebp - 0x1a8]
push eax
call fcn.0041d930
add esp, 4
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 9
call fcn.00444e70
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
lea ecx, [ebp - 0x11c]
mov edx, str.GetServiceState
mov dword [ebp - 0x20], 0x290028
cmovae eax, dword [ebp - 0x38]
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1c], 0x2d0020
mov dword [ebp - 0x18], 0x20
call fcn.004b6330
mov edx, str._BDREINIT__::
mov dword [ebp - 0x1a8], eax
lea ecx, [ebp - 0xfc]
call fcn.00419450
push dword [ebp - 0x1a8]
mov edx, eax
lea ecx, [ebp - 0x158]
call fcn.004b63b0
add esp, 4
lea ecx, [ebp - 0x20]
mov edx, eax
push ecx
lea ecx, [ebp - 0x1a0]
call fcn.004b64b0
add esp, 4
mov dword [ebp - 0x1a8], eax
call fcn.00441aa0
push dword [ebp - 0x1ac]
push 0
push dword [ebp - 0x1a8]
push 8
push eax
call fcn.0043ebb0
mov edx, dword [ebp - 0x24]
add esp, 0x14
cmp edx, 8
mov esi, dword [ebp - 0x1b4]
mov edi, dword [ebp - 0x1b8]
jb 0x4b009f
mov ecx, dword [ebp - 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4b0095
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01ab
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov edx, dword [ebp - 0x8c]
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
cmp edx, 8
jb 0x4b00f3
mov ecx, dword [ebp - 0xa0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4b00e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01ab
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov edx, dword [ebp - 0xa4]
xor eax, eax
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 7
mov word [ebp - 0xa0], ax
cmp edx, 8
jb 0x4b0161
mov ecx, dword [ebp - 0xb8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4b0142
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4b01ab
push edx
push ecx
call fcn.004fc7e0
add esp, 8
mov byte [ebp - 0x1a1], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4afe64
mov byte [ebp - 0x1a1], 0
test esi, esi
je 0x4afe5e
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
jmp 0x4afe64
mov ecx, dword [ebp - 0x1a8]
mov eax, dword [ebp - 0xd8]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ecx], eax
mov byte [ebp - 0x1a1], 1
call esi
jmp 0x4afe64
call fcn.0050175f
call fcn.0050175f
call fcn.0050175f
int3