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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
cmp qword [rcx + 0x20], 0
lea rsi, [rcx + 0x20]
mov r12, r8
mov r14, rdx
mov rbx, rcx
mov r15d, 4
jne 0x1800018d6
mov rdi, rsi
mov ebp, r15d
nop dword [rax]
movsxd rcx, dword [rbx]
call qword [fcn.180014ad8]
mov qword [rdi], rax
lea rdi, [rdi + 8]
sub rbp, 1
jne 0x1800018c0
mov eax, dword [rbx]
xor ebp, ebp
shl eax, 2
mov r8d, ebp
test eax, eax
jle 0x180001929
nop dword [rax]
nop dword [rax + rax]
mov eax, r8d
mov ecx, r8d
and eax, 3
test r8d, r8d
jns 0x180001905
lea ecx, [r8 + 3]
sub eax, r15d
cdqe
inc r8d
sar ecx, 2
movsxd rdx, ecx
mov rcx, qword [rbx + rax*8 + 0x20]
movzx eax, byte [r14]
inc r14
mov byte [rdx + rcx], al
mov eax, dword [rbx]
shl eax, 2
cmp r8d, eax
jl 0x1800018f0
movsxd rax, dword [rbx + 8]
mov rdx, rbp
mov r8, rsi
mov r10, r15
lea rax, [rax*4]
lea r9, [rax*4]
lea r11, [rax*4 + 8]
lea rdi, [rax*4 + 0xc]
nop word [rax + rax]
mov rcx, qword [r8]
lea r8, [r8 + 8]
mov rax, qword [rbx + 0x18]
add rax, rdx
movzx eax, byte [rax + r9]
xor byte [rcx], al
mov rcx, qword [r8 - 8]
mov rax, qword [rbx + 0x18]
add rax, rdx
movzx eax, byte [rax + r9 + 4]
xor byte [rcx + 1], al
mov rcx, qword [r8 - 8]
mov rax, qword [rbx + 0x18]
add rax, rdx
movzx eax, byte [rax + r11]
xor byte [rcx + 2], al
mov rax, qword [rbx + 0x18]
mov rcx, qword [r8 - 8]
add rax, rdx
inc rdx
movzx eax, byte [rax + rdi]
xor byte [rcx + 3], al
sub r10, 1
jne 0x180001960
mov eax, dword [rbx + 8]
lea r13, [0x180015040]
dec eax
movsxd r14, eax
cmp r14, 1
jl 0x180001ae2
mov rdi, r14
shl rdi, 4
mov rcx, rbx
call fcn.180001d10
mov r8, rsi
mov r9, r15
nop word [rax + rax]
mov rdx, qword [r8]
lea r8, [r8 + 8]
movzx eax, byte [rdx]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx], al
mov rdx, qword [r8 - 8]
movzx eax, byte [rdx + 1]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx + 1], al
mov rdx, qword [r8 - 8]
movzx eax, byte [rdx + 2]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx + 2], al
mov rdx, qword [r8 - 8]
movzx eax, byte [rdx + 3]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx + 3], al
sub r9, 1
jne 0x1800019f0
mov r8, rbp
mov r9, rsi
mov r10, r15
mov rdx, qword [r9]
lea r8, [r8 + 1]
mov rcx, qword [rbx + 0x18]
lea r9, [r9 + 8]
add rcx, rdi
movzx eax, byte [rcx + r8 - 1]
xor byte [rdx], al
mov rdx, qword [r9 - 8]
mov rcx, qword [rbx + 0x18]
add rcx, rdi
movzx eax, byte [rcx + r8 + 3]
xor byte [rdx + 1], al
mov rdx, qword [r9 - 8]
mov rcx, qword [rbx + 0x18]
add rcx, rdi
movzx eax, byte [rcx + r8 + 7]
xor byte [rdx + 2], al
mov rcx, qword [rbx + 0x18]
mov rdx, qword [r9 - 8]
add rcx, rdi
movzx eax, byte [rcx + r8 + 0xb]
xor byte [rdx + 3], al
sub r10, 1
jne 0x180001a70
mov rcx, rbx
call fcn.180002020
sub rdi, 0x10
sub r14, 1
jne 0x1800019d7
mov rcx, rbx
call fcn.180001d10
mov r8, rsi
mov r9, r15
mov rdx, qword [r8]
lea r8, [r8 + 8]
movzx eax, byte [rdx]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx], al
mov rdx, qword [r8 - 8]
movzx eax, byte [rdx + 1]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx + 1], al
mov rdx, qword [r8 - 8]
movzx eax, byte [rdx + 2]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx + 2], al
mov rdx, qword [r8 - 8]
movzx eax, byte [rdx + 3]
mov ecx, eax
and eax, 0xf
and rcx, 0xfffffffffffffff0
add rcx, rax
movzx eax, byte [rcx + r13]
mov byte [rdx + 3], al
sub r9, 1
jne 0x180001af0
mov r8, rbp
nop word [rax + rax]
mov rax, qword [rbx + 0x18]
lea r8, [r8 + 1]
mov rdx, qword [rsi]
lea rsi, [rsi + 8]
movzx ecx, byte [rax + r8 - 1]
xor byte [rdx], cl
mov rax, qword [rbx + 0x18]
mov rdx, qword [rsi - 8]
movzx ecx, byte [rax + r8 + 3]
xor byte [rdx + 1], cl
mov rax, qword [rbx + 0x18]
mov rdx, qword [rsi - 8]
movzx ecx, byte [rax + r8 + 7]
xor byte [rdx + 2], cl
mov rax, qword [rbx + 0x18]
mov rdx, qword [rsi - 8]
movzx ecx, byte [rax + r8 + 0xb]
xor byte [rdx + 3], cl
sub r15, 1
jne 0x180001b70
mov r8d, dword [rbx]
shl r8d, 2
test r8d, r8d
jle 0x180001bf9
mov rdx, rbp
nop
mov rax, rdx
mov ecx, ebp
and eax, 3
shr rcx, 2
inc ebp
lea r12, [r12 + 1]
inc rdx
mov rax, qword [rbx + rax*8 + 0x20]
movzx ecx, byte [rcx + rax]
mov byte [r12 - 1], cl
cmp ebp, r8d
jl 0x180001bd0
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret