Function at 0x4e0fb0
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 0x4e1041
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x4e10be
push ecx
push ebx
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.004df4e0
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 0x4e1021
push edx
push edi
call fcn.004e0fb0
mov edi, ebp
jmp 0x4e102c
push ebx
push ebp
call fcn.004e0fb0
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 0x4e0fd5
cmp edi, ebx
je 0x4e126e
lea esi, [edi + 4]
cmp esi, ebx
je 0x4e126e
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 + 0x6bc110]
mov eax, dword [edi]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6bc110]
comisd xmm1, xmm0
jbe 0x4e120f
add ecx, 0xfffffffc
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 4
push edi
push eax
call fcn.0067d850
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [edi], eax
jmp 0x4e125f
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 0x4e11c0
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 0x4e1142
add ecx, ecx
mov eax, dword [edi + ecx*4 + 8]
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x6bc110]
mov eax, dword [edi + ecx*4 + 4]
movd xmm0, eax
shr eax, 0x1f
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x6bc110]
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 0x4e10f5
cmp edx, esi
jne 0x4e1155
test bl, 1
jne 0x4e1155
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 0x4e11a5
mov eax, dword [esp + 0x20]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x6bc110]
mov esi, dword [edi + ecx*4]
mov eax, esi
shr eax, 0x1f
movd xmm0, esi
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x6bc110]
comisd xmm0, xmm1
jbe 0x4e11a1
mov dword [edi + edx*4], esi
mov edx, ecx
dec ecx
sar ecx, 1
cmp ebp, edx
jl 0x4e1176
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [edi + edx*4], eax
test ebp, ebp
jg 0x4e10e4
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x4e126e
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.004dfb50
mov ecx, dword [esp + 0x40]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffc
cmp eax, 8
jge 0x4e11d0
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 + 0x6bc110]
comisd xmm1, xmm0
jbe 0x4e1258
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 + 0x6bc110]
comisd xmm1, xmm0
ja 0x4e1231
mov eax, dword [esp + 0x24]
mov dword [ebp], eax
mov ecx, dword [esp + 0x20]
add esi, 4
cmp esi, ebx
jne 0x4e1060
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret