Function at 0x40cfe0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x70
cmp dword [esp + 0x7c], 0
push edi
mov edi, dword [esp + 0x78]
jle 0x40d286
add eax, 0x18
add edi, 0x1c
mov dword [esp + 0x70], eax
push esi
movups xmm3, xmmword [edi + 4]
lea esi, [eax - 0x18]
movups xmm1, xmmword [edi + 0x14]
movq xmm0, qword [edi + 0x24]
movups xmm4, xmmword [edi - 0x1c]
movups xmm5, xmmword [edi - 0xc]
movq qword [esp + 0x48], xmm0
movaps xmm7, xmm4
movups xmm0, xmmword [esi]
xorps xmm7, xmmword [0x511aa0]
movups xmmword [edi - 0x1c], xmm0
movq xmm0, qword [esi + 0x10]
movaps xmm6, xmm7
movups xmmword [esp + 0x28], xmm3
shufps xmm3, xmm3, 0x55
movq qword [edi - 0xc], xmm0
movaps xmm2, xmm3
addss xmm2, xmm1
movups xmmword [esp + 0x60], xmm1
movups xmmword [esp + 0x38], xmm1
movaps xmm0, xmm2
addss xmm7, xmm2
mulss xmm0, dword [0x511784]
movups xmm2, xmmword [esp + 0x60]
subss xmm6, xmm0
movups xmmword [esp + 8], xmm4
movups xmmword [esp + 0x18], xmm5
shufps xmm4, xmm4, 0xff
shufps xmm5, xmm5, 0xaa
movaps xmm1, xmm4
addss xmm1, xmm5
movups xmmword [esp + 0x50], xmm5
movups xmm0, xmmword [esp + 0x50]
mulss xmm1, dword [0x5117e4]
movaps xmm5, xmm6
subss xmm0, xmm4
movss xmm4, dword [eax]
subss xmm6, xmm1
addss xmm5, xmm1
movaps xmm1, xmm2
subss xmm1, xmm3
shufps xmm2, xmm2, 0xff
movups xmmword [esp + 0x50], xmm0
mulss xmm0, dword [0x511784]
movss dword [esp + 0x70], xmm6
movaps xmm6, xmm2
mulss xmm1, dword [0x5117e4]
subss xmm6, xmm0
movaps xmm0, xmm5
mulss xmm0, dword [0x5117b8]
mulss xmm5, dword [0x5117dc]
movups xmmword [esp + 0x60], xmm2
movaps xmm2, xmm6
subss xmm6, xmm1
addss xmm2, xmm1
movaps xmm1, xmm4
mulss xmm4, dword [0x51176c]
movaps xmm3, xmm2
mulss xmm2, dword [0x5117b8]
mulss xmm3, dword [0x5117dc]
subss xmm5, xmm2
addss xmm3, xmm0
movss dword [eax], xmm5
movss xmm5, dword [0x5117fc]
movaps xmm0, xmm3
mulss xmm1, xmm5
mulss xmm0, dword [0x51176c]
mulss xmm3, xmm5
subss xmm1, xmm0
movaps xmm0, xmm7
mulss xmm0, dword [0x511780]
addss xmm3, xmm4
movss xmm4, dword [0x5117ec]
movss dword [edi - 4], xmm1
movups xmm1, xmmword [esp + 0x60]
movss dword [edi + 0x10], xmm3
addss xmm1, dword [esp + 0x50]
movss xmm3, dword [eax + 4]
xorps xmm1, xmmword [0x511aa0]
movaps xmm2, xmm1
mulss xmm2, xmm4
mulss xmm1, dword [0x511780]
addss xmm2, xmm0
push eax
mulss xmm7, xmm4
movaps xmm0, xmm2
mulss xmm2, xmm4
mulss xmm0, dword [0x511780]
subss xmm7, xmm1
movaps xmm1, xmm3
mulss xmm3, dword [0x511780]
mulss xmm1, xmm4
addss xmm2, xmm3
movss dword [eax + 4], xmm7
subss xmm1, xmm0
movss dword [edi], xmm1
movss xmm1, dword [esp + 0x74]
movss dword [edi + 0xc], xmm2
movaps xmm0, xmm1
mulss xmm0, dword [0x51176c]
movaps xmm2, xmm6
mulss xmm6, dword [0x51176c]
movss xmm3, dword [eax + 8]
mulss xmm1, xmm5
mulss xmm2, xmm5
subss xmm1, xmm6
addss xmm2, xmm0
movss dword [eax + 8], xmm1
movaps xmm1, xmm3
mulss xmm1, dword [0x5117dc]
lea eax, [edi + 0x14]
push eax
mulss xmm3, dword [0x5117b8]
movaps xmm0, xmm2
lea eax, [esp + 0x14]
mulss xmm0, dword [0x5117b8]
push eax
mulss xmm2, dword [0x5117dc]
subss xmm1, xmm0
addss xmm2, xmm3
movss dword [edi + 4], xmm1
movss dword [edi + 8], xmm2
call fcn.0040c6a0
push dword [esp + 0x80]
lea eax, [esp + 0x20]
push esi
push eax
call fcn.0040c6a0
mov ecx, dword [esp + 0x9c]
add esp, 0x18
mov eax, dword [esp + 0x74]
dec ecx
add eax, 0x24
mov dword [esp + 0x84], ecx
add edi, 0x48
mov dword [esp + 0x74], eax
test ecx, ecx
jg 0x40d002
pop esi
pop edi
add esp, 0x70
ret