Function at 0x4040d0
Capabilities:
Encode data using xor
Encrypt data using aes via x86 extensions

Disassembly:
mov ecx, dword [esp + 4]
push esi
push edi
push ebp
mov ebp, esp
sub esp, 0x100
and esp, 0xfffffff0
mov eax, dword [ecx + 0x10]
mov esi, dword [ecx]
mov edi, dword [ecx + 4]
mov ecx, dword [ecx + 8]
sub edi, esi
test eax, eax
je 0x40446d
cmp eax, 4
jl 0x4043b0
test ecx, 0xf
je 0x4041e0
movdqu xmm4, xmmword [ecx]
movdqa xmmword [esp], xmm4
movdqu xmm4, xmmword [ecx + 0x10]
movdqa xmmword [esp + 0x10], xmm4
movdqu xmm4, xmmword [ecx + 0x20]
movdqa xmmword [esp + 0x20], xmm4
movdqu xmm4, xmmword [ecx + 0x30]
movdqa xmmword [esp + 0x30], xmm4
movdqu xmm4, xmmword [ecx + 0x40]
movdqa xmmword [esp + 0x40], xmm4
movdqu xmm4, xmmword [ecx + 0x50]
movdqa xmmword [esp + 0x50], xmm4
movdqu xmm4, xmmword [ecx + 0x60]
movdqa xmmword [esp + 0x60], xmm4
movdqu xmm4, xmmword [ecx + 0x70]
movdqa xmmword [esp + 0x70], xmm4
movdqu xmm4, xmmword [ecx + 0x80]
movdqa xmmword [esp + 0x80], xmm4
movdqu xmm4, xmmword [ecx + 0x90]
movdqa xmmword [esp + 0x90], xmm4
movdqu xmm4, xmmword [ecx + 0xa0]
movdqa xmmword [esp + 0xa0], xmm4
movdqu xmm4, xmmword [ecx + 0xb0]
movdqa xmmword [esp + 0xb0], xmm4
movdqu xmm4, xmmword [ecx + 0xc0]
movdqa xmmword [esp + 0xc0], xmm4
movdqu xmm4, xmmword [ecx + 0xd0]
movdqa xmmword [esp + 0xd0], xmm4
movdqu xmm4, xmmword [ecx + 0xe0]
movdqa xmmword [esp + 0xe0], xmm4
mov ecx, esp
nop
test eax, eax
je 0x40446d
cmp eax, 4
jl 0x4043b0
movdqa xmm4, xmmword [ecx]
movdqu xmm0, xmmword [esi]
pxor xmm0, xmm4
movdqu xmm1, xmmword [esi + 0x10]
pxor xmm1, xmm4
movdqu xmm2, xmmword [esi + 0x20]
pxor xmm2, xmm4
movdqu xmm3, xmmword [esi + 0x30]
pxor xmm3, xmm4
add esi, 0x40
movdqa xmm4, xmmword [ecx + 0x10]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x20]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x30]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x40]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x50]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x60]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x70]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x80]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0x90]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0xa0]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0xb0]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0xc0]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0xd0]
aesenc xmm0, xmm4
aesenc xmm1, xmm4
aesenc xmm2, xmm4
aesenc xmm3, xmm4
movdqa xmm4, xmmword [ecx + 0xe0]
aesenclast xmm0, xmm4
aesenclast xmm1, xmm4
aesenclast xmm2, xmm4
aesenclast xmm3, xmm4
movdqu xmmword [esi + edi - 0x40], xmm0
movdqu xmmword [esi + edi - 0x30], xmm1
movdqu xmmword [esi + edi - 0x20], xmm2
movdqu xmmword [esi + edi - 0x10], xmm3
sub eax, 4
jmp 0x4041e0
movdqu xmm0, xmmword [esi]
add esi, 0x10
movdqu xmm4, xmmword [ecx]
pxor xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x10]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x20]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x30]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x40]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x50]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x60]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x70]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x80]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0x90]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0xa0]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0xb0]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0xc0]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0xd0]
aesenc xmm0, xmm4
movdqu xmm4, xmmword [ecx + 0xe0]
aesenclast xmm0, xmm4
movdqu xmmword [esi + edi - 0x10], xmm0
dec eax
jne 0x4043b0
mov esp, ebp
pop ebp
pop edi
pop esi
ret