Function at 0x10155991
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov ebx, dword [ebp + 0x28]
mov eax, dword [ebp + 0x10]
mov esi, dword [0x101db764]
mov edi, dword [ebp + 0xc]
xor esi, ebp
cmp edi, 1
mov dword [esp + 0x68], esi
mov esi, dword [ebp + 8]
jne 0x101559cf
push dword [ebp + 0x20]
push eax
push esi
call fcn.10155f31
add esp, 0xc
xor esi, esi
inc esi
jmp 0x10155f1c
mov dword [esp + 0x1c], ebx
mov ebx, dword [ecx]
mov eax, edx
lea edx, [esp + 0x50]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x30], ebx
mov ebx, dword [ecx + 0x1c]
mov dword [esp + 0x34], ebx
lea ebx, [ebp + 0x28]
push ebx
push 1
push dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x14]
push ebx
push ebx
lea ebx, [ebp + 0x10]
push ebx
push edi
push esi
mov dword [esp + 0x34], eax
push eax
call fcn.10156758
add esp, 0x24
lea ecx, [esp + 0x50]
movss xmm0, dword [0x101c1e90]
cmp edi, 2
cvtsi2ss xmm1, dword [ecx + 4]
cvtsi2ss xmm2, dword [ecx + 8]
mov eax, dword [ecx]
mov edx, dword [ecx + 0x10]
mov ebx, dword [ecx + 0x14]
lea ecx, [ebp + 0x10]
mov ecx, dword [ecx]
mulss xmm1, xmm0
mulss xmm2, xmm0
mov dword [esp + 0x3c], eax
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edx
movss dword [esp + 0x10], xmm1
jne 0x10155b09
mov eax, edx
mov edx, 0x4000
xor ebx, ebx
movss dword [esp + 0x18], xmm2
or eax, 0x4000
cmp eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 8]
setne bl
lea edx, [ebx*8]
sub ecx, edx
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x20]
lea eax, [eax + ebx*8]
sub dword [ecx + 0x20], eax
mov eax, esi
mov ebx, dword [esp + 0x14]
cmp dword [esp + 0xc], 0x2000
cmovg eax, ebx
mov edx, ebx
mov dword [esp + 0xc], eax
mov eax, 0x4000
cmovg edx, esi
cmp dword [esp + 0x38], eax
mov eax, 0
mov dword [esp + 8], edx
je 0x10155cb0
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x30], 0
je 0x10155c9a
movsd xmm1, qword [eax]
movsd xmm0, qword [edx]
xor ebx, ebx
shufps xmm1, xmm1, 0xe1
mulps xmm1, xmm0
movaps xmm0, xmm1
shufps xmm0, xmm1, 0xe5
subss xmm1, xmm0
xorps xmm0, xmm0
ucomiss xmm0, xmm1
seta bl
push 1
push ebx
push dword [esp + 0x3c]
call fcn.1015c611
mov edx, dword [esp + 0x14]
mov eax, ebx
add esp, 0xc
jmp 0x10155cac
mov edx, ecx
sub edx, dword [esp + 0x5c]
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
sar ebx, 1
cmp ecx, ebx
cmovle ebx, ecx
xor edx, edx
test ebx, ebx
cmovs ebx, edx
mov edx, dword [esp + 0x20]
sub ecx, ebx
mov dword [esp + 4], ecx
mov eax, dword [edx + 0x20]
sub eax, dword [esp + 8]
cmp ebx, ecx
mov dword [edx + 0x20], eax
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 8], eax
jge 0x10155be7
mov ecx, dword [ebp + 0x14]
movaps xmm0, xmm2
sar eax, cl
mov ecx, edx
mov edx, esi
push eax
mov eax, 0
push eax
push eax
mov eax, dword [ebp + 0x1c]
push eax
mov eax, 0
push eax
push dword [ebp + 0x14]
push dword [esp + 0x1c]
push edi
call fcn.1015560d
add esp, 0x20
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 4]
movss xmm0, dword [0x10187150]
mov eax, dword [eax + 0x20]
sub eax, dword [esp + 0x1c]
lea ecx, [eax + edx]
lea eax, [eax + edx - 0x18]
cmp ecx, 0x18
mov ecx, 0
cmovle eax, ecx
cmp dword [esp + 0xc], 0x4000
cmove eax, ecx
mov ecx, dword [esp + 0x20]
add eax, ebx
mov ebx, dword [esp + 0x14]
mov edx, ebx
push dword [esp + 8]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push edi
call fcn.1015560d
mov ecx, dword [esp + 0x40]
add esp, 0x20
or eax, dword [esp + 0x18]
jmp 0x10155c91
mov ecx, edx
movss xmm0, dword [0x10187150]
mov edx, dword [esp + 0x14]
push eax
push dword [ebp + 0x24]
push dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
push eax
push dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push eax
push ebx
push edi
movss dword [esp + 0x38], xmm2
call fcn.1015560d
add esp, 0x20
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
movss xmm0, dword [esp + 0x18]
mov edx, esi
mov eax, dword [eax + 0x20]
sub eax, dword [esp + 0x1c]
lea ecx, [eax + ebx]
lea eax, [eax + ebx - 0x18]
mov ebx, dword [esp + 0x14]
cmp ecx, 0x18
mov ecx, 0
cmovle eax, ecx
mov ecx, dword [esp + 0xc]
test ecx, ecx
cmove eax, ecx
mov ecx, dword [ebp + 0x14]
add eax, dword [esp + 4]
sar dword [esp + 8], cl
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], eax
push dword [esp + 8]
mov eax, 0
push eax
mov eax, 0
push eax
push dword [ebp + 0x1c]
mov eax, 0
push eax
push dword [ebp + 0x14]
push dword [esp + 0x1c]
push edi
call fcn.1015560d
mov ecx, dword [esp + 0x40]
add esp, 0x20
or eax, dword [esp + 0x30]
mov dword [esp + 4], eax
jmp 0x10155d96
push 1
push dword [esp + 0x38]
call fcn.1015210c
mov edx, dword [esp + 0x10]
add esp, 8
mov ecx, dword [esp + 0x20]
movss xmm0, dword [0x10187150]
add eax, eax
xor ebx, ebx
inc ebx
sub ebx, eax
push dword [esp + 0x1c]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [esp + 0x1c]
push 2
call fcn.1015560d
add esp, 0x20
mov ecx, dword [esp + 8]
xorps xmm0, xmm0
cvtsi2ss xmm0, ebx
neg ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0xc]
xorps xmm1, xmm1
cvtsi2ss xmm1, ebx
mulss xmm1, dword [ecx + 4]
movss dword [eax], xmm1
mulss xmm0, dword [ecx]
xor ecx, ecx
movss dword [eax + 4], xmm0
mov eax, dword [esp + 0x20]
cmp dword [eax + 4], ecx
je 0x10155d90
mov ebx, dword [esp + 0x14]
movss xmm3, dword [esp + 0x10]
movss xmm1, dword [esp + 0x18]
mov ecx, eax
movss xmm0, dword [ebx]
mulss xmm0, xmm3
movss dword [ebx], xmm0
movss xmm0, dword [ebx + 4]
mulss xmm0, xmm3
movss dword [ebx + 4], xmm0
movss xmm0, dword [esi]
mulss xmm0, xmm1
movss dword [esi], xmm0
mulss xmm1, dword [esi + 4]
movss dword [esi + 4], xmm1
movss xmm1, dword [ebx]
movaps xmm2, xmm1
subss xmm2, xmm0
movss dword [ebx], xmm2
addss xmm1, dword [esi]
movss dword [esi], xmm1
movss xmm0, dword [ebx + 4]
movaps xmm1, xmm0
subss xmm1, dword [esi + 4]
movss dword [ebx + 4], xmm1
addss xmm0, dword [esi + 4]
movss dword [esi + 4], xmm0
jmp 0x10155d9c
mov ebx, dword [esp + 0x14]
mov ecx, eax
movss xmm3, dword [esp + 0x10]
cmp dword [ecx + 4], 0
je 0x10155f18
cmp edi, 2
je 0x10155ef5
xorps xmm0, xmm0
test edi, edi
jle 0x10155dd4
xor eax, eax
movss xmm1, dword [esi + eax*4]
movss xmm2, dword [ebx + eax*4]
inc eax
cmp edi, eax
unpcklps xmm2, xmm1
shufps xmm1, xmm1, 0xe0
mulps xmm1, xmm2
addps xmm0, xmm1
jne 0x10155db8
movaps xmm1, xmm3
movaps xmm2, xmm3
mulss xmm1, xmm0
mulss xmm2, xmm3
shufps xmm0, xmm0, 0xe5
addss xmm0, xmm2
movss xmm2, dword [0x101c5cb8]
addss xmm1, xmm1
movaps xmm4, xmm0
addss xmm4, xmm1
ucomiss xmm2, xmm4
ja 0x10155e21
subss xmm0, xmm1
ucomiss xmm2, xmm0
ja 0x10155e21
cvtss2sd xmm0, xmm0
xorps xmm2, xmm2
ucomisd xmm0, xmm2
jb 0x10155e38
xorps xmm1, xmm1
sqrtsd xmm1, xmm0
jmp 0x10155e5f
lea eax, [edi*4]
push eax
push ebx
push esi
call fcn.101613e0
add esp, 0xc
jmp 0x10155ef5
sub esp, 8
movsd qword [esp], xmm0
movaps xmmword [esp + 0x28], xmm4
call fcn.1016bee0
movaps xmm4, xmmword [esp + 0x28]
xorps xmm2, xmm2
add esp, 8
fstp qword [esp + 0x48]
movsd xmm1, qword [esp + 0x48]
xorps xmm0, xmm0
cvtss2sd xmm0, xmm4
ucomisd xmm0, xmm2
jb 0x10155e75
xorps xmm2, xmm2
sqrtsd xmm2, xmm0
jmp 0x10155e9b
sub esp, 8
movsd qword [esp], xmm0
movsd qword [esp + 0x28], xmm1
call fcn.1016bee0
movsd xmm1, qword [esp + 0x28]
add esp, 8
fstp qword [esp + 0x40]
movsd xmm2, qword [esp + 0x40]
movss xmm5, dword [esp + 0x10]
test edi, edi
jle 0x10155f18
movss xmm0, dword [0x10187150]
xorps xmm3, xmm3
cvtsd2ss xmm3, xmm1
cvtsd2ss xmm2, xmm2
xor eax, eax
movaps xmm1, xmm0
divss xmm0, xmm2
divss xmm1, xmm3
movss xmm2, dword [ebx + eax*4]
movss xmm3, dword [esi + eax*4]
mulss xmm2, xmm5
movaps xmm4, xmm2
addss xmm2, xmm3
subss xmm4, xmm3
mulss xmm2, xmm0
mulss xmm4, xmm1
movss dword [ebx + eax*4], xmm4
movss dword [esi + eax*4], xmm2
inc eax
cmp edi, eax
jne 0x10155ec5
cmp dword [esp + 0x3c], 0
je 0x10155f18
test edi, edi
jle 0x10155f18
movaps xmm0, xmmword [0x10187140]
movss xmm1, dword [esi]
xorps xmm1, xmm0
movss dword [esi], xmm1
add esi, 4
dec edi
jne 0x10155f07
mov esi, dword [esp + 4]
mov ecx, dword [esp + 0x68]
xor ecx, ebp
call fcn.1015e65c
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret