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

Disassembly:
push rbx
push rbp
push r12
sub rsp, 0x30
cmp qword [rcx + 0x20], 0
mov r12, r8
mov qword [rsp + 0x50], rsi
mov rbx, rcx
mov qword [rsp + 0x58], rdi
lea rsi, [rcx + 0x20]
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x28], r14
mov r14, rdx
mov qword [rsp + 0x20], r15
mov r15d, 4
jne 0x180001528
mov rdi, rsi
mov ebp, r15d
movsxd rcx, dword [rbx]
call qword [sym.imp.mfc140u.dll_operator]
mov qword [rdi], rax
lea rdi, [rdi + 8]
sub rbp, 1
jne 0x180001512
mov eax, dword [rbx]
xor ebp, ebp
shl eax, 2
mov r8d, ebp
test eax, eax
jle 0x180001579
nop word [rax + rax]
mov eax, r8d
mov ecx, r8d
and eax, 3
test r8d, r8d
jns 0x180001555
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 0x180001540
mov r8, rbp
mov r9, rsi
mov r10, r15
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x18]
lea r8, [r8 + 1]
mov rdx, qword [r9]
lea r9, [r9 + 8]
movzx ecx, byte [rax + r8 - 1]
xor byte [rdx], cl
mov rax, qword [rbx + 0x18]
mov rdx, qword [r9 - 8]
movzx ecx, byte [rax + r8 + 3]
xor byte [rdx + 1], cl
mov rax, qword [rbx + 0x18]
mov rdx, qword [r9 - 8]
movzx ecx, byte [rax + r8 + 7]
xor byte [rdx + 2], cl
mov rax, qword [rbx + 0x18]
mov rdx, qword [r9 - 8]
movzx ecx, byte [rax + r8 + 0xb]
xor byte [rdx + 3], cl
sub r10, 1
jne 0x180001590
mov eax, dword [rbx + 8]
lea r13, [0x180015150]
dec eax
mov r14d, 1
cmp eax, r14d
jl 0x180001711
lea edi, [r10 + 0x10]
nop
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 0x180001610
mov rcx, rbx
call fcn.180001c20
mov rcx, rbx
call fcn.180001df0
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 0x1800016a0
mov eax, dword [rbx + 8]
inc r14d
dec eax
add rdi, 0x10
cmp r14d, eax
jle 0x180001600
mov r14, qword [rsp + 0x28]
mov r8, rsi
mov rdi, qword [rsp + 0x58]
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 0x180001721
mov rcx, rbx
call fcn.180001c20
movsxd rax, dword [rbx + 8]
mov rdx, rbp
mov r13, qword [rsp + 0x60]
lea rax, [rax*4]
lea r8, [rax*4]
lea r9, [rax*4 + 8]
lea r10, [rax*4 + 0xc]
nop dword [rax]
mov rcx, qword [rsi]
lea rsi, [rsi + 8]
mov rax, qword [rbx + 0x18]
add rax, rdx
movzx eax, byte [rax + r8]
xor byte [rcx], al
mov rcx, qword [rsi - 8]
mov rax, qword [rbx + 0x18]
add rax, rdx
movzx eax, byte [rax + r8 + 4]
xor byte [rcx + 1], al
mov rcx, qword [rsi - 8]
mov rax, qword [rbx + 0x18]
add rax, rdx
movzx eax, byte [rax + r9]
xor byte [rcx + 2], al
mov rax, qword [rbx + 0x18]
mov rcx, qword [rsi - 8]
add rax, rdx
inc rdx
movzx eax, byte [rax + r10]
xor byte [rcx + 3], al
sub r15, 1
jne 0x1800017d0
mov r8d, dword [rbx]
mov r15, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x50]
shl r8d, 2
test r8d, r8d
jle 0x18000186a
mov rdx, rbp
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 0x180001841
add rsp, 0x30
pop r12
pop rbp
pop rbx
ret