Function at 0x4644e4
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x3c
push esi
mov esi, dword [esp + 0x48]
mov eax, esi
cdq
and edx, 3
add eax, edx
sar eax, 2
mov ecx, eax
mov dword [esp + 0x34], eax
shl ecx, 2
push edi
push ecx
call fcn.00573de4
mov ecx, dword [esp + 0x3c]
mov edi, eax
mov dword [esp + 0x28], edi
lea ecx, [ecx + esi]
shl ecx, 2
push ecx
call fcn.00573de4
movd xmm0, esi
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x3c], eax
mov eax, esi
sar eax, 1
mov dword [esp + 0x28], eax
movss dword [esp + 0x38], xmm0
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
call fcn.005963b0
movsd xmm0, qword [0x5bc7b0]
fstp qword [esp + 0x10]
movsd qword [esp], xmm0
call fcn.005963b0
movsd xmm0, qword [esp + 0x10]
fstp qword [esp + 0x18]
divsd xmm0, qword [esp + 0x18]
addsd xmm0, qword [0x5bc4e8]
movsd qword [esp], xmm0
call fcn.00596200
pop ecx
pop ecx
call fcn.00573bc0
mov edx, dword [esp + 0x48]
and dword [esp + 0x40], 0
mov ecx, dword [esp + 0x34]
movss xmm1, dword [0x5bc81c]
mov dword [edx + 0xc], edi
xor edi, edi
inc edi
mov dword [esp + 0xc], eax
cmp dword [esp + 0x38], 0
mov dword [edx + 4], eax
mov dword [edx], esi
mov dword [edx + 8], ecx
mov dword [esp + 0x28], 2
jle 0x4646c0
lea eax, [esi + esi]
mov dword [esp + 0x3c], edi
movd xmm0, eax
movaps xmm2, xmm1
divss xmm2, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
xor edx, edx
mov dword [esp + 0x2c], edx
mov esi, ecx
lea edi, [ecx + eax*4]
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x14], xmm2
divss xmm1, xmm0
movss dword [esp + 0x18], xmm1
movd xmm0, edx
cvtdq2ps xmm0, xmm0
push ecx
push ecx
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x24], xmm0
movsd qword [esp], xmm0
call fcn.005965f0
mov eax, dword [esp + 0x48]
movsd xmm0, qword [esp + 0x24]
movsd qword [esp], xmm0
fstp dword [esi + eax*8]
call fcn.00596640
mov eax, dword [esp + 0x48]
fstp qword [esp + 0x24]
movsd xmm0, qword [esp + 0x24]
xorps xmm0, xmmword [0x5bc7e0]
cvtsd2ss xmm0, xmm0
movss dword [esi + eax*8 + 4], xmm0
movd xmm0, dword [esp + 0x44]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x20]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x24], xmm0
movsd qword [esp], xmm0
call fcn.005965f0
movsd xmm0, qword [esp + 0x24]
fstp dword [edi]
movsd qword [esp], xmm0
call fcn.00596640
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x34]
inc eax
add dword [esp + 0x44], 2
add edx, 4
movss xmm2, dword [esp + 0x1c]
fstp dword [edi + 4]
pop ecx
add edi, 8
mov dword [esp + 0x44], eax
pop ecx
mov dword [esp + 0x2c], edx
cmp eax, dword [esp + 0x38]
jl 0x4645f2
movss xmm1, dword [0x5bc81c]
xor edi, edi
mov esi, dword [esp + 0x4c]
inc edi
mov ecx, dword [esp + 0x34]
mov eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x2c], eax
test eax, eax
jle 0x464767
divss xmm1, dword [esp + 0x30]
push 2
mov edi, eax
lea esi, [ecx + esi*4]
pop eax
movss dword [esp + 0x4c], xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
push ecx
push ecx
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
movsd qword [esp], xmm0
call fcn.005965f0
fmul qword [0x5bc4e8]
movsd xmm0, qword [esp + 0x18]
movsd qword [esp], xmm0
fstp dword [esi]
call fcn.00596640
mov eax, dword [esp + 0x30]
movss xmm1, dword [esp + 0x54]
add eax, 4
fstp qword [esp + 0x18]
movsd xmm0, qword [esp + 0x18]
xorps xmm0, xmmword [0x5bc7e0]
mulsd xmm0, qword [0x5bc4e8]
pop ecx
pop ecx
mov dword [esp + 0x28], eax
cvtsd2ss xmm0, xmm0
movss dword [esi + 4], xmm0
add esi, 8
sub edi, 1
jne 0x4646eb
mov eax, dword [esp + 0x2c]
xor edi, edi
inc edi
mov esi, dword [esp + 0xc]
mov edx, edi
lea ecx, [esi - 1]
shl edx, cl
lea ecx, [esi - 2]
dec edx
shl edi, cl
xor esi, esi
mov dword [esp + 0x4c], edx
test eax, eax
jle 0x4647c7
mov ecx, edx
xor edx, edx
and dword [esp + 0xc], edx
test edi, edi
je 0x4647a8
mov ecx, dword [esp + 0xc]
mov eax, edi
test esi, eax
je 0x46479b
bts edx, ecx
inc ecx
mov eax, edi
sar eax, cl
test eax, eax
jne 0x464794
mov ecx, dword [esp + 0x4c]
mov eax, edx
not eax
and eax, ecx
mov ecx, dword [esp + 0x24]
dec eax
mov dword [ecx + esi*8], eax
mov eax, ecx
mov ecx, dword [esp + 0x4c]
mov dword [eax + esi*8 + 4], edx
inc esi
cmp esi, dword [esp + 0x2c]
jl 0x464784
movss xmm0, dword [0x5bc820]
divss xmm0, dword [esp + 0x30]
mov eax, dword [esp + 0x48]
pop edi
pop esi
movss dword [eax + 0x10], xmm0
add esp, 0x3c
ret