Function at 0x1012a806
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x14], eax
xor eax, eax
inc eax
cmp dword [ebp + 0x14], eax
jne 0x1012a83d
push dword [ebp + 0x28]
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.1012a75c
add esp, 0x14
jmp 0x1012abb6
mov ecx, dword [ebp + 0x30]
push edi
mov dword [ebp - 0x20], ecx
lea ecx, [ebp + 0x30]
push ecx
push eax
push dword [ebp + 0x24]
lea eax, [ebp + 0x18]
push dword [ebp + 0x1c]
push dword [ebp + 0x1c]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0x3c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push esi
call fcn.101295b3
movd xmm1, dword [ebp - 0x38]
add esp, 0x2c
cmp dword [ebp + 0x14], 2
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x101a69c4]
movss dword [ebp - 8], xmm1
movd xmm1, dword [ebp - 0x34]
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x101a69c4]
movss dword [ebp - 0x1c], xmm1
jne 0x1012aa2e
xor edi, edi
mov ecx, edi
mov dword [ebp - 0x10], edi
mov edx, edi
cmp dword [ebp - 0x2c], ecx
je 0x1012a8be
cmp dword [ebp - 0x2c], 0x4000
push 8
pop eax
cmovne ecx, eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 0x18]
sub eax, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
add eax, ecx
sub dword [esi + 0x1c], eax
cmp dword [ebp - 0x2c], 0x2000
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
cmovg esi, eax
cmovg eax, dword [ebp + 0xc]
mov dword [ebp - 4], esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x10], edx
je 0x1012a93e
push 1
cmp dword [ebp - 0xc], edx
je 0x1012a932
movss xmm1, dword [eax + 4]
mov eax, dword [ebp - 4]
movss xmm0, dword [eax + 4]
mulss xmm1, dword [eax]
mov eax, dword [ebp - 0x18]
mulss xmm0, dword [eax]
xor eax, eax
subss xmm1, xmm0
xorps xmm0, xmm0
comiss xmm0, xmm1
seta al
push eax
push dword [ebp - 0x14]
mov dword [ebp + 8], eax
call fcn.1012df72
mov edx, dword [ebp + 8]
add esp, 0xc
jmp 0x1012a93e
push dword [ebp - 0x14]
call fcn.101271d0
pop ecx
pop ecx
mov edx, eax
push dword [ebp - 0x20]
xor ecx, ecx
lea eax, [edx + edx]
push dword [ebp + 0x2c]
inc ecx
sub ecx, eax
push ecx
mov dword [esp], 0x3f800000
push dword [ebp + 0x28]
mov dword [ebp - 0x14], ecx
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp - 0x24]
push 2
push dword [ebp - 4]
push esi
call fcn.1012a44c
mov edx, dword [ebp - 0x18]
add esp, 0x2c
mov dword [ebp + 8], eax
mov eax, dword [ebp - 0x14]
mov ecx, eax
neg ecx
movss xmm3, dword [ebp - 8]
movd xmm0, ecx
mov ecx, dword [ebp - 4]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ecx + 4]
movss dword [edx], xmm0
movd xmm0, eax
mov eax, dword [ebp + 0x10]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ecx]
mov ecx, dword [ebp + 0xc]
movss dword [edx + 4], xmm0
cmp dword [ebp - 0xc], edi
jne 0x1012ab6a
movss xmm0, dword [ecx]
mulss xmm0, xmm3
movss dword [ecx], xmm0
movss xmm0, dword [ecx + 4]
mulss xmm0, xmm3
movss dword [ecx + 4], xmm0
movss xmm0, dword [eax + 4]
mulss xmm0, dword [ebp - 0x1c]
movss xmm2, dword [eax]
mulss xmm2, dword [ebp - 0x1c]
movss dword [eax + 4], xmm0
movss dword [eax], xmm2
movss xmm1, dword [ecx]
movaps xmm0, xmm1
subss xmm0, xmm2
movss dword [ecx], xmm0
movss xmm0, dword [eax]
addss xmm0, xmm1
movss dword [eax], xmm0
movss xmm1, dword [ecx + 4]
movaps xmm0, xmm1
subss xmm0, dword [eax + 4]
movss dword [ecx + 4], xmm0
movss xmm0, dword [eax + 4]
addss xmm0, xmm1
movss dword [eax + 4], xmm0
jmp 0x1012ab6a
mov eax, dword [ebp + 0x18]
sub eax, dword [ebp - 0x30]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp + 0x18]
sar edi, 1
cmp eax, edi
mov ecx, edi
cmovl ecx, eax
xor edx, edx
test ecx, ecx
jns 0x1012aa4f
mov edi, edx
jmp 0x1012aa54
cmp eax, edi
cmovl edi, eax
sub eax, edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x28]
sub dword [esi + 0x1c], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x18], eax
cmp edi, dword [ebp - 4]
jl 0x1012aae9
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push ecx
mov dword [esp], 0x3f800000
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push edi
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push esi
call fcn.1012a44c
mov dword [ebp + 8], eax
add esp, 0x2c
mov eax, dword [esi + 0x1c]
sub eax, dword [ebp - 0x18]
add eax, edi
cmp eax, 0x18
jle 0x1012aab5
cmp dword [ebp - 0x2c], 0
je 0x1012aab5
mov ecx, dword [ebp - 4]
add ecx, 0xffffffe8
add ecx, eax
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0x1c]
xor edi, edi
mov eax, dword [ebp + 0x30]
movss xmm1, dword [ebp - 0x1c]
sar eax, cl
push eax
push edi
push ecx
movss dword [esp], xmm1
push edi
push dword [ebp + 0x24]
push edi
push ecx
push dword [ebp - 4]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call fcn.1012a44c
add esp, 0x2c
or dword [ebp + 8], eax
jmp 0x1012ab5f
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x30]
sar eax, cl
push eax
push edx
push ecx
movss dword [esp], xmm1
push edx
push dword [ebp + 0x24]
push edx
push ecx
push dword [ebp - 4]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
call fcn.1012a44c
mov dword [ebp + 8], eax
add esp, 0x2c
mov eax, dword [esi + 0x1c]
sub eax, dword [ebp - 0x18]
add eax, dword [ebp - 4]
cmp eax, 0x18
jle 0x1012ab30
cmp dword [ebp - 0x2c], 0x4000
je 0x1012ab30
add edi, 0xffffffe8
add edi, eax
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push ecx
mov dword [esp], 0x3f800000
push dword [ebp + 0x28]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push edi
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push esi
call fcn.1012a44c
or dword [ebp + 8], eax
add esp, 0x2c
xor edi, edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
movss xmm3, dword [ebp - 8]
cmp dword [ebp - 0xc], 0
jne 0x1012abb2
cmp dword [ebp + 0x14], 2
je 0x1012ab8c
push dword [esi + 0x28]
push dword [ebp + 0x14]
push ecx
movss dword [esp], xmm3
push eax
push ecx
call fcn.1012afc4
add esp, 0x14
cmp dword [ebp - 0x3c], 0
je 0x1012abb2
cmp dword [ebp + 0x14], 0
jle 0x1012abb2
mov eax, dword [ebp + 0x10]
movss xmm0, dword [eax + edi*4]
xorps xmm0, xmmword [0x1015d900]
movss dword [eax + edi*4], xmm0
inc edi
cmp edi, dword [ebp + 0x14]
jl 0x1012ab9b
mov eax, dword [ebp + 8]
pop edi
pop esi
mov esp, ebp
pop ebp
ret