Function at 0x1002af14
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x48
mov eax, dword [ebp + 8]
push esi
mov esi, dword [0x101c0bb0]
push edi
mov edi, ecx
mov dword [esp + 0x18], edx
mov edx, dword [ebp + 0x1c]
mov ecx, edx
shr ecx, 0x14
and ecx, 1
mov dword [esp + 0x40], edx
mov dword [esp + 0x28], ecx
cmp eax, 8
je 0x1002aafb
cmp eax, 9
je 0x1002aafb
xor al, al
jmp 0x1002aafd
mov al, 1
mov byte [esp + 0x17], al
test dl, 0x20
je 0x1002ab0e
test al, al
je 0x1002ab0e
mov dl, 1
jmp 0x1002ab10
xor dl, dl
movss xmm0, dword [edi + ecx*4 + 8]
movss xmm5, dword [edi + ecx*4]
movaps xmm2, xmm0
movss xmm3, dword [ebp + 0x10]
subss xmm2, xmm5
movss xmm4, dword [esi + 0x1590]
movss dword [esp + 0x4c], xmm0
movss xmm0, dword [ebp + 0x14]
comiss xmm0, xmm3
mov byte [esp + 0x16], dl
subss xmm2, dword [0x101afcc0]
movss dword [esp + 0x2c], xmm4
movss dword [esp + 0x48], xmm2
jbe 0x1002ab60
movaps xmm1, xmm0
subss xmm1, xmm3
jmp 0x1002ab67
movaps xmm1, xmm3
subss xmm1, xmm0
movss xmm3, dword [0x101afc38]
xorps xmm0, xmm0
movss dword [esp + 0x24], xmm1
test al, al
jne 0x1002ab9f
comiss xmm1, xmm0
jb 0x1002ab9f
movaps xmm0, xmm1
movaps xmm1, xmm2
addss xmm0, xmm3
divss xmm1, xmm0
xorps xmm0, xmm0
maxss xmm1, xmm4
movaps xmm4, xmm1
movss dword [esp + 0x2c], xmm4
comiss xmm2, xmm4
ja 0x1002abad
movaps xmm4, xmm2
movss dword [esp + 0x2c], xmm4
addss xmm5, dword [0x101afc78]
movaps xmm1, xmm2
movss dword [esp + 0x20], xmm0
subss xmm1, xmm4
movss dword [esp + 0x1c], xmm0
test dl, dl
mov edx, dword [ebp + 0x18]
movss dword [esp + 0x44], xmm5
movss dword [esp + 0x30], xmm1
je 0x1002ac4a
test al, al
je 0x1002abe8
mov ecx, edx
call fcn.101239a0
jmp 0x1002abed
mov eax, 1
movsd xmm0, qword [0x101afc50]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
cvtps2pd xmm1, xmm1
call fcn.10160390
movss xmm1, dword [esp + 0x30]
movss xmm3, dword [0x101afc38]
movss xmm2, dword [esi + 0x1598]
mulss xmm2, dword [0x101afbec]
mov ecx, dword [esp + 0x28]
cvtsd2ss xmm0, xmm0
movss xmm5, dword [esp + 0x44]
movss dword [esp + 0x20], xmm0
movaps xmm0, xmm1
maxss xmm0, xmm3
divss xmm2, xmm0
xorps xmm0, xmm0
movss dword [esp + 0x1c], xmm2
mov edx, dword [esp + 0x18]
xor al, al
mov byte [esp + 0x15], al
cmp dword [esi + 0x1aa4], edx
jne 0x1002afd8
mov eax, dword [esi + 0x1ad4]
cmp eax, 1
jne 0x1002acc2
cmp byte [esi + 0xec], 0
je 0x1002afcf
comiss xmm1, xmm0
jbe 0x1002ac9c
movss xmm2, dword [esi + ecx*4 + 0xe4]
subss xmm2, xmm5
divss xmm2, xmm1
comiss xmm0, xmm2
ja 0x1002ac9c
movaps xmm1, xmm3
minss xmm1, xmm2
jmp 0x1002ac9f
xorps xmm1, xmm1
movss dword [esp + 0x18], xmm1
test ecx, ecx
je 0x1002af58
movaps xmm0, xmm3
subss xmm0, xmm1
movaps xmm1, xmm0
movss dword [esp + 0x18], xmm1
jmp 0x1002af58
cmp eax, 2
jne 0x1002afd4
cmp byte [esi + 0x1ab0], 0
je 0x1002ace5
mov dword [esi + 0x2e74], 0
mov byte [esi + 0x2e78], 0
push ecx
mov dword [esp], 0
lea ecx, [esp + 0x34]
push 5
xorps xmm3, xmm3
mov edx, 3
call fcn.100ddc00
add esp, 8
cmp dword [esp + 0x28], 0
jne 0x1002ad12
movss xmm1, dword [esp + 0x30]
jmp 0x1002ad1f
movss xmm1, dword [esp + 0x34]
xorps xmm1, xmmword [0x101b1470]
xorps xmm2, xmm2
ucomiss xmm1, xmm2
lahf
test ah, 0x44
jnp 0x1002addb
cmp byte [esp + 0x17], 0
movss xmm5, dword [0x101afd04]
je 0x1002ad65
mov ecx, dword [ebp + 0x18]
call fcn.101239a0
test eax, eax
jle 0x1002ad65
movss xmm0, dword [esi + 0x338]
comiss xmm0, xmm2
divss xmm1, dword [0x101afd6c]
jbe 0x1002adb3
divss xmm1, xmm5
jmp 0x1002adb3
movss xmm3, dword [esp + 0x24]
comiss xmm3, dword [0x101afe7c]
movss xmm4, dword [0x101afd6c]
jb 0x1002ad81
comiss xmm4, xmm3
jae 0x1002ad8e
movss xmm0, dword [esi + 0x338]
comiss xmm0, xmm2
jbe 0x1002adaf
comiss xmm2, xmm1
jbe 0x1002ada1
movss xmm1, dword [0x101afe40]
divss xmm1, xmm3
jmp 0x1002adb3
movss xmm1, dword [0x101afc38]
divss xmm1, xmm3
jmp 0x1002adb3
divss xmm1, xmm4
movss xmm0, dword [esi + 0x33c]
comiss xmm0, xmm2
jbe 0x1002adc4
mulss xmm1, xmm5
addss xmm1, dword [esi + 0x2e74]
mov byte [esi + 0x2e78], 1
movss dword [esi + 0x2e74], xmm1
movss xmm2, dword [esi + 0x2e74]
mov eax, dword [esp + 0x18]
movss dword [esp + 0x24], xmm2
cmp dword [esi + 0x1bd8], eax
jne 0x1002ae02
cmp byte [esi + 0x1ab0], 0
je 0x1002afcf
cmp byte [esi + 0x2e78], 0
je 0x1002afd4
mov eax, dword [ebp + 0xc]
sub esp, 8
movss xmm0, dword [esp + 0x24]
mov dl, byte [esp + 0x1e]
movss xmm3, dword [ebp + 0x14]
movss xmm2, dword [ebp + 0x10]
movss xmm1, dword [eax]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x28]
movss dword [esp], xmm0
call fcn.1002e4b0
movss xmm2, dword [0x101afc38]
movaps xmm3, xmm0
movss xmm1, dword [esp + 0x2c]
add esp, 8
comiss xmm3, xmm2
movss dword [esp + 0x30], xmm3
xorps xmm0, xmm0
jb 0x1002ae6a
comiss xmm1, xmm0
ja 0x1002ae74
comiss xmm0, xmm3
jb 0x1002ae8a
comiss xmm0, xmm1
jbe 0x1002ae8a
mov dword [esi + 0x2e74], 0
mov byte [esi + 0x2e78], 0
jmp 0x1002afd4
addss xmm1, xmm3
comiss xmm0, xmm1
ja 0x1002ae9a
movaps xmm0, xmm2
minss xmm0, xmm1
movss xmm1, dword [esp + 0x1c]
sub esp, 8
mov dl, byte [esp + 0x1e]
movss xmm3, dword [ebp + 0x14]
movss xmm2, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
movss dword [esp + 4], xmm1
movss xmm1, dword [esp + 0x28]
movss dword [esp], xmm1
movaps xmm1, xmm0
movss dword [esp + 0x20], xmm0
call fcn.1002e7e0
add esp, 8
test byte [esp + 0x40], 0x40
jne 0x1002aeeb
mov edx, dword [ebp + 8]
movaps xmm2, xmm0
mov ecx, dword [ebp + 0x18]
call fcn.1002eaa0
movss xmm1, dword [esp + 0x1c]
sub esp, 8
mov dl, byte [esp + 0x1e]
movss xmm3, dword [ebp + 0x14]
movss xmm2, dword [ebp + 0x10]
movss dword [esp + 4], xmm1
movss xmm1, dword [esp + 0x28]
movss dword [esp], xmm1
movaps xmm1, xmm0
call fcn.1002e4b0
movss xmm2, dword [esp + 0x2c]
add esp, 8
comiss xmm2, dword [0x101afb04]
movss xmm1, dword [esi + 0x2e74]
subss xmm0, dword [esp + 0x30]
jbe 0x1002af41
minss xmm0, xmm2
jmp 0x1002af45
maxss xmm0, xmm2
subss xmm1, xmm0
movss dword [esi + 0x2e74], xmm1
mov byte [esi + 0x2e78], 0
movss xmm0, dword [esp + 0x1c]
sub esp, 8
mov esi, dword [ebp + 8]
mov ecx, esi
mov dl, byte [esp + 0x1e]
movss xmm3, dword [ebp + 0x14]
movss xmm2, dword [ebp + 0x10]
movss xmm1, dword [esp + 0x20]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x28]
movss dword [esp], xmm0
call fcn.1002e7e0
add esp, 8
movaps xmm1, xmm0
test byte [esp + 0x40], 0x40
jne 0x1002afad
mov ecx, dword [ebp + 0x18]
movaps xmm2, xmm1
mov edx, esi
call fcn.1002eaa0
movaps xmm1, xmm0
mov ecx, dword [ebp + 0xc]
movss xmm0, dword [ecx]
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jnp 0x1002afc9
mov al, 1
movss dword [ecx], xmm1
mov byte [esp + 0x15], al
jmp 0x1002afdb
mov al, byte [esp + 0x15]
jmp 0x1002afdb
call fcn.100ed160
mov al, byte [esp + 0x15]
mov ecx, dword [ebp + 0xc]
movss xmm0, dword [0x101afc38]
comiss xmm0, dword [esp + 0x48]
jbe 0x1002b010
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [ebp + 0x20]
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], edx
movups xmm0, xmmword [esp + 0x30]
movups xmmword [ecx], xmm0
pop edi
pop esi
mov esp, ebp
pop ebp
ret
movss xmm0, dword [esp + 0x1c]
sub esp, 8
mov dl, byte [esp + 0x1e]
movss xmm3, dword [ebp + 0x14]
movss xmm2, dword [ebp + 0x10]
movss xmm1, dword [ecx]
movss dword [esp + 4], xmm0
movss xmm0, dword [esp + 0x28]
movss dword [esp], xmm0
call fcn.1002e4b0
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
je 0x1002b05b
movss xmm1, dword [0x101afc38]
subss xmm1, xmm0
movaps xmm0, xmm1
movss xmm3, dword [esp + 0x4c]
test eax, eax
subss xmm3, dword [esp + 0x44]
movss xmm4, dword [0x101afbec]
mov eax, dword [ebp + 0x20]
mulss xmm3, xmm0
movss xmm0, dword [esp + 0x2c]
mulss xmm0, xmm4
addss xmm3, dword [esp + 0x44]
movaps xmm2, xmm3
addss xmm3, xmm0
subss xmm2, xmm0
jne 0x1002b0bc
movss xmm0, dword [edi + 4]
movss xmm1, dword [edi + 0xc]
movss dword [eax], xmm2
movss dword [eax + 4], xmm0
movss dword [eax + 8], xmm3
movss dword [eax + 0xc], xmm1
mov al, byte [esp + 0x15]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
movss xmm0, dword [edi + 8]
movaps xmm1, xmm0
addss xmm0, dword [edi]
subss xmm1, dword [0x101afc78]
pop edi
pop esi
mulss xmm0, xmm4
movss dword [eax], xmm0
movss dword [eax + 4], xmm2
movss dword [eax + 8], xmm1
movss dword [eax + 0xc], xmm3
mov al, byte [esp + 0xd]
mov esp, ebp
pop ebp
ret