Function at 0x4e0d60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x14]
mov eax, ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
sub eax, edi
and eax, 0xfffffffc
cmp eax, 0x80
jle 0x4e0df1
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
test esi, esi
jle 0x4e0e4c
push ecx
push ebx
lea eax, [esp + 0x18]
push edi
push eax
call fcn.004df330
mov edx, dword [esp + 0x20]
mov eax, esi
mov ebp, dword [esp + 0x24]
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 + 0x28]
push eax
push esi
jge 0x4e0dd1
push edx
push edi
call fcn.004e0d60
mov edi, ebp
jmp 0x4e0ddc
push ebx
push ebp
call fcn.004e0d60
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov eax, ebx
sub eax, edi
add esp, 0x10
and eax, 0xfffffffc
cmp eax, 0x80
jg 0x4e0d85
cmp edi, ebx
je 0x4e0f9d
lea esi, [edi + 4]
cmp esi, ebx
je 0x4e0f9d
mov eax, 4
sub eax, edi
mov dword [esp + 0x20], eax
nop
mov ebp, dword [esi]
mov edx, esi
movd xmm0, dword [edi]
cvtdq2pd xmm0, xmm0
movd xmm1, ebp
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm0
jbe 0x4e0f60
lea ecx, [eax - 4]
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 4
push edi
push eax
call fcn.0067d850
add esp, 0xc
mov dword [edi], ebp
jmp 0x4e0f8e
sub ebx, edi
mov eax, ebx
mov dword [esp + 0x20], ebx
sar eax, 2
mov esi, eax
mov dword [esp + 0x10], eax
sar esi, 1
test esi, esi
jle 0x4e0f18
mov ebx, eax
lea ebp, [ebx - 1]
sar ebp, 1
nop
mov eax, dword [edi + esi*4 - 4]
dec esi
mov dword [esp + 0x1c], eax
mov edx, esi
mov ecx, esi
cmp esi, ebp
jge 0x4e0eb2
add ecx, ecx
xor eax, eax
movd xmm1, dword [edi + ecx*4 + 8]
movd xmm0, dword [edi + ecx*4 + 4]
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
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, ebp
jl 0x4e0e81
cmp edx, ebp
jne 0x4e0ec5
test bl, 1
jne 0x4e0ec5
mov eax, dword [edi + ebx*4 - 4]
mov dword [edi + edx*4], eax
lea edx, [ebx - 1]
lea eax, [edx - 1]
sar eax, 1
cmp esi, edx
jge 0x4e0efd
movd xmm1, dword [esp + 0x1c]
cvtdq2pd xmm1, xmm1
nop dword [eax + eax]
mov ecx, dword [edi + eax*4]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
comisd xmm0, xmm1
jbe 0x4e0efd
mov dword [edi + edx*4], ecx
mov edx, eax
dec eax
sar eax, 1
cmp esi, edx
jl 0x4e0ee0
mov eax, dword [esp + 0x1c]
mov dword [edi + edx*4], eax
test esi, esi
jg 0x4e0e70
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x4e0f9d
mov eax, dword [edi + ebx - 4]
mov dword [esp + 0x20], eax
mov eax, dword [edi]
mov dword [edi + ebx - 4], eax
lea eax, [esp + 0x20]
push ecx
push eax
lea eax, [ebx - 4]
sar eax, 2
push eax
push 0
push edi
call fcn.004dfaa0
mov ecx, dword [esp + 0x3c]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffc
cmp eax, 8
jge 0x4e0f21
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ecx, dword [esi - 4]
lea eax, [esi - 4]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
jbe 0x4e0f8c
mov dword [edx], ecx
mov edx, eax
mov ecx, dword [eax - 4]
sub eax, 4
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
ja 0x4e0f74
mov dword [edx], ebp
mov eax, dword [esp + 0x20]
add esi, 4
cmp esi, ebx
jne 0x4e0e10
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret