Function at 0x180145b40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov qword [rbp], 0xfffffffffffffffe
mov qword [rbp - 0x10], r8
cmp rdx, 2
jb 0x1801460ba
lea rax, [rdx + 0x10]
cmp rax, r9
ja 0x1801460d0
mov r15, rcx
mov rsi, rdx
shr rsi, 1
cmp rdx, 0xf
mov qword [rbp - 0x18], rdx
mov qword [rbp - 8], rcx
jbe 0x180145bc7
mov rbx, qword [rbp - 0x10]
lea r8, [rbx + rdx*8]
mov rcx, r15
mov rdi, rdx
mov rdx, rbx
call fcn.180145660
lea rcx, [r15 + rsi*8]
lea rdx, [rbx + rsi*8]
lea r8, [rbx + rdi*8]
add r8, 0x40
call fcn.180145660
mov rdx, rdi
mov eax, 8
jmp 0x180145eb8
cmp rdx, 7
jbe 0x180145ea1
mov eax, dword [r15 + 8]
mov ecx, dword [r15 + 0xc]
xor edx, edx
cmp ecx, dword [r15 + 4]
setb dl
xor ecx, ecx
cmp eax, dword [r15]
setb cl
cmove ecx, edx
mov eax, dword [r15 + 0x18]
mov edx, dword [r15 + 0x1c]
xor r8d, r8d
cmp edx, dword [r15 + 0x14]
setb r8b
xor r10d, r10d
cmp eax, dword [r15 + 0x10]
setb r10b
cmove r10d, r8d
movzx ecx, cl
mov eax, ecx
xor al, 1
movzx edx, al
lea r9, [r15 + rdx*8]
movzx eax, r10b
lea r8d, [rax + 2]
xor eax, 3
mov r11d, dword [r15 + r8*8]
mov r10d, dword [r15 + r8*8 + 4]
xor edi, edi
cmp r10d, dword [r15 + rcx*8 + 4]
setb dil
xor r10d, r10d
cmp r11d, dword [r15 + rcx*8]
setb r10b
cmove r10d, edi
mov r11d, dword [r15 + rax*8]
mov edi, dword [r15 + rax*8 + 4]
xor ebx, ebx
cmp edi, dword [r15 + rdx*8 + 4]
setb bl
xor r14d, r14d
cmp r11d, dword [r15 + rdx*8]
mov r11, qword [rbp - 8]
lea r15, [r11 + r8*8]
setb r14b
cmove r14d, ebx
test r10b, r10b
mov rdi, r15
cmovne rdi, r9
mov r11d, r8d
cmovne r11d, edx
mov rbx, qword [rbp - 8]
lea rbx, [rbx + rax*8]
test r14b, r14b
cmovne r9, r15
cmovne r11d, eax
cmovne eax, edx
mov qword [rbp - 0x20], rax
cmovne edx, r8d
cmovne rdi, rbx
test r10b, r10b
mov r10, qword [rbp - 8]
lea r10, [r10 + rcx*8]
cmove r10, r9
mov r9, qword [rbp - 8]
mov r9d, dword [r9 + r11*8]
cmovne edx, ecx
cmovne ecx, r8d
mov r8d, dword [rdi + 4]
xor edi, edi
cmp r8d, dword [r10 + 4]
setb dil
xor r8d, r8d
mov r10, qword [rbp - 8]
cmp r9d, dword [r10 + rdx*8]
setb r8b
cmove r8d, edi
mov r9, qword [rbp - 8]
mov rcx, qword [r9 + rcx*8]
mov rax, qword [rbp - 0x10]
mov qword [rax], rcx
test r8b, r8b
mov ecx, edx
cmovne ecx, r11d
mov r8, qword [rbp - 8]
mov r10, qword [r8 + rcx*8]
cmove edx, r11d
mov rcx, qword [rbp - 8]
lea rcx, [rcx + rsi*8]
mov r8, qword [rbp - 8]
mov r8d, dword [r8 + rsi*8 + 8]
mov r9, qword [rbp - 8]
mov r9d, dword [r9 + rsi*8 + 0xc]
xor r11d, r11d
mov rdi, qword [rbp - 8]
cmp r9d, dword [rdi + rsi*8 + 4]
setb r11b
xor r9d, r9d
mov rdi, qword [rbp - 8]
cmp r8d, dword [rdi + rsi*8]
setb r9b
cmove r9d, r11d
mov r8, qword [rbp - 8]
mov r8d, dword [r8 + rsi*8 + 0x18]
mov r11, qword [rbp - 8]
mov r11d, dword [r11 + rsi*8 + 0x1c]
xor edi, edi
mov rbx, qword [rbp - 8]
cmp r11d, dword [rbx + rsi*8 + 0x14]
setb dil
xor r11d, r11d
mov rbx, qword [rbp - 8]
cmp r8d, dword [rbx + rsi*8 + 0x10]
setb r11b
cmove r11d, edi
movzx r9d, r9b
mov r8d, r9d
xor r8b, 1
movzx ebx, r8b
lea rdi, [rcx + rbx*8]
movzx r8d, r11b
lea r11d, [r8 + 2]
xor r8d, 3
mov r15d, dword [rcx + r11*8]
mov r14d, dword [rcx + r11*8 + 4]
xor r12d, r12d
cmp r14d, dword [rcx + r9*8 + 4]
setb r12b
xor r14d, r14d
cmp r15d, dword [rcx + r9*8]
setb r14b
cmove r14d, r12d
mov r15d, dword [rcx + r8*8]
mov r12d, dword [rcx + r8*8 + 4]
xor r13d, r13d
cmp r12d, dword [rcx + rbx*8 + 4]
setb r13b
xor r12d, r12d
cmp r15d, dword [rcx + rbx*8]
lea r15, [rcx + r11*8]
setb r12b
cmove r12d, r13d
test r14b, r14b
mov r13, r15
cmovne r13, rdi
mov qword [rax + 8], r10
mov r10d, r11d
cmovne r10d, ebx
test r12b, r12b
cmovne rdi, r15
mov r15, qword [rbp - 8]
mov rdx, qword [r15 + rdx*8]
mov qword [rax + 0x10], rdx
mov r12, rax
lea rdx, [rcx + r8*8]
cmovne r13, rdx
cmovne r10d, r8d
cmovne r8d, ebx
cmovne ebx, r11d
test r14b, r14b
lea rdx, [rcx + r9*8]
cmove rdx, rdi
mov edi, dword [r13 + 4]
cmovne ebx, r9d
cmovne r9d, r11d
xor r11d, r11d
cmp edi, dword [rdx + 4]
mov edx, dword [rcx + r10*8]
setb r11b
xor edi, edi
cmp edx, dword [rcx + rbx*8]
setb dil
cmove edi, r11d
mov rax, qword [rbp - 0x20]
mov rax, qword [r15 + rax*8]
mov qword [r12 + 0x18], rax
mov rax, qword [rcx + r9*8]
mov qword [r12 + rsi*8], rax
test dil, dil
mov rdx, qword [rbp - 0x18]
mov eax, ebx
cmovne eax, r10d
mov rax, qword [rcx + rax*8]
mov qword [r12 + rsi*8 + 8], rax
cmove ebx, r10d
mov rax, qword [rcx + rbx*8]
mov qword [r12 + rsi*8 + 0x10], rax
mov rax, qword [rcx + r8*8]
mov qword [r12 + rsi*8 + 0x18], rax
mov eax, 4
jmp 0x180145eb8
mov rax, qword [r15]
mov rcx, qword [rbp - 0x10]
mov qword [rcx], rax
mov rax, qword [r15 + rsi*8]
mov qword [rcx + rsi*8], rax
mov eax, 1
mov qword [rbp - 0x40], 0
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x28], 2
mov rcx, rdx
sub rcx, rsi
lea edx, [rax*8]
mov r9d, 2
xor r10d, r10d
jmp 0x180145f05
mov r10, qword [rbp - 0x30]
mov r9, qword [rbp - 0x28]
mov r15, qword [rbp - 8]
cmp r9, r10
je 0x180145fcc
lea rdi, [r10 + 1]
mov qword [rbp - 0x30], rdi
mov r11, qword [rbp + r10*8 - 0x40]
test r11, r11
mov r8, rcx
cmove r8, rsi
mov r10, rdi
cmp rax, r8
jae 0x180145efc
lea r9, [r15 + r11*8]
mov r10, qword [rbp - 0x10]
lea r10, [r10 + r11*8]
mov r11, rdx
mov rdi, rax
jmp 0x180145f52
mov r15, r10
mov qword [r15], rbx
inc rdi
add r11, 8
cmp rdi, r8
je 0x180145ef0
mov rbx, qword [r9 + rdi*8]
mov qword [r10 + rdi*8], rbx
mov r14, rbx
shr r14, 0x20
xor r15d, r15d
cmp dword [r10 + rdi*8 - 4], r14d
seta r15b
xor r12d, r12d
cmp dword [r10 + rdi*8 - 8], ebx
seta r12b
cmovne r15d, r12d
cmp r15b, 1
jne 0x180145f46
mov r15, r11
nop word cs:[rax + rax]
mov r12, qword [r10 + r15 - 8]
mov qword [r10 + r15], r12
cmp r15, 8
je 0x180145f40
xor r12d, r12d
cmp dword [r10 + r15 - 0xc], r14d
seta r12b
xor r13d, r13d
cmp dword [r10 + r15 - 0x10], ebx
seta r13b
cmove r13d, r12d
add r15, 0xfffffffffffffff8
test r13b, r13b
jne 0x180145f90
add r15, r10
jmp 0x180145f43
mov r8, qword [rbp - 0x10]
lea rax, [r8 + rsi*8]
lea rdx, [r8 + rsi*8]
add rdx, 0xfffffffffffffff8
mov rcx, qword [rbp - 0x18]
lea r9, [rcx - 1]
lea rcx, [r8 + rcx*8]
add rcx, 0xfffffffffffffff8
xor r10d, r10d
nop
mov r11d, dword [rax]
mov edi, dword [rax + 4]
xor ebx, ebx
cmp edi, dword [r8 + 4]
setb bl
xor edi, edi
cmp r11d, dword [r8]
setb dil
cmove edi, ebx
test dil, dil
mov r11, r8
cmovne r11, rax
mov r11, qword [r11]
mov qword [r15 + r10*8], r11
inc r10
movzx r11d, dil
xor dil, 1
lea rax, [rax + r11*8]
movzx r11d, dil
mov edi, dword [rcx]
mov ebx, dword [rcx + 4]
xor r14d, r14d
cmp ebx, dword [rdx + 4]
setb r14b
xor ebx, ebx
cmp edi, dword [rdx]
lea r8, [r8 + r11*8]
setb bl
cmove ebx, r14d
test bl, bl
mov r11, rcx
cmovne r11, rdx
mov r11, qword [r11]
mov qword [r15 + r9*8], r11
movzx r11d, bl
shl r11d, 3
add rcx, r11
add rcx, 0xfffffffffffffff8
sub rdx, r11
dec r9
cmp rsi, r10
jne 0x180145ff0
add rdx, 8
test byte [rbp - 0x18], 1
je 0x1801460ac
xor r9d, r9d
xor r11d, r11d
cmp r8, rdx
setae r9b
setb r11b
mov rsi, rax
cmovb rsi, r8
mov rsi, qword [rsi]
mov qword [r15 + r10*8], rsi
lea r8, [r8 + r11*8]
lea rax, [rax + r9*8]
cmp r8, rdx
jne 0x1801460cb
add rcx, 8
cmp rax, rcx
jne 0x1801460cb
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call fcn.18019e590
ud2