Function at 0x14004ffc0
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 rax, qword [0x1400c0e18]
xor rax, rsp
mov qword [rsp + 0x60], rax
call fcn.140053160
test byte [rax + 0x1b], 2
je 0x140050038
cmp ebx, 0xe
je 0x14005049f
cmp ebx, 0xc
je 0x1400504ca
cmp ebx, 0xa
jne 0x140050038
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400556d0
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 0x140057810
mov qword [rsp + 0x28], rsi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x54]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x48], rax
movzx ebp, byte [r14 + 4]
movzx r15d, byte [r14 + 8]
movzx r12d, byte [r14 + 0xc]
movzx r13d, byte [r14]
mov dword [rsp + 0x24], 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 + 0x5c], sil
movzx esi, byte [r14 + 7]
mov byte [rsp + 0x5d], sil
movzx esi, byte [r14 + 0xb]
mov byte [rsp + 0x5e], sil
movzx esi, byte [r14 + 0xf]
mov byte [rsp + 0x5f], sil
xor r13b, byte [rdi]
mov byte [rsp + 0x50], r13b
xor bpl, byte [rdi + 4]
mov byte [rsp + 0x51], bpl
xor r15b, byte [rdi + 8]
mov byte [rsp + 0x52], r15b
xor r12b, byte [rdi + 0xc]
mov byte [rsp + 0x53], r12b
xor bl, byte [rdi + 1]
mov byte [rsp + 0x54], bl
mov esi, dword [rsp + 0x24]
xor r11b, byte [rdi + 5]
mov byte [rsp + 0x55], r11b
xor r10b, byte [rdi + 9]
mov byte [rsp + 0x56], r10b
xor r9b, byte [rdi + 0xd]
mov byte [rsp + 0x57], r9b
xor r8b, byte [rdi + 2]
mov byte [rsp + 0x58], r8b
xor dl, byte [rdi + 6]
mov byte [rsp + 0x59], dl
xor cl, byte [rdi + 0xa]
mov byte [rsp + 0x5a], cl
xor al, byte [rdi + 0xe]
mov byte [rsp + 0x5b], al
mov r15, qword [rsp + 0x48]
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 0x1400502c7
mov r12d, esi
shl r12, 4
mov r13d, reloc.WS2_32.dll_recv
lea r14, [rsp + 0x30]
nop word cs:[rax + rax]
mov rcx, r14
call fcn.1400516a0
movzx eax, byte [rsp + 0x57]
mov ecx, dword [rsp + 0x54]
shl ecx, 0x18
shl eax, 0x10
movzx edx, word [rsp + 0x55]
or edx, eax
or edx, ecx
mov dword [rsp + 0x54], edx
movzx eax, byte [rsp + 0x58]
movzx ecx, byte [rsp + 0x59]
shl ecx, 0x18
shl eax, 0x10
movzx edx, word [rsp + 0x5a]
or edx, eax
or edx, ecx
mov dword [rsp + 0x58], edx
movzx eax, byte [r15 + 3]
movzx ecx, byte [r15]
movzx edx, byte [r15 + 1]
movzx r8d, byte [r15 + 2]
shl r8d, 0x18
shl edx, 0x10
shl ecx, 8
or ecx, eax
or ecx, edx
or ecx, r8d
mov dword [r15], ecx
mov rcx, r14
call fcn.1400518a0
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 + 0x50]
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 + 0x50], xmm1
movzx ecx, byte [rdi + rax + 2]
movzx edx, byte [rdi + rax + 0xa]
movq xmm0, qword [rsp + 0x58]
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 + 0x58], 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 0x140050180
lea rcx, [rsp + 0x30]
call fcn.1400516a0
movzx eax, byte [rsp + 0x57]
mov ecx, dword [rsp + 0x54]
shl ecx, 0x18
shl eax, 0x10
movzx edx, word [rsp + 0x55]
or edx, eax
or edx, ecx
mov dword [rsp + 0x54], edx
movzx eax, byte [rsp + 0x58]
movzx ecx, byte [rsp + 0x59]
shl ecx, 0x18
shl eax, 0x10
movzx edx, word [rsp + 0x5a]
or edx, eax
or edx, ecx
mov dword [rsp + 0x58], edx
movzx eax, byte [r15 + 3]
movzx ecx, byte [r15]
movzx edx, byte [r15 + 1]
movzx r8d, byte [r15 + 2]
shl r8d, 0x18
shl edx, 0x10
shl ecx, 8
or ecx, eax
or ecx, edx
or ecx, r8d
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 + 0x50]
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 + 0x50], xmm1
movzx ecx, byte [rdi + rax + 2]
movzx edx, byte [rdi + rax + 0xa]
movq xmm0, qword [rsp + 0x58]
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 + 0x58], 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 + 0x30]
movzx ecx, byte [rax]
mov rdx, qword [rsp + 0x28]
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 + 0x38]
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 + 0x40]
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 + 0x48]
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
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400556d0
nop
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400556d0
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 0x140057940
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400556d0
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 0x1400578a0
movdqu xmm0, xmmword [rcx]
xorps xmm0, xmmword [r8]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x10]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x20]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x30]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x40]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x50]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x60]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x70]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x80]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x90]
movdqu xmmword [rdx], xmm0
aesenclast xmm0, xmmword [r8 + 0xa0]
movdqu xmmword [rdx], xmm0
ret
movdqu xmm0, xmmword [rcx]
xorps xmm0, xmmword [r8]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x10]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x20]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x30]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x40]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x50]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x60]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x70]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x80]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x90]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0xa0]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0xb0]
movdqu xmmword [rdx], xmm0
aesenclast xmm0, xmmword [r8 + 0xc0]
movdqu xmmword [rdx], xmm0
ret
movdqu xmm0, xmmword [rcx]
xorps xmm0, xmmword [r8]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x10]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x20]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x30]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x40]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x50]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x60]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x70]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x80]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0x90]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0xa0]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0xb0]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0xc0]
movdqu xmmword [rdx], xmm0
aesenc xmm0, xmmword [r8 + 0xd0]
movdqu xmmword [rdx], xmm0
aesenclast xmm0, xmmword [r8 + 0xe0]
movdqu xmmword [rdx], xmm0
ret