Function at 0x49a480
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov esi, dword [esp + 0x18]
mov eax, 0xffffffff
test esi, esi
je 0x49a793
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x49a793
mov edi, dword [esp + 0x1c]
cmp edi, 0x80
je 0x49a4ce
cmp edi, 0x100
je 0x49a4d5
mov eax, 0xfffffffe
cmp edi, 0xc0
jne 0x49a793
mov eax, 0xc
jmp 0x49a4da
mov eax, 0xa
jmp 0x49a4da
mov eax, 0xe
mov dword [ecx + 0xf0], eax
cmp edi, 0x80
mov edx, dword [esi]
bswap edx
mov dword [ecx], edx
mov eax, dword [esi + 4]
bswap eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
bswap eax
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xc]
bswap eax
mov dword [ecx + 0xc], eax
jne 0x49a59f
mov eax, 0xffffffd8
nop
mov ebx, dword [ecx + eax*4 + 0xac]
movzx edi, bh
mov esi, ebx
movzx edi, byte [edi*4 + 0x51dea2]
shr esi, 0xe
and esi, 0x3fc
movzx esi, byte [esi + 0x51daa3]
shl edi, 0x10
xor edi, edx
movzx edx, bl
movzx ebp, byte [edx*4 + str.cc]
mov edx, ebx
shl esi, 0x18
shr edx, 0x18
movzx edx, byte [edx*4 + 0x51e6a0]
shl ebp, 8
xor ebp, edi
xor edx, ebp
xor edx, esi
xor edx, dword [eax + 0x51eac8]
mov dword [ecx + eax*4 + 0xb0], edx
mov esi, dword [ecx + eax*4 + 0xa4]
xor esi, edx
mov dword [ecx + eax*4 + 0xb4], esi
xor esi, dword [ecx + eax*4 + 0xa8]
mov dword [ecx + eax*4 + 0xb8], esi
xor esi, ebx
mov dword [ecx + eax*4 + 0xbc], esi
add eax, 4
jne 0x49a510
jmp 0x49a791
mov eax, dword [esi + 0x10]
cmp edi, 0xc0
bswap eax
mov dword [ecx + 0x10], eax
mov eax, dword [esi + 0x14]
bswap eax
mov dword [ecx + 0x14], eax
jne 0x49a650
add ecx, 0x2c
mov eax, 0xffffffe4
nop word cs:[eax + eax]
nop dword [eax]
mov ebx, dword [ecx - 0x18]
movzx edi, bh
mov esi, ebx
movzx edi, byte [edi*4 + 0x51dea2]
shr esi, 0xe
and esi, 0x3fc
movzx esi, byte [esi + 0x51daa3]
shl edi, 0x10
xor edi, edx
movzx edx, bl
movzx ebp, byte [edx*4 + str.cc]
mov edx, ebx
shl esi, 0x18
shr edx, 0x18
movzx edx, byte [edx*4 + 0x51e6a0]
shl ebp, 8
xor ebp, edi
xor edx, ebp
xor edx, esi
xor edx, dword [eax + 0x51eabc]
mov dword [ecx - 0x14], edx
mov esi, dword [ecx - 0x28]
xor esi, edx
mov dword [ecx - 0x10], esi
xor esi, dword [ecx - 0x24]
mov dword [ecx - 0xc], esi
xor esi, dword [ecx - 0x20]
test eax, eax
mov dword [ecx - 8], esi
je 0x49a791
xor esi, dword [ecx - 0x1c]
add eax, 4
mov dword [ecx - 4], esi
xor esi, ebx
mov dword [ecx], esi
add ecx, 0x18
jmp 0x49a5d0
mov eax, dword [esi + 0x18]
bswap eax
mov dword [ecx + 0x18], eax
mov eax, dword [esi + 0x1c]
bswap eax
mov dword [ecx + 0x1c], eax
xor eax, eax
cmp edi, 0x100
jne 0x49a793
mov esi, 0xffffffe8
nop word cs:[eax + eax]
nop dword [eax]
mov eax, dword [ecx + esi*8 + 0xdc]
movzx ebx, ah
mov edi, eax
mov dword [esp], eax
movzx ebx, byte [ebx*4 + 0x51dea2]
shr edi, 0xe
and edi, 0x3fc
movzx edi, byte [edi + 0x51daa3]
shl ebx, 0x10
xor ebx, edx
movzx edx, al
movzx ebp, byte [edx*4 + str.cc]
mov edx, eax
shl edi, 0x18
shr edx, 0x18
movzx edx, byte [edx*4 + 0x51e6a0]
shl ebp, 8
xor ebp, ebx
xor edx, ebp
xor edx, edi
xor edx, dword [esi + 0x51eab8]
mov dword [ecx + esi*8 + 0xe0], edx
mov eax, dword [ecx + esi*8 + 0xc4]
xor eax, edx
mov dword [ecx + esi*8 + 0xe4], eax
xor eax, dword [ecx + esi*8 + 0xc8]
mov dword [ecx + esi*8 + 0xe8], eax
xor eax, dword [ecx + esi*8 + 0xcc]
test esi, esi
mov dword [ecx + esi*8 + 0xec], eax
je 0x49a791
mov ebx, eax
movzx ebp, ah
shr ebx, 0x18
movzx ebp, byte [ebp*4 + str.cc]
movzx edi, byte [ebx*4 + 0x51daa3]
mov ebx, eax
movzx eax, al
shr ebx, 0xe
movzx eax, byte [eax*4 + 0x51e6a0]
and ebx, 0x3fc
movzx ebx, byte [ebx + 0x51dea2]
shl ebp, 8
shl edi, 0x18
xor edi, dword [ecx + esi*8 + 0xd0]
shl ebx, 0x10
xor ebp, ebx
xor eax, ebp
xor eax, edi
mov dword [ecx + esi*8 + 0xf0], eax
xor eax, dword [ecx + esi*8 + 0xd4]
mov dword [ecx + esi*8 + 0xf4], eax
xor eax, dword [ecx + esi*8 + 0xd8]
mov dword [ecx + esi*8 + 0xf8], eax
xor eax, dword [esp]
mov dword [ecx + esi*8 + 0xfc], eax
add esi, 4
jmp 0x49a680
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret