Function at 0x4bfc80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, edi
sub eax, ebx
and eax, 0xfffffff8
cmp eax, 0x100
jle 0x4bfe7c
mov ecx, dword [ebp + 0x14]
mov eax, edi
sub eax, ebx
cmp dword [ebp + 0x10], 0
jle 0x4bfedc
sar eax, 4
push ecx
lea esi, [ebx + eax*8]
lea eax, [edi - 8]
push eax
push esi
push ebx
call fcn.004bd180
add esp, 0x10
lea edi, [esi + 8]
cmp ebx, esi
jae 0x4bfcf4
movsd xmm0, qword [esi]
movsd xmm1, qword [esi - 8]
comisd xmm1, xmm0
ja 0x4bfcf4
movsd xmm0, qword [esi]
comisd xmm0, xmm1
ja 0x4bfcf4
add esi, 0xfffffff8
movaps xmm0, xmm1
cmp ebx, esi
jb 0x4bfcd5
mov eax, dword [ebp + 0xc]
cmp edi, eax
jae 0x4bfd17
movsd xmm1, qword [esi]
nop
movsd xmm0, qword [edi]
comisd xmm0, xmm1
ja 0x4bfd17
comisd xmm1, xmm0
ja 0x4bfd17
add edi, 8
cmp edi, eax
jb 0x4bfd00
mov edx, dword [ebp + 0xc]
mov eax, edi
mov ecx, esi
nop
cmp eax, edx
jae 0x4bfd55
movsd xmm0, qword [esi]
movsd xmm1, qword [eax]
comisd xmm0, xmm1
ja 0x4bfd4e
comisd xmm1, xmm0
ja 0x4bfd55
mov edx, dword [ebp + 0xc]
cmp edi, eax
je 0x4bfd4b
movsd xmm0, qword [edi]
movsd qword [edi], xmm1
movsd qword [eax], xmm0
add edi, 8
add eax, 8
cmp eax, edx
jb 0x4bfd24
cmp ecx, ebx
jbe 0x4bfd96
lea edx, [ecx - 8]
nop dword [eax]
movsd xmm1, qword [edx]
movsd xmm0, qword [esi]
comisd xmm1, xmm0
ja 0x4bfd87
comisd xmm0, xmm1
ja 0x4bfd91
sub esi, 8
cmp esi, edx
je 0x4bfd87
movsd xmm0, qword [esi]
movsd qword [esi], xmm1
movsd qword [edx], xmm0
sub ecx, 8
sub edx, 8
cmp ebx, ecx
jb 0x4bfd60
mov edx, dword [ebp + 0xc]
cmp ecx, ebx
jne 0x4bfdd2
cmp eax, edx
je 0x4bfe21
cmp edi, eax
je 0x4bfdb4
movsd xmm0, qword [edi]
movsd xmm1, qword [esi]
movsd qword [esi], xmm0
movsd qword [edi], xmm1
movsd xmm0, qword [eax]
add edi, 8
movsd xmm1, qword [esi]
movsd qword [esi], xmm0
add esi, 8
movsd qword [eax], xmm1
add eax, 8
jmp 0x4bfd20
add ecx, 0xfffffff8
cmp eax, edx
jne 0x4bfe09
sub esi, 8
cmp ecx, esi
je 0x4bfdf0
movsd xmm0, qword [esi]
movsd xmm1, qword [ecx]
movsd qword [ecx], xmm0
movsd qword [esi], xmm1
movsd xmm0, qword [edi - 8]
sub edi, 8
movsd xmm1, qword [esi]
movsd qword [esi], xmm0
movsd qword [edi], xmm1
jmp 0x4bfd20
movsd xmm1, qword [eax]
movsd xmm0, qword [ecx]
movsd qword [eax], xmm0
add eax, 8
movsd qword [ecx], xmm1
jmp 0x4bfd20
mov edx, dword [ebp + 0x10]
mov eax, edx
mov ecx, dword [ebp + 0xc]
sar eax, 2
sub ecx, edi
sar edx, 1
and ecx, 0xfffffff8
add edx, eax
mov eax, esi
sub eax, ebx
mov dword [ebp + 0x10], edx
and eax, 0xfffffff8
cmp eax, ecx
mov eax, dword [ebp + 0x14]
push eax
push edx
jge 0x4bfe56
push esi
push ebx
call fcn.004bfc80
mov ebx, edi
mov edi, dword [ebp + 0xc]
jmp 0x4bfe64
push dword [ebp + 0xc]
push edi
call fcn.004bfc80
mov edi, esi
mov dword [ebp + 0xc], edi
mov ecx, dword [ebp + 0x14]
mov eax, edi
sub eax, ebx
add esp, 0x10
and eax, 0xfffffff8
cmp eax, 0x100
jg 0x4bfca7
cmp ebx, edi
je 0x4c001a
lea esi, [ebx + 8]
cmp esi, edi
je 0x4c001a
mov eax, 8
sub eax, ebx
mov dword [esp + 0x18], eax
nop word [eax + eax]
movsd xmm1, qword [esi]
mov ecx, esi
comisd xmm1, xmmword [ebx]
movsd qword [esp + 0x10], xmm1
jbe 0x4bffe5
lea ecx, [eax - 8]
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 8
push ebx
push eax
call fcn.006d8770
movsd xmm0, qword [esp + 0x1c]
add esp, 0xc
movsd qword [ebx], xmm0
jmp 0x4c000b
sar eax, 3
mov esi, eax
mov dword [esp + 0xc], eax
sar esi, 1
test esi, esi
jle 0x4bff90
lea ecx, [eax - 1]
mov dword [esp + 0x18], ecx
sar ecx, 1
mov dword [esp + 0x10], ecx
mov edi, ecx
nop
movsd xmm1, qword [ebx + esi*8 - 8]
dec esi
mov edx, esi
mov ecx, esi
cmp esi, edi
jge 0x4bff3d
nop
add ecx, ecx
xor eax, eax
movsd xmm0, qword [ebx + ecx*8 + 0x10]
comisd xmm0, xmmword [ebx + ecx*8 + 8]
seta al
inc ecx
xor eax, 1
add ecx, eax
movsd xmm0, qword [ebx + ecx*8]
movsd qword [ebx + edx*8], xmm0
mov edx, ecx
cmp ecx, edi
jl 0x4bff10
mov eax, dword [esp + 0xc]
cmp edx, edi
jne 0x4bff54
test al, 1
jne 0x4bff54
movsd xmm0, qword [ebx + eax*8 - 8]
movsd qword [ebx + edx*8], xmm0
mov edx, dword [esp + 0x18]
lea eax, [edx - 1]
sar eax, 1
cmp esi, edx
jge 0x4bff79
nop dword [eax]
movsd xmm0, qword [ebx + eax*8]
comisd xmm0, xmm1
jbe 0x4bff79
movsd qword [ebx + edx*8], xmm0
mov edx, eax
dec eax
sar eax, 1
cmp esi, edx
jl 0x4bff60
mov eax, dword [esp + 0xc]
movsd qword [ebx + edx*8], xmm1
test esi, esi
jg 0x4bff00
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov eax, edi
sub eax, ebx
and eax, 0xfffffff8
cmp eax, 0x10
jl 0x4c001a
sub edi, ebx
nop
movsd xmm0, qword [ebx + edi - 8]
lea eax, [esp + 0x18]
push ecx
push eax
lea eax, [edi - 8]
movsd qword [esp + 0x20], xmm0
movsd xmm0, qword [ebx]
sar eax, 3
push eax
push 0
push ebx
movsd qword [ebx + edi - 8], xmm0
call fcn.004be190
mov ecx, dword [ebp + 0x14]
add edi, 0xfffffff8
mov eax, edi
add esp, 0x14
and eax, 0xfffffff8
cmp eax, 0x10
jge 0x4bffa0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsd xmm0, qword [esi - 8]
lea eax, [esi - 8]
comisd xmm1, xmm0
jbe 0x4c0007
movsd qword [ecx], xmm0
mov ecx, eax
movsd xmm0, qword [eax - 8]
sub eax, 8
comisd xmm1, xmm0
ja 0x4bfff3
movsd qword [ecx], xmm1
mov eax, dword [esp + 0x18]
add esi, 8
cmp esi, edi
jne 0x4bfea0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret