Function at 0x508b9b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
and esi, 1
add esi, esi
mov eax, dword [edi + 4]
mov ecx, dword [edi + 0x8c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
and eax, 1
or esi, eax
mov eax, dword [edi + 0x84]
shl esi, 8
mov dword [ebp - 8], eax
call fcn.004dfdd1
mov dword [ebp - 0xc], eax
mov ebx, 0x508fde
mov eax, dword [ebp - 4]
cmp dword [eax + 0x58], 0
jne 0x508beb
mov ebx, 0x508f38
jmp 0x508bf7
cmp dword [eax + 0x58], 2
mov ecx, 0x508f90
cmove ebx, ecx
cmp byte [edi + 0x88], 2
je 0x508cf6
movd xmm0, dword [ebp + 0xc]
lea ecx, [ebp - 0x20]
cvtdq2ps xmm0, xmm0
push ecx
push ecx
push ecx
lea eax, [edi + 0x5c]
mov dword [ebp - 0x10], eax
addss xmm0, dword [0x5f7bcc]
movss dword [esp + 4], xmm0
movd xmm0, dword [ebp + 8]
cvtdq2ps xmm0, xmm0
addss xmm0, dword [0x5f7bcc]
movss dword [esp], xmm0
push eax
call dword [ebp - 8]
movss xmm0, dword [ebp - 0x20]
add esp, 0x10
cmp byte [edi + 0x88], 1
movss xmm1, dword [ebp - 0x1c]
movss dword [ebp - 0x14], xmm0
movss dword [ebp - 0x18], xmm1
jne 0x508ca4
movd xmm0, dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
cvtdq2ps xmm0, xmm0
lea eax, [ebp + 8]
push eax
push ecx
mov ecx, dword [ebp - 0x10]
movss dword [esp], xmm0
call fcn.004cd951
movd xmm1, dword [ebp + 8]
movd xmm2, dword [ebp - 8]
movss xmm0, dword [ebp - 0x14]
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm2, xmm2
mulss xmm1, dword [0x619aac]
mulss xmm2, dword [0x619aac]
jmp 0x508cae
movss xmm1, dword [edi + 0x5c]
movss xmm2, dword [edi + 0x68]
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0x3c]
sub esp, 0x10
add eax, 0xd4
movss dword [esp + 0xc], xmm2
movss dword [esp + 8], xmm1
movss xmm1, dword [ebp - 0x18]
movss dword [esp + 4], xmm1
movss dword [esp], xmm0
push eax
call fcn.005083e9
push dword [ebp + 0x14]
lea eax, [ebp - 0x3c]
push esi
push dword [ebp - 0xc]
push dword [ebp + 0x10]
push eax
call ebx
add esp, 0x14
jmp 0x508e06
movd xmm1, dword [ebp + 8]
movd xmm2, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 0xc], ecx
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm2, xmm2
addss xmm1, dword [0x5f7bcc]
addss xmm2, dword [0x5f7bcc]
movss dword [ebp + 8], xmm1
movss dword [ebp - 0x18], xmm2
test ecx, ecx
jle 0x508e06
lea ecx, [edi + 0x5c]
mov dword [ebp + 0x14], ecx
lea edi, [eax + 0xd4]
lea eax, [ebp - 0x20]
push eax
push ecx
push ecx
movss dword [esp + 4], xmm2
movss dword [esp], xmm1
push ecx
call dword [ebp - 8]
movss xmm0, dword [ebp - 0x1c]
lea eax, [ebp - 0x3c]
subss xmm0, dword [edi + 4]
movss xmm2, dword [ebp - 0x20]
movss xmm3, dword [edi + 0xc]
subss xmm2, dword [edi]
movss xmm4, dword [edi + 8]
movaps xmm1, xmm3
mulss xmm1, xmm0
and dword [ebp - 0x30], 0
and dword [ebp - 0x2c], 0
movss dword [ebp - 0x34], xmm0
movaps xmm0, xmm4
mulss xmm0, xmm2
push 1
push esi
push dword [ebp - 0xc]
addss xmm1, xmm0
mov dword [ebp - 0x3c], edi
push dword [ebp + 0x10]
xorps xmm0, xmm0
movss dword [ebp - 0x38], xmm2
mulss xmm3, xmm0
push eax
addss xmm1, dword [edi + 0x20]
mulss xmm4, xmm0
mulss xmm1, dword [0x61cddc]
addss xmm3, xmm4
movss dword [ebp - 0x28], xmm1
mulss xmm3, dword [0x61cddc]
movss dword [ebp - 0x24], xmm3
call ebx
movss xmm1, dword [ebp + 8]
add esp, 0x24
addss xmm1, dword [0x5f7bd0]
mov eax, dword [ebp + 0xc]
xor esi, 0x100
add dword [ebp + 0x10], 4
dec eax
movss xmm2, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
movss dword [ebp + 8], xmm1
mov dword [ebp + 0xc], eax
test eax, eax
jg 0x508d3a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10