Function at 0x1005e0d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push esi
push edi
mov edi, dword [esp + 0x40]
mov eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x2c], eax
lea ecx, [eax*4]
push ecx
call fcn.10081963
mov ecx, dword [esp + 0x30]
mov esi, eax
mov dword [esp + 0x24], esi
lea ecx, [ecx + edi]
shl ecx, 2
push ecx
call fcn.10081963
mov edi, eax
mov eax, dword [esp + 0x48]
mov ecx, eax
mov dword [esp + 0x30], edi
sar ecx, 1
mov dword [esp + 0x24], ecx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x3c], xmm0
cvtps2pd xmm0, xmm0
call fcn.1007b3a0
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [0x10153e70]
call fcn.1007b3a0
movsd xmm1, qword [esp + 0x10]
divsd xmm1, xmm0
addsd xmm1, qword [0x101592c0]
movsd qword [esp + 0x10], xmm1
fld qword [esp + 0x10]
fstp qword [esp]
call fcn.1007bc90
add esp, 8
call fcn.1006e710
mov ecx, dword [esp + 0x3c]
movss xmm1, dword [0x10159240]
mov dword [esp + 0xc], eax
mov dword [ecx + 0xc], esi
xor esi, esi
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x40]
mov dword [ecx], eax
mov dword [ecx + 8], edi
cmp dword [esp + 0x2c], esi
jle 0x1005e288
add eax, eax
mov ecx, dword [esp + 0x1c]
movaps xmm2, xmm1
mov dword [esp + 0x30], 1
divss xmm2, dword [esp + 0x34]
lea edi, [edi + ecx*4]
movd xmm0, eax
xor eax, eax
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x24], eax
movss dword [esp + 0x10], xmm2
divss xmm1, xmm0
movss dword [esp + 0x14], xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
call fcn.1007ac50
mov ecx, dword [esp + 0x28]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
movss dword [ecx + esi*8], xmm1
call fcn.1007b630
xorps xmm0, xmmword [0x101547e0]
mov eax, dword [esp + 0x28]
cvtsd2ss xmm0, xmm0
movss dword [eax + esi*8 + 4], xmm0
movd xmm0, dword [esp + 0x30]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x14]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
call fcn.1007ac50
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
movss dword [edi], xmm1
call fcn.1007b630
mov eax, dword [esp + 0x24]
lea edi, [edi + 8]
add dword [esp + 0x30], 2
inc esi
movss xmm2, dword [esp + 0x10]
add eax, 4
cvtsd2ss xmm0, xmm0
mov dword [esp + 0x24], eax
movss dword [edi - 4], xmm0
cmp esi, dword [esp + 0x2c]
jl 0x1005e1d3
movss xmm1, dword [0x10159240]
mov eax, dword [esp + 0x40]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x14], eax
test eax, eax
jle 0x1005e3bb
divss xmm1, dword [esp + 0x34]
mov edx, dword [esp + 0x40]
mov edi, 2
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x40], eax
lea esi, [ecx + edx*4]
movss dword [esp + 0x10], xmm1
nop dword [eax]
xorps xmm0, xmm0
cvtsi2ss xmm0, edi
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
call fcn.1007ac50
mulsd xmm0, qword [0x101592c0]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
movss dword [esi], xmm1
call fcn.1007b630
xorps xmm0, xmmword [0x101547e0]
lea esi, [esi + 8]
mulsd xmm0, qword [0x101592c0]
add edi, 4
sub dword [esp + 0x40], 1
movss xmm1, dword [esp + 0x10]
cvtsd2ss xmm0, xmm0
movss dword [esi - 4], xmm0
jne 0x1005e2c0
mov eax, dword [esp + 0xc]
mov edi, 1
mov esi, edi
mov dword [esp + 0x28], 0
lea ecx, [eax - 2]
shl esi, cl
lea ecx, [eax - 1]
shl edi, cl
mov eax, esi
mov dword [esp + 0x2c], esi
dec edi
mov dword [esp + 0x40], eax
nop word [eax + eax]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x24], ecx
test eax, eax
je 0x1005e38e
mov eax, esi
nop
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x24]
test dword [esp + 0x28], eax
je 0x1005e375
bts edx, ecx
inc ecx
mov eax, esi
sar eax, cl
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x1005e360
mov eax, dword [esp + 0x40]
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], esi
mov ecx, dword [esp + 0x28]
mov eax, edx
mov esi, dword [esp + 0x20]
not eax
and eax, edi
dec eax
mov dword [esi + ecx*8], eax
mov eax, esi
mov esi, dword [esp + 0x2c]
mov dword [eax + ecx*8 + 4], edx
inc ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x28], ecx
cmp ecx, dword [esp + 0x14]
jl 0x1005e350
jmp 0x1005e3c7
movss xmm0, dword [esp + 0x34]
movss dword [esp + 0x34], xmm0
movss xmm0, dword [0x101d72e8]
divss xmm0, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
pop edi
pop esi
movss dword [eax + 0x10], xmm0
add esp, 0x30
ret