Function at 0x18001cbe0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x20
mov ebp, dword [rdx]
mov r15, rdx
mov r12d, dword [r8]
mov r14, r8
cmp ebp, r12d
mov dword [rsp + 0x58], r12d
mov edi, r12d
mov ebx, r12d
cmova edi, ebp
mov rsi, rcx
sub ebx, edi
mov edx, edi
add ebx, ebp
call fcn.18001aa40
test eax, eax
jne 0x18001cfdd
mov qword [rsp + 0x50], r13
mov r9d, eax
mov dword [rsi], edi
test ebx, ebx
je 0x18001cd85
cmp ebx, 0x10
jb 0x18001cd44
mov rdx, qword [rsi + 8]
lea eax, [rbx - 1]
mov r10, qword [r14 + 8]
lea r12, [rax*4]
lea r13, [r14 + 8]
lea rcx, [r12 + rdx]
lea rax, [r12 + r10]
cmp rdx, rax
ja 0x18001cc70
cmp rcx, r10
jae 0x18001cd3f
mov r8, qword [r15 + 8]
lea r11, [r15 + 8]
lea rax, [r12 + r8]
cmp rdx, rax
ja 0x18001cc8a
cmp rcx, r8
jae 0x18001cd3f
cmp rdx, r13
ja 0x18001cc98
cmp rcx, r13
jae 0x18001cd3f
cmp rdx, r11
ja 0x18001cca6
cmp rcx, r11
jae 0x18001cd3f
lea rax, [rsi + 8]
cmp rdx, rax
ja 0x18001ccb8
cmp rcx, rax
jae 0x18001cd3f
mov r11d, ebx
and r11d, 0xfffffff0
mov r13d, 8
nop word [rax + rax]
mov eax, r9d
add r9d, 0x10
movdqu xmm0, xmmword [r8 + rax*4]
movdqu xmm1, xmmword [r10 + rax*4]
pxor xmm1, xmm0
movdqu xmmword [rdx + rax*4], xmm1
lea eax, [r13 - 4]
movdqu xmm0, xmmword [r8 + rax*4]
movdqu xmm1, xmmword [r10 + rax*4]
pxor xmm1, xmm0
movdqu xmmword [rdx + rax*4], xmm1
mov eax, r13d
movdqu xmm0, xmmword [r8 + rax*4]
movdqu xmm1, xmmword [r10 + rax*4]
pxor xmm1, xmm0
movdqu xmmword [rdx + rax*4], xmm1
lea eax, [r13 + 4]
add r13d, 0x10
movdqu xmm1, xmmword [r8 + rax*4]
movdqu xmm0, xmmword [r10 + rax*4]
pxor xmm1, xmm0
movdqu xmmword [rdx + rax*4], xmm1
cmp r9d, r11d
jb 0x18001ccd0
mov r12d, dword [rsp + 0x58]
cmp r9d, ebx
jae 0x18001cd85
mov eax, r9d
lea r8, [rax*4]
mov eax, ebx
sub eax, r9d
mov r9d, eax
nop dword [rax]
mov rax, qword [r14 + 8]
lea r8, [r8 + 4]
mov rcx, qword [r15 + 8]
mov edx, dword [r8 + rcx - 4]
xor edx, dword [r8 + rax - 4]
mov rax, qword [rsi + 8]
mov dword [r8 + rax - 4], edx
sub r9, 1
jne 0x18001cd60
cmp ebp, r12d
je 0x18001cfbd
mov r11d, edi
cmp ebx, ebp
jae 0x18001ceb2
mov eax, dword [r14 + 0x10]
neg eax
sbb r10d, r10d
sub r11d, ebx
movd xmm1, r10d
pshufd xmm1, xmm1, 0
cmp ebx, edi
jae 0x18001cfbd
cmp r11d, 0x10
jb 0x18001ce70
mov r9, qword [rsi + 8]
lea eax, [rdi - 1]
mov r8, qword [r15 + 8]
lea r13, [rsi + 8]
lea r12, [r15 + 8]
lea rdx, [rbx*4]
lea rbp, [r9 + rax*4]
lea rax, [r8 + rax*4]
lea rcx, [rdx + r9]
cmp rcx, rax
ja 0x18001cdf6
lea rax, [rdx + r8]
cmp rbp, rax
jae 0x18001ce70
cmp rcx, r12
ja 0x18001ce00
cmp rbp, r12
jae 0x18001ce70
cmp rcx, r13
ja 0x18001ce0a
cmp rbp, r13
jae 0x18001ce70
and r11d, 0xf
mov ebp, edi
sub ebp, r11d
lea edx, [rbx + 8]
nop word [rax + rax]
movdqu xmm0, xmmword [r8 + rbx*4]
lea eax, [rdx - 4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rbx*4], xmm0
add ebx, 0x10
movdqu xmm0, xmmword [r8 + rax*4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rax*4], xmm0
lea eax, [rdx + 4]
movdqu xmm0, xmmword [r8 + rdx*4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rdx*4], xmm0
lea edx, [rdx + 0x10]
movdqu xmm0, xmmword [r8 + rax*4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rax*4], xmm0
cmp ebx, ebp
jb 0x18001ce20
cmp ebx, edi
jae 0x18001cfbd
sub edi, ebx
lea rdx, [rbx*4]
mov r8d, edi
nop word [rax + rax]
mov rax, qword [r15 + 8]
lea rdx, [rdx + 4]
mov ecx, dword [rdx + rax - 4]
mov rax, qword [rsi + 8]
xor ecx, r10d
mov dword [rdx + rax - 4], ecx
sub r8, 1
jne 0x18001ce90
jmp 0x18001cfbd
mov eax, dword [r15 + 0x10]
neg eax
sbb r10d, r10d
sub r11d, ebx
movd xmm1, r10d
pshufd xmm1, xmm1, 0
cmp ebx, edi
jae 0x18001cfbd
cmp r11d, 0x10
jb 0x18001cf80
mov r9, qword [rsi + 8]
lea eax, [rdi - 1]
mov r8, qword [r14 + 8]
lea r13, [rsi + 8]
lea r12, [r14 + 8]
lea rdx, [rbx*4]
lea rbp, [r9 + rax*4]
lea rax, [r8 + rax*4]
lea rcx, [rdx + r9]
cmp rcx, rax
ja 0x18001cf0f
lea rax, [rdx + r8]
cmp rbp, rax
jae 0x18001cf80
cmp rcx, r12
ja 0x18001cf19
cmp rbp, r12
jae 0x18001cf80
cmp rcx, r13
ja 0x18001cf23
cmp rbp, r13
jae 0x18001cf80
and r11d, 0xf
mov ebp, edi
sub ebp, r11d
lea edx, [rbx + 8]
nop
movdqu xmm0, xmmword [r8 + rbx*4]
lea eax, [rdx - 4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rbx*4], xmm0
add ebx, 0x10
movdqu xmm0, xmmword [r8 + rax*4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rax*4], xmm0
lea eax, [rdx + 4]
movdqu xmm0, xmmword [r8 + rdx*4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rdx*4], xmm0
lea edx, [rdx + 0x10]
movdqu xmm0, xmmword [r8 + rax*4]
pxor xmm0, xmm1
movdqu xmmword [r9 + rax*4], xmm0
cmp ebx, ebp
jb 0x18001cf30
cmp ebx, edi
jae 0x18001cfbd
sub edi, ebx
lea rdx, [rbx*4]
mov r8d, edi
nop dword [rax]
nop word [rax + rax]
mov rax, qword [r14 + 8]
lea rdx, [rdx + 4]
mov ecx, dword [rdx + rax - 4]
mov rax, qword [rsi + 8]
xor ecx, r10d
mov dword [rdx + rax - 4], ecx
sub r8, 1
jne 0x18001cfa0
mov r13, qword [rsp + 0x50]
xor ecx, ecx
cmp dword [r15 + 0x10], ecx
mov eax, ecx
sete al
cmp dword [r14 + 0x10], ecx
sete cl
xor eax, ecx
mov dword [rsi + 0x10], eax
xor eax, eax
jmp 0x18001cfe0
or eax, 0xffffffff
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret