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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x14]
cdq
and edx, 3
push ebx
push esi
mov esi, dword [ebp + 8]
lea ebx, [edx + eax]
mov eax, dword [ebp + 0xc]
cdq
and edx, 3
sar ebx, 2
add edx, eax
mov dword [ebp - 4], ebx
sar edx, 2
mov eax, ebx
cmp edx, ebx
mov dword [esi + 0x3e8], edx
push edi
cmovg eax, edx
add eax, 6
mov dword [esi + 0x3ec], eax
cmp edx, 8
jne 0x1014c3f3
mov dword [esi + 0x3c0], 0x1014be43
mov dword [esi + 0x3c4], 0x1014b1a1
jmp 0x1014c427
cmp edx, 6
jne 0x1014c40e
mov dword [esi + 0x3c0], 0x1014ba48
mov dword [esi + 0x3c4], 0x1014ada2
jmp 0x1014c427
cmp edx, 4
jne 0x1014c427
mov dword [esi + 0x3c0], 0x1014b7c5
mov dword [esi + 0x3c4], 0x1014ab1c
xor edi, edi
mov dword [ebp + 0xc], 1
inc eax
imul eax, edx
test eax, eax
jle 0x1014c570
mov eax, ebx
mov edx, esi
mov ebx, dword [ebp + 0x10]
shl eax, 2
sub edx, eax
add ebx, 2
mov dword [ebp + 8], edx
mov ecx, dword [ebp - 4]
cmp edi, ecx
jge 0x1014c47b
movzx ecx, byte [ebx - 2]
movzx eax, byte [ebx - 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 1]
shl ecx, 8
or ecx, eax
mov dword [esi + edi*4], ecx
jmp 0x1014c550
mov eax, dword [esi + edi*4 - 4]
mov dword [ebp + 0x14], eax
mov eax, edi
cdq
idiv ecx
test edx, edx
jne 0x1014c4f2
mov edx, dword [ebp + 0x14]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, edx
xor ecx, dword [ebp + 0xc]
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, dl
shl ecx, 8
shr edx, 0x18
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, byte [edx + str.cw]
shl ecx, 8
or ecx, eax
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp + 0xc]
mov eax, ecx
and al, 0x80
movzx eax, al
neg eax
sbb eax, eax
and ecx, 0x7f
and eax, 0x1b
add ecx, ecx
xor ecx, eax
mov dword [ebp + 0xc], ecx
jmp 0x1014c545
cmp edx, 4
jne 0x1014c545
cmp ecx, 6
jle 0x1014c545
mov edx, dword [ebp + 0x14]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax + str.cw]
shl eax, 8
or ecx, eax
mov eax, edx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
movzx eax, dl
shl ecx, 8
movzx eax, byte [eax + str.cw]
or ecx, eax
mov dword [ebp + 0x14], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
xor eax, dword [ebp + 0x14]
mov dword [esi + edi*4], eax
mov eax, dword [esi + 0x3ec]
add edx, 4
inc edi
mov dword [ebp + 8], edx
add ebx, 4
inc eax
imul eax, dword [esi + 0x3e8]
cmp edi, eax
jl 0x1014c44e
xor edx, edx
cmp dword [esi + 0x3ec], edx
jl 0x1014c62a
xor ebx, ebx
cmp dword [esi + 0x3e8], ebx
jle 0x1014c61d
mov ecx, dword [esi + 0x3ec]
mov eax, ecx
mov edi, dword [esi + 0x3e8]
sub eax, edx
imul eax, edi
add eax, ebx
mov eax, dword [esi + eax*4]
mov dword [ebp + 0x14], eax
test edx, edx
je 0x1014c604
cmp edx, ecx
je 0x1014c604
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + str.cw]
mov eax, dword [ebp + 0x14]
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x10300f40]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x10301340]
mov eax, dword [ebp + 0x14]
shr eax, 0x18
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x10300b40]
mov eax, dword [ebp + 0x14]
movzx eax, al
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x10301740]
mov eax, ecx
imul edi, edx
add edi, ebx
inc ebx
mov dword [esi + edi*4 + 0x1e0], eax
cmp ebx, dword [esi + 0x3e8]
jl 0x1014c58c
inc edx
cmp edx, dword [esi + 0x3ec]
jle 0x1014c57e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret