Function at 0x52ea30
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movaps xmmword [rsp + 0x30], xmm6
movaps xmmword [rsp + 0x40], xmm7
mov esi, dword [r8 + 0x28]
mov qword [rsp + 0xa0], rcx
mov rdi, rdx
mov rbx, r8
test esi, esi
jne 0x52ea90
mov dword [rcx + 8], 0
mov eax, 1
movaps xmm6, xmmword [rsp + 0x30]
movaps xmm7, xmmword [rsp + 0x40]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea r12d, [rsi + rsi]
mov rcx, rdi
mov edx, r12d
call fcn.0052e860
test rax, rax
je 0x52ed20
mov eax, dword [rbx + 0x30]
mov r14, qword [rbx + 0x20]
xor dword [rdi + 0x10], eax
mov r15, qword [rdi]
mov r8d, dword [rdi + 8]
test r12d, r12d
jle 0x52eba8
lea eax, [r12 - 1]
cmp eax, 2
jbe 0x52edb7
mov edx, r12d
movd xmm3, r8d
pxor xmm5, xmm5
mov rax, r15
shr edx, 2
pshufd xmm7, xmm3, 0
movdqa xmm6, xmmword [0x008f0090]
pxor xmm4, xmm4
shl rdx, 5
movdqa xmm3, xmmword [0x008f0080]
add rdx, r15
nop word [rax + rax]
movdqa xmm0, xmm3
movdqa xmm1, xmm4
paddd xmm3, xmm6
add rax, 0x20
psubd xmm0, xmm7
psrld xmm0, 0x1f
movdqa xmm2, xmm0
punpckldq xmm0, xmm5
punpckhdq xmm2, xmm5
psubq xmm1, xmm2
movdqu xmm2, xmmword [rax - 0x10]
pand xmm1, xmm2
movdqa xmm2, xmm4
psubq xmm2, xmm0
movdqu xmm0, xmmword [rax - 0x20]
movups xmmword [rax - 0x10], xmm1
pand xmm0, xmm2
movups xmmword [rax - 0x20], xmm0
cmp rax, rdx
jne 0x52eb08
mov eax, r12d
and eax, 0xfffffffc
test r12b, 3
je 0x52eba8
mov edx, eax
movsxd r9, eax
add eax, 1
sub edx, r8d
shr edx, 0x1f
neg rdx
and qword [r15 + r9*8], rdx
cmp r12d, eax
jle 0x52eba8
mov edx, eax
movsxd r9, eax
add eax, 1
sub edx, r8d
shr edx, 0x1f
neg rdx
and qword [r15 + r9*8], rdx
cmp r12d, eax
jle 0x52eba8
movsxd rdx, eax
sub eax, r8d
shr eax, 0x1f
neg rax
and qword [r15 + rdx*8], rax
mov dword [rdi + 8], r12d
mov r12, qword [rbx + 0x50]
test esi, esi
jle 0x52ed68
lea eax, [rsi - 1]
movsxd r10, esi
xor ebx, ebx
mov dword [rsp + 0x2c], eax
mov eax, esi
lea r13, [r10*8]
mov qword [rsp + 0x20], rax
lea rbp, [r15 + rax*8]
nop word [rax + rax]
mov r9, qword [r15]
mov r8d, esi
mov rdx, r14
mov rcx, r15
imul r9, r12
call fcn.0061ffc0
mov r8, qword [r15 + r13]
xor edx, edx
add rax, rbx
add rax, r8
cmp r8, rax
mov qword [r15 + r13], rax
setne dl
or rbx, rdx
xor edx, edx
cmp r8, rax
setae dl
add r15, 8
and rbx, rdx
cmp r15, rbp
jne 0x52ebe0
mov rcx, qword [rsp + 0xa0]
mov edx, esi
call fcn.0052e860
test rax, rax
je 0x52ed20
mov rax, qword [rsp + 0xa0]
mov r12, qword [rdi]
mov r9d, esi
mov r8, r14
mov rcx, qword [rsp + 0xa0]
mov dword [rax + 8], esi
mov eax, dword [rdi + 0x10]
lea rdi, [r12 + r13]
mov rbp, qword [rcx]
mov rdx, rdi
mov dword [rcx + 0x10], eax
mov rcx, rbp
call fcn.006202c0
mov rcx, rbx
sub rcx, rax
lea rax, [r12 + r13 + 0x10]
cmp rbp, rax
lea rax, [rbp + 0x10]
setae dl
cmp rdi, rax
setae al
or dl, al
je 0x52ed30
cmp dword [rsp + 0x2c], 1
jbe 0x52ed30
mov edx, esi
movq xmm2, rcx
pxor xmm1, xmm1
xor eax, eax
shr edx, 1
punpcklqdq xmm2, xmm2
shl rdx, 4
nop dword [rax + rax]
movdqu xmm6, xmmword [rbp + rax]
movdqu xmm0, xmmword [rdi + rax]
pxor xmm0, xmm6
pand xmm0, xmm2
pxor xmm0, xmm6
movups xmmword [rbp + rax], xmm0
movups xmmword [rdi + rax], xmm1
add rax, 0x10
cmp rdx, rax
jne 0x52ecb8
mov eax, esi
and eax, 0xfffffffe
and esi, 1
je 0x52ed0e
shl rax, 3
add rdi, rax
add rax, rbp
mov rdx, qword [rax]
mov rbx, qword [rdi]
xor rbx, rdx
and rbx, rcx
xor rbx, rdx
mov qword [rax], rbx
mov qword [rdi], 0
mov eax, 1
jmp 0x52ea6c
xor eax, eax
jmp 0x52ea6c
xor eax, eax
nop word [rax + rax]
mov r8, qword [rbp + rax*8]
mov rdx, qword [rdi + rax*8]
xor rdx, r8
and rdx, rcx
xor rdx, r8
mov qword [rbp + rax*8], rdx
mov qword [rdi + rax*8], 0
add rax, 1
cmp rax, qword [rsp + 0x20]
jne 0x52ed38
jmp 0x52ed0e
mov rcx, qword [rsp + 0xa0]
mov edx, esi
call fcn.0052e860
test rax, rax
je 0x52ed20
mov rax, qword [rsp + 0xa0]
movsxd rdx, esi
mov r9d, esi
mov r8, r14
mov rcx, qword [rsp + 0xa0]
mov dword [rax + 8], esi
mov eax, dword [rdi + 0x10]
mov dword [rcx + 0x10], eax
mov rax, qword [rdi]
mov rcx, qword [rcx]
lea rdx, [rax + rdx*8]
call fcn.006202c0
mov eax, 1
jmp 0x52ea6c
mov eax, r8d
neg eax
shr eax, 0x1f
neg rax
and qword [r15], rax
mov eax, 1
jmp 0x52eb7e