Function at 0x10154af0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 0x10]
xor ecx, ecx
push esi
push edi
xor edi, edi
lea eax, [ebx - 4]
mov dword [ebp - 4], edi
mov dword [ebp - 8], eax
test eax, eax
js 0x10154bab
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
add ebx, 4
lea esi, [eax + 2]
sub eax, ecx
shr ebx, 2
lea edx, [ecx + 6]
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], eax
lea ecx, [ebx*4]
mov dword [ebp - 8], ecx
mov ecx, edx
lea ebx, [ebx]
movzx edx, word [esi - 2]
lea ecx, [ecx + 8]
movzx eax, word [ecx - 0xe]
sub edx, eax
mov eax, edx
cdq
mov esi, eax
mov eax, dword [ebp - 4]
xor esi, edx
sub esi, edx
movzx edx, word [ecx - 0xa]
movzx eax, word [eax + 2]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
movzx edx, word [ecx - 0xc]
add esi, eax
mov eax, dword [ebp - 4]
movzx eax, word [eax]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add esi, eax
mov eax, dword [ebp - 0x10]
movzx edx, word [eax + ecx - 8]
movzx eax, word [ecx - 8]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
add edi, esi
mov esi, dword [ebp - 4]
add esi, 8
mov dword [ebp - 4], esi
dec ebx
jne 0x10154b40
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], edi
mov eax, ebx
sub eax, ecx
cmp ecx, ebx
jge 0x10154c80
cmp eax, 8
jb 0x10154c80
cmp dword [0x101fe438], 2
jl 0x10154c80
and eax, 0x80000007
jns 0x10154bd9
dec eax
or eax, 0xfffffff8
inc eax
mov edx, ebx
xorps xmm3, xmm3
sub edx, eax
movdqa xmm2, xmm3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 8]
mov edi, edx
lea eax, [eax + ecx*2]
add eax, 8
sub edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
lea esi, [edx + ecx*2]
mov edi, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
movq xmm0, qword [esi]
lea esi, [esi + 0x10]
pmovzxwd xmm1, xmm0
movq xmm0, qword [eax - 8]
lea eax, [eax + 0x10]
pmovzxwd xmm0, xmm0
psubd xmm1, xmm0
add ecx, 8
pabsd xmm0, xmm1
paddd xmm3, xmm0
movq xmm0, qword [ebx + eax - 0x10]
pmovzxwd xmm1, xmm0
movq xmm0, qword [eax - 0x10]
pmovzxwd xmm0, xmm0
psubd xmm1, xmm0
pabsd xmm0, xmm1
paddd xmm2, xmm0
cmp ecx, dword [ebp - 0xc]
jl 0x10154c04
mov ebx, dword [ebp + 0x10]
paddd xmm2, xmm3
movdqa xmm0, xmm2
psrldq xmm0, 8
paddd xmm2, xmm0
movdqa xmm0, xmm2
psrldq xmm0, 4
paddd xmm2, xmm0
movd eax, xmm2
add edi, eax
mov dword [ebp - 4], edi
jmp 0x10154c83
mov edx, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 8], esi
cmp ecx, ebx
jge 0x10154d21
mov eax, ebx
sub eax, ecx
cmp eax, 2
jl 0x10154cf9
lea eax, [ebx - 1]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov edx, ebx
mov eax, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp - 0x10], edx
xor edi, edi
lea esi, [eax + 2]
lea esi, [esi + ecx*2]
movzx eax, word [esi - 2]
lea esi, [esi + 4]
movzx edx, word [ebx + ecx*2]
add ecx, 2
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [ebp - 0x10]
movzx edx, word [eax + esi - 4]
movzx eax, word [esi - 4]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 8], eax
cmp ecx, dword [ebp - 0xc]
jl 0x10154cb4
mov ebx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 0x10]
cmp ecx, ebx
jge 0x10154d13
mov eax, dword [ebp + 0xc]
movzx edx, word [edx + ecx*2]
movzx eax, word [eax + ecx*2]
sub edx, eax
mov eax, edx
cdq
xor eax, edx
sub eax, edx
add edi, eax
mov eax, dword [ebp - 8]
add eax, esi
add eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret