Function at 0x40f710
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, 0xd8
push esi
push edi
push ecx
push dword [ebx + 0xc]
mov edi, edx
mov esi, ecx
call fcn.00472020
mov eax, dword [ebx + 0xc]
lea ecx, [esi + edi]
add esp, 4
add eax, 0xd0
mov edx, edi
mov dword [ebp - 0x30], eax
push eax
call fcn.00472020
mov edi, dword [ebx + 0xc]
add esp, 8
mov ecx, edi
mov eax, dword [edi + 0x1a0]
mov edx, eax
mov dword [ebp - 0x20], eax
lea esi, [eax + 0x100000]
mov dword [ebp - 0x50], esi
call fcn.0047d820
mov edx, esi
lea ecx, [edi + 0xd0]
call fcn.0047d820
mov ecx, dword [edi + 0x24]
xor ecx, dword [edi + 4]
mov edx, dword [edi + 0xf0]
xor edx, dword [edi + 0xd0]
mov eax, dword [edi + 0x20]
xor eax, dword [edi]
mov esi, dword [edi + 0xf4]
xor esi, dword [edi + 0xd4]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x8c], ecx
lea ecx, [edi + 0xd0]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x90], eax
mov eax, dword [edi + 0x28]
xor eax, dword [edi + 8]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0xa0], edx
mov edx, dword [edi + 0x2c]
xor edx, dword [edi + 0xc]
mov eax, edx
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x84], eax
mov eax, dword [ecx + 0x28]
xor eax, dword [ecx + 8]
mov ecx, dword [ecx + 0x2c]
xor ecx, dword [edi + 0xdc]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x98], eax
mov eax, dword [edi + 0x3c]
xor eax, dword [edi + 0x1c]
mov dword [ebp - 0x94], ecx
mov ecx, dword [edi + 0x38]
xor ecx, dword [edi + 0x18]
mov dword [ebp - 8], ecx
mov ecx, dword [edi + 0x30]
xor ecx, dword [edi + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x34]
xor eax, dword [edi + 0x14]
mov edi, dword [ebp - 0x30]
movq xmm0, qword [ebp - 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
mov ecx, dword [edi + 0x38]
movq xmm4, qword [ebp - 8]
mov eax, dword [edi + 0x3c]
xor ecx, dword [edi + 0x18]
xor eax, dword [edi + 0x1c]
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0x18], edx
punpcklqdq xmm4, xmm0
mov edx, dword [ebp - 0x50]
mov dword [ebp - 8], ecx
mov ecx, dword [edi + 0x30]
xor ecx, dword [edi + 0x10]
mov dword [ebp - 4], eax
movq xmm0, qword [ebp - 8]
mov eax, dword [edi + 0x34]
xor eax, dword [edi + 0x14]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
movq xmm5, qword [ebp - 8]
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x34], esi
lea esi, [edx + 8]
punpcklqdq xmm5, xmm0
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0x30], 0x40000
jmp 0x40f8a3
mov edx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x20]
and eax, 0xffff0
movq xmm0, qword [ebp - 0x88]
and ecx, 0xffff0
movq xmm1, qword [ebp - 0x90]
xor edi, edi
punpcklqdq xmm1, xmm0
movups xmm3, xmmword [eax + esi]
movups xmm2, xmmword [ecx + edx]
movq xmm0, qword [ebp - 0x98]
aesenc xmm3, xmm1
movq xmm1, qword [ebp - 0xa0]
punpcklqdq xmm1, xmm0
movaps xmm0, xmm3
pxor xmm0, xmm4
movaps xmmword [ebp - 0xc0], xmm3
movups xmmword [eax + esi], xmm0
aesenc xmm2, xmm1
movd eax, xmm3
movaps xmm0, xmm2
pxor xmm0, xmm5
movaps xmmword [ebp - 0xd0], xmm2
movups xmmword [ecx + edx], xmm0
movaps xmm0, xmm3
mov ecx, dword [ebp - 0x20]
or edi, eax
movd eax, xmm2
xor edx, edx
psrldq xmm0, 4
movd esi, xmm0
movaps xmm0, xmm2
or edx, eax
psrldq xmm0, 4
mov eax, edi
mov dword [ebp - 0x48], edx
and eax, 0xffff0
mov dword [ebp - 0x58], esi
add ecx, eax
movd dword [ebp - 0x80], xmm0
mov dword [ebp - 0x60], ecx
push 0
push esi
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x20]
add ecx, 8
mov dword [ebp - 0x3c], edx
add eax, ecx
push 0
mov dword [ebp - 0x64], eax
push edx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x34], eax
call fcn.0042bf70
push 0
push edi
push 0
push dword [ebp - 0x3c]
mov dword [ebp - 0x10], eax
mov esi, edx
call fcn.0042bf70
push 0
push edi
push 0
push dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x54], edx
call fcn.0042bf70
mov edi, eax
mov ecx, edx
mov eax, dword [ebp - 0x10]
add edi, eax
adc ecx, esi
mov dword [ebp - 0x5c], ecx
cmp ecx, esi
ja 0x40f9c6
jb 0x40f9b6
cmp edi, eax
jae 0x40f9c6
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 1
jmp 0x40f9da
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0xc]
xor esi, esi
add esi, ecx
adc edi, dword [ebp - 0x54]
cmp edi, dword [ebp - 0x54]
ja 0x40f9ff
jb 0x40f9ef
cmp esi, ecx
jae 0x40f9ff
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x10], 0
jmp 0x40fa13
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
push 0
push dword [ebp - 0x58]
push 0
push dword [ebp - 0x14]
call fcn.0042bf70
add eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x44]
adc edx, 0
add eax, dword [ebp - 0x24]
push 0
adc edx, dword [ebp - 0x28]
add eax, dword [ebp - 0xc]
push dword [ebp - 0x80]
adc edx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [ebp - 0x60]
adc dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x1c]
add dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x2c]
adc dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x18]
mov dword [eax], ecx
xor ecx, dword [ebp - 0x3c]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x64]
xor edx, dword [ebp - 0x14]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x90], ecx
mov dword [eax], esi
xor esi, dword [ebp - 0x6c]
mov dword [eax + 4], edi
mov eax, dword [ebp - 0x48]
xor edi, dword [ebp - 0x34]
and eax, 0xffff0
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x20]
add ecx, 0x100000
mov dword [ebp - 0x1c], edx
add ecx, eax
mov dword [ebp - 0x8c], edx
add eax, dword [ebp - 0xa4]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x18], edi
mov edx, dword [ecx]
mov dword [ebp - 0x84], edi
mov edi, dword [ecx + 4]
mov dword [ebp - 0x60], ecx
mov ecx, dword [eax]
push 0
mov dword [ebp - 0x5c], eax
mov eax, dword [eax + 4]
push edx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], eax
call fcn.0042bf70
push 0
push dword [ebp - 0x48]
mov dword [ebp - 0x34], eax
mov esi, edx
push 0
push dword [ebp - 0x24]
call fcn.0042bf70
push 0
push dword [ebp - 0x48]
mov dword [ebp - 0x6c], eax
push 0
push edi
mov dword [ebp - 0x64], edx
call fcn.0042bf70
mov edi, eax
mov ecx, edx
mov eax, dword [ebp - 0x34]
add edi, eax
adc ecx, esi
mov dword [ebp - 0x34], ecx
cmp ecx, esi
ja 0x40fb22
jb 0x40fb12
cmp edi, eax
jae 0x40fb22
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x10], 1
jmp 0x40fb36
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x6c]
xor esi, esi
add esi, ecx
adc edi, dword [ebp - 0x64]
cmp edi, dword [ebp - 0x64]
ja 0x40fb5b
jb 0x40fb4b
cmp esi, ecx
jae 0x40fb5b
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x28], 0
jmp 0x40fb6f
xorps xmm0, xmm0
movlpd qword [ebp - 0x70], xmm0
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0xc], eax
push 0
push dword [ebp - 0x80]
push 0
push dword [ebp - 0x14]
call fcn.0042bf70
add eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x4c]
adc edx, 0
movaps xmm4, xmmword [ebp - 0xc0]
add eax, dword [ebp - 0x3c]
movaps xmm5, xmmword [ebp - 0xd0]
adc edx, dword [ebp - 0x10]
add eax, dword [ebp - 0xc]
adc edx, dword [ebp - 0x28]
add ecx, eax
mov eax, dword [ebp - 0x7c]
adc eax, edx
mov edx, dword [ebp - 0x74]
add edx, esi
mov esi, dword [ebp - 0x78]
adc esi, edi
mov edi, dword [ebp - 0x60]
mov dword [edi], ecx
xor ecx, dword [ebp - 0x24]
mov dword [edi + 4], eax
mov edi, dword [ebp - 0x5c]
xor eax, dword [ebp - 0x14]
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x9c], eax
mov dword [edi], edx
xor edx, dword [ebp - 0x58]
mov dword [edi + 4], esi
xor esi, dword [ebp - 0x54]
sub dword [ebp - 0x30], 1
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x94], esi
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0xa0], ecx
jne 0x40f8a0
mov edi, dword [ebx + 0xc]
mov edx, edi
mov ecx, dword [ebp - 0x20]
call fcn.0047d490
mov ecx, dword [ebp - 0x50]
lea edx, [edi + 0xd0]
call fcn.0047d490
mov ecx, edi
call fcn.00471710
lea ecx, [edi + 0xd0]
call fcn.00471710
movzx eax, byte [edi]
mov esi, dword [ebx + 8]
and eax, 3
push esi
push 0xc8
push edi
mov eax, dword [eax*4 + 0x495ed0]
call eax
movzx ecx, byte [edi + 0xd0]
lea edx, [edi + 0xd0]
add esp, 0xc
lea eax, [esi + 0x20]
and ecx, 3
push eax
mov eax, dword [ecx*4 + 0x495ed0]
push 0xc8
push edx
call eax
add esp, 0xc
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret