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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
jmp 0x401766
cmp dword [ebp + 0xc], eax
jbe 0x40176e
mov edx, ecx
sub edx, dword [ecx + 0x124]
mov dl, byte [edx + 0x30]
xor byte [edi], dl
inc edi
dec dword [ecx + 0x124]
dec dword [ebp + 0xc]
cmp dword [ecx + 0x124], eax
ja 0x40174a
mov ebx, dword [ebp + 0xc]
movdqa xmm1, xmmword [ecx + 0x10]
movdqa xmm2, xmmword [0x413880]
movdqa xmm3, xmmword [0x413870]
push 0x10
pop edx
cmp ebx, edx
jb 0x401892
pxor xmm4, xmm4
shr ebx, 4
mov esi, dword [ecx + 0x120]
lea eax, [ecx + 0x30]
movdqa xmm5, xmmword [eax]
movdqa xmm0, xmm1
pshufb xmm0, xmm2
pxor xmm0, xmm5
cmp esi, edx
je 0x4017f0
cmp esi, 0x18
je 0x4017da
cmp esi, 0x20
jne 0x40185d
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
add eax, edx
movdqa xmm5, xmmword [eax]
aesenc xmm0, xmm5
movdqa xmm5, xmmword [eax + edx]
aesenc xmm0, xmm5
movdqa xmm5, xmmword [eax + edx + 0x10]
aesenclast xmm0, xmm5
sub dword [ebp + 0xc], edx
paddq xmm1, xmm3
movdqa xmm5, xmm1
pcmpeqq xmm1, xmm4
movdqa xmm6, xmm4
punpcklqdq xmm6, xmm1
psubq xmm5, xmm6
movdqa xmm1, xmm5
movdqu xmm5, xmmword [edi]
pxor xmm0, xmm5
movdqu xmmword [edi], xmm0
add edi, edx
dec ebx
jne 0x401798
cmp dword [ebp + 0xc], 0
je 0x4019a4
mov esi, dword [ecx + 0x120]
lea eax, [ecx + 0x30]
movdqa xmm0, xmm1
pshufb xmm0, xmm2
movdqa xmm2, xmmword [eax]
pxor xmm0, xmm2
cmp esi, edx
je 0x4018f4
cmp esi, 0x18
je 0x4018de
cmp esi, 0x20
jne 0x401961
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
add eax, edx
movdqa xmm2, xmmword [eax]
aesenc xmm0, xmm2
movdqa xmm2, xmmword [eax + edx]
aesenc xmm0, xmm2
movdqa xmm2, xmmword [eax + edx + 0x10]
aesenclast xmm0, xmm2
movdqa xmmword [ecx + 0x20], xmm0
movdqa xmm0, xmm1
paddq xmm0, xmm3
pxor xmm2, xmm2
movdqa xmm1, xmm0
xor esi, esi
movdqa xmm3, xmm2
pcmpeqq xmm0, xmm2
punpcklqdq xmm3, xmm0
psubq xmm1, xmm3
cmp dword [ebp + 0xc], esi
jbe 0x40199b
mov al, byte [ecx + esi + 0x20]
xor byte [esi + edi], al
inc esi
cmp esi, dword [ebp + 0xc]
jb 0x40198e
sub edx, dword [ebp + 0xc]
mov dword [ecx + 0x124], edx
pop edi
pop esi
movdqa xmmword [ecx + 0x10], xmm1
pop ebx
mov esp, ebp
pop ebp
ret 8