Function at 0x57f7f0
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 0x57f9ec
mov ecx, dword [ebp + 0x14]
mov eax, edi
sub eax, ebx
cmp dword [ebp + 0x10], 0
jle 0x57fa4c
sar eax, 4
push ecx
lea esi, [ebx + eax*8]
lea eax, [edi - 8]
push eax
push esi
push ebx
call fcn.0057ccf0
add esp, 0x10
lea edi, [esi + 8]
cmp ebx, esi
jae 0x57f864
movsd xmm0, qword [esi]
movsd xmm1, qword [esi - 8]
comisd xmm1, xmm0
ja 0x57f864
movsd xmm0, qword [esi]
comisd xmm0, xmm1
ja 0x57f864
add esi, 0xfffffff8
movaps xmm0, xmm1
cmp ebx, esi
jb 0x57f845
mov eax, dword [ebp + 0xc]
cmp edi, eax
jae 0x57f887
movsd xmm1, qword [esi]
nop
movsd xmm0, qword [edi]
comisd xmm0, xmm1
ja 0x57f887
comisd xmm1, xmm0
ja 0x57f887
add edi, 8
cmp edi, eax
jb 0x57f870
mov edx, dword [ebp + 0xc]
mov eax, edi
mov ecx, esi
nop
cmp eax, edx
jae 0x57f8c5
movsd xmm0, qword [esi]
movsd xmm1, qword [eax]
comisd xmm0, xmm1
ja 0x57f8be
comisd xmm1, xmm0
ja 0x57f8c5
mov edx, dword [ebp + 0xc]
cmp edi, eax
je 0x57f8bb
movsd xmm0, qword [edi]
movsd qword [edi], xmm1
movsd qword [eax], xmm0
add edi, 8
add eax, 8
cmp eax, edx
jb 0x57f894
cmp ecx, ebx
jbe 0x57f906
lea edx, [ecx - 8]
nop dword [eax]
movsd xmm1, qword [edx]
movsd xmm0, qword [esi]
comisd xmm1, xmm0
ja 0x57f8f7
comisd xmm0, xmm1
ja 0x57f901
sub esi, 8
cmp esi, edx
je 0x57f8f7
movsd xmm0, qword [esi]
movsd qword [esi], xmm1
movsd qword [edx], xmm0
sub ecx, 8
sub edx, 8
cmp ebx, ecx
jb 0x57f8d0
mov edx, dword [ebp + 0xc]
cmp ecx, ebx
jne 0x57f942
cmp eax, edx
je 0x57f991
cmp edi, eax
je 0x57f924
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 0x57f890
add ecx, 0xfffffff8
cmp eax, edx
jne 0x57f979
sub esi, 8
cmp ecx, esi
je 0x57f960
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 0x57f890
movsd xmm1, qword [eax]
movsd xmm0, qword [ecx]
movsd qword [eax], xmm0
add eax, 8
movsd qword [ecx], xmm1
jmp 0x57f890
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 0x57f9c6
push esi
push ebx
call fcn.0057f7f0
mov ebx, edi
mov edi, dword [ebp + 0xc]
jmp 0x57f9d4
push dword [ebp + 0xc]
push edi
call fcn.0057f7f0
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 0x57f817
cmp ebx, edi
je 0x57fb8a
lea esi, [ebx + 8]
cmp esi, edi
je 0x57fb8a
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 0x57fb55
lea ecx, [eax - 8]
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 8
push ebx
push eax
call fcn.0086cdf0
movsd xmm0, qword [esp + 0x1c]
add esp, 0xc
movsd qword [ebx], xmm0
jmp 0x57fb7b
sar eax, 3
mov esi, eax
mov dword [esp + 0xc], eax
sar esi, 1
test esi, esi
jle 0x57fb00
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 0x57faad
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 0x57fa80
mov eax, dword [esp + 0xc]
cmp edx, edi
jne 0x57fac4
test al, 1
jne 0x57fac4
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 0x57fae9
nop dword [eax]
movsd xmm0, qword [ebx + eax*8]
comisd xmm0, xmm1
jbe 0x57fae9
movsd qword [ebx + edx*8], xmm0
mov edx, eax
dec eax
sar eax, 1
cmp esi, edx
jl 0x57fad0
mov eax, dword [esp + 0xc]
movsd qword [ebx + edx*8], xmm1
test esi, esi
jg 0x57fa70
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov eax, edi
sub eax, ebx
and eax, 0xfffffff8
cmp eax, 0x10
jl 0x57fb8a
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.0057dd00
mov ecx, dword [ebp + 0x14]
add edi, 0xfffffff8
mov eax, edi
add esp, 0x14
and eax, 0xfffffff8
cmp eax, 0x10
jge 0x57fb10
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 0x57fb77
movsd qword [ecx], xmm0
mov ecx, eax
movsd xmm0, qword [eax - 8]
sub eax, 8
comisd xmm1, xmm0
ja 0x57fb63
movsd qword [ecx], xmm1
mov eax, dword [esp + 0x18]
add esi, 8
cmp esi, edi
jne 0x57fa10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret