Function at 0x668f40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
xor dl, dl
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
push esi
push edi
test bl, 3
jne 0x669080
test al, 3
jne 0x669080
test ecx, ecx
je 0x669080
mov edi, ecx
mov dword [ebp - 4], 0
shr edi, 2
xor esi, esi
mov dword [ebp - 0xc], edi
test edi, edi
je 0x66903b
cmp edi, 8
jb 0x669002
mov edx, edi
mov ecx, ebx
and edx, 0xfffffff8
add eax, 0x10
sub ecx, dword [ebp + 0xc]
xorps xmm3, xmm3
mov dword [ebp - 8], ecx
xorps xmm2, xmm2
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 8]
nop dword [eax]
movups xmm0, xmmword [eax - 0x10]
lea eax, [eax + 0x20]
movups xmm1, xmmword [ebx + esi*4]
add esi, 8
pxor xmm1, xmm0
por xmm3, xmm1
movups xmm1, xmmword [edi + eax - 0x20]
movups xmm0, xmmword [eax - 0x20]
pxor xmm1, xmm0
por xmm2, xmm1
cmp esi, edx
jb 0x668fb0
mov eax, dword [ebp + 0xc]
por xmm2, xmm3
mov edi, dword [ebp - 0xc]
movaps xmm0, xmm2
psrldq xmm0, 8
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
por xmm2, xmm0
movd dword [ebp - 4], xmm2
cmp esi, edi
jae 0x66903f
mov dword [ebp - 8], ebx
lea edx, [eax + esi*4]
sub dword [ebp - 8], eax
mov ebx, edi
mov ecx, dword [ebp - 8]
sub ebx, esi
mov esi, edi
mov edi, dword [ebp - 4]
nop dword [eax + eax]
mov eax, dword [edx + ecx]
lea edx, [edx + 4]
xor eax, dword [edx - 4]
or edi, eax
sub ebx, 1
jne 0x669020
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 4], edi
jmp 0x669042
xor edi, edi
jmp 0x669042
mov edi, dword [ebp - 4]
shl esi, 2
sub ecx, esi
jne 0x669055
test edi, edi
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
add ebx, esi
add eax, esi
mov dword [ebp + 8], ebx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov edx, eax
shr eax, 0x10
shr edx, 0x18
or dl, al
mov eax, dword [ebp - 4]
shr eax, 8
or dl, al
mov eax, dword [ebp - 8]
or dl, byte [ebp - 4]
mov dword [ebp - 4], edx
xor edi, edi
test ecx, ecx
je 0x669150
cmp ecx, 0x20
jb 0x66912a
mov esi, ecx
xorps xmm3, xmm3
and esi, 0xffffffe0
xorps xmm2, xmm2
mov dword [ebp - 0xc], esi
mov esi, ebx
sub esi, dword [ebp - 8]
mov dword [ebp - 0x10], esi
lea esi, [ebx + 0x10]
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
nop dword [eax + eax]
movups xmm0, xmmword [eax]
lea eax, [eax + 0x20]
movups xmm1, xmmword [eax + ebx - 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [eax - 0x10]
por xmm3, xmm1
movups xmm1, xmmword [edx + edi]
add edi, 0x20
pxor xmm1, xmm0
por xmm2, xmm1
cmp edi, esi
jb 0x6690c0
por xmm2, xmm3
mov edx, dword [ebp - 4]
movaps xmm0, xmm2
mov ebx, dword [ebp + 8]
psrldq xmm0, 8
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 2
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 1
por xmm2, xmm0
movd eax, xmm2
or dl, al
cmp edi, ecx
jae 0x669150
mov eax, dword [ebp - 8]
sub ebx, eax
sub ecx, edi
lea esi, [edi + eax]
nop dword [eax + eax]
mov al, byte [ebx + esi]
lea esi, [esi + 1]
xor al, byte [esi - 1]
or dl, al
sub ecx, 1
jne 0x669140
pop edi
test dl, dl
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret