Function at 0x1400214a0
Capabilities:
Encode data using xor
Encrypt data using aes via x86 extensions

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov ebx, r9d
mov rdi, r8
mov rsi, rdx
mov r14, 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 0x140021988
test byte [0x14013b607], 2
jne 0x14002191b
mov qword [rsp + 0x60], rsi
lea rax, [rsp + 0x20]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x24]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x2c]
mov qword [rsp + 0x58], rax
movzx ebp, byte [r14 + 4]
movzx r15d, byte [r14 + 8]
movzx r12d, byte [r14 + 0xc]
movzx r13d, byte [r14]
mov dword [rsp + 0x3c], ebx
movzx ebx, byte [r14 + 1]
movzx r11d, byte [r14 + 5]
movzx r10d, byte [r14 + 9]
movzx r9d, byte [r14 + 0xd]
movzx r8d, byte [r14 + 2]
movzx edx, byte [r14 + 6]
movzx ecx, byte [r14 + 0xa]
movzx eax, byte [r14 + 0xe]
movzx esi, byte [r14 + 3]
mov byte [rsp + 0x2c], sil
movzx esi, byte [r14 + 7]
mov byte [rsp + 0x2d], sil
movzx esi, byte [r14 + 0xb]
mov byte [rsp + 0x2e], sil
movzx esi, byte [r14 + 0xf]
mov byte [rsp + 0x2f], sil
xor r13b, byte [rdi]
mov byte [rsp + 0x20], r13b
xor bpl, byte [rdi + 4]
mov byte [rsp + 0x21], bpl
xor r15b, byte [rdi + 8]
mov byte [rsp + 0x22], r15b
xor r12b, byte [rdi + 0xc]
mov byte [rsp + 0x23], r12b
xor bl, byte [rdi + 1]
mov byte [rsp + 0x24], bl
mov esi, dword [rsp + 0x3c]
xor r11b, byte [rdi + 5]
mov byte [rsp + 0x25], r11b
xor r10b, byte [rdi + 9]
mov byte [rsp + 0x26], r10b
xor r9b, byte [rdi + 0xd]
mov byte [rsp + 0x27], r9b
xor r8b, byte [rdi + 2]
mov byte [rsp + 0x28], r8b
xor dl, byte [rdi + 6]
mov byte [rsp + 0x29], dl
xor cl, byte [rdi + 0xa]
mov byte [rsp + 0x2a], cl
xor al, byte [rdi + 0xe]
mov byte [rsp + 0x2b], al
mov r15, qword [rsp + 0x58]
movzx eax, byte [rdi + 3]
xor byte [r15], al
movzx eax, byte [rdi + 7]
xor byte [r15 + 1], al
movzx eax, byte [rdi + 0xb]
xor byte [r15 + 2], al
movzx eax, byte [rdi + 0xf]
xor byte [r15 + 3], al
cmp esi, 2
jl 0x140021764
mov r12d, esi
shl r12, 4
mov r13d, reloc.WS2_32.dll_recv
lea r14, [rsp + 0x40]
nop dword [rax + rax]
mov rcx, r14
call fcn.140023060
movzx eax, word [rsp + 0x25]
movzx ecx, byte [rsp + 0x27]
mov edx, dword [rsp + 0x24]
mov r8d, dword [rsp + 0x28]
shl edx, 0x18
shl ecx, 0x10
or ecx, eax
or ecx, edx
mov dword [rsp + 0x24], ecx
movzx eax, word [rsp + 0x2a]
shl r8d, 0x10
or r8d, eax
mov dword [rsp + 0x28], r8d
movzx eax, byte [r15 + 3]
movzx ecx, byte [r15]
movzx edx, word [r15 + 1]
shl edx, 0x10
shl ecx, 8
or ecx, eax
or ecx, edx
mov dword [r15], ecx
mov rcx, r14
call fcn.1400232c0
mov eax, r13d
and eax, 0xfffffff0
movzx ecx, byte [rdi + rax]
movzx edx, byte [rdi + rax + 8]
movzx r8d, byte [rdi + rax + 1]
movzx r9d, byte [rdi + rax + 9]
movq xmm0, qword [rsp + 0x20]
movzx r10d, byte [rdi + rax + 0xc]
shl r10d, 8
or r10d, edx
movzx edx, byte [rdi + rax + 4]
shl edx, 8
or edx, ecx
movd xmm1, edx
movzx ecx, byte [rdi + rax + 5]
shl ecx, 8
pinsrw xmm1, r10d, 1
or ecx, r8d
movzx edx, byte [rdi + rax + 0xd]
pinsrw xmm1, ecx, 2
shl edx, 8
or edx, r9d
pinsrw xmm1, edx, 3
pxor xmm1, xmm0
movq qword [rsp + 0x20], xmm1
movzx ecx, byte [rdi + rax + 2]
movzx edx, byte [rdi + rax + 0xa]
movq xmm0, qword [rsp + 0x28]
movzx r8d, byte [rdi + rax + 0xe]
shl r8d, 8
or r8d, edx
movzx edx, byte [rdi + rax + 6]
shl edx, 8
or edx, ecx
movd xmm1, edx
pinsrw xmm1, r8d, 1
pxor xmm1, xmm0
movd dword [rsp + 0x28], xmm1
movzx ecx, byte [rdi + rax + 3]
xor byte [r15], cl
movzx ecx, byte [rdi + rax + 7]
xor byte [r15 + 1], cl
movzx ecx, byte [rdi + rax + 0xb]
xor byte [r15 + 2], cl
movzx eax, byte [rdi + rax + 0xf]
xor byte [r15 + 3], al
add r13, 0x10
cmp r12, r13
jne 0x140021630
lea rcx, [rsp + 0x40]
call fcn.140023060
movzx eax, word [rsp + 0x25]
movzx ecx, byte [rsp + 0x27]
mov edx, dword [rsp + 0x24]
mov r8d, dword [rsp + 0x28]
shl edx, 0x18
shl ecx, 0x10
or ecx, eax
or ecx, edx
mov dword [rsp + 0x24], ecx
movzx eax, word [rsp + 0x2a]
shl r8d, 0x10
or r8d, eax
mov dword [rsp + 0x28], r8d
movzx eax, byte [r15 + 3]
movzx ecx, byte [r15]
movzx edx, word [r15 + 1]
shl edx, 0x10
shl ecx, 8
or ecx, eax
or ecx, edx
mov dword [r15], ecx
movsxd rax, esi
shl rax, 4
movzx ecx, byte [rdi + rax]
movzx edx, byte [rdi + rax + 8]
movzx r8d, byte [rdi + rax + 1]
movzx r9d, byte [rdi + rax + 9]
movq xmm0, qword [rsp + 0x20]
movzx r10d, byte [rdi + rax + 0xc]
shl r10d, 8
or r10d, edx
movzx edx, byte [rdi + rax + 4]
shl edx, 8
or edx, ecx
movd xmm1, edx
pinsrw xmm1, r10d, 1
movzx ecx, byte [rdi + rax + 5]
shl ecx, 8
or ecx, r8d
pinsrw xmm1, ecx, 2
movzx ecx, byte [rdi + rax + 0xd]
shl ecx, 8
or ecx, r9d
pinsrw xmm1, ecx, 3
pxor xmm1, xmm0
movq qword [rsp + 0x20], xmm1
movzx ecx, byte [rdi + rax + 2]
movzx edx, byte [rdi + rax + 0xa]
movq xmm0, qword [rsp + 0x28]
movzx r8d, byte [rdi + rax + 0xe]
shl r8d, 8
or r8d, edx
movzx edx, byte [rdi + rax + 6]
shl edx, 8
or edx, ecx
movd xmm1, edx
pinsrw xmm1, r8d, 1
pxor xmm1, xmm0
movd dword [rsp + 0x28], xmm1
movzx ecx, byte [rdi + rax + 3]
xor byte [r15], cl
movzx ecx, byte [rdi + rax + 7]
xor byte [r15 + 1], cl
movzx ecx, byte [rdi + rax + 0xb]
xor byte [r15 + 2], cl
movzx eax, byte [rdi + rax + 0xf]
xor byte [r15 + 3], al
mov rax, qword [rsp + 0x40]
movzx ecx, byte [rax]
mov rdx, qword [rsp + 0x60]
mov byte [rdx], cl
movzx ecx, byte [rax + 1]
mov byte [rdx + 4], cl
movzx ecx, byte [rax + 2]
mov byte [rdx + 8], cl
movzx eax, byte [rax + 3]
mov byte [rdx + 0xc], al
mov rax, qword [rsp + 0x48]
movzx ecx, byte [rax]
mov byte [rdx + 1], cl
movzx ecx, byte [rax + 1]
mov byte [rdx + 5], cl
movzx ecx, byte [rax + 2]
mov byte [rdx + 9], cl
movzx eax, byte [rax + 3]
mov byte [rdx + 0xd], al
mov rax, qword [rsp + 0x50]
movzx ecx, byte [rax]
mov byte [rdx + 2], cl
movzx ecx, byte [rax + 1]
mov byte [rdx + 6], cl
movzx ecx, byte [rax + 2]
mov byte [rdx + 0xa], cl
movzx eax, byte [rax + 3]
mov byte [rdx + 0xe], al
mov rax, qword [rsp + 0x58]
movzx ecx, byte [rax]
mov byte [rdx + 3], cl
movzx ecx, byte [rax + 1]
mov byte [rdx + 7], cl
movzx ecx, byte [rax + 2]
mov byte [rdx + 0xb], cl
movzx eax, byte [rax + 3]
mov byte [rdx + 0xf], al
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp ebx, 0xe
je 0x14002194c
cmp ebx, 0xc
je 0x14002196a
cmp ebx, 0xa
jne 0x1400214ee
mov rcx, r14
mov rdx, rsi
mov r8, rdi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14004d6e0
mov rcx, r14
mov rdx, rsi
mov r8, rdi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14004d7c0
mov rcx, r14
mov rdx, rsi
mov r8, rdi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14004d740
lea rcx, [0x14013b620]
call fcn.14009ab34
cmp dword [0x14013b620], 0xffffffff
jne 0x1400214e1
lea rcx, [0x14013b5e0]
call fcn.14004db90
lea rcx, [0x14013b620]
call fcn.14009aac8
jmp 0x1400214e1