Function at 0x24fb90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, eax
sar eax, 1
add eax, dword [ebp + 0x20]
mov ebx, edx
mov edx, dword [ebp + 0x10]
imul eax, edx
imul edx, dword [ebp + 0x20]
add eax, dword [ebp + 8]
add edx, dword [ebp + 0xc]
mov esi, ecx
sar ecx, 1
add ecx, eax
and esi, 1
add ecx, ebx
add edx, ebx
and edi, 1
test esi, esi
mov dword [ebp + 8], ecx
mov dword [ebp + 0x20], edx
jne 0x24fd9b
test edi, edi
jne 0x24fcac
cmp dword [ebp + 0x24], edi
je 0x24fc31
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
and ecx, 8
jecxz 0x24fc05
movq mm0, qword [esi]
movq mm1, qword [edi]
add esi, edx
pavgb mm0, mm1
movq qword [edi], mm0
add edi, edx
sub eax, 1
jne 0x24fbee
jmp 0x24fc2c
movq mm0, qword [esi]
movq mm1, qword [edi]
pxor mm7, mm7
movq mm3, qword [esi + 8]
pavgb mm0, mm1
movq mm4, qword [edi + 8]
add esi, edx
movq qword [edi], mm0
pavgb mm3, mm4
movq qword [edi + 8], mm3
add edi, edx
sub eax, 1
jne 0x24fc05
jmp 0x250162
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
and ecx, 0x16
jecxz 0x24fc7c
mov edx, dword [ebp + 0x14]
mov ebx, esi
mov eax, dword [ebp + 0x1c]
mov ecx, edi
shr eax, 1
add ebx, edx
add ecx, edx
add edx, edx
movq mm0, qword [esi]
movq mm1, qword [esi + 8]
movq qword [edi], mm0
movq qword [edi + 8], mm1
add edi, edx
add esi, edx
movq mm2, qword [ebx]
movq mm3, qword [ebx + 8]
movq qword [ecx], mm2
movq qword [ecx + 8], mm3
add ebx, edx
add ecx, edx
sub eax, 1
jne 0x24fc51
jmp 0x24fca7
mov edx, dword [ebp + 0x14]
mov ebx, esi
mov eax, dword [ebp + 0x1c]
mov ecx, edi
shr eax, 1
sub ebx, edx
sub ecx, edx
add edx, edx
movq mm0, qword [esi]
add ebx, edx
add ecx, edx
movq qword [edi], mm0
movq mm1, qword [ebx]
add esi, edx
add edi, edx
movq qword [ecx], mm1
sub eax, 1
jne 0x24fc8e
jmp 0x250162
cmp dword [ebp + 0x24], 0
je 0x24fd23
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
and ecx, 8
jecxz 0x24fce8
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm3, qword [esi + ecx]
movq mm1, qword [edi]
add esi, edx
pavgb mm0, mm3
dec eax
pavgb mm1, mm0
movq qword [edi], mm1
add edi, edx
cmp eax, 0
jne 0x24fcc9
jmp 0x24fd1e
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm5, qword [esi + ecx]
movq mm1, qword [edi]
movq mm3, qword [esi + 8]
pavgb mm0, mm5
movq mm6, qword [esi + ecx + 8]
movq mm4, qword [edi + 8]
pavgb mm3, mm6
pavgb mm0, mm1
pavgb mm3, mm4
movq qword [edi], mm0
add esi, edx
movq qword [edi + 8], mm3
add edi, edx
sub eax, 1
jne 0x24fceb
jmp 0x250162
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
and ecx, 8
jecxz 0x24fd69
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm3, qword [esi + ecx]
pxor mm7, mm7
pavgb mm0, mm3
add esi, edx
movq qword [edi], mm0
add edi, edx
movq mm1, qword [esi]
movq mm4, qword [esi + ecx]
pxor mm7, mm7
pavgb mm1, mm4
add esi, edx
movq qword [edi], mm1
add edi, edx
sub eax, 2
jne 0x24fd3a
jmp 0x24fd96
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm5, qword [esi + ecx]
pxor mm7, mm7
pavgb mm0, mm5
dec eax
movq mm3, qword [esi + 8]
movq mm6, qword [esi + ecx + 8]
movq qword [edi], mm0
pavgb mm3, mm6
add esi, edx
movq qword [edi + 8], mm3
add edi, edx
cmp eax, 0
jne 0x24fd6c
jmp 0x250162
test edi, edi
jne 0x24fed2
cmp dword [ebp + 0x24], edi
je 0x24fe41
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
and ecx, 8
jecxz 0x24fded
movq mm0, qword [esi]
movq mm3, qword [esi + 8]
movq mm6, mm0
psllq mm3, 0x38
psrlq mm6, 8
movq mm1, qword [edi]
por mm3, mm6
pavgb mm0, mm3
add esi, edx
pavgb mm1, mm0
dec eax
movq qword [edi], mm1
add edi, edx
cmp eax, 0
jne 0x24fdc0
jmp 0x24fe3c
movq mm0, qword [esi]
movq mm5, qword [esi + 8]
movq mm6, mm0
psllq mm5, 0x38
psrlq mm6, 8
movq mm1, qword [edi]
por mm5, mm6
movq mm3, qword [esi + 8]
pavgb mm0, mm5
movq mm6, qword [esi + 0x10]
movq mm5, mm3
psllq mm6, 0x38
movq mm4, qword [edi + 8]
psrlq mm5, 8
por mm6, mm5
dec eax
pavgb mm3, mm6
pavgb mm0, mm1
pavgb mm3, mm4
movq qword [edi], mm0
add esi, edx
movq qword [edi + 8], mm3
add edi, edx
cmp eax, 0
jne 0x24fded
jmp 0x250162
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
and ecx, 8
jecxz 0x24fe9a
movq mm0, qword [esi]
movq mm3, qword [esi + 8]
movq mm5, mm0
psllq mm3, 0x38
psrlq mm5, 8
por mm3, mm5
add esi, edx
movq mm1, qword [esi]
movq mm4, qword [esi + 8]
pavgb mm0, mm3
movq mm6, mm1
psllq mm4, 0x38
psrlq mm6, 8
movq qword [edi], mm0
por mm4, mm6
add edi, edx
pavgb mm1, mm4
movq qword [edi], mm1
add esi, edx
add edi, edx
sub eax, 2
jne 0x24fe55
jmp 0x24fecd
movq mm0, qword [esi]
movq mm5, qword [esi + 1]
movq mm3, qword [esi + 8]
pavgb mm0, mm5
movq mm6, qword [esi + 0x10]
movq mm5, mm3
psllq mm6, 0x38
psrlq mm5, 8
por mm6, mm5
movq qword [edi], mm0
pavgb mm3, mm6
add esi, edx
movq qword [edi + 8], mm3
add edi, edx
sub eax, 1
jne 0x24fe9a
jmp 0x250162
cmp dword [ebp + 0x24], 0
je 0x25002b
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov ebx, 0x101
movd mm7, ebx
pshufw mm7, mm7, 0
and ecx, 8
jecxz 0x24ff5b
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm2, qword [esi + 1]
movq mm5, qword [esi + ecx]
movq mm6, qword [esi + ecx + 1]
movq mm4, mm0
movq mm1, mm5
pavgb mm0, mm2
pavgb mm5, mm6
pxor mm2, mm4
pxor mm6, mm1
pand mm2, mm7
pand mm6, mm7
movq mm3, mm0
por mm2, mm6
pavgb mm0, mm5
pxor mm3, mm5
pand mm3, mm7
paddb mm2, mm3
movq mm1, qword [edi]
psrlw mm2, 1
pand mm2, mm7
dec eax
psubb mm0, mm2
pavgb mm1, mm0
movq qword [edi], mm1
add esi, edx
add edi, edx
cmp eax, 0
jne 0x24feff
jmp 0x250026
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm2, qword [esi + 1]
movq mm5, qword [esi + ecx]
pavgb mm0, mm2
movq mm6, qword [esi + ecx + 1]
movq mm4, mm0
pavgb mm5, mm6
movq mm1, mm5
pxor mm2, mm4
pxor mm6, mm1
pand mm2, mm7
movq mm3, mm0
pand mm6, mm7
por mm2, mm6
pavgb mm0, mm5
pxor mm3, mm5
movq mm5, qword [esi + ecx + 8]
pand mm3, mm7
movq mm6, qword [esi + ecx + 0x10]
movq mm4, mm5
psrlq mm4, 8
psllq mm6, 0x38
por mm6, mm4
paddb mm2, mm3
psrlw mm2, 1
movq mm1, qword [edi]
pand mm2, mm7
psubb mm0, mm2
pavgb mm0, mm1
movq qword [edi], mm0
movq mm0, qword [esi + 8]
movq mm2, qword [esi + 0x10]
movq mm4, mm0
psrlq mm4, 8
psllq mm2, 0x38
por mm2, mm4
movq mm4, mm0
pavgb mm0, mm2
movq mm1, mm5
pxor mm2, mm4
pavgb mm5, mm6
pxor mm6, mm1
pand mm2, mm7
pand mm6, mm7
movq mm3, mm0
por mm2, mm6
pavgb mm0, mm5
pxor mm3, mm5
movq mm1, qword [edi + 8]
pand mm3, mm7
paddb mm2, mm3
psrlw mm2, 1
pand mm2, mm7
psubb mm0, mm2
pavgb mm0, mm1
movq qword [edi + 8], mm0
dec eax
add esi, edx
add edi, edx
cmp eax, 0
jne 0x24ff5e
jmp 0x250162
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov ebx, 0x101
movd mm7, ebx
pshufw mm7, mm7, 0
and ecx, 8
jecxz 0x2500a4
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm2, qword [esi + 1]
movq mm5, qword [esi + ecx]
movq mm6, qword [esi + ecx + 1]
movq mm4, mm0
movq mm1, mm5
pavgb mm0, mm2
pavgb mm5, mm6
pxor mm2, mm4
pxor mm6, mm1
pand mm2, mm7
pand mm6, mm7
por mm2, mm6
movq mm3, mm0
pavgb mm0, mm5
pxor mm3, mm5
pand mm3, mm7
paddb mm2, mm3
psrlw mm2, 1
pand mm2, mm7
psubb mm0, mm2
movq qword [edi], mm0
dec eax
add esi, edx
add edi, edx
cmp eax, 0
jne 0x25004e
jmp 0x250162
mov ecx, dword [ebp + 0x10]
movq mm0, qword [esi]
movq mm2, qword [esi + 1]
movq mm5, qword [esi + ecx]
movq mm6, qword [esi + ecx + 1]
movq mm4, mm0
movq mm1, mm5
pavgb mm0, mm2
pavgb mm5, mm6
pxor mm2, mm4
pxor mm6, mm1
pand mm2, mm7
movq mm3, mm0
pand mm6, mm7
por mm2, mm6
pavgb mm0, mm5
pxor mm3, mm5
movq mm5, qword [esi + ecx + 8]
pand mm3, mm7
movq mm6, qword [esi + ecx + 0x10]
movq mm4, mm5
psrlq mm4, 8
psllq mm6, 0x38
por mm6, mm4
paddb mm2, mm3
psrlw mm2, 1
pand mm2, mm7
psubb mm0, mm2
movq qword [edi], mm0
movq mm0, qword [esi + 8]
movq mm2, qword [esi + 0x10]
movq mm4, mm0
psrlq mm4, 8
psllq mm2, 0x38
por mm2, mm4
movq mm4, mm0
pavgb mm0, mm2
movq mm1, mm5
pxor mm2, mm4
pavgb mm5, mm6
pxor mm6, mm1
pand mm2, mm7
pand mm6, mm7
movq mm3, mm0
por mm2, mm6
pavgb mm0, mm5
pxor mm3, mm5
pand mm3, mm7
paddb mm2, mm3
psrlw mm2, 1
pand mm2, mm7
psubb mm0, mm2
movq qword [edi + 8], mm0
dec eax
add esi, edx
add edi, edx
cmp eax, 0
jne 0x2500a7
emms
pop edi
pop esi
pop ebx
pop ebp
ret 0x20