Function at 0x140001b50
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.140003204
mov ecx, 4
mov rbx, rax
call fcn.140003204
mov r8d, dword [rdi + 4]
xor r10d, r10d
mov r9, rax
lea ecx, [r8*4]
test ecx, ecx
jle 0x140001bbe
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 r8d, dword [rdi + 4]
lea eax, [r8*4]
cmp r10d, eax
jl 0x140001ba0
mov eax, dword [rdi + 8]
lea r10d, [r8*4]
inc eax
imul eax, dword [rdi]
shl eax, 2
cmp r10d, eax
jge 0x140001e03
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], r12
lea r12, [0x1400054d0]
movsxd r11, r10d
add r11, 0xfffffffffffffffd
mov qword [rsp + 0x50], r14
add r11, r15
nop word [rax + rax]
movzx r8d, byte [r11 - 1]
mov eax, r10d
cdq
mov byte [rbx], r8b
movzx esi, byte [r11]
and edx, 3
add eax, edx
mov byte [rbx + 1], sil
movzx ebp, byte [r11 + 1]
sar eax, 2
mov byte [rbx + 2], bpl
cdq
movzx r14d, byte [r11 + 2]
mov byte [rbx + 3], r14b
mov ecx, dword [rdi + 4]
idiv ecx
mov eax, edx
test edx, edx
jne 0x140001d04
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, r10d
mov r8d, dword [rdi + 4]
cdq
shl r8d, 2
idiv r8d
dec eax
test eax, eax
jle 0x140001cd6
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 0x140001cc0
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 0x140001d71
movzx edx, r8b
cmp ecx, 6
jle 0x140001d71
cmp eax, 4
jne 0x140001d71
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, r10d
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
mov eax, r10d
xor dl, byte [rcx + r15]
mov byte [r11 + 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 [r11 + 4], al
mov eax, r10d
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 [r11 + 5], al
mov eax, r10d
mov ecx, dword [rdi + 4]
add r10d, 4
shl ecx, 2
sub eax, ecx
movsxd rcx, eax
movzx eax, byte [rcx + r15 + 3]
xor al, byte [rbx + 3]
mov byte [r11 + 6], al
add r11, 4
mov eax, dword [rdi + 8]
inc eax
imul eax, dword [rdi]
shl eax, 2
cmp r10d, eax
jl 0x140001c00
mov r14, qword [rsp + 0x50]
mov r12, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov rcx, r9
call fcn.1400031c0
mov rcx, rbx
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop rdi
pop rsi
jmp fcn.1400031c0