Function at 0x1800cf9e0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov qword [rsp + 0x28], rdx
cmp rdx, 2
jb 0x1800cfefc
mov rax, qword [rsp + 0x28]
add rax, 0x10
cmp rax, r9
ja 0x1800cff0d
mov rax, qword [rsp + 0x28]
mov rdi, rax
shr rdi, 1
cmp rax, 0xf
jbe 0x1800cfa61
mov rbx, qword [rsp + 0x28]
lea rax, [r8 + rbx*8]
mov rsi, rcx
mov rdx, r8
mov r14, r8
mov r8, rax
call fcn.1800cef80
lea rcx, [rsi + rdi*8]
lea rdx, [r14 + rdi*8]
lea r8, [r14 + rbx*8]
add r8, 0x40
call fcn.1800cef80
mov rcx, rsi
mov r8, r14
mov eax, 8
jmp 0x1800cfcf6
cmp qword [rsp + 0x28], 7
jbe 0x1800cfce3
mov eax, dword [rcx + 8]
mov r9d, dword [rcx + 0xc]
xor r10d, r10d
cmp r9d, dword [rcx + 4]
setb r10b
xor r9d, r9d
cmp eax, dword [rcx]
setb r9b
cmove r9d, r10d
mov eax, dword [rcx + 0x18]
mov r10d, dword [rcx + 0x1c]
xor r11d, r11d
cmp r10d, dword [rcx + 0x14]
setb r11b
xor ebx, ebx
cmp eax, dword [rcx + 0x10]
setb bl
cmove ebx, r11d
movzx r9d, r9b
mov eax, r9d
xor al, 1
movzx r10d, al
lea rsi, [rcx + r10*8]
movzx edx, bl
lea r11d, [rdx + 2]
xor edx, 3
mov ebp, dword [rcx + r11*8]
mov ebx, dword [rcx + r11*8 + 4]
xor r14d, r14d
cmp ebx, dword [rcx + r9*8 + 4]
setb r14b
xor ebx, ebx
cmp ebp, dword [rcx + r9*8]
setb bl
cmove ebx, r14d
mov ebp, dword [rcx + rdx*8]
mov r14d, dword [rcx + rdx*8 + 4]
xor r15d, r15d
cmp r14d, dword [rcx + r10*8 + 4]
setb r15b
xor r12d, r12d
cmp ebp, dword [rcx + r10*8]
lea r13, [rcx + r11*8]
setb r12b
cmove r12d, r15d
test bl, bl
mov r15, r13
cmovne r15, rsi
mov r14d, r11d
cmovne r14d, r10d
lea rbp, [rcx + rdx*8]
test r12b, r12b
cmovne rsi, r13
cmovne r14d, edx
cmovne edx, r10d
cmovne r10d, r11d
cmovne r15, rbp
test bl, bl
lea rbx, [rcx + r9*8]
cmove rbx, rsi
mov esi, dword [rcx + r14*8]
cmovne r10d, r9d
cmovne r9d, r11d
mov r11d, dword [r15 + 4]
xor ebp, ebp
cmp r11d, dword [rbx + 4]
setb bpl
xor r11d, r11d
cmp esi, dword [rcx + r10*8]
setb r11b
cmove r11d, ebp
mov r9, qword [rcx + r9*8]
mov qword [r8], r9
test r11b, r11b
mov r9d, r10d
cmovne r9d, r14d
mov rbx, qword [rcx + r9*8]
cmove r10d, r14d
mov qword [rsp + 0x30], r10
lea r9, [rcx + rdi*8]
mov r11d, dword [rcx + rdi*8 + 8]
mov esi, dword [rcx + rdi*8 + 0xc]
xor ebp, ebp
cmp esi, dword [rcx + rdi*8 + 4]
setb bpl
xor esi, esi
cmp r11d, dword [rcx + rdi*8]
setb sil
cmove esi, ebp
mov r11d, dword [rcx + rdi*8 + 0x18]
mov ebp, dword [rcx + rdi*8 + 0x1c]
xor r14d, r14d
cmp ebp, dword [rcx + rdi*8 + 0x14]
setb r14b
xor ebp, ebp
cmp r11d, dword [rcx + rdi*8 + 0x10]
setb bpl
cmove ebp, r14d
movzx esi, sil
mov r11d, esi
xor r11b, 1
movzx r12d, r11b
lea r15, [r9 + r12*8]
movzx r11d, bpl
lea r14d, [r11 + 2]
xor r11d, 3
mov r13d, dword [r9 + r14*8]
mov ebp, dword [r9 + r14*8 + 4]
xor eax, eax
cmp ebp, dword [r9 + rsi*8 + 4]
setb al
xor ebp, ebp
cmp r13d, dword [r9 + rsi*8]
setb bpl
cmove ebp, eax
mov r10d, dword [r9 + r11*8]
mov r13d, dword [r9 + r11*8 + 4]
xor eax, eax
cmp r13d, dword [r9 + r12*8 + 4]
setb al
xor r13d, r13d
cmp r10d, dword [r9 + r12*8]
lea r10, [r9 + r14*8]
setb r13b
cmove r13d, eax
test bpl, bpl
mov rax, r10
cmovne rax, r15
mov qword [r8 + 8], rbx
mov ebx, r14d
cmovne ebx, r12d
test r13b, r13b
cmovne r15, r10
lea r10, [r9 + r11*8]
cmovne ebx, r11d
cmovne r11d, r12d
mov r13, qword [rsp + 0x30]
mov r13, qword [rcx + r13*8]
cmovne r12d, r14d
mov qword [r8 + 0x10], r13
cmovne rax, r10
test bpl, bpl
lea r10, [r9 + rsi*8]
cmove r10, r15
mov ebp, dword [r9 + rbx*8]
cmovne r12d, esi
cmovne esi, r14d
mov eax, dword [rax + 4]
xor r14d, r14d
cmp eax, dword [r10 + 4]
setb r14b
xor eax, eax
cmp ebp, dword [r9 + r12*8]
mov r10, qword [rcx + rdx*8]
setb al
cmove eax, r14d
mov qword [r8 + 0x18], r10
mov r10, qword [r9 + rsi*8]
mov qword [r8 + rdi*8], r10
test al, al
mov eax, r12d
cmovne eax, ebx
mov rax, qword [r9 + rax*8]
mov qword [r8 + rdi*8 + 8], rax
cmove r12d, ebx
mov rax, qword [r9 + r12*8]
mov qword [r8 + rdi*8 + 0x10], rax
mov rax, qword [r9 + r11*8]
mov qword [r8 + rdi*8 + 0x18], rax
mov eax, 4
jmp 0x1800cfcf6
mov rax, qword [rcx]
mov qword [r8], rax
mov rax, qword [rcx + rdi*8]
mov qword [r8 + rdi*8], rax
mov eax, 1
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x50], 2
mov r9, qword [rsp + 0x28]
sub r9, rdi
lea edx, [rax*8]
mov qword [rsp + 0x30], rdx
mov esi, 2
xor ebx, ebx
jmp 0x1800cfd43
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
cmp rsi, rbx
je 0x1800cfe09
lea r15, [rbx + 1]
mov qword [rsp + 0x48], r15
mov r14, qword [rsp + rbx*8 + 0x38]
test r14, r14
mov r11, r9
cmove r11, rdi
mov rbx, r15
cmp rax, r11
jae 0x1800cfd3a
lea rsi, [rcx + r14*8]
lea rbx, [r8 + r14*8]
mov r14, qword [rsp + 0x30]
mov r15, rax
jmp 0x1800cfd93
mov rbp, rbx
mov qword [rbp], r12
inc r15
add r14, 8
cmp r15, r11
je 0x1800cfd30
mov r12, qword [rsi + r15*8]
mov qword [rbx + r15*8], r12
mov r13, r12
shr r13, 0x20
xor ebp, ebp
cmp dword [rbx + r15*8 - 4], r13d
seta bpl
xor r10d, r10d
cmp dword [rbx + r15*8 - 8], r12d
seta r10b
cmovne ebp, r10d
cmp bpl, 1
jne 0x1800cfd87
mov rbp, r14
nop word cs:[rax + rax]
mov r10, qword [rbx + rbp - 8]
mov qword [rbx + rbp], r10
cmp rbp, 8
je 0x1800cfd80
xor r10d, r10d
cmp dword [rbx + rbp - 0xc], r13d
seta r10b
xor edx, edx
cmp dword [rbx + rbp - 0x10], r12d
seta dl
cmove edx, r10d
add rbp, 0xfffffffffffffff8
test dl, dl
jne 0x1800cfdd0
add rbp, rbx
jmp 0x1800cfd83
lea rax, [r8 + rdi*8]
lea r10, [r8 + rdi*8]
add r10, 0xfffffffffffffff8
mov rdx, qword [rsp + 0x28]
lea r9, [r8 + rdx*8]
add r9, 0xfffffffffffffff8
lea r11, [rcx + rdx*8]
add r11, 0xfffffffffffffff8
neg rdi
xor esi, esi
nop
mov ebp, dword [rax]
mov ebx, dword [rax + 4]
xor r14d, r14d
cmp ebx, dword [r8 + 4]
setb r14b
xor ebx, ebx
cmp ebp, dword [r8]
setb bl
cmove ebx, r14d
test bl, bl
mov r14, r8
cmovne r14, rax
mov r14, qword [r14]
mov qword [rcx], r14
movzx r14d, bl
xor bl, 1
lea rax, [rax + r14*8]
add rcx, 8
mov ebp, dword [r9]
mov r14d, dword [r9 + 4]
xor r15d, r15d
cmp r14d, dword [r10 + 4]
setb r15b
xor r14d, r14d
cmp ebp, dword [r10]
movzx ebx, bl
lea r8, [r8 + rbx*8]
setb r14b
cmove r14d, r15d
test r14b, r14b
mov rbx, r9
cmovne rbx, r10
mov rbx, qword [rbx]
mov qword [r11 + rsi*8], rbx
movzx ebx, r14b
shl ebx, 3
add r9, rbx
add r9, 0xfffffffffffffff8
sub r10, rbx
dec rsi
cmp rdi, rsi
jne 0x1800cfe30
add r10, 8
test byte [rsp + 0x28], 1
je 0x1800cfeee
xor edx, edx
xor r11d, r11d
cmp r8, r10
setae dl
setb r11b
mov rsi, rax
cmovb rsi, r8
mov rsi, qword [rsi]
mov qword [rcx], rsi
lea r8, [r8 + r11*8]
lea rax, [rax + rdx*8]
cmp r8, r10
jne 0x1800cff0f
add r9, 8
cmp rax, r9
jne 0x1800cff0f
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2
call fcn.180109bd0
int3