Function at 0x140064e50
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, 0x1a8
mov ebx, 0xffffff53
cmp r8d, 0x20
ja 0x140065848
mov ebp, r8d
mov r15d, r8d
movabs rax, 0x101010000
bt rax, r15
jae 0x140065848
mov rdi, r9
mov r14, rdx
mov rsi, rcx
mov dword [rcx + 0x158], 0
mov dword [rcx + 0xf4], ebp
mov r13d, ebp
shr r13d, 2
lea eax, [r13 + 6]
mov dword [rcx + 0xf0], eax
mov byte [rcx + 0x154], 0
cmp byte [0x143e27964], 0
je 0x140064ece
mov eax, dword [0x143e27960]
jmp 0x140064ee6
call fcn.1400e8c80
shr eax, 5
and eax, 1
mov dword [0x143e27960], eax
mov byte [0x143e27964], 1
mov r12d, dword [rsp + 0x210]
test eax, eax
je 0x140064f6a
mov byte [rsi + 0x154], 1
lea rax, [rsi + 0x100]
test rdi, rdi
je 0x140064fb6
vmovdqu xmm0, xmmword [rdi]
vmovdqu xmmword [rax], xmm0
test r12d, r12d
je 0x140064fc7
mov ebx, 0xffffff53
test r14, r14
je 0x140065848
shl ebp, 3
cmp ebp, 0x100
je 0x1400656bd
cmp ebp, 0xc0
je 0x1400656d7
cmp ebp, 0x80
jne 0x140065848
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.1400f31ad
mov r8d, 0xa
xor r9d, r9d
jmp 0x1400656ed
mov rcx, rsi
mov rdx, r14
mov r8, r15
call fcn.14016e4a0
test sil, 3
je 0x140065012
mov eax, ebp
and eax, 0xfffffffc
je 0x140065150
mov eax, eax
xor ecx, ecx
nop word cs:[rax + rax]
mov edx, dword [rsi + rcx]
bswap edx
mov dword [rsi + rcx], edx
add rcx, 4
cmp rcx, rax
jb 0x140064fa0
jmp 0x140065150
vpxor xmm0, xmm0, xmm0
vmovdqa xmmword [rax], xmm0
test r12d, r12d
jne 0x140064f1a
test r14, r14
je 0x140065848
shl ebp, 3
cmp ebp, 0x100
je 0x140065861
cmp ebp, 0xc0
je 0x140065879
cmp ebp, 0x80
jne 0x140065848
mov rcx, r14
mov rdx, rsi
call fcn.1400f31ad
mov eax, 0xa
mov dword [rsi + 0xf0], eax
jmp 0x140065846
mov eax, r13d
cmp ebp, 0x1f
ja 0x140065021
xor ecx, ecx
jmp 0x140065140
mov ecx, eax
and ecx, 0xfffffff8
vmovdqu xmm0, xmmword [rsi]
vmovdqu xmm2, xmmword [rsi + 0x10]
vmovdqa xmm1, xmmword [0x1401761b0]
vpshufb xmm2, xmm2, xmm1
vpshufb xmm0, xmm0, xmm1
vinsertf128 ymm2, ymm0, xmm2, 1
vmovdqu ymmword [rsi], ymm2
cmp rcx, 8
je 0x14006512a
vmovdqu xmm2, xmmword [rsi + 0x20]
vmovdqu xmm3, xmmword [rsi + 0x30]
vmovdqu xmm4, xmmword [rsi + 0x40]
vmovdqu xmm5, xmmword [rsi + 0x50]
vpshufb xmm3, xmm3, xmm1
vpshufb xmm2, xmm2, xmm1
vinsertf128 ymm2, ymm2, xmm3, 1
vmovups ymmword [rsi + 0x20], ymm2
vpshufb xmm2, xmm5, xmm1
vpshufb xmm3, xmm4, xmm1
vinsertf128 ymm2, ymm3, xmm2, 1
vmovups ymmword [rsi + 0x40], ymm2
vmovdqu xmm2, xmmword [rsi + 0x70]
vpshufb xmm2, xmm2, xmm1
vmovdqu xmm3, xmmword [rsi + 0x60]
vpshufb xmm3, xmm3, xmm1
vinsertf128 ymm2, ymm3, xmm2, 1
vmovups ymmword [rsi + 0x60], ymm2
vmovdqu xmm2, xmmword [rsi + 0x90]
vpshufb xmm2, xmm2, xmm1
vmovdqu xmm3, xmmword [rsi + 0x80]
vpshufb xmm3, xmm3, xmm1
vinsertf128 ymm2, ymm3, xmm2, 1
vmovups ymmword [rsi + 0x80], ymm2
vmovdqu xmm2, xmmword [rsi + 0xb0]
vpshufb xmm2, xmm2, xmm1
vmovdqu xmm3, xmmword [rsi + 0xa0]
vpshufb xmm3, xmm3, xmm1
vinsertf128 ymm2, ymm3, xmm2, 1
vmovups ymmword [rsi + 0xa0], ymm2
vmovdqu xmm2, xmmword [rsi + 0xd0]
vpshufb xmm2, xmm2, xmm1
vmovdqu xmm3, xmmword [rsi + 0xc0]
vpshufb xmm1, xmm3, xmm1
vinsertf128 ymm1, ymm1, xmm2, 1
vmovdqu ymmword [rsi + 0xc0], ymm1
cmp rcx, rax
jne 0x140065140
vmovd r9d, xmm0
jmp 0x14006516e
mov edx, dword [rsi + rcx*4]
bswap edx
mov dword [rsi + rcx*4], edx
inc rcx
cmp rax, rcx
jne 0x140065140
cmp ebp, 0x10
je 0x140065296
cmp ebp, 0x18
je 0x140065354
cmp ebp, 0x20
jne 0x140065848
mov r9d, dword [rsi]
xor eax, eax
lea rcx, [0x14017e680]
lea rdx, [0x14017f680]
nop
mov r8d, dword [rsi + rax*8 + 0x1c]
mov r10d, r8d
shr r10d, 0x10
movzx r11d, r10b
movzx ebx, byte [rcx + r11*4 + 0x803]
shl ebx, 0x18
xor ebx, r9d
mov r11d, r8d
shr r11d, 8
movzx r9d, r11b
movzx r9d, byte [rcx + r9*4 + 0xc02]
shl r9d, 0x10
movzx r14d, r8b
movzx ebp, byte [rcx + r14*4 + 1]
shl ebp, 8
xor ebp, r9d
xor ebp, ebx
mov r14d, r8d
shr r14d, 0x18
movzx r9d, byte [rcx + r14*4 + 0x400]
xor r9d, ebp
xor r9d, dword [rax + rdx]
mov dword [rsi + rax*8 + 0x20], r9d
mov ebx, dword [rsi + rax*8 + 4]
xor ebx, r9d
mov dword [rsi + rax*8 + 0x24], ebx
xor ebx, dword [rsi + rax*8 + 8]
mov dword [rsi + rax*8 + 0x28], ebx
xor ebx, dword [rsi + rax*8 + 0xc]
mov dword [rsi + rax*8 + 0x2c], ebx
cmp rax, 0x18
je 0x140065282
mov r10d, ebx
shr r10d, 0x18
movzx r10d, byte [rcx + r10*4 + 0x803]
shl r10d, 0x18
xor r10d, dword [rsi + rax*8 + 0x10]
mov r11d, ebx
shr r11d, 0x10
movzx r11d, r11b
movzx r11d, byte [rcx + r11*4 + 0xc02]
shl r11d, 0x10
movzx ebp, bh
movzx ebp, byte [rcx + rbp*4 + 1]
shl ebp, 8
xor ebp, r11d
movzx r11d, bl
movzx r11d, byte [rcx + r11*4 + 0x400]
xor r11d, ebp
xor r11d, r10d
mov dword [rsi + rax*8 + 0x30], r11d
xor r11d, dword [rsi + rax*8 + 0x14]
mov dword [rsi + rax*8 + 0x34], r11d
xor r11d, dword [rsi + rax*8 + 0x18]
mov dword [rsi + rax*8 + 0x38], r11d
xor r11d, r8d
mov dword [rsi + rax*8 + 0x3c], r11d
add rax, 4
jmp 0x140065180
mov byte [rsp + 0x30], r8b
mov byte [rsp + 0x2f], r11b
mov byte [rsp + 0x2c], r10b
jmp 0x140065414
mov r11d, dword [rsi]
xor eax, eax
lea rcx, [0x14017e680]
lea rdx, [0x14017f680]
nop dword [rax]
mov r9d, dword [rsi + rax*4 + 0xc]
mov r8d, r9d
shr r8d, 0x10
movzx r10d, r8b
movzx ebx, byte [rcx + r10*4 + 0x803]
shl ebx, 0x18
xor ebx, r11d
mov r10d, r9d
shr r10d, 8
movzx r11d, r10b
movzx r11d, byte [rcx + r11*4 + 0xc02]
shl r11d, 0x10
movzx r14d, r9b
movzx ebp, byte [rcx + r14*4 + 1]
shl ebp, 8
xor ebp, r11d
xor ebp, ebx
mov ebx, r9d
shr ebx, 0x18
movzx r11d, byte [rcx + rbx*4 + 0x400]
xor r11d, ebp
xor r11d, dword [rax + rdx]
mov dword [rsi + rax*4 + 0x10], r11d
mov ebp, dword [rsi + rax*4 + 4]
xor ebp, r11d
mov dword [rsi + rax*4 + 0x14], ebp
xor ebp, dword [rsi + rax*4 + 8]
mov dword [rsi + rax*4 + 0x18], ebp
xor ebp, r9d
mov dword [rsi + rax*4 + 0x1c], ebp
add rax, 4
cmp rax, 0x28
jne 0x1400652b0
mov byte [rsp + 0x30], r9b
mov byte [rsp + 0x2f], r10b
mov byte [rsp + 0x2c], r8b
mov byte [rsp + 0x2e], bl
jmp 0x140065419
mov r10d, dword [rsi]
lea rax, [rsi + 0x2c]
xor ecx, ecx
lea rdx, [0x14017e680]
lea r8, [0x14017f680]
nop dword [rax + rax]
mov r9d, dword [rax - 0x18]
mov r11d, r9d
shr r11d, 0x10
movzx ebx, r11b
movzx ebp, byte [rdx + rbx*4 + 0x803]
shl ebp, 0x18
xor ebp, r10d
mov ebx, r9d
shr ebx, 8
movzx r10d, bl
movzx r10d, byte [rdx + r10*4 + 0xc02]
shl r10d, 0x10
movzx r14d, r9b
movzx r15d, byte [rdx + r14*4 + 1]
shl r15d, 8
xor r15d, r10d
xor r15d, ebp
mov r14d, r9d
shr r14d, 0x18
movzx r10d, byte [rdx + r14*4 + 0x400]
xor r10d, r15d
xor r10d, dword [rcx + r8]
mov dword [rax - 0x14], r10d
mov ebp, dword [rax - 0x28]
xor ebp, r10d
mov dword [rax - 0x10], ebp
xor ebp, dword [rax - 0x24]
mov dword [rax - 0xc], ebp
xor ebp, dword [rax - 0x20]
mov dword [rax - 8], ebp
cmp rcx, 0x1c
je 0x140065406
xor ebp, dword [rax - 0x1c]
mov dword [rax - 4], ebp
xor ebp, r9d
mov dword [rax], ebp
add rcx, 4
add rax, 0x18
jmp 0x140065370
mov byte [rsp + 0x30], r9b
mov byte [rsp + 0x2f], bl
mov byte [rsp + 0x2c], r11b
mov byte [rsp + 0x2e], r14b
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x2f], 0
mov byte [rsp + 0x2c], 0
mov byte [rsp + 0x2e], 0
cmp r12d, 1
jne 0x140065690
mov eax, dword [rsi + 0xf0]
shl eax, 2
test eax, eax
je 0x1400654c5
xor ecx, ecx
nop word [rax + rax]
mov edx, dword [rsi + rcx*4]
mov r8d, eax
mov r9d, dword [rsi + r8*4]
mov dword [rsi + rcx*4], r9d
mov dword [rsi + r8*4], edx
mov edx, dword [rsi + rcx*4 + 4]
lea r8d, [rax + 1]
mov r9d, dword [rsi + r8*4]
mov dword [rsi + rcx*4 + 4], r9d
mov dword [rsi + r8*4], edx
mov edx, dword [rsi + rcx*4 + 8]
lea r8d, [rax + 2]
mov r9d, dword [rsi + r8*4]
mov dword [rsi + rcx*4 + 8], r9d
mov dword [rsi + r8*4], edx
mov edx, dword [rsi + rcx*4 + 0xc]
lea r8d, [rax + 3]
mov r9d, dword [rsi + r8*4]
mov dword [rsi + rcx*4 + 0xc], r9d
mov dword [rsi + r8*4], edx
add rcx, 4
add eax, 0xfffffffc
cmp rcx, rax
jb 0x140065450
mov byte [rsp + 0x30], dl
mov byte [rsp + 0x2f], dh
mov eax, edx
shr eax, 0x10
mov byte [rsp + 0x2c], al
shr edx, 0x18
mov byte [rsp + 0x2e], dl
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x2f], 0
mov byte [rsp + 0x2c], 0
mov byte [rsp + 0x2e], 0
cmp dword [rsi + 0xf0], 2
jb 0x140065690
lea rax, [rsi + 0x1c]
mov ecx, 1
lea rdx, [0x14017e680]
lea r8, [0x14017f6b0]
nop dword [rax]
mov ebx, dword [rax - 0xc]
mov r9d, ebx
movzx ebp, bh
mov r10d, ebx
shr r10d, 0x18
movzx r10d, byte [rdx + r10*4 + 0x400]
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
mov r9d, dword [r8 + r9*4 + 0x400]
xor r9d, dword [r8 + r10*4]
movzx r10d, bl
movzx r11d, byte [rdx + rbp*4 + 0x400]
xor r9d, dword [r8 + r11*4 + 0x800]
mov ebx, dword [rax - 8]
movzx r10d, byte [rdx + r10*4 + 0x400]
xor r9d, dword [r8 + r10*4 + 0xc00]
mov dword [rax - 0xc], r9d
mov r9d, ebx
movzx ebp, bh
mov r10d, ebx
shr r10d, 0x18
movzx r10d, byte [rdx + r10*4 + 0x400]
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
mov r9d, dword [r8 + r9*4 + 0x400]
xor r9d, dword [r8 + r10*4]
movzx r10d, bl
movzx r11d, byte [rdx + rbp*4 + 0x400]
xor r9d, dword [r8 + r11*4 + 0x800]
movzx r10d, byte [rdx + r10*4 + 0x400]
xor r9d, dword [r8 + r10*4 + 0xc00]
mov dword [rax - 8], r9d
mov ebx, dword [rax - 4]
mov r9d, ebx
movzx ebp, bh
mov r10d, ebx
shr r10d, 0x18
movzx r10d, byte [rdx + r10*4 + 0x400]
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
mov r9d, dword [r8 + r9*4 + 0x400]
xor r9d, dword [r8 + r10*4]
movzx r10d, bl
movzx r11d, byte [rdx + rbp*4 + 0x400]
xor r9d, dword [r8 + r11*4 + 0x800]
movzx r10d, byte [rdx + r10*4 + 0x400]
xor r9d, dword [r8 + r10*4 + 0xc00]
mov dword [rax - 4], r9d
mov ebx, dword [rax]
mov r9d, ebx
movzx ebp, bh
mov r10d, ebx
shr r10d, 0x18
movzx r10d, byte [rdx + r10*4 + 0x400]
shr r9d, 0x10
movzx r9d, r9b
movzx r9d, byte [rdx + r9*4 + 0x400]
mov r9d, dword [r8 + r9*4 + 0x400]
xor r9d, dword [r8 + r10*4]
movzx r10d, bl
movzx r11d, byte [rdx + rbp*4 + 0x400]
xor r9d, dword [r8 + r11*4 + 0x800]
movzx r10d, byte [rdx + r10*4 + 0x400]
xor r9d, dword [r8 + r10*4 + 0xc00]
mov dword [rax], r9d
inc ecx
add rax, 0x10
cmp ecx, dword [rsi + 0xf0]
jb 0x140065500
lea rax, [rsi + 0x100]
test rdi, rdi
je 0x1400656a6
vmovdqu xmm0, xmmword [rdi]
vmovdqu xmmword [rax], xmm0
jmp 0x1400656ae
vpxor xmm0, xmm0, xmm0
vmovdqa xmmword [rax], xmm0
mov dword [rsi + 0x158], 0
jmp 0x140065846
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.1400f3408
mov r8d, select
mov r9b, 1
mov dl, 1
jmp 0x1400656ef
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.1400f32a4
mov r8d, recv
mov r9b, 1
xor edx, edx
mov dword [rsi + 0xf0], r8d
vmovaps xmm0, xmmword [rsp + 0x30]
mov ecx, r8d
mov rax, rcx
shl rax, 4
vmovaps xmmword [rsi + rax], xmm0
vaesimc xmm0, xmmword [rsp + 0x40]
lea r10d, [r8 - 1]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0x50]
lea r10d, [r8 - 2]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0x60]
lea r10d, [r8 - 3]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0x70]
lea r10d, [r8 - 4]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0x80]
lea r10d, [r8 - 5]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0x90]
lea r10d, [r8 - 6]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0xa0]
lea r10d, [r8 - 7]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0xb0]
lea r10d, [r8 - 8]
shl r10, 4
vmovdqa xmmword [rsi + r10], xmm0
vaesimc xmm0, xmmword [rsp + 0xc0]
add r8d, 0xfffffff7
shl r8, 4
vmovdqa xmmword [rsi + r8], xmm0
test r9b, r9b
je 0x14006583c
vaesimc xmm0, xmmword [rsp + 0xd0]
lea r8d, [rcx - 0xa]
shl r8, 4
vmovdqa xmmword [rsi + r8], xmm0
vaesimc xmm0, xmmword [rsp + 0xe0]
lea r8d, [rcx - 0xb]
shl r8, 4
vmovdqa xmmword [rsi + r8], xmm0
test dl, dl
je 0x14006583c
vaesimc xmm0, xmmword [rsp + 0xf0]
lea edx, [rcx - 0xc]
shl rdx, 4
vmovdqa xmmword [rsi + rdx], xmm0
vaesimc xmm0, xmmword [rsp + 0x100]
add ecx, 0xfffffff3
shl rcx, 4
vmovdqa xmmword [rsi + rcx], xmm0
vmovdqa xmm0, xmmword [rsp + rax + 0x30]
vmovdqa xmmword [rsi], xmm0
xor ebx, ebx
mov eax, ebx
add rsp, 0x1a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
vzeroupper
ret
mov rcx, r14
mov rdx, rsi
call fcn.1400f3408
mov eax, select
mov dword [rsi + 0xf0], eax
jmp 0x140065846
mov rcx, r14
mov rdx, rsi
call fcn.1400f32a4
mov eax, recv
mov dword [rsi + 0xf0], eax
jmp 0x140065846