Function at 0x10036de0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
movss xmm7, dword [0x1015199c]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
dec esi
mov dword [ebp - 8], ebx
mov eax, esi
mov dword [ebp - 4], ecx
sar eax, 1
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
push edi
mov edi, ebx
cmp ebx, eax
jge 0x10036f17
movss xmm6, dword [0x1021abd0]
add edi, edi
movss xmm5, dword [0x1021abd4]
movaps xmm4, xmm6
mov esi, dword [ecx + edi*4 + 8]
mov ebx, dword [ecx + edi*4 + 4]
movss xmm0, dword [esi + 0x10]
addss xmm0, dword [esi]
movss xmm2, dword [esi + 0x14]
addss xmm2, dword [esi + 4]
movss xmm3, dword [ebx + 0x14]
movss xmm1, dword [ebx + 0x10]
addss xmm3, dword [ebx + 4]
addss xmm1, dword [ebx]
mulss xmm0, xmm7
mulss xmm2, xmm7
subss xmm4, xmm0
mulss xmm1, xmm7
movaps xmm0, xmm5
mulss xmm3, xmm7
subss xmm0, xmm2
movss xmm2, dword [0x1021abd8]
subss xmm2, dword [0x1013df4c]
mulss xmm4, xmm4
subss xmm6, xmm1
subss xmm5, xmm3
mulss xmm0, xmm0
mulss xmm2, xmm2
addss xmm0, xmm4
movss dword [ebp - 0x14], xmm6
movss dword [ebp - 0x10], xmm5
movss dword [ebp - 0x18], xmm2
addss xmm0, xmm2
call fcn.10004780
movss xmm1, dword [ebp - 0x14]
movss dword [ebp - 0x1c], xmm0
movss xmm0, dword [ebp - 0x10]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm0, xmm1
addss xmm0, dword [ebp - 0x18]
call fcn.10004780
movss xmm1, dword [ebp - 0x1c]
movss xmm7, dword [0x1015199c]
comiss xmm1, xmm0
seta cl
movzx eax, cl
xor eax, 1
inc eax
add edi, eax
mov eax, dword [ebp - 8]
test cl, cl
mov dword [ebp - 8], edi
mov ecx, dword [ebp - 4]
cmove ebx, esi
mov dword [ecx + eax*4], ebx
mov ebx, edi
mov eax, dword [ebp - 0x20]
cmp edi, eax
jl 0x10036e14
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x24]
cmp edi, eax
jne 0x10036f2b
mov eax, dword [ebp + 8]
test al, 1
jne 0x10036f2b
mov eax, dword [ecx + eax*4 - 4]
mov dword [ecx + ebx*4], eax
mov ebx, esi
cmp edx, ebx
jge 0x10037029
nop dword [eax]
nop word [eax + eax]
movss xmm6, dword [0x1021abd0]
lea esi, [ebx - 1]
mov eax, dword [ebp + 0xc]
movaps xmm4, xmm6
movss xmm5, dword [0x1021abd4]
sar esi, 1
mov eax, dword [eax]
mov edi, dword [ecx + esi*4]
movss xmm3, dword [eax + 0x14]
movss xmm1, dword [eax + 0x10]
movss xmm0, dword [edi + 0x10]
addss xmm0, dword [edi]
movss xmm2, dword [edi + 0x14]
addss xmm2, dword [edi + 4]
addss xmm3, dword [eax + 4]
addss xmm1, dword [eax]
mulss xmm0, xmm7
mulss xmm2, xmm7
subss xmm4, xmm0
mulss xmm1, xmm7
movaps xmm0, xmm5
mulss xmm3, xmm7
subss xmm0, xmm2
movss xmm2, dword [0x1021abd8]
subss xmm2, dword [0x1013df4c]
mulss xmm4, xmm4
subss xmm6, xmm1
subss xmm5, xmm3
mulss xmm0, xmm0
mulss xmm2, xmm2
addss xmm0, xmm4
movss dword [ebp - 0x24], xmm6
movss dword [ebp + 8], xmm5
movss dword [ebp - 0x20], xmm2
addss xmm0, xmm2
call fcn.10004780
movss xmm1, dword [ebp - 0x24]
movss dword [ebp - 0x1c], xmm0
movss xmm0, dword [ebp + 8]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm0, xmm1
addss xmm0, dword [ebp - 0x20]
call fcn.10004780
movss xmm1, dword [ebp - 0x1c]
comiss xmm1, xmm0
mov ecx, dword [ebp - 4]
jbe 0x10037029
movss xmm7, dword [0x1015199c]
mov dword [ecx + ebx*4], edi
mov ebx, esi
cmp dword [ebp - 0xc], esi
jl 0x10036f40
mov eax, dword [ebp + 0xc]
pop edi
pop esi
mov eax, dword [eax]
mov dword [ecx + ebx*4], eax
pop ebx
mov esp, ebp
pop ebp
ret