Function at 0x57efc0
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 0x57f051
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x57f0ce
push ecx
push ebx
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.0057d4f0
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 0x57f031
push edx
push edi
call fcn.0057efc0
mov edi, ebp
jmp 0x57f03c
push ebx
push ebp
call fcn.0057efc0
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 0x57efe5
cmp edi, ebx
je 0x57f27e
lea esi, [edi + 4]
cmp esi, ebx
je 0x57f27e
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 + 0x8b6930]
mov eax, dword [edi]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x8b6930]
comisd xmm1, xmm0
jbe 0x57f21f
add ecx, 0xfffffffc
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 4
push edi
push eax
call fcn.0086cdf0
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [edi], eax
jmp 0x57f26f
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 0x57f1d0
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 0x57f152
add ecx, ecx
mov eax, dword [edi + ecx*4 + 8]
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x8b6930]
mov eax, dword [edi + ecx*4 + 4]
movd xmm0, eax
shr eax, 0x1f
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x8b6930]
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 0x57f105
cmp edx, esi
jne 0x57f165
test bl, 1
jne 0x57f165
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 0x57f1b5
mov eax, dword [esp + 0x20]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x8b6930]
mov esi, dword [edi + ecx*4]
mov eax, esi
shr eax, 0x1f
movd xmm0, esi
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x8b6930]
comisd xmm0, xmm1
jbe 0x57f1b1
mov dword [edi + edx*4], esi
mov edx, ecx
dec ecx
sar ecx, 1
cmp ebp, edx
jl 0x57f186
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [edi + edx*4], eax
test ebp, ebp
jg 0x57f0f4
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x57f27e
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.0057db60
mov ecx, dword [esp + 0x40]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffc
cmp eax, 8
jge 0x57f1e0
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 + 0x8b6930]
comisd xmm1, xmm0
jbe 0x57f268
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 + 0x8b6930]
comisd xmm1, xmm0
ja 0x57f241
mov eax, dword [esp + 0x24]
mov dword [ebp], eax
mov ecx, dword [esp + 0x20]
add esi, 4
cmp esi, ebx
jne 0x57f070
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret