Function at 0x4c3223
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using aes via x86 extensions
Reference aes constants

Disassembly:
sub esp, 0x1c
mov dword [esp + 0x14], ebp
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x24]
and eax, 0xfffffff0
je 0x4c349e
mov ebx, dword [esp + 0x20]
add eax, ebx
mov dword [esp + 0x24], eax
mov dword [esp + 8], ecx
mov esi, dword [ecx + 0x1d0]
add esi, ecx
mov dword [esp + 4], esi
test byte [0x4e1850], 0xff
jne 0x4c34b4
mov ecx, dword [edx]
mov edi, dword [edx + 4]
mov eax, dword [edx + 8]
mov ebp, dword [edx + 0xc]
lea esp, [esp]
lea esp, [esp]
mov edx, dword [ebx + 8]
xor ebp, dword [ebx + 0xc]
xor edx, eax
mov eax, dword [ebx]
mov ebx, dword [ebx + 4]
xor eax, ecx
mov ecx, dword [esp + 8]
xor ebx, edi
xor eax, dword [ecx]
xor ebx, dword [ecx + 4]
xor edx, dword [ecx + 8]
xor ebp, dword [ecx + 0xc]
lea ecx, [ecx + 0x10]
mov dword [esp], ecx
lea esp, [esp]
lea ecx, [ecx]
push ebp
movzx ecx, al
mov ecx, dword [ecx*4 + 0x4ca000]
movzx esi, ah
shr eax, 0x10
mov ebp, dword [esi*4 + 0x4ca400]
movzx edi, ah
mov edi, dword [edi*4 + 0x4cac00]
movzx eax, al
mov eax, dword [eax*4 + 0x4ca800]
movzx esi, bl
xor edi, dword [esi*4 + 0x4ca000]
movzx esi, bh
shr ebx, 0x10
xor ecx, dword [esi*4 + 0x4ca400]
movzx esi, bl
xor ebp, dword [esi*4 + 0x4ca800]
movzx ebx, bh
xor eax, dword [ebx*4 + 0x4cac00]
pop ebx
movzx esi, dl
xor eax, dword [esi*4 + 0x4ca000]
movzx esi, dh
xor edi, dword [esi*4 + 0x4ca400]
shr edx, 0x10
movzx esi, dl
xor ecx, dword [esi*4 + 0x4ca800]
movzx edx, dh
xor ebp, dword [edx*4 + 0x4cac00]
mov esi, dword [esp]
movzx edx, bl
xor ebp, dword [edx*4 + 0x4ca000]
movzx edx, bh
xor eax, dword [edx*4 + 0x4ca400]
shr ebx, 0x10
movzx edx, bl
xor edi, dword [edx*4 + 0x4ca800]
movzx ebx, bh
xor ecx, dword [ebx*4 + 0x4cac00]
mov edx, dword [esi + 8]
xor edx, eax
mov eax, dword [esi]
xor eax, ecx
xor ebp, dword [esi + 0xc]
mov ebx, dword [esi + 4]
xor ebx, edi
add esi, 0x10
cmp esi, dword [esp + 4]
mov dword [esp], esi
jb 0x4c32b0
push ebp
movzx ecx, al
movzx ecx, byte [ecx + str.cw]
movzx esi, ah
shr eax, 0x10
movzx ebp, byte [esi + str.cw]
movzx edi, ah
shl ebp, 8
movzx edi, byte [edi + str.cw]
movzx eax, al
shl edi, 0x18
movzx eax, byte [eax + str.cw]
shl eax, 0x10
movzx esi, bl
movzx esi, byte [esi + str.cw]
or edi, esi
movzx esi, bh
shr ebx, 0x10
movzx esi, byte [esi + str.cw]
shl esi, 8
or ecx, esi
movzx esi, bl
movzx esi, byte [esi + str.cw]
movzx ebx, bh
shl esi, 0x10
movzx ebx, byte [ebx + str.cw]
or ebp, esi
shl ebx, 0x18
or eax, ebx
movzx esi, dl
movzx esi, byte [esi + str.cw]
movzx ebx, dh
shr edx, 0x10
movzx ebx, byte [ebx + str.cw]
or eax, esi
shl ebx, 8
movzx esi, dl
movzx esi, byte [esi + str.cw]
or edi, ebx
pop ebx
movzx edx, dh
movzx edx, byte [edx + str.cw]
shl esi, 0x10
or ecx, esi
shl edx, 0x18
or ebp, edx
movzx esi, bl
movzx esi, byte [esi + str.cw]
movzx edx, bh
shr ebx, 0x10
movzx edx, byte [edx + str.cw]
or ebp, esi
shl edx, 8
or eax, edx
mov edx, dword [esp]
movzx esi, bl
movzx esi, byte [esi + str.cw]
movzx ebx, bh
movzx ebx, byte [ebx + str.cw]
shl esi, 0x10
shl ebx, 0x18
or edi, esi
or ecx, ebx
xor ecx, dword [edx]
xor edi, dword [edx + 4]
xor eax, dword [edx + 8]
xor ebp, dword [edx + 0xc]
mov ebx, dword [esp + 0x20]
mov dword [ebx], ecx
mov dword [ebx + 4], edi
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], ebp
add ebx, 0x10
cmp ebx, dword [esp + 0x24]
mov dword [esp + 0x20], ebx
jb 0x4c3280
mov dword [esp - 4], ebx
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
add esp, 0x1c
ret 8
movups xmm0, xmmword [edx]
mov edi, ecx
movups xmm1, xmmword [ebx]
pxor xmm0, xmm1
mov ecx, edi
movups xmm1, xmmword [ecx]
pxor xmm0, xmm1
add ecx, 0x10
movups xmm1, xmmword [ecx]
aesenc xmm0, xmm1
add ecx, 0x10
cmp ecx, esi
jb 0x4c34cc
movups xmm1, xmmword [esi]
aesenclast xmm0, xmm1
movups xmmword [ebx], xmm0
add ebx, 0x10
cmp ebx, eax
jb 0x4c34b9
jmp 0x4c349e