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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x88
push esi
mov esi, dword [ebx + 0xc]
push edi
push ecx
push esi
call fcn.00472020
mov edx, dword [esi + 0x1a0]
add esp, 8
mov ecx, esi
call fcn.0047eee0
mov eax, dword [esi + 0x20]
xor eax, dword [esi]
mov ecx, dword [esi + 0x2c]
xor ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x24]
xor edx, dword [esi + 4]
mov edi, dword [esi + 0x1a0]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x70], eax
mov eax, dword [esi + 0x28]
xor eax, dword [esi + 8]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x64], ecx
mov ecx, dword [esi + 0x38]
xor ecx, dword [esi + 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x68], eax
mov eax, dword [esi + 0x3c]
xor eax, dword [esi + 0x1c]
mov dword [ebp - 0x58], ecx
mov ecx, dword [esi + 0x30]
xor ecx, dword [esi + 0x10]
mov dword [ebp - 0x54], eax
mov eax, dword [esi + 0x34]
movq xmm0, qword [ebp - 0x58]
xor eax, dword [esi + 0x14]
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x54], eax
lea eax, [edi + 8]
mov dword [ebp - 0x58], ecx
mov ecx, esi
movq xmm3, qword [ebp - 0x58]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x6c], edx
punpcklqdq xmm3, xmm0
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0x80000
nop word [eax + eax]
movq xmm0, qword [ebp - 0x68]
and ecx, 0x1ffff0
movq xmm1, qword [ebp - 0x70]
punpcklqdq xmm1, xmm0
push 0
movups xmm2, xmmword [ecx + edi]
aesenc xmm2, xmm1
movaps xmm0, xmm2
movd eax, xmm2
pxor xmm0, xmm3
movaps xmmword [ebp - 0x80], xmm2
movups xmmword [ecx + edi], xmm0
xor ecx, ecx
or ecx, eax
movaps xmm0, xmm2
mov eax, ecx
psrldq xmm0, 4
and eax, 0x1ffff0
mov dword [ebp - 8], ecx
movd edx, xmm0
lea ecx, [eax + edi]
mov dword [ebp - 0x40], edx
add eax, dword [ebp - 0x38]
mov edi, dword [ecx]
mov dword [ebp - 0x48], ecx
mov ecx, dword [ecx + 4]
push edx
mov dword [ebp - 4], ecx
mov ecx, dword [eax]
push 0
mov dword [ebp - 0x4c], eax
mov eax, dword [eax + 4]
push edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x54], eax
call fcn.0042bf70
push 0
push dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov edi, edx
push 0
push dword [ebp - 0x2c]
call fcn.0042bf70
push 0
push dword [ebp - 8]
mov dword [ebp - 0x14], eax
push 0
push dword [ebp - 4]
mov dword [ebp - 0x3c], edx
call fcn.0042bf70
mov ecx, dword [ebp - 0x1c]
add eax, ecx
adc edx, edi
mov dword [ebp - 0x44], edx
cmp edx, edi
ja 0x40c6d7
jb 0x40c6c7
cmp eax, ecx
jae 0x40c6d7
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 1
jmp 0x40c6eb
xorps xmm0, xmm0
movlpd qword [ebp - 0x20], xmm0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0x14]
xor edi, edi
mov edx, dword [ebp - 0x3c]
add edi, ecx
adc eax, edx
mov dword [ebp - 0x3c], eax
cmp eax, edx
ja 0x40c714
jb 0x40c704
cmp edi, ecx
jae 0x40c714
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x1c], 0
jmp 0x40c728
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
push 0
push dword [ebp - 0x40]
push 0
push dword [ebp - 4]
call fcn.0042bf70
add eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x24]
adc edx, 0
movaps xmm3, xmmword [ebp - 0x80]
add eax, dword [ebp - 8]
adc edx, dword [ebp - 0xc]
add eax, dword [ebp - 0x14]
adc edx, dword [ebp - 0x1c]
add esi, eax
mov eax, dword [ebp - 0x30]
adc eax, edx
mov edx, dword [ebp - 0x28]
add ecx, edi
mov edi, dword [ebp - 0x48]
adc edx, dword [ebp - 0x3c]
mov dword [edi], esi
xor esi, dword [ebp - 0x2c]
mov dword [edi + 4], eax
mov edi, dword [ebp - 0x4c]
xor eax, dword [ebp - 4]
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x30], eax
mov dword [edi], ecx
xor ecx, dword [ebp - 0x50]
mov dword [edi + 4], edx
xor edx, dword [ebp - 0x54]
sub dword [ebp - 0x34], 1
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x68], ecx
mov ecx, esi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x54], eax
jne 0x40c610
mov esi, dword [ebx + 0xc]
mov edx, esi
mov ecx, dword [esi + 0x1a0]
call fcn.0047eb50
mov ecx, esi
call fcn.00471710
movzx eax, byte [esi]
push dword [ebx + 8]
and eax, 3
push 0xc8
push esi
mov eax, dword [eax*4 + 0x495ed0]
call eax
add esp, 0xc
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret