Function at 0x499740
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58aa0b
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 0x4997bc
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.00499f70
jmp 0x499ba9
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 0x4997f7
cmp edx, 0x10
mov dword [ebp - 0x24], ecx
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
mov byte [eax + ecx], 0
jmp 0x499804
sub ecx, eax
push 0
push ecx
lea ecx, [ebp - 0x34]
call fcn.00413e70
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 0x4998b1
cmp eax, 0xea
je 0x499842
cmp eax, 0x7a
jne 0x49984d
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
jmp 0x4997e0
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.00499f70
mov eax, dword [ebp - 0x20]
cmp eax, 0x10
jb 0x499884
inc eax
lea ecx, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
call fcn.004067d0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
call fcn.00495ca0
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 0x499b60
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 0x49992a
xor ecx, ecx
jmp 0x49993f
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x499930
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.00405d60
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x70]
call fcn.00497e80
mov edi, eax
lea eax, [ebp - 0xbc]
cmp eax, edi
je 0x4999a9
mov eax, dword [ebp - 0xa8]
cmp eax, 0x10
jb 0x499982
inc eax
lea ecx, [ebp - 0xbc]
push eax
push dword [ebp - 0xbc]
call fcn.004067d0
push edi
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0xa8], 0xf
mov dword [ebp - 0xac], 0
mov byte [ebp - 0xbc], 0
call fcn.004065e0
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x4999be
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.004067d0
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 0x4999e9
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00407050
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 0x499a09
xor ecx, ecx
jmp 0x499a1f
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x499a10
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x58]
call fcn.00405d60
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x70]
call fcn.00497e80
mov edi, eax
lea eax, [ebp - 0xa4]
cmp eax, edi
je 0x499a89
mov eax, dword [ebp - 0x90]
cmp eax, 0x10
jb 0x499a62
inc eax
lea ecx, [ebp - 0xa4]
push eax
push dword [ebp - 0xa4]
call fcn.004067d0
push edi
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0x90], 0xf
mov dword [ebp - 0x94], 0
mov byte [ebp - 0xa4], 0
call fcn.004065e0
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x499a9e
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.004067d0
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 0x499ac9
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00407050
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.00499c00
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x90]
cmp eax, 0x10
jb 0x499b14
inc eax
lea ecx, [ebp - 0xa4]
push eax
push dword [ebp - 0xa4]
call fcn.004067d0
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x90], 0xf
mov dword [ebp - 0x94], 0
mov byte [ebp - 0xa4], 0
cmp eax, 0x10
jb 0x499b4d
inc eax
lea ecx, [ebp - 0xbc]
push eax
push dword [ebp - 0xbc]
call fcn.004067d0
mov eax, dword [ebp - 0x40]
add esi, 0x24
inc eax
mov dword [ebp - 0x40], eax
cmp eax, dword [ebp - 0x38]
jl 0x4998d0
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.00499f70
mov eax, dword [ebp - 0x20]
cmp eax, 0x10
jb 0x499b97
inc eax
lea ecx, [ebp - 0x34]
push eax
push dword [ebp - 0x34]
call fcn.004067d0
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x499bde
push dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
push ecx
mov ecx, esi
call fcn.00495e30
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.00495d70
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