Function at 0x4cd250
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0xc], eax
lea ecx, [eax*4]
push ecx
call fcn.0051269a
mov ecx, dword [ebp - 0xc]
mov esi, eax
mov dword [ebp - 0x38], esi
lea ecx, [ecx + edi]
shl ecx, 2
push ecx
call fcn.0051269a
mov edi, eax
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov dword [ebp - 0x28], edi
sar ecx, 1
mov dword [ebp - 0x18], ecx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x10], xmm0
cvtps2pd xmm0, xmm0
call fcn.0051f9a0
movsd qword [ebp - 0x34], xmm0
movsd xmm0, qword [0x5451e0]
call fcn.0051f9a0
movsd xmm1, qword [ebp - 0x34]
divsd xmm1, xmm0
addsd xmm1, qword [0x549540]
movsd qword [ebp - 0x34], xmm1
fld qword [ebp - 0x34]
fstp qword [esp]
call fcn.00513b10
add esp, 8
call fcn.0050b800
cmp dword [ebp - 0xc], 0
mov ecx, dword [ebp + 8]
movss xmm1, dword [0x542120]
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], esi
jle 0x4cd3fd
add eax, eax
mov dword [ebp - 8], 1
movaps xmm2, xmm1
xor ecx, ecx
divss xmm2, dword [ebp - 0x10]
mov dword [ebp - 0x14], ecx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mov eax, dword [ebp - 0x18]
movss dword [ebp - 0x24], xmm2
lea esi, [edi + eax*4]
divss xmm1, xmm0
movss dword [ebp - 0x20], xmm1
nop word [eax + eax]
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x1c], xmm0
call fcn.005132f0
mov eax, dword [ebp - 4]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x1c]
movss dword [edi + eax*8], xmm1
call fcn.005134b0
xorps xmm0, xmmword [0x54f0d0]
mov eax, dword [ebp - 4]
cvtsd2ss xmm0, xmm0
movss dword [edi + eax*8 + 4], xmm0
movd xmm0, dword [ebp - 8]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x20]
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x1c], xmm0
call fcn.005132f0
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x1c]
movss dword [esi], xmm1
call fcn.005134b0
mov eax, dword [ebp - 4]
lea esi, [esi + 8]
mov ecx, dword [ebp - 0x14]
inc eax
add dword [ebp - 8], 2
add ecx, 4
movss xmm2, dword [ebp - 0x24]
cvtsd2ss xmm0, xmm0
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], ecx
movss dword [esi - 4], xmm0
cmp eax, dword [ebp - 0xc]
jl 0x4cd350
movss xmm1, dword [0x542120]
mov eax, dword [ebp + 0xc]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebp - 0x14], eax
test eax, eax
jle 0x4cd48a
divss xmm1, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov edi, 2
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 0xc], eax
lea esi, [ecx + edx*4]
movss dword [ebp - 0x24], xmm1
nop dword [eax + eax]
movd xmm0, edi
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [ebp - 0x2c], xmm0
call fcn.005132f0
mulsd xmm0, qword [0x549540]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x2c]
movss dword [esi], xmm1
call fcn.005134b0
mulsd xmm0, qword [0x554cb8]
lea esi, [esi + 8]
add edi, 4
sub dword [ebp + 0xc], 1
movss xmm1, dword [ebp - 0x24]
cvtsd2ss xmm0, xmm0
movss dword [esi - 4], xmm0
jne 0x4cd430
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x30]
mov edx, 1
mov edi, 1
lea ecx, [esi - 1]
shl edx, cl
lea ecx, [esi - 2]
dec edx
shl edi, cl
xor esi, esi
mov dword [ebp + 0xc], edx
test eax, eax
jle 0x4cd4e8
nop dword [eax + eax]
xor edx, edx
xor ecx, ecx
test edi, edi
je 0x4cd4d0
mov eax, edi
nop word [eax + eax]
test esi, eax
je 0x4cd4c7
bts edx, ecx
inc ecx
mov eax, edi
sar eax, cl
test eax, eax
jne 0x4cd4c0
mov ecx, dword [ebp - 0x38]
mov eax, edx
not eax
and eax, dword [ebp + 0xc]
dec eax
mov dword [ecx + esi*8], eax
mov dword [ecx + esi*8 + 4], edx
inc esi
cmp esi, dword [ebp - 0x14]
jl 0x4cd4b0
movss xmm0, dword [0x541738]
divss xmm0, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
pop edi
pop esi
movss dword [eax + 0x10], xmm0
mov esp, ebp
pop ebp
ret