Function at 0x402510
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x426342
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x431540]
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 eax, dword [ebp + 8]
xor ebx, ebx
mov edi, ecx
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x7c], ebx
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x90], 1
cmp dword [eax + 0x10], ebx
je 0x402578
cmp dword [eax + 0x14], 8
jb 0x40257a
mov eax, dword [eax]
jmp 0x40257a
xor eax, eax
push 5
push str.ServicesActive
push eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x8c], esi
cmp esi, ebx
je 0x402741
push ebx
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x70]
push ecx
lea edx, [ebp - 0x74]
push edx
push ebx
push ebx
push 3
push 0x3b
push ebx
push esi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x88], ebx
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
jne 0x402730
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x402730
mov eax, dword [ebp - 0x74]
push eax
call fcn.00411c88
add esp, 4
push ebx
lea ecx, [ebp - 0x88]
push ecx
mov ecx, dword [ebp - 0x74]
mov edi, eax
lea edx, [ebp - 0x70]
push edx
lea eax, [ebp - 0x74]
push eax
push ecx
push edi
push 3
push 0x3b
push ebx
push esi
mov dword [ebp - 0x7c], edi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
test eax, eax
je 0x402717
mov dword [ebp - 0x80], ebx
cmp dword [ebp - 0x70], ebx
jbe 0x402717
add edi, 8
mov dword [ebp - 0x78], edi
jmp 0x402633
mov edi, dword [ebp - 0x78]
mov eax, dword [edi - 8]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x58], 7
mov dword [ebp - 0x5c], ebx
mov word [ebp - 0x6c], dx
lea esi, [ecx + 2]
jmp 0x402650
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x402650
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x6c]
call fcn.00401c20
mov dword [ebp - 4], 1
mov eax, dword [edi - 4]
xor ecx, ecx
mov word [ebp - 0x50], cx
mov ecx, eax
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], ebx
lea edx, [ecx + 2]
mov si, word [ecx]
add ecx, 2
cmp si, bx
jne 0x402687
sub ecx, edx
sar ecx, 1
push ecx
lea esi, [ebp - 0x50]
call fcn.00401c20
mov esi, edi
mov ecx, 9
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], 2
mov esi, dword [ebp - 0x84]
lea eax, [ebp - 0x6c]
call fcn.00403940
mov esi, 8
mov byte [ebp - 4], bl
cmp dword [ebp - 0x3c], esi
jb 0x4026d9
mov edx, dword [ebp - 0x50]
push edx
call fcn.00413644
add esp, 4
xor eax, eax
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], ebx
mov word [ebp - 0x50], ax
cmp dword [ebp - 0x58], esi
jb 0x4026fa
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.00413644
add esp, 4
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], 0x2c
inc eax
mov dword [ebp - 0x80], eax
cmp eax, dword [ebp - 0x70]
jb 0x402630
mov esi, dword [ebp - 0x8c]
mov edi, dword [ebp - 0x7c]
push edi
call fcn.00413f50
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x84]
mov ebx, eax
jmp 0x402733
mov ebx, dword [ebp - 0x7c]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
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.00413635
mov esp, ebp
pop ebp
ret