Function at 0x4996b0
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58b35b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb8
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0xc4], 0
push edi
mov dword [ebp - 0xc0], ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push 4
push 0
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x49972c
push dword [ebp - 0x10]
mov dword [ebx], eax
mov ecx, ebx
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00499ee0
jmp 0x499b19
xor ecx, ecx
mov edx, 0xf
xor eax, eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x34], al
mov byte [ebp - 4], 1
nop dword [eax + eax]
cmp ecx, eax
ja 0x499767
cmp edx, 0x10
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
mov byte [eax + ecx], 0
jmp 0x499774
sub ecx, eax
push 0
push ecx
lea ecx, [ebp - 0x34]
call fcn.004142d0
cmp dword [ebp - 0x20], 0x10
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x3c]
push ecx
push dword [ebp - 0x24]
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push 1
push 0x3b
push edi
call dword [sym.imp.ADVAPI32.dll_EnumServicesStatusW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x499821
cmp eax, 0xea
je 0x4997b2
cmp eax, 0x7a
jne 0x4997bd
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
jmp 0x499750
push dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
mov dword [ebx], 0
push eax
mov ecx, ebx
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
call fcn.00499ee0
mov eax, dword [ebp - 0x20]
cmp eax, 0x10
jb 0x4997f4
inc eax
lea ecx, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
call fcn.00406c30
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
call fcn.00496010
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x20], 0x10
lea esi, [ebp - 0x34]
mov dword [ebp - 0x40], 0
cmovae esi, dword [ebp - 0x34]
cmp dword [ebp - 0x38], 0
jle 0x499ad0
add esi, 8
mov dword [ebp - 0xa8], 0xf
mov dword [ebp - 0xac], 0
mov byte [ebp - 0xbc], 0
mov dword [ebp - 0x90], 0xf
mov dword [ebp - 0x94], 0
mov byte [ebp - 0xa4], 0
mov byte [ebp - 4], 2
xor eax, eax
mov edx, dword [esi - 8]
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp word [edx], ax
jne 0x49989a
xor ecx, ecx
jmp 0x4998af
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4998a0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.004061c0
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x70]
call fcn.00497bc0
mov edi, eax
lea eax, [ebp - 0xbc]
cmp eax, edi
je 0x499919
mov eax, dword [ebp - 0xa8]
cmp eax, 0x10
jb 0x4998f2
inc eax
lea ecx, [ebp - 0xbc]
push eax
push dword [ebp - 0xbc]
call fcn.00406c30
push edi
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0xa8], 0xf
mov dword [ebp - 0xac], 0
mov byte [ebp - 0xbc], 0
call fcn.00406a40
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x49992e
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00406c30
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
cmp eax, 8
jb 0x499959
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.004074b0
mov edx, dword [esi - 4]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp word [edx], ax
jne 0x499979
xor ecx, ecx
jmp 0x49998f
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x499980
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.004061c0
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x70]
call fcn.00497bc0
mov edi, eax
lea eax, [ebp - 0xa4]
cmp eax, edi
je 0x4999f9
mov eax, dword [ebp - 0x90]
cmp eax, 0x10
jb 0x4999d2
inc eax
lea ecx, [ebp - 0xa4]
push eax
push dword [ebp - 0xa4]
call fcn.00406c30
push edi
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0x90], 0xf
mov dword [ebp - 0x94], 0
mov byte [ebp - 0xa4], 0
call fcn.00406a40
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x499a0e
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00406c30
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
cmp eax, 8
jb 0x499a39
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.004074b0
movups xmm0, xmmword [esi]
mov eax, dword [esi + 0x18]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0xbc]
movups xmmword [ebp - 0x8c], xmm0
push eax
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x7c], xmm0
call fcn.00499b70
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x90]
cmp eax, 0x10
jb 0x499a84
inc eax
lea ecx, [ebp - 0xa4]
push eax
push dword [ebp - 0xa4]
call fcn.00406c30
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x90], 0xf
mov dword [ebp - 0x94], 0
mov byte [ebp - 0xa4], 0
cmp eax, 0x10
jb 0x499abd
inc eax
lea ecx, [ebp - 0xbc]
push eax
push dword [ebp - 0xbc]
call fcn.00406c30
mov eax, dword [ebp - 0x40]
add esi, 0x24
inc eax
mov dword [ebp - 0x40], eax
cmp eax, dword [ebp - 0x38]
jl 0x499840
push dword [ebp - 0x10]
lea eax, [ebp - 0x1c]
mov dword [ebx], 0
push eax
mov ecx, ebx
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
call fcn.00499ee0
mov eax, dword [ebp - 0x20]
cmp eax, 0x10
jb 0x499b07
inc eax
lea ecx, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
call fcn.00406c30
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x499b4e
push dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
push ecx
mov ecx, esi
call fcn.004961a0
mov ecx, dword [ebp - 0x14]
mov eax, 0x6bca1af3
sub ecx, esi
add esp, 8
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push esi
call fcn.004960e0
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret