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

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x10
lea rsi, [0x14047ca20]
mov r15d, r9d
mov rdi, rcx
mov r14d, 4
cmp r8d, 0x10
jne 0x14029a0d0
lea eax, [r14 + 6]
mov r10d, r14d
jmp 0x14029a0f5
cmp r8d, 0x18
jne 0x14029a0e0
lea eax, [r8 - 0xc]
lea r10d, [r8 - 0x12]
jmp 0x14029a0f5
cmp r8d, 0x20
jne 0x14029a34d
mov eax, select
mov r10d, 8
mov qword [rsp + 0x38], rbp
lea r11, [rcx + 4]
mov word [rcx], ax
mov word [rcx + 2], r10w
test r10d, r10d
je 0x14029a151
add rdx, 2
mov r9d, r10d
mov r8, r11
nop word [rax + rax]
movzx eax, byte [rdx - 1]
lea r8, [r8 + 4]
movzx ecx, byte [rdx - 2]
lea rdx, [rdx + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdx - 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdx - 3]
shl ecx, 8
or ecx, eax
mov dword [r8 - 4], ecx
sub r9, 1
jne 0x14029a120
movzx eax, word [rdi]
mov r9d, r10d
lea ebp, [rax*4 + 4]
cmp r10d, ebp
jae 0x14029a25f
mov qword [rsp + 0x30], rbx
mov eax, r10d
mov qword [rsp + 0x40], r12
lea r12, str.cw
lea rbx, [r11 + rax*4]
nop
lea eax, [r9 - 1]
xor edx, edx
mov ecx, dword [r11 + rax*4]
mov eax, r9d
div r10d
test edx, edx
jne 0x14029a1e5
mov eax, ecx
shr rax, 0x10
movzx edx, al
mov eax, ecx
shr rax, 8
movzx r8d, byte [rdx + r12]
movzx edx, al
shl r8d, 8
movzx eax, byte [rdx + r12]
or r8d, eax
movzx edx, cl
shl r8d, 8
movzx eax, byte [rdx + r12]
or r8d, eax
mov eax, ecx
shr rax, 0x18
shl r8d, 8
mov ecx, r8d
movzx eax, byte [rax + r12]
or ecx, eax
movzx eax, byte [rsi]
shl eax, 0x18
xor ecx, eax
inc rsi
cmp r10d, 8
jne 0x14029a23a
mov eax, r9d
and al, 7
cmp al, r14b
jne 0x14029a23a
mov eax, ecx
shr rax, 0x10
movzx edx, al
mov eax, ecx
shr rax, 0x18
movzx r8d, byte [rdx + r12]
movzx eax, byte [rax + r12]
shl eax, 8
or r8d, eax
mov eax, ecx
shr rax, 8
movzx edx, al
shl r8d, 8
movzx eax, byte [rdx + r12]
or r8d, eax
movzx eax, cl
shl r8d, 8
mov ecx, r8d
movzx edx, byte [rax + r12]
or ecx, edx
mov eax, r9d
inc r9d
sub eax, r10d
xor ecx, dword [r11 + rax*4]
mov dword [rbx], ecx
add rbx, r14
cmp r9d, ebp
jb 0x14029a180
mov r12, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
cmp r15d, 1
jne 0x14029a34d
movzx eax, word [rdi]
shl eax, 2
cmp eax, r14d
jbe 0x14029a34d
nop dword [rax]
mov ecx, r14d
mov edx, dword [rdi + rcx*4 + 4]
mov r10d, edx
and r10d, 0x80808080
mov eax, r10d
shr eax, 7
sub r10d, eax
lea eax, [rdx + rdx]
and eax, 0xfefefefe
and r10d, 0x1b1b1b1b
xor r10d, eax
mov r9d, r10d
and r9d, 0x80808080
mov eax, r9d
shr eax, 7
sub r9d, eax
lea eax, [r10 + r10]
and eax, 0xfefefefe
and r9d, 0x1b1b1b1b
xor r9d, eax
mov r8d, r9d
and r8d, 0x80808080
mov eax, r8d
shr eax, 7
sub r8d, eax
lea eax, [r9 + r9]
and eax, 0xfefefefe
and r8d, 0x1b1b1b1b
xor r8d, eax
mov eax, r8d
xor r8d, r9d
xor eax, edx
xor r8d, r10d
xor r10d, eax
mov edx, r14d
xor r9d, eax
mov ecx, eax
shr eax, 8
inc r14d
shl ecx, 0x18
or ecx, eax
mov eax, r9d
shr eax, 0x10
shl r9d, 0x10
or eax, r9d
xor ecx, eax
mov eax, r10d
shr eax, 0x18
shl r10d, 8
or eax, r10d
xor ecx, eax
xor ecx, r8d
mov dword [rdi + rdx*4 + 4], ecx
movzx eax, word [rdi]
shl eax, 2
cmp r14d, eax
jb 0x14029a280
mov rsi, qword [rsp + 0x48]
add rsp, 0x10
pop r15
pop r14
pop rdi
ret