Function at 0x10037040
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
movss xmm3, 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 0x100371b8
nop dword [eax]
nop dword [eax + eax]
movss xmm5, dword [0x1021abd0]
add edi, edi
mov esi, dword [ecx + edi*4 + 8]
mov ebx, dword [ecx + edi*4 + 4]
movss xmm2, dword [esi + 0x14]
addss xmm2, dword [esi + 4]
movss xmm0, dword [esi + 0x10]
addss xmm0, dword [esi]
movss xmm6, dword [esi + 0x18]
addss xmm6, dword [esi + 8]
movss xmm7, dword [ebx + 0x18]
addss xmm7, dword [ebx + 8]
movss xmm1, dword [ebx + 0x10]
addss xmm1, dword [ebx]
movss xmm4, dword [ebx + 0x14]
addss xmm4, dword [ebx + 4]
mulss xmm0, xmm3
mulss xmm1, dword [0x1015199c]
mulss xmm4, dword [0x1015199c]
subss xmm5, xmm0
mulss xmm2, xmm3
mulss xmm6, xmm3
mulss xmm7, xmm3
movss xmm3, dword [0x1021abd4]
subss xmm3, xmm2
mulss xmm5, xmm5
movss xmm2, dword [0x1021abd8]
movaps xmm0, xmm2
subss xmm2, xmm7
subss xmm0, xmm6
movss xmm6, dword [0x1021abd0]
mulss xmm3, xmm3
subss xmm6, xmm1
movss xmm1, dword [0x1021abd4]
subss xmm1, xmm4
movss dword [ebp - 0x18], xmm2
addss xmm3, xmm5
mulss xmm0, xmm0
movss dword [ebp - 0x14], xmm6
movss dword [ebp - 0x10], xmm1
addss xmm0, xmm3
call fcn.10004780
movss xmm1, dword [ebp - 0x14]
movss dword [ebp - 0x1c], xmm0
movss xmm0, dword [ebp - 0x10]
mulss xmm1, xmm1
mulss xmm0, xmm0
addss xmm0, xmm1
movss xmm1, dword [ebp - 0x18]
mulss xmm1, xmm1
addss xmm0, xmm1
call fcn.10004780
comiss xmm0, dword [ebp - 0x1c]
movss xmm3, dword [0x1015199c]
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 0x10037080
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x24]
cmp edi, eax
jne 0x100371cc
mov eax, dword [ebp + 8]
test al, 1
jne 0x100371cc
mov eax, dword [ecx + eax*4 - 4]
mov dword [ecx + ebx*4], eax
mov ebx, esi
cmp edx, ebx
jge 0x10037306
nop dword [eax]
nop dword [eax + eax]
mov eax, dword [ebp + 0xc]
lea esi, [ebx - 1]
movss xmm4, dword [0x1021abd0]
movss xmm6, dword [0x1021abd8]
sar esi, 1
mov eax, dword [eax]
mov edi, dword [ecx + esi*4]
movss xmm7, dword [eax + 0x18]
addss xmm7, dword [eax + 8]
movss xmm1, dword [eax + 0x10]
movss xmm0, dword [edi + 0x10]
addss xmm0, dword [edi]
movss xmm2, dword [edi + 0x14]
addss xmm2, dword [edi + 4]
movss xmm5, dword [edi + 0x18]
addss xmm5, dword [edi + 8]
mulss xmm0, dword [0x1015199c]
mulss xmm2, dword [0x1015199c]
addss xmm1, dword [eax]
subss xmm4, xmm0
mulss xmm5, xmm3
movss xmm0, dword [0x1021abd4]
subss xmm0, xmm2
mulss xmm7, xmm3
movss xmm3, dword [eax + 0x14]
movaps xmm2, xmm6
addss xmm3, dword [eax + 4]
mulss xmm1, dword [0x1015199c]
subss xmm2, xmm5
movss xmm5, dword [0x1021abd0]
subss xmm6, xmm7
mulss xmm0, xmm0
mulss xmm3, dword [0x1015199c]
subss xmm5, xmm1
movss xmm1, dword [0x1021abd4]
mulss xmm4, xmm4
mulss xmm2, xmm2
subss xmm1, xmm3
addss xmm0, xmm4
movss dword [ebp - 0x24], xmm5
movss dword [ebp - 0x20], xmm6
movss dword [ebp + 8], xmm1
addss xmm0, xmm2
call fcn.10004780
movss xmm1, dword [ebp - 0x24]
movss dword [ebp - 0x1c], xmm0
movss xmm0, dword [ebp + 8]
mulss xmm1, xmm1
mulss xmm0, xmm0
addss xmm0, xmm1
movss xmm1, dword [ebp - 0x20]
mulss xmm1, xmm1
addss xmm0, xmm1
call fcn.10004780
comiss xmm0, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
jbe 0x10037306
movss xmm3, dword [0x1015199c]
mov dword [ecx + ebx*4], edi
mov ebx, esi
cmp dword [ebp - 0xc], esi
jl 0x100371e0
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