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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x10], esi
push edi
cmp edx, 1
je 0x409717
test edx, edx
je 0x409717
mov eax, 0xffffffdf
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
cmp edi, 0xf
ja 0x40970b
mov eax, dword [ebp + 8]
test edx, edx
jne 0x409837
test eax, eax
je 0x40992d
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
sub edx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], edx
dec eax
mov dword [esp + 0x1c], eax
test edi, edi
jne 0x4097f4
mov ecx, esi
call fcn.004090e0
cmp dword [0x49411c], edi
jne 0x40979b
mov eax, 1
xor ecx, ecx
push ebx
cpuid
mov esi, ebx
pop ebx
mov dword [0x494108], eax
mov eax, ecx
mov dword [0x49410c], esi
mov esi, dword [esp + 0x14]
mov dword [0x494110], ecx
mov dword [0x494114], edx
mov dword [0x494118], eax
mov dword [0x49411c], 1
jmp 0x4097a0
mov eax, dword [0x494118]
test eax, 0x2000000
je 0x4097dc
mov eax, dword [esi + 4]
mov edx, dword [ebp + 0x10]
lea eax, [esi + eax*4]
movaps xmm1, xmmword [eax + 8]
add eax, 0x18
mov ecx, dword [esi]
movups xmm0, xmmword [edx]
pxor xmm1, xmm0
sub ecx, 1
je 0x4097d2
aesenc xmm1, xmmword [eax]
add eax, 0x10
sub ecx, 1
jne 0x4097c5
aesenclast xmm1, xmmword [eax]
movups xmmword [edx], xmm1
jmp 0x4097f4
mov eax, dword [ebp + 0x10]
mov ecx, esi
push eax
mov edx, eax
call fcn.00408700
add esp, 4
test eax, eax
jne 0x409934
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
inc dword [esp + 0x10]
movzx edx, byte [ecx + eax]
mov ecx, dword [ebp + 0x10]
mov al, byte [ecx + edi]
xor al, dl
mov byte [esi], al
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov byte [ecx + edi], dl
inc edi
and edi, 0xf
test eax, eax
jne 0x409744
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x40992d
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x18], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x10], ecx
dec eax
mov dword [esp + 0x1c], eax
test edi, edi
jne 0x409902
mov ecx, esi
call fcn.004090e0
cmp dword [0x49411c], edi
jne 0x4098a7
mov eax, 1
xor ecx, ecx
push ebx
cpuid
mov esi, ebx
pop ebx
mov dword [0x494108], eax
mov eax, ecx
mov dword [0x49410c], esi
mov esi, dword [esp + 0x14]
mov dword [0x494110], ecx
mov dword [0x494114], edx
mov dword [0x494118], eax
mov dword [0x49411c], 1
jmp 0x4098ac
mov eax, dword [0x494118]
test eax, 0x2000000
je 0x4098e7
mov edx, dword [ebp + 0x10]
mov eax, dword [esi + 4]
mov ecx, dword [esi]
lea eax, [esi + eax*4]
movups xmm0, xmmword [edx]
pxor xmm0, xmmword [eax + 8]
add eax, 0x18
sub ecx, 1
je 0x4098dd
nop
aesenc xmm0, xmmword [eax]
add eax, 0x10
sub ecx, 1
jne 0x4098d0
aesenclast xmm0, xmmword [eax]
movups xmmword [edx], xmm0
jmp 0x4098fe
mov eax, dword [ebp + 0x10]
mov ecx, esi
push eax
mov edx, eax
call fcn.00408700
add esp, 4
test eax, eax
jne 0x409934
mov edx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
mov al, byte [edi + edx]
mov esi, dword [esp + 0x18]
inc dword [esp + 0x18]
xor al, byte [esi]
mov esi, dword [esp + 0x14]
mov byte [ecx], al
inc ecx
mov byte [edi + edx], al
inc edi
mov eax, dword [esp + 0x1c]
and edi, 0xf
mov dword [esp + 0x10], ecx
test eax, eax
jne 0x409850
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret