Function at 0x8226b8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push edi
push esi
push ebx
sub esp, 0x14
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
shl ebx, 5
cmp eax, 8
jg 0x82284d
test cl, 0xf
jne 0x822799
lea edi, [eax - 1]
mov esi, eax
and esi, 1
pxor xmm4, xmm4
cmovne edi, eax
movsx esi, di
movd xmm3, esi
punpcklwd xmm3, xmm3
shl eax, 0x10
punpcklwd xmm3, xmm3
add eax, eax
sar eax, 0x10
movd xmm2, eax
punpcklwd xmm3, xmm3
punpcklwd xmm2, xmm2
punpcklwd xmm2, xmm2
punpcklwd xmm2, xmm2
test edx, edx
jl 0x8229e3
movdqa xmm1, xmmword [ebx + 0x8df4e0]
movdqa xmm0, xmmword [ebx + 0x8df4f0]
lea esi, [edx + 8]
mov eax, 0x80000001
imul esi
xor eax, eax
add edx, esi
sar edx, 2
sar esi, 0x1f
sub edx, esi
movdqa xmm4, xmmword [ecx]
movdqa xmm7, xmm4
psraw xmm7, 0xf
movdqa xmm5, xmm3
pxor xmm5, xmm7
psubsw xmm5, xmm7
add eax, 1
movdqa xmm6, xmm2
pmullw xmm6, xmm4
pxor xmm7, xmm7
pcmpeqw xmm4, xmm7
paddsw xmm6, xmm5
pandn xmm4, xmm6
pmaxsw xmm4, xmm1
pminsw xmm4, xmm0
movdqa xmmword [ecx], xmm4
add ecx, 0x10
cmp eax, edx
jb 0x82274d
jmp 0x8229e3
lea edi, [eax - 1]
mov esi, eax
and esi, 1
pxor xmm4, xmm4
cmovne edi, eax
movsx esi, di
movd xmm3, esi
punpcklwd xmm3, xmm3
shl eax, 0x10
punpcklwd xmm3, xmm3
add eax, eax
sar eax, 0x10
movd xmm2, eax
punpcklwd xmm3, xmm3
punpcklwd xmm2, xmm2
punpcklwd xmm2, xmm2
punpcklwd xmm2, xmm2
test edx, edx
jl 0x8229e3
movdqa xmm1, xmmword [ebx + 0x8df4e0]
movdqa xmm0, xmmword [ebx + 0x8df4f0]
lea esi, [edx + 8]
mov eax, 0x80000001
imul esi
xor eax, eax
add edx, esi
sar edx, 2
sar esi, 0x1f
sub edx, esi
movdqu xmm4, xmmword [ecx]
movdqa xmm5, xmm3
movdqa xmm6, xmm2
movdqa xmm7, xmm4
psraw xmm7, 0xf
pmullw xmm6, xmm4
add eax, 1
pxor xmm5, xmm7
psubsw xmm5, xmm7
pxor xmm7, xmm7
pcmpeqw xmm4, xmm7
paddsw xmm6, xmm5
pandn xmm4, xmm6
pmaxsw xmm4, xmm1
pminsw xmm4, xmm0
movdqu xmmword [ecx], xmm4
add ecx, 0x10
cmp eax, edx
jb 0x822801
jmp 0x8229e3
test cl, 0xf
jne 0x82291f
lea edi, [eax - 1]
mov esi, eax
and esi, 1
cmovne edi, eax
movsx esi, di
movd xmm2, esi
punpcklwd xmm2, xmm2
shl eax, 0x10
punpcklwd xmm2, xmm2
add eax, eax
sar eax, 0x10
movd xmm1, eax
punpcklwd xmm2, xmm2
punpcklwd xmm1, xmm1
punpcklwd xmm1, xmm1
punpcklwd xmm1, xmm1
test edx, edx
jl 0x8229e3
movdqa xmm0, xmmword [ebx + 0x8df4e0]
movdqa xmm3, xmmword [ebx + 0x8df4f0]
lea esi, [edx + 8]
mov eax, 0x80000001
imul esi
xor eax, eax
movdqa xmmword [esp], xmm3
add edx, esi
sar edx, 2
sar esi, 0x1f
sub edx, esi
movdqa xmm5, xmmword [ecx]
pxor xmm6, xmm6
pcmpgtw xmm6, xmm5
pxor xmm4, xmm4
pcmpeqw xmm4, xmm5
movdqa xmm3, xmm1
pmulhw xmm3, xmm5
add eax, 1
pmullw xmm5, xmm1
movdqa xmm7, xmm2
pxor xmm7, xmm6
psubsw xmm7, xmm6
pandn xmm4, xmm7
movdqa xmm6, xmm5
punpckhwd xmm6, xmm3
punpcklwd xmm5, xmm3
packssdw xmm5, xmm6
paddsw xmm5, xmm4
pmaxsw xmm5, xmm0
pminsw xmm5, xmmword [esp]
movdqa xmmword [ecx], xmm5
add ecx, 0x10
cmp eax, edx
jb 0x8228bf
jmp 0x8229e3
lea edi, [eax - 1]
mov esi, eax
and esi, 1
cmovne edi, eax
movsx esi, di
movd xmm2, esi
punpcklwd xmm2, xmm2
shl eax, 0x10
punpcklwd xmm2, xmm2
add eax, eax
sar eax, 0x10
movd xmm1, eax
punpcklwd xmm2, xmm2
punpcklwd xmm1, xmm1
punpcklwd xmm1, xmm1
punpcklwd xmm1, xmm1
test edx, edx
jl 0x8229e3
movdqa xmm0, xmmword [ebx + 0x8df4e0]
movdqa xmm3, xmmword [ebx + 0x8df4f0]
lea esi, [edx + 8]
mov eax, 0x80000001
imul esi
xor eax, eax
movdqa xmmword [esp], xmm3
add edx, esi
sar edx, 2
sar esi, 0x1f
sub edx, esi
movdqu xmm5, xmmword [ecx]
pxor xmm6, xmm6
pxor xmm4, xmm4
pcmpgtw xmm6, xmm5
pcmpeqw xmm4, xmm5
movdqa xmm3, xmm1
pmulhw xmm3, xmm5
add eax, 1
pmullw xmm5, xmm1
movdqa xmm7, xmm2
pxor xmm7, xmm6
psubsw xmm7, xmm6
pandn xmm4, xmm7
movdqa xmm6, xmm5
punpckhwd xmm6, xmm3
punpcklwd xmm5, xmm3
packssdw xmm5, xmm6
paddsw xmm5, xmm4
pmaxsw xmm5, xmm0
pminsw xmm5, xmmword [esp]
movdqu xmmword [ecx], xmm5
add ecx, 0x10
cmp eax, edx
jb 0x822988
add esp, 0x14
pop ebx
pop esi
pop edi
mov esp, ebp
pop ebp
ret