Function at 0x40a995
Capabilities:
Encode data using xor
Enumerate services
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf003f
push 0
push 0
mov dword [0x4128bc], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x40abfd
mov edx, 0x40ecbd
mov dword [0x4128c0], 1
lea ecx, [ebp - 0x18]
call fcn.004022b0
test eax, eax
je 0x40abef
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [eax], ecx
je 0x40abe7
mov edi, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], ecx
mov eax, dword [edi]
push 0x2c
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x40aa1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40abc9
lea eax, [ebp - 8]
push eax
push 0x24
lea eax, [ebp - 0x88]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40abc2
cmp dword [ebp - 0x84], 1
je 0x40abc2
cmp dword [ebp - 0x84], 3
je 0x40abc2
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x40ab5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40ab5e
mov ecx, dword [ebp - 8]
call fcn.00406c20
mov ebx, eax
test ebx, ebx
je 0x40ab5b
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x40ab54
mov esi, dword [ebp - 0x14]
lea edi, [ebp - 0xac]
push 9
pop ecx
push 0x24
add esi, ebx
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0xac]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40ab4e
mov ecx, esi
call fcn.0040a90f
mov edi, dword [ebp - 0xc]
test eax, eax
je 0x40ab45
movaps xmm0, xmmword [0x4020d0]
xor eax, eax
mov ecx, dword [edi]
movups xmmword [ebp - 0x40], xmm0
movaps xmm0, xmmword [0x401b50]
movups xmmword [ebp - 0x30], xmm0
xor byte [ebp + eax - 0x40], 0x55
inc eax
cmp eax, 0x1f
jb 0x40ab03
movaps xmm0, xmmword [0x401bc0]
xor eax, eax
mov byte [ebp - 0x21], 0
movups xmmword [ebp - 0x54], xmm0
xor byte [ebp + eax - 0x54], 0x55
inc eax
cmp eax, 0xf
jb 0x40ab1f
push dword [ebp - 0xac]
lea eax, [ebp - 0x40]
mov byte [ebp - 0x45], 0
push ecx
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.0040d3d8
add esp, 0x10
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40ab51
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x1c]
mov ecx, ebx
call fcn.00406cc5
mov ebx, dword [ebp - 0x10]
mov ecx, esi
call fcn.0040a90f
test eax, eax
je 0x40abc2
mov ecx, dword [edi]
xor edx, edx
movaps xmm0, xmmword [0x4020d0]
mov eax, edx
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x28], 0x55705575
mov dword [ebp - 0x24], 0x555526
xor byte [ebp + eax - 0x38], 0x55
inc eax
cmp eax, 0x17
jb 0x40ab88
movaps xmm0, xmmword [0x401bc0]
mov eax, edx
mov byte [ebp - 0x21], dl
movups xmmword [ebp - 0x64], xmm0
xor byte [ebp + eax - 0x64], 0x55
inc eax
cmp eax, 0xf
jb 0x40aba3
push ecx
lea eax, [ebp - 0x38]
mov byte [ebp - 0x55], dl
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0040d3d8
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
inc ecx
add dword [ebp - 0x14], 0x24
mov dword [ebp - 0x20], ecx
lea edi, [eax + ecx*4]
mov eax, dword [edi]
mov dword [ebp - 0xc], edi
test eax, eax
jne 0x40aa01
lea ecx, [ebp - 0x18]
call fcn.00402369
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
and dword [0x4128c0], 0
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 4