Function at 0x5ae670
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
push esi
push edi
mov edi, edx
mov dword [esp + 0x24], ecx
mov eax, edi
mov dword [esp + 0x20], edi
cdq
and edx, 3
lea ebx, [edx + eax]
sar ebx, 2
mov dword [esp + 0x1c], ebx
lea esi, [ebx*4]
push esi
call fcn.0058552b
lea ecx, [ebx + edi]
mov esi, eax
shl ecx, 2
push ecx
mov dword [esp + 0x54], esi
call fcn.0058552b
movd xmm0, edi
mov ebx, eax
cvtdq2ps xmm0, xmm0
mov eax, edi
mov dword [esp + 0x40], ebx
sar eax, 1
mov dword [esp + 0x30], eax
movss dword [esp + 0x1c], xmm0
cvtps2pd xmm0, xmm0
call fcn.005b5c40
movsd qword [esp + 0x48], xmm0
movsd xmm0, qword [0x61c990]
call fcn.005b5c40
movsd xmm1, qword [esp + 0x48]
divsd xmm1, xmm0
addsd xmm1, qword [0x61c960]
movsd qword [esp + 0x48], xmm1
fld qword [esp + 0x48]
fstp qword [esp]
call fcn.00589920
add esp, 8
call fcn.00569160
mov ecx, dword [esp + 0x24]
movss xmm1, dword [0x61c9c8]
mov dword [esp + 0x40], eax
mov dword [ecx + 0xc], esi
xor esi, esi
mov dword [ecx + 4], eax
mov dword [ecx], edi
mov dword [ecx + 8], ebx
cmp dword [esp + 0x1c], esi
jle 0x5ae82d
lea eax, [edi + edi]
mov ecx, dword [esp + 0x28]
movd xmm0, eax
movaps xmm2, xmm1
divss xmm2, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x10], 1
mov dword [esp + 0x18], eax
lea edi, [ebx + ecx*4]
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x34], xmm2
divss xmm1, xmm0
movss dword [esp + 0x30], xmm1
nop word [eax + eax]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
call fcn.00589d80
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x28]
movss dword [ebx + esi*8], xmm1
call fcn.0058a220
xorps xmm0, xmmword [0x61caf0]
cvtsd2ss xmm0, xmm0
movss dword [ebx + esi*8 + 4], xmm0
movd xmm0, dword [esp + 0x10]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x30]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x28], xmm0
call fcn.00589d80
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x28]
movss dword [edi], xmm1
call fcn.0058a220
mov eax, dword [esp + 0x18]
lea edi, [edi + 8]
add dword [esp + 0x10], 2
inc esi
movss xmm2, dword [esp + 0x34]
add eax, 4
cvtsd2ss xmm0, xmm0
mov dword [esp + 0x18], eax
movss dword [edi - 4], xmm0
cmp esi, dword [esp + 0x1c]
jl 0x5ae780
movss xmm1, dword [0x61c9c8]
mov edi, dword [esp + 0x20]
mov eax, edi
cdq
and edx, 7
lea ebx, [edx + eax]
sar ebx, 3
mov dword [esp + 0x30], ebx
test ebx, ebx
jle 0x5ae8be
divss xmm1, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
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.00589d80
mulsd xmm0, qword [0x61c960]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x38]
movss dword [esi], xmm1
call fcn.0058a220
mulsd xmm0, qword [0x61ca08]
lea esi, [esi + 8]
add edi, 4
movss xmm1, dword [esp + 0x34]
cvtsd2ss xmm0, xmm0
movss dword [esi - 4], xmm0
sub ebx, 1
jne 0x5ae861
mov ebx, dword [esp + 0x30]
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 0x5ae919
xor edx, edx
xor ecx, ecx
test edi, edi
je 0x5ae900
mov eax, edi
nop dword [eax + eax]
test esi, eax
je 0x5ae8f7
bts edx, ecx
inc ecx
mov eax, edi
sar eax, cl
test eax, eax
jne 0x5ae8f0
mov ecx, dword [esp + 0x4c]
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 0x5ae8e1
movss xmm0, dword [0x61c9d8]
divss xmm0, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
movss dword [ecx + 0x10], xmm0
mov esp, ebp
pop ebp
ret