Function at 0x14002be90
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x70
lea rbp, [rsp + 0x20]
mov qword [rbp + 0x80], rbx
mov qword [rbp + 0x88], rsi
mov qword [rbp + 0x90], rdi
mov rax, qword [0x1400a5028]
xor rax, rbp
mov qword [rbp + 0x48], rax
movsxd r13, r9d
mov rdi, rdx
mov qword [rbp + 0x28], rdx
mov r12, rcx
mov dword [rbp], r8d
movabs r8, 0xffffffffffffff0
mov qword [rbp + 0x40], rcx
lea rax, [r13*2]
lea rdx, [rax + 0xf]
cmp rdx, rax
ja 0x14002bef9
mov rdx, r8
and rdx, 0xfffffffffffffff0
mov rax, rdx
call fcn.140057540
sub rsp, rdx
lea rax, [r13*4]
lea rcx, [rax + 0xf]
lea rdx, [rsp + 0x20]
mov qword [rbp + 8], rdx
cmp rcx, rax
ja 0x14002bf25
mov rcx, r8
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.140057540
sub rsp, rcx
xor ebx, ebx
mov r8, rdi
mov r9d, ebx
mov r10d, ebx
mov rcx, r12
lea rax, [rsp + 0x20]
sub rax, rdi
sub rdx, r12
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x10], rdx
mov rdi, rax
nop dword [rax + rax]
movzx eax, word [rcx]
lea rcx, [rcx + 2]
shr eax, 0xf
inc r10d
mov dword [rdi + r8], eax
lea r8, [r8 + 4]
movzx eax, word [rcx - 2]
cwd
xor ax, dx
sub ax, dx
mov rdx, qword [rbp + 0x10]
mov word [rcx - 2], ax
mov dword [r8 - 4], ebx
mov word [rdx + rcx - 2], bx
cmp r10d, r13d
jl 0x14002bf60
mov r8d, dword [rbp]
mov eax, r13d
mov rdi, qword [rbp + 0x28]
movzx esi, bx
sar eax, 1
mov r14d, ebx
mov r15d, r8d
cmp r8d, eax
jle 0x14002c088
mov rcx, rbx
mov rdx, r13
nop dword [rax]
movsx eax, word [r12 + rcx*2]
inc rcx
add r9d, eax
cmp rcx, rdx
jl 0x14002bfc0
cmp r9d, r8d
jg 0x14002bffd
mov r9d, 0x4000
mov eax, 1
mov word [r12], r9w
nop word [rax + rax]
mov word [r12 + rax*2], bx
inc rax
cmp rax, rdx
jl 0x14002bff0
mov ecx, r9d
call fcn.140029e00
movsxd r8, dword [rbp]
mov r9, rdi
movsx rcx, r8w
mov rdi, r12
mov r8, qword [rbp + 8]
mov r10d, ebx
imul rax, rcx
sar rax, 0x10
movsx ecx, ax
sub rdi, r8
mov r11d, ecx
nop dword [rax + rax]
movsx edx, word [r8 + rdi]
lea r8, [r8 + 2]
imul edx, r11d
lea r9, [r9 + 4]
inc r10d
sar edx, 0xf
mov dword [r9 - 4], edx
mov word [r8 - 2], dx
movsx eax, dx
movsx ecx, dx
imul ecx, eax
movsx eax, word [r8 + rdi - 2]
add si, cx
movsx ecx, dx
imul ecx, eax
add dx, dx
mov word [r8 - 2], dx
sub r15d, dword [r9 - 4]
add r14d, ecx
cmp r10d, r13d
jl 0x14002c030
mov rdi, qword [rbp + 0x28]
mov r8d, dword [rbp]
mov rdx, qword [rbp + 0x10]
mov r11, qword [rbp + 8]
lea eax, [r13 + 3]
cmp r15d, eax
jle 0x14002c0b2
movzx eax, r15w
movsx ecx, r15w
add ax, word [r11]
movsx edx, ax
imul edx, ecx
add si, dx
add dword [rdi], r15d
jmp 0x14002c1e0
mov dword [rbp + 4], ebx
mov ecx, ebx
test r15d, r15d
jle 0x14002c1e0
lea rax, [r12 + 2]
sub r8d, r15d
mov qword [rbp + 0x38], rax
lea eax, [r8 + 1]
mov dword [rbp + 0x1c], eax
nop dword [rax]
nop word [rax + rax]
add eax, ecx
mov dword [rbp], 1
bsr ecx, eax
mov rax, qword [rbp + 8]
inc si
movsx edi, cx
movzx r11d, si
mov r10, rbx
mov qword [rbp + 0x20], 1
mov rbx, qword [rbp + 0x38]
add r11w, word [rax]
movsx eax, word [r12]
lea ecx, [rdi + 1]
add eax, r14d
sar eax, cl
movsx ecx, ax
imul ecx, ecx
sar ecx, 0xf
movsx r12d, cx
nop word [rax + rax]
movsx eax, word [rbx]
lea ecx, [rdi + 1]
add eax, r14d
movsx r8d, r12w
sar eax, cl
lea rbx, [rbx + 2]
movsx ecx, ax
movzx r9d, si
add r9w, word [rdx + rbx - 2]
imul ecx, ecx
movsx eax, r9w
imul r8d, eax
mov rax, qword [rbp + 0x20]
sar ecx, 0xf
movsx edx, cx
movsx ecx, r11w
imul ecx, edx
cmp ecx, r8d
cmovle rax, r10
inc qword [rbp + 0x20]
mov r10, rax
mov eax, dword [rbp]
inc eax
cmp ecx, r8d
mov dword [rbp], eax
cmovle edx, r12d
cmovle r9w, r11w
mov r12d, edx
mov rdx, qword [rbp + 0x10]
movzx r11d, r9w
cmp eax, r13d
jl 0x14002c130
mov rcx, qword [rbp + 8]
mov r12, qword [rbp + 0x40]
mov ebx, 0
mov rdi, qword [rbp + 0x28]
movsx eax, word [r12 + r10*2]
add r14d, eax
movzx eax, word [rcx + r10*2]
add si, ax
add ax, 2
mov word [rcx + r10*2], ax
mov ecx, dword [rbp + 4]
inc dword [rdi + r10*4]
inc ecx
mov eax, dword [rbp + 0x1c]
mov dword [rbp + 4], ecx
cmp ecx, r15d
jl 0x14002c0e0
mov rax, qword [rbp + 0x30]
nop dword [rax]
nop dword [rax + rax]
mov edx, dword [rax + rdi]
lea rdi, [rdi + 4]
neg edx
inc ebx
xor edx, dword [rdi - 4]
add edx, dword [rax + rdi - 4]
mov dword [rdi - 4], edx
cmp ebx, r13d
jl 0x14002c1f0
movzx eax, si
mov rcx, qword [rbp + 0x48]
xor rcx, rbp
call fcn.140056cc0
mov rbx, qword [rbp + 0x80]
mov rsi, qword [rbp + 0x88]
mov rdi, qword [rbp + 0x90]
lea rsp, [rbp + 0x50]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret