Function at 0x140013400
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r15
sub rsp, 0x20
mov rdi, rcx
mov r15, r8
mov ecx, 4
mov rsi, rdx
call fcn.140028f04
mov ecx, 4
mov rbx, rax
call fcn.140028f04
mov r11d, dword [rdi + 4]
xor r10d, r10d
mov r9, rax
lea edx, [r11*4]
test edx, edx
jle 0x14001346e
mov rcx, r15
sub rsi, r15
nop dword [rax]
movzx eax, byte [rsi + rcx]
inc r10d
mov byte [rcx], al
lea rcx, [rcx + 1]
mov r11d, dword [rdi + 4]
lea eax, [r11*4]
cmp r10d, eax
jl 0x140013450
mov eax, dword [rdi + 8]
lea r11d, [r11*4]
inc eax
imul eax, dword [rdi]
shl eax, 2
cmp r11d, eax
jge 0x1400136b3
mov qword [rsp + 0x40], rbp
lea r10, [r15 - 3]
mov qword [rsp + 0x48], r12
lea r12, [0x140063050]
movsxd rax, r11d
mov qword [rsp + 0x50], r14
add r10, rax
nop word [rax + rax]
movzx r8d, byte [r10 - 1]
mov eax, r11d
cdq
mov byte [rbx], r8b
movzx esi, byte [r10]
and edx, 3
add eax, edx
mov byte [rbx + 1], sil
movzx ebp, byte [r10 + 1]
sar eax, 2
mov byte [rbx + 2], bpl
cdq
movzx r14d, byte [r10 + 2]
mov byte [rbx + 3], r14b
mov ecx, dword [rdi + 4]
idiv ecx
mov eax, edx
test edx, edx
jne 0x1400135b4
mov eax, esi
mov ecx, esi
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r12]
mov ecx, ebp
mov byte [rbx], al
and rcx, 0xfffffffffffffff0
mov eax, ebp
and eax, 0xf
add rcx, rax
movzx eax, byte [rcx + r12]
mov ecx, r14d
mov byte [rbx + 1], al
and rcx, 0xfffffffffffffff0
mov eax, r14d
and eax, 0xf
add rcx, rax
movzx eax, byte [rcx + r12]
mov ecx, r8d
mov byte [rbx + 2], al
and rcx, 0xfffffffffffffff0
mov eax, r8d
and eax, 0xf
add rcx, rax
movzx eax, byte [rcx + r12]
mov cl, 1
mov byte [rbx + 3], al
mov eax, r11d
mov r8d, dword [rdi + 4]
cdq
shl r8d, 2
idiv r8d
dec eax
test eax, eax
jle 0x140013586
mov r8d, eax
nop dword [rax]
nop word [rax + rax]
movzx eax, cl
add cl, cl
shr al, 7
movzx eax, al
imul edx, eax, 0x1b
xor cl, dl
sub r8, 1
jne 0x140013570
mov byte [r9], cl
mov word [r9 + 2], 0
mov byte [r9 + 1], 0
xor byte [rbx], cl
movzx eax, byte [r9 + 1]
xor byte [rbx + 1], al
movzx eax, byte [r9 + 2]
xor byte [rbx + 2], al
movzx eax, byte [r9 + 3]
xor byte [rbx + 3], al
movzx edx, byte [rbx]
jmp 0x140013621
movzx edx, r8b
cmp ecx, 6
jle 0x140013621
cmp eax, 4
jne 0x140013621
mov rax, r8
mov rcx, r8
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
mov rax, rsi
and eax, 0xf
movzx edx, byte [rcx + r12]
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov byte [rbx], dl
add rcx, rax
movzx eax, byte [rcx + r12]
mov rcx, rbp
mov byte [rbx + 1], al
and rcx, 0xfffffffffffffff0
mov rax, rbp
and eax, 0xf
add rcx, rax
movzx eax, byte [rcx + r12]
mov rcx, r14
mov byte [rbx + 2], al
and rcx, 0xfffffffffffffff0
mov rax, r14
and eax, 0xf
add rcx, rax
movzx eax, byte [rcx + r12]
mov byte [rbx + 3], al
mov ecx, dword [rdi + 4]
mov eax, r11d
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
mov eax, r11d
xor dl, byte [rcx + r15]
mov byte [r10 + 3], dl
mov ecx, dword [rdi + 4]
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movzx eax, byte [rcx + r15 + 1]
xor al, byte [rbx + 1]
mov byte [r10 + 4], al
mov eax, r11d
mov ecx, dword [rdi + 4]
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movzx eax, byte [rcx + r15 + 2]
xor al, byte [rbx + 2]
mov byte [r10 + 5], al
mov eax, r11d
mov ecx, dword [rdi + 4]
add r11d, 4
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movzx eax, byte [rcx + r15 + 3]
xor al, byte [rbx + 3]
mov byte [r10 + 6], al
add r10, 4
mov eax, dword [rdi + 8]
inc eax
imul eax, dword [rdi]
shl eax, 2
cmp r11d, eax
jl 0x1400134b0
mov r14, qword [rsp + 0x50]
mov r12, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov rcx, r9
call fcn.1400285fc
mov rcx, rbx
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop rdi
pop rsi
jmp fcn.1400285fc