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

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x30
mov eax, dword [rdx]
lea r14, [rcx + 0xf0]
mov ebx, eax
xor esi, esi
neg ebx
mov rdi, rdx
mov r15, rcx
and ebx, 0xf
je 0x1400043a7
lea rcx, [r11 - 0x28]
call fcn.14000245c
mov ecx, dword [rdi]
add ecx, ebx
mov dword [rsp + 0x20], ecx
call qword [0x140018750]
mov r8d, dword [rsp + 0x20]
lea edx, [rsi + 8]
mov rcx, rax
call qword [0x140018758]
mov qword [rsp + 0x28], rax
cmp dword [rsp + 0x20], esi
jne 0x140004361
xor eax, eax
jmp 0x14000454b
mov r8d, dword [rdi]
mov rcx, rax
mov rdx, qword [rdi + 8]
call qword [0x140018780]
mov r8d, ebx
mov rdx, rsi
test ebx, ebx
je 0x140004390
mov ecx, dword [rdi]
mov rax, qword [rsp + 0x28]
add rcx, rdx
inc rdx
mov byte [rcx + rax], bl
cmp rdx, r8
jb 0x14000437b
mov rcx, rdi
call fcn.14000241c
mov rax, qword [rsp + 0x28]
mov qword [rdi + 8], rax
mov eax, dword [rsp + 0x20]
mov dword [rdi], eax
mov rbx, qword [rdi + 8]
test eax, eax
je 0x140004546
mov r12d, 4
mov rcx, rbx
sub r14, rbx
mov edx, 0x10
mov al, byte [r14 + rcx]
xor byte [rcx], al
inc rcx
sub rdx, 1
jne 0x1400043c4
mov r8, r15
mov rdx, rbx
xor ecx, ecx
call fcn.140003a64
mov bpl, 1
mov rdx, rbx
mov r8, r12
mov rcx, rdx
mov r9, r12
movzx eax, byte [rcx]
lea r10, str.cw
mov al, byte [rax + r10]
mov byte [rcx], al
add rcx, r12
sub r9, 1
jne 0x1400043ef
inc rdx
sub r8, 1
jne 0x1400043e9
mov al, byte [rbx + 5]
lea r14, [rbx + 2]
mov cl, byte [rbx + 1]
mov byte [rbx + 1], al
mov al, byte [rbx + 9]
mov byte [rbx + 5], al
mov al, byte [rbx + 0xd]
mov byte [rbx + 9], al
mov al, byte [rbx + 0xa]
mov byte [rbx + 0xd], cl
mov cl, byte [r14]
mov byte [r14], al
mov al, byte [rbx + 0xe]
mov byte [rbx + 0xa], cl
mov cl, byte [rbx + 6]
mov byte [rbx + 6], al
mov al, byte [rbx + 0xf]
mov byte [rbx + 0xe], cl
mov cl, byte [rbx + 3]
mov byte [rbx + 3], al
mov al, byte [rbx + 0xb]
mov byte [rbx + 0xf], al
mov al, byte [rbx + 7]
mov byte [rbx + 0xb], al
mov byte [rbx + 7], cl
cmp bpl, 0xe
je 0x140004523
mov r11b, byte [r14 - 2]
mov r8b, byte [r14 - 1]
mov dl, r11b
mov r9b, byte [r14 + 1]
xor dl, r8b
xor r9b, byte [r14]
mov al, dl
shr al, 7
add dl, dl
movzx eax, al
mov r10b, r9b
imul ecx, eax, 0x1b
xor r10b, r11b
xor r10b, r8b
xor cl, dl
mov dl, r8b
xor dl, byte [r14]
xor cl, r11b
xor r11b, byte [r14 + 1]
xor cl, r10b
mov byte [r14 - 2], cl
mov al, dl
shr al, 7
add dl, dl
movzx eax, al
imul ecx, eax, 0x1b
mov al, r9b
shr al, 7
add r9b, r9b
movzx eax, al
xor cl, dl
xor cl, r8b
xor cl, r10b
mov byte [r14 - 1], cl
imul ecx, eax, 0x1b
mov al, r11b
shr al, 7
add r11b, r11b
movzx eax, al
xor cl, r9b
xor cl, byte [r14]
xor cl, r10b
mov byte [r14], cl
lea r14, [r14 + 4]
imul ecx, eax, 0x1b
xor cl, r11b
xor cl, byte [r14 - 3]
xor cl, r10b
mov byte [r14 - 3], cl
sub r12, 1
jne 0x140004467
mov r8, r15
mov rdx, rbx
mov cl, bpl
call fcn.140003a64
inc bpl
mov r12d, 4
jmp 0x1400043e3
mov r8, r15
mov rdx, rbx
mov cl, 0xe
call fcn.140003a64
mov ecx, dword [rdi]
mov r14, rbx
add rbx, 0x10
add rsi, 0x10
cmp rsi, rcx
jb 0x1400043b9
mov eax, 1
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
ret