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

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x1e8
movdqa xmmword [rsp + 0x1d0], xmm15
movdqa xmmword [rsp + 0x1c0], xmm14
movdqa xmmword [rsp + 0x1b0], xmm13
movdqa xmmword [rsp + 0x1a0], xmm12
movaps xmmword [rsp + 0x190], xmm11
movaps xmmword [rsp + 0x180], xmm10
movaps xmmword [rsp + 0x170], xmm9
movaps xmmword [rsp + 0x160], xmm8
movdqa xmmword [rsp + 0x150], xmm7
movdqa xmmword [rsp + 0x140], xmm6
mov r9, qword [rdx]
mov r8, qword [rdx + 8]
mov rax, qword [rdx + 0x10]
mov r10, qword [rdx + 0x18]
mov edx, r10d
and edx, 7
cmp r10, 8
jb 0x5814ad
mov r11, r10
shr r11, 3
movaps xmm0, xmmword [rcx]
movaps xmmword [rsp + 0x10], xmm0
movaps xmm0, xmmword [rcx + 0x10]
movaps xmmword [rsp], xmm0
movaps xmm0, xmmword [rcx + 0x20]
movaps xmmword [rsp + 0x130], xmm0
movaps xmm0, xmmword [rcx + 0x30]
movaps xmmword [rsp + 0x120], xmm0
movaps xmm0, xmmword [rcx + 0x40]
movaps xmmword [rsp + 0x110], xmm0
movaps xmm0, xmmword [rcx + 0x50]
movaps xmmword [rsp + 0x100], xmm0
movaps xmm0, xmmword [rcx + 0x60]
movaps xmmword [rsp + 0xf0], xmm0
movaps xmm0, xmmword [rcx + 0x70]
movaps xmmword [rsp + 0xe0], xmm0
movaps xmm0, xmmword [rcx + 0x80]
movaps xmmword [rsp + 0xd0], xmm0
movaps xmm0, xmmword [rcx + 0x90]
movaps xmmword [rsp + 0xc0], xmm0
movaps xmm0, xmmword [rcx + 0xa0]
movaps xmmword [rsp + 0xb0], xmm0
movdqa xmm0, xmmword [rcx + 0xb0]
movdqa xmmword [rsp + 0xa0], xmm0
movdqa xmm12, xmmword [rcx + 0xc0]
movdqa xmm13, xmmword [rcx + 0xd0]
movdqa xmm14, xmmword [rcx + 0xe0]
xor esi, esi
nop word cs:[rax + rax]
movsd xmm15, qword [r9 + 4]
mov ebx, dword [r9 + 0xc]
mov edi, dword [r9 + 0x10]
lea ebp, [rbx + rdi]
bswap ebp
movss xmm0, dword [r9]
movd xmm1, ebp
lea ebp, [rbx + rdi + 1]
shufps xmm1, xmm15, 0xd4
bswap ebp
movd xmm2, ebp
lea ebp, [rbx + rdi + 2]
shufps xmm2, xmm15, 0xd4
bswap ebp
movd xmm3, ebp
lea ebp, [rbx + rdi + 3]
shufps xmm3, xmm15, 0xd4
bswap ebp
movd xmm7, ebp
lea ebp, [rbx + rdi + 4]
shufps xmm7, xmm15, 0xd4
bswap ebp
movd xmm8, ebp
lea ebp, [rbx + rdi + 5]
shufps xmm8, xmm15, 0xd4
bswap ebp
movd xmm9, ebp
lea ebp, [rbx + rdi + 6]
shufps xmm9, xmm15, 0xd4
bswap ebp
movd xmm10, ebp
lea ebx, [rbx + rdi + 7]
shufps xmm10, xmm15, 0xd4
bswap ebx
movd xmm11, ebx
shufps xmm11, xmm15, 0xd4
unpcklps xmm15, xmm0
movaps xmm6, xmm15
shufps xmm6, xmm1, 0x21
movaps xmm5, xmm15
shufps xmm5, xmm2, 0x21
movaps xmm4, xmm15
shufps xmm4, xmm3, 0x21
movaps xmm3, xmm15
shufps xmm3, xmm7, 0x21
movaps xmm2, xmm15
shufps xmm2, xmm8, 0x21
movaps xmm1, xmm15
shufps xmm1, xmm9, 0x21
movaps xmm0, xmm15
shufps xmm0, xmm10, 0x21
add edi, 8
shufps xmm15, xmm11, 0x21
mov dword [r9 + 0x10], edi
movaps xmm7, xmmword [rsp + 0x10]
xorps xmm6, xmm7
xorps xmm5, xmm7
xorps xmm4, xmm7
xorps xmm3, xmm7
xorps xmm2, xmm7
xorps xmm1, xmm7
xorps xmm0, xmm7
xorps xmm15, xmm7
movdqa xmm7, xmmword [rsp]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0x130]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0x120]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0x110]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0x100]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0xf0]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0xe0]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0xd0]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0xc0]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0xb0]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
movdqa xmm7, xmmword [rsp + 0xa0]
aesenc xmm6, xmm7
aesenc xmm5, xmm7
aesenc xmm4, xmm7
aesenc xmm3, xmm7
aesenc xmm2, xmm7
aesenc xmm1, xmm7
aesenc xmm0, xmm7
aesenc xmm15, xmm7
aesenc xmm6, xmm12
aesenc xmm5, xmm12
aesenc xmm4, xmm12
aesenc xmm3, xmm12
aesenc xmm2, xmm12
aesenc xmm1, xmm12
aesenc xmm0, xmm12
aesenc xmm15, xmm12
aesenc xmm6, xmm13
aesenc xmm5, xmm13
aesenc xmm4, xmm13
aesenc xmm3, xmm13
aesenc xmm2, xmm13
aesenc xmm1, xmm13
aesenc xmm0, xmm13
aesenc xmm15, xmm13
aesenclast xmm6, xmm14
aesenclast xmm5, xmm14
aesenclast xmm4, xmm14
aesenclast xmm3, xmm14
aesenclast xmm2, xmm14
aesenclast xmm1, xmm14
aesenclast xmm0, xmm14
aesenclast xmm15, xmm14
movdqu xmm7, xmmword [r8 + rsi]
pxor xmm7, xmm6
movdqu xmm6, xmmword [r8 + rsi + 0x10]
pxor xmm6, xmm5
movdqu xmm5, xmmword [r8 + rsi + 0x20]
pxor xmm5, xmm4
movdqu xmm4, xmmword [r8 + rsi + 0x30]
pxor xmm4, xmm3
movdqu xmm3, xmmword [r8 + rsi + 0x40]
pxor xmm3, xmm2
movdqu xmm2, xmmword [r8 + rsi + 0x50]
pxor xmm2, xmm1
movdqu xmm1, xmmword [r8 + rsi + 0x60]
pxor xmm1, xmm0
movdqu xmm0, xmmword [r8 + rsi + 0x70]
pxor xmm0, xmm15
movdqu xmmword [rax + rsi], xmm7
movdqu xmmword [rax + rsi + 0x10], xmm6
movdqu xmmword [rax + rsi + 0x20], xmm5
movdqu xmmword [rax + rsi + 0x30], xmm4
movdqu xmmword [rax + rsi + 0x40], xmm3
movdqu xmmword [rax + rsi + 0x50], xmm2
movdqu xmmword [rax + rsi + 0x60], xmm1
movdqu xmmword [rax + rsi + 0x70], xmm0
sub rsi, 0xffffffffffffff80
dec r11
jne 0x581070
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x90], xmm0
movdqa xmmword [rsp + 0x80], xmm0
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rsp + 0x60], xmm0
movdqa xmmword [rsp + 0x50], xmm0
movdqa xmmword [rsp + 0x40], xmm0
movdqa xmmword [rsp + 0x30], xmm0
movdqa xmmword [rsp + 0x20], xmm0
test rdx, rdx
je 0x581a53
mov r11d, dword [r9 + 0x10]
mov esi, dword [r9 + 0xc]
add esi, r11d
bswap esi
movd xmm2, esi
movaps xmm0, xmmword [rcx]
movdqa xmm14, xmmword [rcx + 0x10]
movdqa xmm13, xmmword [rcx + 0x20]
movdqa xmm12, xmmword [rcx + 0x30]
movdqa xmm11, xmmword [rcx + 0x40]
movdqa xmm10, xmmword [rcx + 0x50]
movdqa xmm9, xmmword [rcx + 0x60]
movdqa xmm8, xmmword [rcx + 0x70]
movdqa xmm7, xmmword [rcx + 0x80]
movdqa xmm6, xmmword [rcx + 0x90]
movdqa xmm5, xmmword [rcx + 0xa0]
movdqa xmm3, xmmword [rcx + 0xb0]
movdqa xmm1, xmmword [rcx + 0xc0]
movss xmm4, dword [r9]
movsd xmm15, qword [r9 + 4]
shufps xmm2, xmm15, 0xd4
unpcklps xmm15, xmm4
movdqa xmm4, xmmword [rcx + 0xd0]
shufps xmm15, xmm2, 0x21
movdqa xmm2, xmmword [rcx + 0xe0]
inc r11d
xorps xmm15, xmm0
aesenc xmm15, xmm14
aesenc xmm15, xmm13
aesenc xmm15, xmm12
aesenc xmm15, xmm11
aesenc xmm15, xmm10
aesenc xmm15, xmm9
aesenc xmm15, xmm8
aesenc xmm15, xmm7
aesenc xmm15, xmm6
aesenc xmm15, xmm5
aesenc xmm15, xmm3
aesenc xmm15, xmm1
aesenc xmm15, xmm4
aesenclast xmm15, xmm2
mov dword [r9 + 0x10], r11d
movdqa xmmword [rsp + 0x20], xmm15
movabs rcx, 0xffffffffffffff8
and r10, rcx
shl r10, 4
add r8, r10
add rax, r10
cmp edx, 1
jne 0x581615
movdqu xmm0, xmmword [r8]
pxor xmm0, xmmword [rsp + 0x20]
movdqu xmmword [rax], xmm0
jmp 0x581a53
mov ecx, dword [r9 + 0x10]
movdqa xmmword [rsp + 0x10], xmm1
movss xmm1, dword [r9]
movsd xmm15, qword [r9 + 4]
mov r10d, dword [r9 + 0xc]
add r10d, ecx
bswap r10d
movdqa xmmword [rsp], xmm2
movd xmm2, r10d
shufps xmm2, xmm15, 0xd4
unpcklps xmm15, xmm1
shufps xmm15, xmm2, 0x21
inc ecx
mov dword [r9 + 0x10], ecx
xorps xmm15, xmm0
aesenc xmm15, xmm14
aesenc xmm15, xmm13
aesenc xmm15, xmm12
aesenc xmm15, xmm11
aesenc xmm15, xmm10
aesenc xmm15, xmm9
aesenc xmm15, xmm8
aesenc xmm15, xmm7
aesenc xmm15, xmm6
aesenc xmm15, xmm5
aesenc xmm15, xmm3
aesenc xmm15, xmmword [rsp + 0x10]
aesenc xmm15, xmm4
aesenclast xmm15, xmmword [rsp]
movdqa xmmword [rsp + 0x30], xmm15
cmp edx, 2
je 0x5819c5
mov ecx, dword [r9 + 0x10]
movss xmm1, dword [r9]
movsd xmm15, qword [r9 + 4]
mov r10d, dword [r9 + 0xc]
add r10d, ecx
bswap r10d
movd xmm2, r10d
shufps xmm2, xmm15, 0xd4
unpcklps xmm15, xmm1
shufps xmm15, xmm2, 0x21
inc ecx
mov dword [r9 + 0x10], ecx
xorps xmm15, xmm0
aesenc xmm15, xmm14
aesenc xmm15, xmm13
aesenc xmm15, xmm12
aesenc xmm15, xmm11
aesenc xmm15, xmm10
aesenc xmm15, xmm9
aesenc xmm15, xmm8
aesenc xmm15, xmm7
aesenc xmm15, xmm6
aesenc xmm15, xmm5
aesenc xmm15, xmm3
aesenc xmm15, xmmword [rsp + 0x10]
aesenc xmm15, xmm4
aesenclast xmm15, xmmword [rsp]
movdqa xmmword [rsp + 0x40], xmm15
cmp edx, 3
je 0x5819c5
mov ecx, dword [r9 + 0x10]
movss xmm1, dword [r9]
movsd xmm15, qword [r9 + 4]
mov r10d, dword [r9 + 0xc]
add r10d, ecx
bswap r10d
movd xmm2, r10d
shufps xmm2, xmm15, 0xd4
unpcklps xmm15, xmm1
shufps xmm15, xmm2, 0x21
inc ecx
mov dword [r9 + 0x10], ecx
xorps xmm15, xmm0
aesenc xmm15, xmm14
aesenc xmm15, xmm13
aesenc xmm15, xmm12
aesenc xmm15, xmm11
aesenc xmm15, xmm10
aesenc xmm15, xmm9
aesenc xmm15, xmm8
aesenc xmm15, xmm7
aesenc xmm15, xmm6
aesenc xmm15, xmm5
aesenc xmm15, xmm3
aesenc xmm15, xmmword [rsp + 0x10]
aesenc xmm15, xmm4
aesenclast xmm15, xmmword [rsp]
movdqa xmmword [rsp + 0x50], xmm15
cmp edx, 4
je 0x5819c5
mov ecx, dword [r9 + 0x10]
movss xmm1, dword [r9]
movsd xmm15, qword [r9 + 4]
mov r10d, dword [r9 + 0xc]
add r10d, ecx
bswap r10d
movd xmm2, r10d
shufps xmm2, xmm15, 0xd4
unpcklps xmm15, xmm1
shufps xmm15, xmm2, 0x21
inc ecx
mov dword [r9 + 0x10], ecx
xorps xmm15, xmm0
aesenc xmm15, xmm14
aesenc xmm15, xmm13
aesenc xmm15, xmm12
aesenc xmm15, xmm11
aesenc xmm15, xmm10
aesenc xmm15, xmm9
aesenc xmm15, xmm8
aesenc xmm15, xmm7
aesenc xmm15, xmm6
aesenc xmm15, xmm5
aesenc xmm15, xmm3
aesenc xmm15, xmmword [rsp + 0x10]
aesenc xmm15, xmm4
aesenclast xmm15, xmmword [rsp]
movdqa xmmword [rsp + 0x60], xmm15
cmp edx, 5
je 0x5819c5
mov ecx, dword [r9 + 0x10]
movss xmm1, dword [r9]
movsd xmm15, qword [r9 + 4]
mov r10d, dword [r9 + 0xc]
add r10d, ecx
bswap r10d
movd xmm2, r10d
shufps xmm2, xmm15, 0xd4
unpcklps xmm15, xmm1
movdqa xmm1, xmmword [rsp + 0x10]
shufps xmm15, xmm2, 0x21
movdqa xmm2, xmmword [rsp]
inc ecx
mov dword [r9 + 0x10], ecx
xorps xmm15, xmm0
aesenc xmm15, xmm14
aesenc xmm15, xmm13
aesenc xmm15, xmm12
aesenc xmm15, xmm11
aesenc xmm15, xmm10
aesenc xmm15, xmm9
aesenc xmm15, xmm8
aesenc xmm15, xmm7
aesenc xmm15, xmm6
aesenc xmm15, xmm5
aesenc xmm15, xmm3
aesenc xmm15, xmm1
aesenc xmm15, xmm4
aesenclast xmm15, xmm2
movdqa xmmword [rsp + 0x70], xmm15
cmp edx, 6
je 0x5819c5
mov ecx, dword [r9 + 0x10]
movsd xmm1, qword [r9 + 4]
mov r10d, dword [r9 + 0xc]
add r10d, ecx
bswap r10d
movd xmm2, r10d
shufps xmm2, xmm1, 0xd4
movss xmm15, dword [r9]
unpcklps xmm1, xmm15
shufps xmm1, xmm2, 0x21
xorps xmm0, xmm1
aesenc xmm0, xmm14
aesenc xmm0, xmm13
aesenc xmm0, xmm12
aesenc xmm0, xmm11
aesenc xmm0, xmm10
aesenc xmm0, xmm9
aesenc xmm0, xmm8
aesenc xmm0, xmm7
aesenc xmm0, xmm6
aesenc xmm0, xmm5
aesenc xmm0, xmm3
aesenc xmm0, xmmword [rsp + 0x10]
aesenc xmm0, xmm4
aesenclast xmm0, xmmword [rsp]
inc ecx
mov dword [r9 + 0x10], ecx
movdqa xmmword [rsp + 0x80], xmm0
movups xmm0, xmmword [r8]
xorps xmm0, xmmword [rsp + 0x20]
movups xmmword [rax], xmm0
movdqu xmm0, xmmword [r8 + 0x10]
pxor xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rax + 0x10], xmm0
cmp edx, 2
je 0x581a53
movdqu xmm0, xmmword [r8 + 0x20]
pxor xmm0, xmmword [rsp + 0x40]
movdqu xmmword [rax + 0x20], xmm0
cmp edx, 3
je 0x581a53
movdqu xmm0, xmmword [r8 + 0x30]
pxor xmm0, xmmword [rsp + 0x50]
movdqu xmmword [rax + 0x30], xmm0
cmp edx, 4
je 0x581a53
movdqu xmm0, xmmword [r8 + 0x40]
pxor xmm0, xmmword [rsp + 0x60]
movdqu xmmword [rax + 0x40], xmm0
cmp edx, 5
je 0x581a53
movdqu xmm0, xmmword [r8 + 0x50]
pxor xmm0, xmmword [rsp + 0x70]
movdqu xmmword [rax + 0x50], xmm0
cmp edx, 6
je 0x581a53
movdqu xmm0, xmmword [r8 + 0x60]
pxor xmm0, xmmword [rsp + 0x80]
movdqu xmmword [rax + 0x60], xmm0
movaps xmm6, xmmword [rsp + 0x140]
movaps xmm7, xmmword [rsp + 0x150]
movaps xmm8, xmmword [rsp + 0x160]
movaps xmm9, xmmword [rsp + 0x170]
movaps xmm10, xmmword [rsp + 0x180]
movaps xmm11, xmmword [rsp + 0x190]
movaps xmm12, xmmword [rsp + 0x1a0]
movaps xmm13, xmmword [rsp + 0x1b0]
movaps xmm14, xmmword [rsp + 0x1c0]
movaps xmm15, xmmword [rsp + 0x1d0]
add rsp, 0x1e8
pop rbx
pop rbp
pop rdi
pop rsi
ret