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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x354
mov eax, dword [0x4902b4]
xor eax, esp
mov dword [esp + 0x350], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x1c], ecx
push edi
mov edi, edx
cmp esi, 0x180
jbe 0x401cc8
mov eax, 0xffffffc8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x350]
xor ecx, esp
call fcn.00444b60
mov esp, ebp
pop ebp
ret
push 0x1a0
lea eax, [esp + 0x1bc]
push 0
push eax
call fcn.00447c10
add esp, 0xc
mov byte [esp + 0x1cf], 0x30
mov eax, esi
bswap eax
mov dword [esp + 0x1c8], eax
lea eax, [esp + 0x1d0]
push esi
push edi
push eax
call fcn.00447690
mov byte [esp + esi + 0x1dc], 0x80
add esp, 0xc
add esi, 0x19
xor eax, eax
mov dword [esp + 0x18], esi
mov byte [esp + eax + 0x198], al
inc eax
cmp eax, 0x20
jl 0x401d15
push pe_nt_image_headers32
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.00447c10
add esp, 0xc
lea edx, [esp + 0x198]
lea ecx, [esp + 0x38]
push 0x100
call fcn.00407430
add esp, 4
test eax, eax
jne 0x4020bf
mov edi, dword [esp + 0x3c]
xor ecx, ecx
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x18], 0
lea eax, [esp + 0x1b8]
xorps xmm0, xmm0
mov dword [esp + 0x1c], eax
movaps xmmword [esp + 0x150], xmm0
jbe 0x401ef5
lea edx, [esp + 0x150]
push 0x10
push eax
mov ecx, edx
call fcn.00401aa0
add dword [esp + 0x24], 0x10
add esp, 8
cmp esi, 0x10
mov eax, esi
mov ecx, 0x10
cmovae eax, ecx
sub esi, eax
cmp dword [0x49411c], 0
mov dword [esp + 0x24], esi
jne 0x401deb
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 dword [0x494110], ecx
mov dword [0x494114], edx
mov dword [0x494118], eax
mov dword [0x49411c], 1
test dword [0x494118], 0x2000000
je 0x401e0c
lea eax, [esp + 0x40]
shr eax, 2
and eax, 3
je 0x401e0c
mov esi, 4
sub esi, eax
jmp 0x401e0e
xor esi, esi
cmp esi, edi
je 0x401e39
mov eax, dword [esp + 0x38]
inc eax
shl eax, 4
push eax
lea eax, [esp + 0x44]
lea eax, [eax + edi*4]
push eax
lea eax, [esp + 0x48]
lea eax, [eax + esi*4]
push eax
call fcn.00446cd0
mov edi, esi
add esp, 0xc
mov dword [esp + 0x3c], edi
cmp dword [0x49411c], 0
jne 0x401e77
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 dword [0x494110], ecx
mov dword [0x494114], edx
mov dword [0x494118], eax
mov dword [0x49411c], 1
test dword [0x494118], 0x2000000
je 0x401ebf
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x40]
movaps xmm0, xmmword [eax + edi*4]
lea eax, [eax + edi*4]
pxor xmm0, xmmword [esp + 0x150]
add eax, 0x10
add ecx, 0xffffffff
je 0x401eb0
aesenc xmm0, xmmword [eax]
add eax, 0x10
sub ecx, 1
jne 0x401ea3
aesenclast xmm0, xmmword [eax]
movaps xmmword [esp + 0x150], xmm0
jmp 0x401ee1
lea eax, [esp + 0x150]
push eax
mov edx, eax
lea ecx, [esp + 0x3c]
call fcn.00408700
add esp, 4
test eax, eax
jne 0x4020bf
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
test esi, esi
jne 0x401d81
mov ecx, dword [esp + 0x14]
movups xmm0, xmmword [esp + 0x150]
inc byte [esp + 0x1bb]
mov esi, dword [esp + 0x18]
movups xmmword [esp + ecx + 0x168], xmm0
add ecx, 0x10
mov dword [esp + 0x14], ecx
cmp ecx, 0x30
jl 0x401d60
push 0x100
lea edx, [esp + 0x16c]
lea ecx, [esp + 0x3c]
call fcn.00407430
add esp, 4
test eax, eax
jne 0x4020bf
movups xmm1, xmmword [esp + 0x188]
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
movups xmmword [esp + 0x28], xmm1
cmp dword [0x49411c], 0
jne 0x401f9f
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 dword [0x494110], ecx
mov dword [0x494114], edx
mov dword [0x494118], eax
mov dword [0x49411c], 1
test dword [0x494118], 0x2000000
je 0x401fc0
lea eax, [esp + 0x40]
shr eax, 2
and eax, 3
je 0x401fc0
mov esi, 4
sub esi, eax
jmp 0x401fc2
xor esi, esi
cmp esi, edi
je 0x401ff2
mov eax, dword [esp + 0x38]
inc eax
shl eax, 4
push eax
lea eax, [esp + 0x44]
lea eax, [eax + edi*4]
push eax
lea eax, [esp + 0x48]
lea eax, [eax + esi*4]
push eax
call fcn.00446cd0
movups xmm1, xmmword [esp + 0x34]
mov edi, esi
add esp, 0xc
mov dword [esp + 0x3c], edi
cmp dword [0x49411c], 0
jne 0x402030
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 dword [0x494110], ecx
mov dword [0x494114], edx
mov dword [0x494118], eax
mov dword [0x49411c], 1
test dword [0x494118], 0x2000000
je 0x402072
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x40]
pxor xmm1, xmmword [ecx + edi*4]
lea ecx, [ecx + edi*4]
add ecx, 0x10
add eax, 0xffffffff
je 0x402061
aesenc xmm1, xmmword [ecx]
add ecx, 0x10
sub eax, 1
jne 0x402054
aesenclast xmm1, xmmword [ecx]
movups xmmword [esp + 0x188], xmm1
xor eax, eax
jmp 0x402098
lea eax, [esp + 0x188]
push eax
mov edx, eax
lea ecx, [esp + 0x3c]
call fcn.00408700
add esp, 4
test eax, eax
jne 0x4020bf
mov edi, dword [esp + 0x3c]
movups xmm1, xmmword [esp + 0x188]
mov ecx, dword [esp + 0x18]
movups xmmword [esp + 0x28], xmm1
movups xmmword [ecx], xmm1
add ecx, 0x10
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x14]
add ecx, 0x10
mov dword [esp + 0x14], ecx
cmp ecx, 0x30
jl 0x401f61
mov edx, pe_nt_image_headers32
lea ecx, [esp + 0x38]
nop dword [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x4020d0
mov edx, 0x1a0
lea ecx, [esp + 0x1b8]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x4020e7
mov edx, 0x30
lea ecx, [esp + 0x168]
nop
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x402100
mov edx, 0x20
lea ecx, [esp + 0x198]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x402117
mov edx, 0x10
lea ecx, [esp + 0x150]
nop
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x402130
test eax, eax
je 0x40215b
mov edx, dword [esp + 0x20]
mov ecx, 0x30
nop dword [eax + eax]
mov byte [edx], 0
lea edx, [edx + 1]
sub ecx, 1
jne 0x402150
mov ecx, dword [esp + 0x35c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00444b60
mov esp, ebp
pop ebp
ret