Function at 0x140021080
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using aes via x86 extensions
Reference aes constants

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov eax, dword [0x14013b620]
mov ecx, dword [0x14013ce80]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 0x30]
jg 0x140021465
test byte [0x14013b607], 2
jne 0x140021114
shr rdi, 2
lea eax, [rdi*4]
mov dword [rsp + 0x2c], eax
test edi, edi
jle 0x14002124b
mov ecx, dword [rsp + 0x2c]
cmp ecx, 2
mov eax, 1
cmovge eax, ecx
xor ecx, ecx
cmp eax, 8
jb 0x1400211e6
mov rdx, rsi
sub rdx, rbx
cmp rdx, 0x20
jb 0x1400211e6
cmp eax, 0x20
jae 0x140021177
xor ecx, ecx
jmp 0x1400211b8
cmp rdi, 0x20
je 0x140021141
cmp rdi, 0x18
je 0x14002115c
cmp rdi, 0x10
jne 0x1400210c7
mov rcx, rsi
mov rdx, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14004ce80
mov rcx, rsi
mov rdx, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14004d3b0
mov rcx, rsi
mov rdx, rbx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14004d0e0
mov ecx, eax
and ecx, 0x7fffffe0
xor edx, edx
nop word cs:[rax + rax]
movups xmm0, xmmword [rbx + rdx]
movups xmm1, xmmword [rbx + rdx + 0x10]
movups xmmword [rsi + rdx], xmm0
movups xmmword [rsi + rdx + 0x10], xmm1
add rdx, 0x20
cmp rcx, rdx
jne 0x140021190
cmp rcx, rax
je 0x14002124b
test al, 0x18
je 0x1400211e6
mov rdx, rcx
mov ecx, eax
and ecx, 0x7ffffff8
nop word cs:[rax + rax]
mov r8, qword [rbx + rdx]
mov qword [rsi + rdx], r8
add rdx, 8
cmp rcx, rdx
jne 0x1400211d0
cmp rcx, rax
je 0x14002124b
mov rdx, rcx
not rdx
add rdx, rax
mov r8, rax
and r8, 1
je 0x140021211
neg r8
nop dword [rax + rax]
movzx r9d, byte [rbx + rcx]
mov byte [rsi + rcx], r9b
inc rcx
inc r8
jne 0x140021200
cmp rdx, 3
jb 0x14002124b
nop word [rax + rax]
movzx edx, byte [rbx + rcx]
mov byte [rsi + rcx], dl
movzx edx, byte [rbx + rcx + 1]
mov byte [rsi + rcx + 1], dl
movzx edx, byte [rbx + rcx + 2]
mov byte [rsi + rcx + 2], dl
movzx edx, byte [rbx + rcx + 3]
mov byte [rsi + rcx + 3], dl
add rcx, 4
cmp rax, rcx
jne 0x140021220
mov eax, edi
shl eax, 4
add eax, 0x70
cmp dword [rsp + 0x2c], eax
jge 0x140021454
movsxd r9, dword [rsp + 0x2c]
cdqe
mov qword [rsp + 0x30], rax
lea r11, str.cw
mov rcx, r9
jmp 0x140021322
mov eax, r15d
and eax, 0xfffffff0
and r15d, 0xf
add rax, r11
mov edx, r13d
and edx, 0xfffffff0
and r13d, 0xf
add rdx, r11
movzx ebp, byte [r13 + rdx]
mov edx, r14d
and edx, 0xfffffff0
and r14d, 0xf
add rdx, r11
movzx r8d, byte [r14 + rdx]
mov edx, r12d
and edx, 0xfffffff0
and r12d, 0xf
add rdx, r11
movzx r10d, byte [r12 + rdx]
xor bl, byte [r15 + rax]
mov rax, rcx
sub rax, r9
xor bl, byte [rsi + rax]
mov byte [rsi + rcx], bl
mov rax, rcx
or rax, 1
mov rdx, rax
sub rdx, r9
xor bpl, byte [rsi + rdx]
mov byte [rsi + rax], bpl
mov rax, rcx
or rax, 2
mov rdx, rax
sub rdx, r9
xor r8b, byte [rsi + rdx]
mov byte [rsi + rax], r8b
mov rax, rcx
or rax, 3
mov rdx, rax
sub rdx, r9
xor r10b, byte [rsi + rdx]
mov byte [rsi + rax], r10b
add rcx, 4
cmp rcx, qword [rsp + 0x30]
jge 0x140021454
movzx ebx, byte [rcx + rsi - 4]
movzx ebp, byte [rcx + rsi - 3]
movzx r12d, bl
movzx r15d, bpl
movzx r8d, byte [rcx + rsi - 2]
movzx r13d, r8b
movzx r10d, byte [rcx + rsi - 1]
movzx r14d, r10b
mov eax, ecx
sar eax, 2
cdq
idiv edi
test edx, edx
je 0x1400213c0
cmp edi, 7
jl 0x1400212c8
cmp edx, 4
jne 0x1400212c8
mov eax, r12d
and eax, 0xfffffff0
and r12d, 0xf
add rax, r11
movzx ebx, byte [r12 + rax]
mov eax, r15d
and eax, 0xfffffff0
and r15d, 0xf
add rax, r11
movzx ebp, byte [r15 + rax]
mov eax, r13d
and eax, 0xfffffff0
and r13d, 0xf
add rax, r11
movzx r8d, byte [r13 + rax]
mov eax, r14d
and eax, 0xfffffff0
and r14d, 0xf
add rax, r11
movzx r10d, byte [r14 + rax]
jmp 0x1400212c8
mov eax, ecx
cdq
idiv dword [rsp + 0x2c]
mov bl, 1
cmp eax, 2
jl 0x140021280
lea edx, [rax - 2]
dec eax
mov bl, 1
cmp edx, 3
jb 0x14002142c
mov edx, eax
and edx, 0xfffffffc
mov r8b, 1
nop word cs:[rax + rax]
lea ebx, [r8 + r8]
sar r8b, 7
and r8b, 0x1b
xor r8b, bl
add r8b, r8b
sar bl, 7
and bl, 0x1b
xor bl, r8b
add bl, bl
sar r8b, 7
and r8b, 0x1b
xor r8b, bl
add r8b, r8b
sar bl, 7
and bl, 0x1b
xor bl, r8b
mov r8d, ebx
add edx, 0xfffffffc
jne 0x1400213f0
and eax, 3
je 0x140021280
nop word cs:[rax + rax]
lea edx, [rbx + rbx]
sar bl, 7
and bl, 0x1b
xor bl, dl
dec eax
jne 0x140021440
jmp 0x140021280
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x14013b620]
call fcn.14009ab34
cmp dword [0x14013b620], 0xffffffff
jne 0x1400210be
lea rcx, [0x14013b5e0]
call fcn.14004db90
lea rcx, [0x14013b620]
call fcn.14009aac8
jmp 0x1400210be