Function at 0x10026740
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
mov eax, ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
sub eax, edi
and eax, 0xfffffffc
cmp eax, 0x80
jle 0x100267d1
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x1002684e
push ecx
push ebx
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.10024c70
mov edx, dword [esp + 0x24]
mov eax, esi
mov ebp, dword [esp + 0x28]
mov ecx, ebx
sar eax, 2
add esp, 0x10
sar esi, 1
sub ecx, ebp
add esi, eax
and ecx, 0xfffffffc
mov eax, edx
sub eax, edi
and eax, 0xfffffffc
cmp eax, ecx
mov eax, dword [esp + 0x2c]
push eax
push esi
jge 0x100267b1
push edx
push edi
call fcn.10026740
mov edi, ebp
jmp 0x100267bc
push ebx
push ebp
call fcn.10026740
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov eax, ebx
sub eax, edi
add esp, 0x10
and eax, 0xfffffffc
cmp eax, 0x80
jg 0x10026765
cmp edi, ebx
je 0x100269fe
lea esi, [edi + 4]
cmp esi, ebx
je 0x100269fe
mov ecx, 4
sub ecx, edi
mov dword [esp + 0x20], ecx
nop
mov eax, dword [esi]
mov ebp, esi
mov dword [esp + 0x24], eax
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x1008f6c0]
mov eax, dword [edi]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1008f6c0]
comisd xmm1, xmm0
jbe 0x1002699f
add ecx, 0xfffffffc
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 4
push edi
push eax
call fcn.1006e070
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [edi], eax
jmp 0x100269ef
sub ebx, edi
mov eax, ebx
mov dword [esp + 0x24], ebx
sar eax, 2
mov ebp, eax
mov dword [esp + 0x10], eax
sar ebp, 1
test ebp, ebp
jle 0x10026950
mov ebx, eax
lea esi, [ebx - 1]
sar esi, 1
mov dword [esp + 0x14], esi
mov eax, dword [edi + ebp*4 - 4]
dec ebp
mov dword [esp + 0x20], eax
mov edx, ebp
mov ecx, ebp
cmp ebp, esi
jge 0x100268d2
add ecx, ecx
mov eax, dword [edi + ecx*4 + 8]
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x1008f6c0]
mov eax, dword [edi + ecx*4 + 4]
movd xmm0, eax
shr eax, 0x1f
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1008f6c0]
xor eax, eax
comisd xmm1, xmm0
seta al
xor eax, 1
inc eax
add ecx, eax
mov eax, dword [edi + ecx*4]
mov dword [edi + edx*4], eax
mov edx, ecx
cmp ecx, esi
jl 0x10026885
cmp edx, esi
jne 0x100268e5
test bl, 1
jne 0x100268e5
mov eax, dword [edi + ebx*4 - 4]
mov dword [edi + edx*4], eax
lea edx, [ebx - 1]
lea ecx, [edx - 1]
sar ecx, 1
cmp ebp, edx
jge 0x10026935
mov eax, dword [esp + 0x20]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x1008f6c0]
mov esi, dword [edi + ecx*4]
mov eax, esi
shr eax, 0x1f
movd xmm0, esi
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1008f6c0]
comisd xmm0, xmm1
jbe 0x10026931
mov dword [edi + edx*4], esi
mov edx, ecx
dec ecx
sar ecx, 1
cmp ebp, edx
jl 0x10026906
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [edi + edx*4], eax
test ebp, ebp
jg 0x10026874
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x100269fe
nop dword [eax]
mov eax, dword [edi + ebx - 4]
mov dword [esp + 0x24], eax
mov eax, dword [edi]
mov dword [edi + ebx - 4], eax
lea eax, [esp + 0x24]
push ecx
push eax
lea eax, [ebx - 4]
sar eax, 2
push eax
push 0
push edi
call fcn.100252e0
mov ecx, dword [esp + 0x40]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffc
cmp eax, 8
jge 0x10026960
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [esi - 4]
lea edx, [esi - 4]
mov eax, ecx
shr eax, 0x1f
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1008f6c0]
comisd xmm1, xmm0
jbe 0x100269e8
mov dword [ebp], ecx
mov ebp, edx
mov ecx, dword [edx - 4]
sub edx, 4
mov eax, ecx
shr eax, 0x1f
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1008f6c0]
comisd xmm1, xmm0
ja 0x100269c1
mov eax, dword [esp + 0x24]
mov dword [ebp], eax
mov ecx, dword [esp + 0x20]
add esi, 4
cmp esi, ebx
jne 0x100267f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret