Function at 0x24c1d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp eax, 4
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
jl 0x24c1e9
mov edi, eax
and edi, 1
add edi, 1
jne 0x24c24e
mov edi, dword [ecx + 0x10]
mov ebx, eax
and eax, 1
cmp dword [ecx + 4], 3
jne 0x24c234
cmp dword [ebp + 0xc], 0
je 0x24c218
sar ebx, 1
and ebx, 1
add ebx, edx
imul ebx, edi
lea eax, [ebx + eax*8]
add eax, dword [ecx + 0x44]
lea edx, [edi + edi - 8]
add eax, esi
jmp 0x24c2c2
and ebx, 2
lea edx, [edx + ebx*4]
imul edx, edi
lea eax, [edx + eax*8]
add eax, dword [ecx + 0x44]
add eax, esi
add edi, 0xfffffff8
mov dword [ebp + 0xc], edi
jmp 0x24c2c5
and ebx, 2
lea edx, [edx + ebx*4]
lea ebx, [edi + edi]
imul edx, ebx
lea eax, [edx + eax*8]
add eax, dword [ecx + 0x44]
lea edx, [edi + edi - 8]
add eax, esi
jmp 0x24c2c2
mov ebx, dword [ecx + 0xc]
cmp ebx, 3
je 0x24c258
sar esi, 1
cmp ebx, 1
jne 0x24c25f
sar edx, 1
cmp dword [ecx + 4], 3
jne 0x24c2a0
cmp dword [ebp + 0xc], 0
je 0x24c282
cmp dword [ecx + 0xc], 1
je 0x24c282
mov ebx, eax
sar ebx, 1
and ebx, 1
add ebx, edx
mov edx, dword [ecx + 0x1c]
imul ebx, edx
jmp 0x24c2b3
mov ebx, eax
and ebx, 2
lea ebx, [edx + ebx*4]
mov edx, dword [ecx + 0x1c]
imul ebx, edx
add ebx, dword [ecx + edi*4 + 0x44]
and eax, 8
add ebx, esi
add eax, ebx
add edx, 0xfffffff8
jmp 0x24c2c2
mov ebx, eax
and ebx, 2
lea ebx, [edx + ebx*4]
mov edx, dword [ecx + 0x1c]
add edx, edx
imul ebx, edx
mov edx, dword [ecx + 0x1c]
add ebx, dword [ecx + edi*4 + 0x44]
and eax, 8
add ebx, esi
add eax, ebx
lea edx, [edx + edx - 8]
mov dword [ebp + 0xc], edx
cmp dword [ebp + 0x14], 0
mov ecx, dword [ecx + 0x20]
mov dword [ebp + 8], ecx
mov dword [ebp - 4], eax
je 0x24c437
cmp dword [ebp + 0x10], 0
je 0x24c34c
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov esi, edi
mov ebx, dword [ebp + 8]
mov ecx, 4
add eax, 8
movq mm0, qword [esi]
pxor mm3, mm3
add esi, eax
dec ecx
movq mm1, qword [ebx]
movq mm4, mm0
movq mm2, qword [ebx + 8]
punpckhbw mm0, mm3
punpcklbw mm4, mm3
paddw mm0, mm2
movq mm5, qword [ebx + 0x10]
paddw mm4, mm1
movq mm2, qword [esi]
packuswb mm4, mm0
movq mm7, qword [ebx + 0x18]
movq mm6, mm2
movq qword [edi], mm4
punpckhbw mm2, mm3
add esi, eax
add edi, eax
punpcklbw mm6, mm3
paddw mm2, mm7
movq mm0, qword [esi]
paddw mm6, mm5
packuswb mm6, mm2
add ebx, 0x20
movq qword [edi], mm6
add edi, eax
cmp ecx, 0
jne 0x24c2f7
jmp 0x24c4a7
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 4]
mov ecx, 4
mov edx, 0x80
movd mm0, edx
add eax, 8
movq mm7, mm0
psllq mm7, 0x10
por mm0, mm7
psllq mm7, 0x10
por mm0, mm7
psllq mm7, 0x10
movq mm1, qword [ebx]
por mm0, mm7
movq mm2, qword [ebx + 8]
paddw mm1, mm0
movq mm3, qword [ebx + 0x10]
paddw mm2, mm0
movq mm4, qword [ebx + 0x18]
packuswb mm1, mm2
add ebx, 0x20
paddw mm3, mm0
movq qword [edi], mm1
paddw mm4, mm0
packuswb mm3, mm4
add edi, eax
movq qword [edi], mm3
add edi, eax
movq mm1, qword [ebx]
movq mm2, qword [ebx + 8]
paddw mm1, mm0
paddw mm2, mm0
movq mm3, qword [ebx + 0x10]
packuswb mm1, mm2
movq mm4, qword [ebx + 0x18]
paddw mm3, mm0
movq qword [edi], mm1
paddw mm4, mm0
packuswb mm3, mm4
add ebx, 0x20
add edi, eax
movq qword [edi], mm3
add edi, eax
movq mm1, qword [ebx]
movq mm2, qword [ebx + 8]
paddw mm1, mm0
paddw mm2, mm0
movq mm3, qword [ebx + 0x10]
packuswb mm1, mm2
movq mm4, qword [ebx + 0x18]
paddw mm3, mm0
movq qword [edi], mm1
paddw mm4, mm0
packuswb mm3, mm4
add ebx, 0x20
add edi, eax
movq qword [edi], mm3
add edi, eax
movq mm1, qword [ebx]
movq mm2, qword [ebx + 8]
paddw mm1, mm0
paddw mm2, mm0
movq mm3, qword [ebx + 0x10]
packuswb mm1, mm2
movq mm4, qword [ebx + 0x18]
paddw mm3, mm0
movq qword [edi], mm1
paddw mm4, mm0
packuswb mm3, mm4
add ebx, 0x20
add edi, eax
movq qword [edi], mm3
add edi, eax
jmp 0x24c4a7
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov ecx, 0x7f7f7f7f
movd mm5, ecx
movd mm4, ecx
psllq mm4, 0x20
por mm5, mm4
mov ecx, 0x1010101
movd mm6, ecx
movd mm4, ecx
psllq mm4, 0x20
por mm6, mm4
pxor mm7, mm7
mov ecx, 8
mov esi, dword [ebp + 8]
pcmpeqd mm7, mm7
add eax, 8
movq mm0, qword [esi]
add esi, 8
movq mm2, mm0
pcmpgtb mm2, mm7
movq mm3, mm2
pxor mm3, mm7
movq mm1, mm0
paddusb mm0, mm5
paddusb mm0, mm6
paddb mm1, mm5
paddb mm1, mm6
pand mm0, mm2
pand mm1, mm3
por mm0, mm1
movq qword [edi], mm0
add edi, eax
dec ecx
cmp ecx, 0
jne 0x24c472
emms
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10