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

Disassembly:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movups xmmword [rsp + 0x40], xmm6
mov rbp, qword [rsp + 0xc0]
mov rbx, rcx
mov r13, rdx
test rcx, rcx
je 0x140213180
test rdx, rdx
je 0x140213190
mov eax, 4
test r8b, 0xf
jne 0x140212eae
test rbp, rbp
je 0x1402131a0
sub r8, 0x20
mov rdx, qword [rbp]
mov qword [rbp], r8
test r9, r9
je 0x140213230
mov eax, 9
cmp rdx, r8
jb 0x140212eae
cmp qword [rcx], 0
je 0x140213240
mov eax, dword [r13]
cmp dword [str.OAES], eax
jne 0x140212ea9
cmp byte [r13 + 4], 1
je 0x140212ec8
mov eax, 0xa
movups xmm6, xmmword [rsp + 0x40]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp byte [r13 + 5], 2
jne 0x140212ea9
movzx esi, word [r13 + 6]
lea eax, [rsi - 1]
cmp ax, 1
ja 0x140212ea9
movzx edi, byte [r13 + 8]
cmp dil, 1
ja 0x140212ea9
mov rcx, r9
lea rdx, [r13 + 0x20]
movdqu xmm6, xmmword [r13 + 0x10]
call sym.memcpy
mov rcx, qword [rbp]
mov r9, rax
test rcx, rcx
je 0x1402131ba
and esi, 2
xor edx, edx
mov qword [rsp + 0xb8], rax
mov r12, rax
mov r10d, esi
mov r11, rdx
lea rsi, [rax + 0x10]
mov byte [rsp + 0x3f], dil
xor r8d, r8d
lea r15, [0x14046ad60]
mov edx, r10d
mov rax, rbp
mov qword [rsp + 0xa8], r13
jmp 0x140212f92
test r11, r11
je 0x140212f5c
mov rdi, qword [rsp + 0xa8]
movdqu xmm6, xmmword [rdi + r11 + 0x10]
test r8d, r8d
je 0x14021324a
mov r8d, 1
movdqu xmm0, xmmword [r12]
pxor xmm0, xmm6
movups xmmword [r12], xmm0
mov rcx, qword [rax]
add r11, 0x10
add r12, 0x10
add rsi, 0x10
cmp r11, rcx
jae 0x1402131aa
test dx, dx
jne 0x140212f48
test r8d, r8d
jne 0x140212f7d
mov r9, rcx
mov r8d, 1
sub r9, r11
cmp r9, 0xf
jbe 0x140212f7d
mov r9, qword [rbx]
test r9, r9
je 0x140212f7d
mov rdi, qword [r9 + 0x20]
mov r8d, 1
lea rcx, [rdi - 1]
shl rcx, 4
add rcx, qword [r9 + 0x18]
movzx ecx, byte [rcx]
xor byte [r12], cl
nop dword [rax + rax]
mov r9, qword [rbx]
mov rdi, qword [r9 + 0x20]
lea rcx, [rdi - 1]
shl rcx, 4
add rcx, qword [r9 + 0x18]
movzx ecx, byte [rcx + r8]
xor byte [r12 + r8], cl
add r8, 1
cmp r8, 0x10
jne 0x140212fd8
mov rcx, qword [rbx]
mov rdi, qword [rcx + 0x20]
sub rdi, 2
je 0x140213270
mov r14, rdi
lea rcx, [rsi - 4]
mov qword [rsp + 0x28], r11
lea r13, [rsi - 0xc]
shl r14, 4
mov qword [rsp + 0x20], rcx
lea rbp, [rsi - 8]
sub r14, r12
mov word [rsp + 0x3c], dx
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0x30], r15
mov qword [rsp + 0xa0], rbx
mov rbx, rsi
mov rsi, r14
mov r14, qword [rsp + 0xa0]
nop word [rax + rax]
mov rcx, r12
call sym.oaes_inv_shift_rows.isra.0
mov rdx, r12
nop dword [rax + rax]
movzx eax, byte [rdx]
add rdx, 1
mov rcx, rax
and eax, 0xf0
and ecx, 0xf
add rax, r15
movzx eax, byte [rax + rcx]
mov byte [rdx - 1], al
cmp rdx, rbx
jne 0x140213070
mov rax, r12
nop dword [rax]
mov rdx, qword [r14]
mov rcx, qword [rdx + 0x18]
add rcx, rax
movzx edx, byte [rcx + rsi]
xor byte [rax], dl
add rax, 1
cmp rax, rbx
jne 0x140213098
mov rcx, r12
sub rsi, 0x10
call sym.oaes_inv_mix_cols.isra.0
mov rcx, r13
call sym.oaes_inv_mix_cols.isra.0
mov rcx, rbp
call sym.oaes_inv_mix_cols.isra.0
mov rcx, qword [rsp + 0x20]
call sym.oaes_inv_mix_cols.isra.0
sub rdi, 1
jne 0x140213060
mov r11, qword [rsp + 0x28]
movzx edx, word [rsp + 0x3c]
mov rsi, rbx
mov rbx, r14
mov rax, qword [rsp + 0xc0]
mov r10, qword [rsp + 0x30]
mov rcx, r12
mov qword [rsp + 0xc0], rax
mov dword [rsp + 0x20], edx
call sym.oaes_inv_shift_rows.isra.0
mov edx, dword [rsp + 0x20]
mov rax, qword [rsp + 0xc0]
mov r8, r12
nop dword [rax]
movzx ecx, byte [r8]
add r8, 1
mov r9, rcx
and ecx, 0xf0
and r9d, 0xf
add rcx, r10
movzx ecx, byte [rcx + r9]
mov byte [r8 - 1], cl
cmp rsi, r8
jne 0x140213120
xor ecx, ecx
nop dword [rax + rax]
mov r8, qword [rbx]
mov r8, qword [r8 + 0x18]
movzx r8d, byte [r8 + rcx]
xor byte [r12 + rcx], r8b
add rcx, 1
cmp rcx, 0x10
jne 0x140213150
xor r8d, r8d
test dx, dx
jne 0x140212f6b
mov rcx, qword [rax]
jmp 0x140212f7d
mov eax, 2
jmp 0x140212eae
mov eax, 3
jmp 0x140212eae
mov eax, 6
jmp 0x140212eae
movzx edi, byte [rsp + 0x3f]
mov r9, qword [rsp + 0xb8]
mov rbp, rax
test dil, dil
je 0x140213230
movzx r8d, byte [r9 + rcx - 1]
lea rax, [r8 - 1]
cmp rax, 0xe
ja 0x140212ea9
sub rcx, r8
mov rax, r8
mov edx, 1
xor r10d, r10d
add r9, rcx
nop dword [rax]
movzx ecx, byte [r9 + rax - 1]
cmp rax, rcx
cmovne edx, r10d
sub rax, 1
jne 0x1402131e8
test edx, edx
je 0x140212ea9
cmp r8d, 8
jae 0x14021327c
test r8b, 4
jne 0x1402132a5
test r8d, r8d
je 0x140213226
mov byte [r9], 0
test r8b, 2
jne 0x1402132b4
sub qword [rbp], r8
nop word [rax + rax]
xor eax, eax
jmp 0x140212eae
mov eax, 7
jmp 0x140212eae
sub rcx, r11
cmp rcx, 0xf
jbe 0x140212f65
mov r9, qword [rbx]
test r9, r9
jne 0x140212fb6
jmp 0x140212f65
lea r10, [0x14046ad60]
jmp 0x1402130fa
lea rdi, [r9 + 8]
mov rcx, r9
mov qword [r9], 0
mov qword [r9 + r8 - 8], 0
and rdi, 0xfffffffffffffff8
sub rcx, rdi
add ecx, r8d
shr ecx, 3
rep stosq qword [rdi], rax
jmp 0x140213226
xor eax, eax
mov dword [r9], eax
mov dword [r9 + r8 - 4], eax
jmp 0x140213226
mov word [r9 + r8 - 2], 0
jmp 0x140213226