Function at 0x10008be3
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
movsx esi, cx
mov ecx, dword [0x100298e0]
push edi
xor edi, edi
mov byte [ebp - 1], dl
mov dword [0x10029938], esi
mov edx, edi
test esi, esi
jle 0x10008c77
mov eax, dword [0x100298d8]
movss xmm1, dword [ecx + 0x98]
movss xmm0, dword [ecx + 0x8c]
mov eax, dword [eax + edx*4]
mulss xmm1, dword [eax + 0x1d]
mulss xmm0, dword [eax + 0x19]
addss xmm1, xmm0
addss xmm1, dword [ecx + 0xa4]
movss dword [eax + 0xd], xmm1
movss xmm1, dword [ecx + 0x9c]
mulss xmm1, dword [eax + 0x1d]
movss xmm0, dword [ecx + 0x90]
mulss xmm0, dword [eax + 0x19]
mov eax, dword [0x100298d8]
addss xmm1, xmm0
mov eax, dword [eax + edx*4]
inc edx
addss xmm1, dword [ecx + 0xa8]
xorps xmm1, xmmword [0x100224f0]
movss dword [eax + 0x11], xmm1
cmp edx, esi
jl 0x10008c05
mov edx, dword [0x100298d8]
mov eax, dword [edx]
movss xmm0, dword [eax + 0x11]
movss xmm1, dword [eax + 0xd]
xor eax, eax
inc eax
movss dword [ebp - 8], xmm0
cmp esi, eax
jle 0x10008cb9
mov ecx, dword [edx + eax*4]
add ecx, 0xd
comiss xmm1, dword [ecx]
jbe 0x10008ca4
movss xmm1, dword [ecx]
comiss xmm0, dword [ecx + 4]
jbe 0x10008caf
movss xmm0, dword [ecx + 4]
inc eax
cmp eax, esi
jl 0x10008c95
movss dword [ebp - 8], xmm0
xorps xmm2, xmm2
comiss xmm2, xmm0
ja 0x10008cdc
comiss xmm2, xmm1
ja 0x10008ce1
movss xmm3, dword [0x10022454]
comiss xmm1, xmm3
jae 0x10008cdc
comiss xmm0, xmm3
jb 0x10008d85
comiss xmm2, xmm1
jbe 0x10008d04
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
push ecx
push ecx
movsd qword [esp], xmm0
call dword [sym.imp.MSVCR120.dll_ceil]
fstp dword [ebp - 0xc]
fld dword [ebp - 0xc]
fld1
fsubp st(1)
fstp dword [ebp - 0x14]
jmp 0x10008d1b
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
push ecx
push ecx
movsd qword [esp], xmm0
call dword [sym.imp.MSVCR120.dll_floor]
fstp dword [ebp - 0x14]
movss xmm0, dword [ebp - 8]
xorps xmm1, xmm1
pop ecx
comiss xmm1, xmm0
pop ecx
push ecx
push ecx
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
jbe 0x10008d49
call dword [sym.imp.MSVCR120.dll_ceil]
fstp dword [ebp - 0xc]
fld dword [ebp - 0xc]
fld1
fsubp st(1)
fstp dword [ebp - 0x10]
jmp 0x10008d52
call dword [sym.imp.MSVCR120.dll_floor]
fstp dword [ebp - 0x10]
pop ecx
pop ecx
mov ecx, edi
test esi, esi
jle 0x10008d85
mov eax, dword [0x100298d8]
mov eax, dword [eax + ecx*4]
inc ecx
movss xmm0, dword [eax + 0xd]
subss xmm0, dword [ebp - 0x14]
movss dword [eax + 0xd], xmm0
movss xmm0, dword [eax + 0x11]
subss xmm0, dword [ebp - 0x10]
movss dword [eax + 0x11], xmm0
cmp ecx, esi
jl 0x10008d5a
mov cl, byte [ebp - 1]
test cl, 2
je 0x10008dd0
mov eax, 0xff
sub eax, dword [0x10029914]
mov dword [0x10029918], eax
test cl, 1
jne 0x10008db9
cmp byte [0x10029943], 0
je 0x10008db2
call fcn.10008e2b
jmp 0x10008de1
call fcn.10008e2b
jmp 0x10008de1
cmp byte [0x10029943], 0
je 0x10008dc9
call fcn.10008e2b
jmp 0x10008de1
call fcn.10008e2b
jmp 0x10008de1
test cl, 1
jne 0x10008ddc
call fcn.10008e2b
jmp 0x10008de1
call fcn.10008e2b
cmp dword [0x10029910], edi
je 0x10008e23
cmp dword [0x10029938], edi
jle 0x10008e23
mov esi, edi
mov eax, dword [0x100298d8]
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx]
cdq
sub eax, edx
sar eax, 1
mov dword [ecx], eax
mov eax, dword [0x100298d8]
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx + 4]
cdq
sub eax, edx
sar eax, 1
inc edi
movsx esi, di
mov dword [ecx + 4], eax
cmp esi, dword [0x10029938]
jl 0x10008df3
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret