Function at 0x10158585
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov esi, esp
mov eax, dword [0x101db764]
mov ebx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
xor eax, ebp
mov dword [esi + 0x38], eax
lea eax, [ebx*4]
call fcn.1015e8d0
mov edx, esp
and edx, 0xfffffff0
mov esp, edx
lea ecx, [ebx + ecx]
lea eax, [ecx*4]
call fcn.1015e8d0
mov eax, esp
and eax, 0xfffffff0
mov dword [esi + 0xc], eax
mov esp, eax
test ebx, ebx
mov dword [esi + 0x14], edx
jle 0x1015861c
mov dword [esi + 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov edi, ebx
mov eax, dword [ecx + edi*4 - 4]
mov dword [edx], eax
add edx, 4
dec edi
jne 0x101585de
mov edi, dword [ebp + 0x1c]
mov ecx, dword [esi + 0x10]
test ebx, ebx
mov edx, 0
jle 0x1015861e
movaps xmm0, xmmword [0x10187140]
mov eax, dword [esi + 0xc]
mov edx, ebx
movss xmm1, dword [edi + edx*4 - 4]
xorps xmm1, xmm0
movss dword [eax], xmm1
add eax, 4
dec edx
jne 0x10158605
mov edx, ebx
jmp 0x1015861e
xor edx, edx
mov eax, dword [ebp + 0x14]
sub ecx, edx
jle 0x1015863d
mov eax, dword [esi + 0xc]
shl ecx, 2
lea eax, [eax + edx*4]
push ecx
push 0
push eax
call fcn.10161ee0
mov eax, dword [ebp + 0x14]
add esp, 0xc
mov edx, dword [ebp + 8]
mov ecx, dword [esi + 0xc]
xor edi, edi
cmp eax, 4
jl 0x10158774
mov eax, dword [ebp + 0x14]
xor edi, edi
lea eax, [eax - 3]
mov dword [esi + 0x1c], eax
movups xmm0, xmmword [edx + edi*4]
lea edx, [ecx + edi*4]
mov ecx, dword [esi + 0x14]
lea eax, [edi*4]
mov dword [esi + 0x10], eax
movaps xmmword [esi + 0x20], xmm0
push ebx
lea eax, [esi + 0x20]
push eax
call fcn.1015840b
mov edx, dword [ebp + 0x10]
add esp, 8
movss xmm0, dword [esi + 0x20]
movaps xmm4, xmmword [0x10187140]
mov ecx, dword [esi + 0xc]
lea eax, [edi + ebx]
mov dword [esi + 0x18], eax
movaps xmm1, xmm0
xorps xmm1, xmm4
movss dword [ecx + eax*4], xmm1
movss dword [edx + edi*4], xmm0
mov edx, dword [ebp + 0xc]
mov ecx, dword [esi + 0xc]
add edi, 4
movss xmm1, dword [esi + 0x24]
movss xmm2, dword [edx]
mov edx, dword [ebp + 0x10]
mulss xmm2, xmm0
subss xmm1, xmm2
movaps xmm2, xmm1
movss dword [esi + 0x24], xmm1
xorps xmm2, xmm4
movss dword [ecx + eax*4 + 4], xmm2
mov eax, dword [esi + 0x10]
mov ecx, eax
or ecx, 4
movss dword [edx + ecx], xmm1
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi + 0x18]
movss xmm2, dword [esi + 0x28]
movss xmm3, dword [ecx]
mulss xmm3, xmm1
subss xmm2, xmm3
movss xmm3, dword [ecx + 4]
mov ecx, dword [esi + 0xc]
mulss xmm3, xmm0
subss xmm2, xmm3
movaps xmm3, xmm2
movss dword [esi + 0x28], xmm2
xorps xmm3, xmm4
movss dword [ecx + edx*4 + 8], xmm3
mov ecx, eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x10]
or ecx, 8
movss dword [eax + ecx], xmm2
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0xc]
movss xmm3, dword [esi + 0x2c]
mulss xmm2, dword [eax]
mulss xmm1, dword [eax + 4]
mulss xmm0, dword [eax + 8]
mov eax, dword [esi + 0x18]
subss xmm3, xmm2
subss xmm3, xmm1
subss xmm3, xmm0
movaps xmm0, xmm3
xorps xmm0, xmm4
movss dword [ecx + eax*4 + 0xc], xmm0
mov eax, dword [esi + 0x10]
or eax, 0xc
cmp edi, dword [esi + 0x1c]
movss dword [edx + eax], xmm3
mov edx, dword [ebp + 8]
jl 0x10158659
mov edx, dword [ebp + 0x14]
cmp edi, edx
jge 0x101587be
lea eax, [ecx + edi*4]
mov ecx, dword [ebp + 8]
test ebx, ebx
movss xmm0, dword [ecx + edi*4]
jle 0x101587a2
mov edx, dword [esi + 0x14]
xor ecx, ecx
movss xmm1, dword [edx + ecx*4]
mulss xmm1, dword [eax + ecx*4]
inc ecx
cmp ebx, ecx
subss xmm0, xmm1
jne 0x1015878f
mov edx, dword [esi + 0xc]
lea ecx, [edi + ebx]
add eax, 4
movss dword [edx + ecx*4], xmm0
mov edx, dword [ebp + 0x10]
movss dword [edx + edi*4], xmm0
inc edi
cmp edi, dword [ebp + 0x14]
jne 0x1015877e
mov edx, dword [ebp + 0x1c]
test ebx, ebx
jle 0x101587dc
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
lea eax, [ecx + eax*4 - 4]
mov ecx, dword [eax]
add eax, 0xfffffffc
mov dword [edx], ecx
add edx, 4
dec ebx
jne 0x101587cf
mov ecx, dword [esi + 0x38]
xor ecx, ebp
call fcn.1015e65c
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret