Function at 0x65a9c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
mov ebx, edx
mov dword [esp + 0x1c], ecx
mov eax, ebx
mov dword [esp + 0x18], ebx
cdq
and edx, 3
push esi
push edi
lea edi, [edx + eax]
sar edi, 2
mov dword [esp + 0x1c], edi
lea esi, [edi*4]
push esi
call fcn.0067647e
lea ecx, [edi + ebx]
mov esi, eax
shl ecx, 2
push ecx
mov dword [esp + 0x4c], esi
call fcn.0067647e
movd xmm0, ebx
mov edi, eax
cvtdq2ps xmm0, xmm0
add esp, 8
mov dword [esp + 0x14], edi
mov eax, ebx
sar eax, 1
mov dword [esp + 0x28], eax
movss dword [esp + 0x18], xmm0
cvtps2pd xmm0, xmm0
call fcn.00686cd2
movsd xmm3, qword [0x6dba70]
movaps xmm5, xmm0
mulsd xmm5, qword [0x6db960]
mov ecx, dword [esp + 0x24]
movsd xmm2, qword [0x6dba30]
movsd xmm4, qword [0x6db958]
addsd xmm5, qword [0x6db950]
mov dword [ecx + 0xc], esi
xor esi, esi
mov dword [ecx], ebx
mov dword [ecx + 8], edi
andps xmm3, xmm5
movaps xmm0, xmm5
xorps xmm0, xmm3
movaps xmm1, xmm5
cmpltsd xmm0, xmm2
andps xmm2, xmm0
orps xmm2, xmm3
addsd xmm1, xmm2
subsd xmm1, xmm2
movaps xmm0, xmm1
subsd xmm0, xmm5
cmpnlesd xmm0, xmm3
andps xmm0, xmm4
subsd xmm1, xmm0
cvttsd2si eax, xmm1
movss xmm1, dword [0x6db99c]
mov dword [esp + 0x40], eax
mov dword [ecx + 4], eax
cmp dword [esp + 0x1c], esi
jle 0x65ab9d
lea eax, [ebx + ebx]
mov dword [esp + 0x10], 1
movd xmm0, eax
movaps xmm2, xmm1
divss xmm2, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
xor ebx, ebx
lea edi, [edi + eax*4]
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x38], xmm2
divss xmm1, xmm0
movss dword [esp + 0x34], xmm1
nop word [eax + eax]
movd xmm0, ebx
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
call fcn.00686677
mov eax, dword [esp + 0x14]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x28]
movss dword [eax + esi*8], xmm1
call fcn.00688315
xorps xmm0, xmmword [0x6dbea0]
mov eax, dword [esp + 0x14]
cvtsd2ss xmm0, xmm0
movss dword [eax + esi*8 + 4], xmm0
movd xmm0, dword [esp + 0x10]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x34]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
call fcn.00686677
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x28]
movss dword [edi], xmm1
call fcn.00688315
add dword [esp + 0x10], 2
lea edi, [edi + 8]
movss xmm2, dword [esp + 0x38]
inc esi
cvtsd2ss xmm0, xmm0
add ebx, 4
movss dword [edi - 4], xmm0
cmp esi, dword [esp + 0x1c]
jl 0x65aaf0
movss xmm1, dword [0x6db99c]
mov ebx, dword [esp + 0x20]
mov eax, ebx
cdq
and edx, 7
lea ebx, [edx + eax]
sar ebx, 3
mov dword [esp + 0x28], ebx
test ebx, ebx
jle 0x65ac2e
divss xmm1, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov edi, 2
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x38], ebx
lea esi, [eax + ecx*4]
movss dword [esp + 0x34], xmm1
movd xmm0, edi
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x38], xmm0
call fcn.00686677
mulsd xmm0, qword [0x6db950]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x38]
movss dword [esi], xmm1
call fcn.00688315
mulsd xmm0, qword [0x6dba98]
lea esi, [esi + 8]
add edi, 4
movss xmm1, dword [esp + 0x34]
cvtsd2ss xmm0, xmm0
movss dword [esi - 4], xmm0
sub ebx, 1
jne 0x65abd1
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
mov eax, 1
mov edi, 1
xor esi, esi
lea ecx, [edx - 1]
shl eax, cl
lea ecx, [edx - 2]
dec eax
shl edi, cl
mov dword [esp + 0x40], eax
test ebx, ebx
jle 0x65ac89
xor edx, edx
xor ecx, ecx
test edi, edi
je 0x65ac70
mov eax, edi
nop dword [eax + eax]
test esi, eax
je 0x65ac67
bts edx, ecx
inc ecx
mov eax, edi
sar eax, cl
test eax, eax
jne 0x65ac60
mov ecx, dword [esp + 0x44]
mov eax, edx
not eax
and eax, dword [esp + 0x40]
dec eax
mov dword [ecx + esi*8], eax
mov dword [ecx + esi*8 + 4], edx
inc esi
cmp esi, ebx
jl 0x65ac51
movss xmm0, dword [0x6db9b0]
divss xmm0, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
movss dword [ecx + 0x10], xmm0
mov esp, ebp
pop ebp
ret