Function at 0x140149680
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x98
movzx eax, word [rcx + 0x14]
lea ebp, [rdx + 0x1fe]
mov r14, qword [rsp + 0xf0]
lea esi, [r8 + 0x1fe]
add eax, 0xfffffffc
mov edi, r8d
cmp ebp, eax
mov ebx, edx
mov r8d, 0x80000
mov r15, r9
cmovge ebp, eax
movzx eax, word [rcx + 0x16]
add eax, 0xfffffffc
mov dword [rsp + 0x24], ebp
cmp esi, eax
mov rcx, r14
cmovge esi, eax
xor edx, edx
mov dword [rsp + 0x20], esi
call fcn.1402d1c50
lea edx, [rbx + 2]
mov dword [rsp + 0xe0], edx
cmp edx, ebp
jge 0x140149953
lea r8d, [rdi + 2]
mov qword [rsp + 0x90], r12
mov eax, 2
mov dword [rsp + 0x28], r8d
mov dword [rsp + 0xd0], eax
mov qword [rsp + 0x88], r13
nop dword [rax + rax]
movsxd rcx, eax
lea rax, [r15 + 6]
mov r12, rcx
mov dword [rsp + 0xd8], r8d
shl r12, 0xa
add r12, 2
lea rcx, [rcx + rcx*2]
add r12, r14
shl rcx, 0xa
add rax, rcx
mov qword [rsp + 0x30], rax
lea rax, [r15 + 0x180006]
add rax, rcx
mov qword [rsp + 0x38], rax
cmp r8d, esi
jge 0x140149922
nop word [rax + rax]
xor r9d, r9d
lea r12, [r12 + 2]
lea rbx, [rsp + 0x30]
lea r11, [0x140374f20]
lea ebp, [r9 + 2]
nop dword [rax + rax]
mov r10, qword [rbx]
mov esi, 4
add r10, 6
mov qword [rbx], r10
movsx edi, word [r10]
movsx r14d, word [r10 + 4]
movsx r15d, word [r10 + 2]
nop dword [rax]
movsxd rax, dword [r11 + r9]
mov edx, edi
lea rcx, [rax + rax*2]
mov eax, edi
lea r8, [r10 + rcx*2]
movsx ecx, word [r10 + rcx*2]
sub edx, ecx
sub eax, ecx
sar edx, 0x1f
mov ecx, r15d
xor eax, edx
sub eax, edx
mov edx, r14d
mov dword [rsp + r9 + 0x40], eax
movsx eax, word [r8 + 4]
sub edx, eax
movsx eax, word [r8 + 2]
sub ecx, eax
imul edx, edx
imul ecx, ecx
add ecx, edx
mov dword [rsp + r9 + 0x60], ecx
add r9, 4
sub rsi, 1
jne 0x1401497b0
add rbx, 8
sub r11, 0x10
sub rbp, 1
jne 0x140149790
mov edx, dword [rsp + 0x44]
mov ecx, edx
mov r8d, dword [rsp + 0x40]
cmp r8d, edx
mov r9d, dword [rsp + 0x5c]
mov eax, r9d
mov r10d, dword [rsp + 0x58]
cmova ecx, r8d
cmp r10d, r9d
cmova eax, r10d
cmp ecx, eax
jae 0x140149841
cmp r8d, edx
cmova edx, r8d
jmp 0x14014984b
cmp r10d, r9d
mov edx, r9d
cmova edx, r10d
mov r8d, dword [rsp + 0x64]
mov ecx, r8d
mov r9d, dword [rsp + 0x60]
cmp r9d, r8d
mov r10d, dword [rsp + 0x7c]
mov eax, r10d
mov r11d, dword [rsp + 0x78]
cmova ecx, r9d
cmp r11d, r10d
cmova eax, r11d
cmp ecx, eax
jae 0x140149880
cmp r9d, r8d
cmova r8d, r9d
jmp 0x14014988a
cmp r11d, r10d
mov r8d, r10d
cmova r8d, r11d
xor r9d, r9d
xor ecx, ecx
lea r13d, [r9 + 1]
xor eax, eax
cmp dword [rsp + rcx + 0x40], edx
ja 0x1401498a4
cmp dword [rsp + rcx + 0x60], r8d
cmovbe eax, r13d
cmp dword [rsp + rcx + 0x44], edx
ja 0x1401498b3
cmp dword [rsp + rcx + 0x64], r8d
ja 0x1401498b3
inc eax
cmp dword [rsp + rcx + 0x48], edx
ja 0x1401498c2
cmp dword [rsp + rcx + 0x68], r8d
ja 0x1401498c2
inc eax
cmp dword [rsp + rcx + 0x4c], edx
ja 0x1401498d1
cmp dword [rsp + rcx + 0x6c], r8d
ja 0x1401498d1
inc eax
mov byte [r9 + r12], al
add rcx, 0x10
inc r9
cmp rcx, 0x20
jl 0x140149893
mov r13d, dword [rsp + 0xd8]
mov esi, dword [rsp + 0x20]
inc r13d
mov dword [rsp + 0xd8], r13d
cmp r13d, esi
jl 0x140149770
mov edx, dword [rsp + 0xe0]
mov ebp, dword [rsp + 0x24]
mov r14, qword [rsp + 0xf0]
mov r8d, dword [rsp + 0x28]
mov r15, qword [rsp + 0xe8]
mov eax, dword [rsp + 0xd0]
inc edx
inc eax
mov dword [rsp + 0xe0], edx
mov dword [rsp + 0xd0], eax
cmp edx, ebp
jl 0x140149720
mov r13, qword [rsp + 0x88]
mov r12, qword [rsp + 0x90]
add rsp, 0x98
pop r15
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret