Function at 0x4bf200
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 0x4bf291
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
test esi, esi
jle 0x4bf2ec
push ecx
push ebx
lea eax, [esp + 0x18]
push edi
push eax
call fcn.004bd7d0
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 0x4bf271
push edx
push edi
call fcn.004bf200
mov edi, ebp
jmp 0x4bf27c
push ebx
push ebp
call fcn.004bf200
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 0x4bf225
cmp edi, ebx
je 0x4bf43d
lea esi, [edi + 4]
cmp esi, ebx
je 0x4bf43d
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 0x4bf400
lea ecx, [eax - 4]
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 4
push edi
push eax
call fcn.006d8770
add esp, 0xc
mov dword [edi], ebp
jmp 0x4bf42e
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 0x4bf3b8
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 0x4bf352
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 0x4bf321
cmp edx, ebp
jne 0x4bf365
test bl, 1
jne 0x4bf365
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 0x4bf39d
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 0x4bf39d
mov dword [edi + edx*4], ecx
mov edx, eax
dec eax
sar eax, 1
cmp esi, edx
jl 0x4bf380
mov eax, dword [esp + 0x1c]
mov dword [edi + edx*4], eax
test esi, esi
jg 0x4bf310
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x4bf43d
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.004bdf40
mov ecx, dword [esp + 0x3c]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffc
cmp eax, 8
jge 0x4bf3c1
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 0x4bf42c
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 0x4bf414
mov dword [edx], ebp
mov eax, dword [esp + 0x20]
add esi, 4
cmp esi, ebx
jne 0x4bf2b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret