Function at 0x509160
Capabilities:
Encrypt data using aes via x86 extensions

Disassembly:
sub rsp, 0x178
vmovups xmmword [rsp + 0xd0], xmm6
vmovups xmmword [rsp + 0xe0], xmm7
vmovups xmmword [rsp + 0xf0], xmm8
vmovups xmmword [rsp + 0x100], xmm9
vmovups xmmword [rsp + 0x110], xmm10
vmovups xmmword [rsp + 0x120], xmm11
vmovups xmmword [rsp + 0x130], xmm12
vmovups xmmword [rsp + 0x140], xmm13
vmovups xmmword [rsp + 0x150], xmm14
vmovups xmmword [rsp + 0x160], xmm15
vpxor xmm0, xmm0, xmm0
xor eax, eax
vmovdqu xmm4, xmmword [rcx + 0x90]
vmovdqu xmm2, xmmword [rdx]
vmovdqu xmm7, xmmword [rdx + 0x20]
vmovdqu xmm3, xmmword [rcx + 0x80]
vpxor xmm14, xmm2, xmm4
vaesenc xmm14, xmm14, xmm0
vmovdqu xmm15, xmmword [rdx + 0x30]
vmovups xmmword [rsp + 0x10], xmm4
vmovups xmmword [rsp + 0x80], xmm4
vmovdqu xmm4, xmmword [rdx + 0x10]
vmovdqu xmm5, xmmword [rcx + 0xb0]
vmovups xmmword [rsp + 0x50], xmm7
vpxor xmm14, xmm4, xmm14
vaesenc xmm14, xmm14, xmm0
vpxor xmm14, xmm14, xmm7
vaesenc xmm14, xmm14, xmm0
vpxor xmm14, xmm15, xmm14
vaesenc xmm14, xmm14, xmm0
vpxor xmm6, xmm14, xmm3
vmovups xmmword [rsp], xmm6
vmovdqu xmm6, xmmword [rdx + 0x40]
vmovups xmmword [rsp + 0x60], xmm5
vmovups xmmword [rsp + 0xa0], xmm5
mov r9d, dword [rcx + 0xc8]
vmovdqu xmm7, xmmword [rdx + 0x60]
vpxor xmm12, xmm5, xmm6
vaesenc xmm12, xmm12, xmm0
vmovups xmmword [rsp + 0x90], xmm3
vmovdqu xmm5, xmmword [rdx + 0x50]
vmovups xmmword [rsp + 0x20], xmm6
vmovdqu xmm13, xmmword [rdx + 0x70]
vmovups xmmword [rsp + 0x40], xmm7
mov edx, dword [rcx + 0xcc]
mov r11d, r9d
vpxor xmm12, xmm12, xmm5
vmovups xmmword [rsp + 0x30], xmm5
mov r10d, dword [rcx + 0xd4]
not r11d
vaesenc xmm12, xmm12, xmm0
vpxor xmm12, xmm12, xmm7
mov r8d, dword [rcx + 0xd0]
vaesenc xmm12, xmm12, xmm0
vpxor xmm12, xmm13, xmm12
vaesenc xmm12, xmm12, xmm0
vmovdqu xmm3, xmmword [rcx + 0xa0]
vmovd xmm5, edx
vpinsrd xmm1, xmm5, r11d, 1
mov r11d, r10d
vmovd xmm6, r10d
vpxor xmm12, xmm12, xmm3
vmovups xmmword [rsp + 0xb0], xmm3
not r11d
vmovd xmm7, r8d
vpinsrd xmm3, xmm6, r8d, 1
vmovd xmm6, r9d
vpunpcklqdq xmm5, xmm3, xmm1
vpinsrd xmm1, xmm7, r11d, 1
mov r11d, edx
vpinsrd xmm3, xmm6, edx, 1
not r11d
vpunpcklqdq xmm3, xmm3, xmm1
vmovups xmmword [rsp + 0x70], xmm3
vmovups xmmword [rsp + 0xc0], xmm5
vaesenc xmm1, xmm2, xmm0
vpshufd xmm1, xmm1, 0x39
vpxor xmm1, xmm13, xmm1
test eax, eax
je 0x509828
vpxor xmm11, xmm1, xmmword [rsp]
vaesenc xmm3, xmm4, xmm0
vaesenc xmm11, xmm11, xmm0
vpshufd xmm3, xmm3, 0x39
vpxor xmm3, xmm1, xmm3
cmp eax, 1
jne 0x509359
vpxor xmm3, xmm3, xmmword [rsp + 0xc0]
vmovdqu xmm6, xmmword [rsp + 0x20]
vpxor xmm11, xmm11, xmm3
vaesenc xmm10, xmm15, xmm0
vaesenc xmm11, xmm11, xmm0
vmovdqu xmm4, xmmword [rsp + 0x50]
vpshufd xmm10, xmm10, 0x39
vmovdqu xmm7, xmmword [rsp + 0x30]
vaesenc xmm9, xmm6, xmm0
vpshufd xmm9, xmm9, 0x39
vmovdqu xmm6, xmmword [rsp + 0x40]
vaesenc xmm5, xmm4, xmm0
vpshufd xmm5, xmm5, 0x39
vpxor xmm5, xmm3, xmm5
vaesenc xmm8, xmm7, xmm0
vpxor xmm10, xmm5, xmm10
vpxor xmm11, xmm11, xmm5
vpxor xmm9, xmm10, xmm9
vaesenc xmm7, xmm6, xmm0
vaesenc xmm11, xmm11, xmm0
vpxor xmm14, xmm9, xmm12
vpxor xmm11, xmm11, xmm10
vaesenc xmm14, xmm14, xmm0
vaesenc xmm11, xmm11, xmm0
vpshufd xmm8, xmm8, 0x39
vpshufd xmm7, xmm7, 0x39
vpxor xmm8, xmm9, xmm8
vaesenc xmm6, xmm13, xmm0
vpxor xmm7, xmm8, xmm7
vpxor xmm14, xmm14, xmm8
vpshufd xmm6, xmm6, 0x39
vaesenc xmm14, xmm14, xmm0
vpxor xmm4, xmm11, xmmword [rsp + 0x60]
vpxor xmm14, xmm14, xmm7
vpxor xmm6, xmm7, xmm6
vaesenc xmm14, xmm14, xmm0
cmp eax, 2
je 0x509850
vpalignr xmm2, xmm6, xmm7, 4
vpxor xmm14, xmm14, xmm6
vaesenc xmm14, xmm14, xmm0
add eax, 1
vpxor xmm1, xmm1, xmm2
vpalignr xmm11, xmm1, xmm6, 4
vpxor xmm2, xmm4, xmm1
vaesenc xmm2, xmm2, xmm0
vpxor xmm3, xmm3, xmm11
vpalignr xmm11, xmm3, xmm1, 4
vpxor xmm2, xmm2, xmm3
vaesenc xmm2, xmm2, xmm0
vpxor xmm5, xmm5, xmm11
vpalignr xmm15, xmm5, xmm3, 4
vpxor xmm2, xmm2, xmm5
vaesenc xmm2, xmm2, xmm0
vpxor xmm10, xmm10, xmm15
vpxor xmm2, xmm2, xmm10
vaesenc xmm2, xmm2, xmm0
vpxor xmm12, xmm2, xmm12
vpalignr xmm2, xmm10, xmm5, 4
vpxor xmm14, xmm14, xmmword [rsp + 0x10]
vaesenc xmm1, xmm1, xmm0
vaesenc xmm3, xmm3, xmm0
vpxor xmm9, xmm9, xmm2
vpalignr xmm2, xmm9, xmm10, 4
vpxor xmm13, xmm9, xmm14
vpshufd xmm1, xmm1, 0x39
vpxor xmm8, xmm8, xmm2
vpalignr xmm2, xmm8, xmm9, 4
vaesenc xmm13, xmm13, xmm0
vpshufd xmm3, xmm3, 0x39
vpxor xmm7, xmm7, xmm2
vpalignr xmm2, xmm7, xmm8, 4
vpxor xmm13, xmm13, xmm8
vaesenc xmm5, xmm5, xmm0
vpxor xmm6, xmm6, xmm2
vaesenc xmm13, xmm13, xmm0
vpxor xmm1, xmm6, xmm1
vpxor xmm13, xmm13, xmm7
vpxor xmm3, xmm1, xmm3
vpxor xmm2, xmm1, xmm12
vaesenc xmm13, xmm13, xmm0
vaesenc xmm2, xmm2, xmm0
vpxor xmm13, xmm13, xmm6
vpxor xmm2, xmm2, xmm3
vpshufd xmm5, xmm5, 0x39
vaesenc xmm2, xmm2, xmm0
vpxor xmm5, xmm3, xmm5
vaesenc xmm10, xmm10, xmm0
vpxor xmm2, xmm2, xmm5
vpshufd xmm10, xmm10, 0x39
vaesenc xmm2, xmm2, xmm0
vpxor xmm10, xmm5, xmm10
vaesenc xmm9, xmm9, xmm0
vpxor xmm2, xmm2, xmm10
vpshufd xmm9, xmm9, 0x39
vaesenc xmm2, xmm2, xmm0
vpxor xmm9, xmm10, xmm9
vpxor xmm15, xmm2, xmm14
vaesenc xmm8, xmm8, xmm0
vaesenc xmm7, xmm7, xmm0
vpshufd xmm8, xmm8, 0x39
vpshufd xmm7, xmm7, 0x39
vpxor xmm8, xmm9, xmm8
vaesenc xmm6, xmm6, xmm0
vpxor xmm7, xmm8, xmm7
vpshufd xmm6, xmm6, 0x39
vpxor xmm6, xmm7, xmm6
vpalignr xmm2, xmm6, xmm7, 4
vaesenc xmm13, xmm13, xmm0
vpxor xmm13, xmm13, xmmword [rsp]
vpxor xmm1, xmm1, xmm2
vpxor xmm11, xmm9, xmm13
vpxor xmm14, xmm1, xmm15
vmovdqu xmm2, xmm1
vaesenc xmm11, xmm11, xmm0
vpxor xmm11, xmm11, xmm8
vaesenc xmm11, xmm11, xmm0
vpxor xmm11, xmm11, xmm7
vaesenc xmm11, xmm11, xmm0
vpxor xmm11, xmm11, xmm6
vaesenc xmm11, xmm11, xmm0
vpxor xmm11, xmm11, xmm4
vpalignr xmm4, xmm1, xmm6, 4
vmovups xmmword [rsp + 0x10], xmm15
vaesenc xmm14, xmm14, xmm0
vpxor xmm3, xmm3, xmm4
vpalignr xmm15, xmm3, xmm1, 4
vpxor xmm14, xmm14, xmm3
vmovdqu xmm4, xmm3
vpxor xmm5, xmm5, xmm15
vpalignr xmm15, xmm5, xmm3, 4
vaesenc xmm14, xmm14, xmm0
vpxor xmm14, xmm14, xmm5
vpxor xmm10, xmm10, xmm15
vaesenc xmm14, xmm14, xmm0
vpxor xmm14, xmm14, xmm10
vaesenc xmm14, xmm14, xmm0
vpxor xmm13, xmm14, xmm13
vmovups xmmword [rsp], xmm13
vpalignr xmm13, xmm10, xmm5, 4
vmovdqu xmm15, xmm10
vpxor xmm9, xmm9, xmm13
vpalignr xmm13, xmm9, xmm10, 4
vpxor xmm14, xmm9, xmm11
vmovups xmmword [rsp + 0x60], xmm11
vpxor xmm8, xmm8, xmm13
vpalignr xmm13, xmm8, xmm9, 4
vaesenc xmm14, xmm14, xmm0
vpxor xmm14, xmm14, xmm8
vpxor xmm7, xmm7, xmm13
vpalignr xmm13, xmm7, xmm8, 4
vaesenc xmm14, xmm14, xmm0
vpxor xmm14, xmm14, xmm7
vpxor xmm6, xmm6, xmm13
vaesenc xmm14, xmm14, xmm0
vmovdqu xmm13, xmm6
vpxor xmm14, xmm14, xmm6
vmovups xmmword [rsp + 0x50], xmm5
vaesenc xmm14, xmm14, xmm0
vpxor xmm12, xmm14, xmm12
vmovups xmmword [rsp + 0x20], xmm9
vmovups xmmword [rsp + 0x30], xmm8
vmovups xmmword [rsp + 0x40], xmm7
cmp eax, 3
jne 0x50931d
vmovdqu xmm15, xmmword [rsp]
vmovd xmm4, r10d
not r8d
vaesenc xmm5, xmm5, xmm0
vaesenc xmm10, xmm10, xmm0
vaesenc xmm1, xmm1, xmm0
vaesenc xmm3, xmm3, xmm0
vpshufd xmm1, xmm1, 0x39
vpshufd xmm3, xmm3, 0x39
vpxor xmm1, xmm6, xmm1
vpxor xmm2, xmm1, xmm15
vpxor xmm1, xmm1, xmm3
vaesenc xmm2, xmm2, xmm0
vpshufd xmm3, xmm5, 0x39
vpxor xmm2, xmm2, xmm1
vpxor xmm1, xmm1, xmm3
vaesenc xmm2, xmm2, xmm0
vpshufd xmm3, xmm10, 0x39
vpxor xmm2, xmm2, xmm1
vpxor xmm1, xmm1, xmm3
vpinsrd xmm3, xmm4, r8d, 1
vmovd xmm4, edx
vaesenc xmm2, xmm2, xmm0
vpxor xmm14, xmm15, xmmword [rsp + 0xb0]
vpinsrd xmm4, xmm4, r9d, 1
vpxor xmm2, xmm2, xmm1
vpunpcklqdq xmm3, xmm4, xmm3
vpxor xmm11, xmm11, xmmword [rsp + 0x80]
vaesenc xmm2, xmm2, xmm0
vaesenc xmm9, xmm9, xmm0
vpxor xmm2, xmm11, xmm2
vmovdqu xmm4, xmmword [rsp + 0xa0]
vaesenc xmm8, xmm8, xmm0
vaesenc xmm7, xmm7, xmm0
vaesenc xmm6, xmm6, xmm0
vmovups xmmword [rcx + 0xa0], xmm14
vmovups xmm10, xmmword [rsp + 0x110]
vpxor xmm14, xmm4, xmmword [rsp + 0x10]
vpshufd xmm9, xmm9, 0x39
vpshufd xmm8, xmm8, 0x39
vpxor xmm9, xmm1, xmm9
vpshufd xmm7, xmm7, 0x39
vpxor xmm8, xmm9, xmm8
vpxor xmm1, xmm12, xmm9
vpxor xmm7, xmm3, xmm7
vaesenc xmm1, xmm1, xmm0
vpxor xmm7, xmm7, xmm8
vpxor xmm12, xmm12, xmmword [rsp + 0x90]
vpxor xmm1, xmm1, xmm8
vpshufd xmm6, xmm6, 0x39
vmovups xmmword [rcx + 0x80], xmm12
vaesenc xmm1, xmm1, xmm0
vmovups xmm8, xmmword [rsp + 0xf0]
vpxor xmm1, xmm1, xmm7
vaesenc xmm1, xmm1, xmm0
vpxor xmm6, xmm1, xmm6
vmovups xmm9, xmmword [rsp + 0x100]
vpxor xmm6, xmm6, xmm7
vaesenc xmm0, xmm6, xmm0
vpxor xmm0, xmm14, xmm0
vmovups xmm6, xmmword [rsp + 0xd0]
vmovups xmmword [rcx + 0x90], xmm2
vmovups xmm7, xmmword [rsp + 0xe0]
vmovups xmmword [rcx + 0xb0], xmm0
vmovups xmm11, xmmword [rsp + 0x120]
vmovups xmm12, xmmword [rsp + 0x130]
vmovups xmm13, xmmword [rsp + 0x140]
vmovups xmm14, xmmword [rsp + 0x150]
vmovups xmm15, xmmword [rsp + 0x160]
add rsp, 0x178
ret
vpxor xmm1, xmm1, xmmword [rsp + 0x70]
vaesenc xmm3, xmm4, xmm0
vpxor xmm11, xmm1, xmmword [rsp]
vpshufd xmm3, xmm3, 0x39
vaesenc xmm11, xmm11, xmm0
vpxor xmm3, xmm1, xmm3
jmp 0x509359
vmovd xmm2, r8d
vmovd xmm15, r9d
vpinsrd xmm2, xmm2, r10d, 1
vpinsrd xmm11, xmm15, r11d, 1
vpunpcklqdq xmm2, xmm2, xmm11
vpxor xmm6, xmm6, xmm2
jmp 0x509413