Function at 0x4cfc14
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 4], edi
test esi, esi
je 0x4d000f
mov ecx, dword [ebp + 0x10]
push 0x18
pop ebx
cmp ecx, 0x10
je 0x4cfc4b
cmp ecx, ebx
je 0x4cfc4b
cmp ecx, 0x20
je 0x4cfc4b
push str.Incorrect_key_length
jmp 0x4d0014
mov eax, dword [ebp + 0x14]
cmp eax, 0x10
je 0x4cfc66
cmp eax, ebx
je 0x4cfc66
cmp eax, 0x20
je 0x4cfc66
push str.Incorrect_block_length
jmp 0x4d0014
push eax
push dword [ebp + 0xc]
mov dword [edi + 0x3c8], eax
lea eax, [edi + 0x3d0]
push eax
mov dword [edi + 0x3c4], ecx
call fcn.004d3ae0
push dword [edi + 0x3c8]
lea eax, [edi + 0x3f0]
push dword [ebp + 0xc]
push eax
call fcn.004d3ae0
mov eax, dword [edi + 0x3c4]
add esp, 0x18
mov ecx, dword [edi + 0x3c8]
cmp eax, 0x10
je 0x4cfcbd
push 0xe
cmp eax, ebx
pop eax
jne 0x4cfcd2
push 0xc
cmp ecx, 0x20
pop edx
cmovne eax, edx
jmp 0x4cfcd2
cmp ecx, 0x10
jne 0x4cfcc7
push 0xa
pop eax
jmp 0x4cfcd2
push 0xe
pop eax
push 0xc
cmp ecx, ebx
pop edx
cmove eax, edx
mov dword [edi + 0x3cc], eax
mov eax, ecx
cdq
lea ecx, [edi + 4]
and edx, 3
mov dword [ebp + 0xc], ecx
lea ebx, [edx + eax]
sar ebx, 2
xor edx, edx
mov dword [ebp + 0x10], ebx
test ebx, ebx
jle 0x4cfd02
mov edi, dword [ebp + 0xc]
mov ecx, ebx
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0x3cc]
inc edx
add ecx, 0x20
mov dword [ebp + 0xc], ecx
cmp edx, eax
jle 0x4cfcef
xor ecx, ecx
mov dword [ebp + 0xc], ecx
test eax, eax
js 0x4cfd45
lea edx, [edi + 0x1e4]
test ebx, ebx
jle 0x4cfd34
mov ecx, ebx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0x3cc]
inc ecx
add edx, 0x20
mov dword [ebp + 0xc], ecx
cmp ecx, eax
jle 0x4cfd22
inc eax
imul eax, ebx
mov dword [ebp + 8], eax
mov eax, dword [edi + 0x3c4]
cdq
and edx, 3
add edx, eax
lea eax, [edi + 0x410]
sar edx, 2
mov dword [ebp - 8], edx
mov dword [ebp + 0x14], eax
mov dword [ebp + 0xc], eax
test edx, edx
jle 0x4cfdff
mov edi, edx
mov ebx, eax
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
mov dword [ebx], eax
movzx edx, byte [esi - 3]
shl edx, 0x10
or edx, eax
mov dword [ebx], edx
movzx ecx, byte [esi - 2]
shl ecx, 8
or ecx, edx
mov dword [ebx], ecx
movzx eax, byte [esi - 1]
or eax, ecx
mov dword [ebx], eax
lea ebx, [ebx + 4]
sub edi, 1
jne 0x4cfd76
mov ecx, dword [ebp + 0x14]
xor esi, esi
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0xc], esi
cmp esi, dword [ebp + 8]
jge 0x4cfeb2
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv ebx
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 4], ecx
mov ecx, dword [edi + 0x3cc]
mov esi, dword [ebp + 0xc]
sub ecx, eax
mov eax, dword [ebp + 0x14]
inc esi
mov dword [ebp + 0xc], esi
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edi + ecx*4 + 0x1e4], eax
mov ecx, dword [ebp + 0x14]
add ecx, 4
mov dword [ebp + 0x14], ecx
cmp esi, edx
jl 0x4cfdb8
jmp 0x4cfe04
xor esi, esi
mov dword [ebp + 0xc], esi
cmp esi, dword [ebp + 8]
jge 0x4cfeb2
mov eax, 0x53aaa0
movzx ecx, byte [eax]
inc eax
mov ebx, dword [edi + edx*4 + 0x40c]
mov dword [ebp - 0x10], eax
mov eax, ebx
sar eax, 0x10
movzx eax, al
movsx edx, byte [eax + str.cw]
mov eax, ebx
sar eax, 8
xor edx, ecx
movzx eax, al
shl edx, 8
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
sar ebx, 0x18
movzx eax, byte [eax + str.cw]
xor edx, eax
movzx eax, bl
shl edx, 8
lea ebx, [edi + 0x410]
movzx eax, byte [eax + str.cw]
xor edx, eax
xor dword [ebx], edx
mov edx, dword [ebp - 8]
cmp edx, 8
je 0x4cff34
cmp edx, 1
jle 0x4cfe9b
lea ecx, [edi + 0x414]
lea ebx, [edx - 1]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub ebx, 1
jne 0x4cfe88
lea ebx, [edi + 0x410]
test edx, edx
jg 0x4cffb2
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
cmp esi, dword [ebp + 8]
jl 0x4cfe12
xor esi, esi
inc esi
cmp dword [edi + 0x3cc], esi
jle 0x4cff2a
lea eax, [edi + 0x204]
mov dword [ebp + 0xc], eax
test ebx, ebx
jle 0x4cff1b
mov edi, eax
mov dword [ebp + 8], ebx
mov edx, dword [edi]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x539aa0]
xor ecx, dword [eax*4 + 0x539ea0]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x53a2a0]
movzx eax, dl
xor ecx, dword [eax*4 + 0x53a6a0]
mov dword [edi], ecx
lea edi, [edi + 4]
sub ebx, 1
jne 0x4cfecf
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
inc esi
add eax, 0x20
mov dword [ebp + 0xc], eax
cmp esi, dword [edi + 0x3cc]
jl 0x4cfec6
mov byte [edi], 1
pop edi
pop esi
pop ebx
leave
ret 0x10
push 3
lea ecx, [edi + 0x414]
pop edx
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x4cff3d
mov edx, dword [edi + 0x41c]
mov eax, edx
sar eax, 0x18
movzx eax, al
push 3
movsx ecx, byte [eax + str.cw]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + str.cw]
xor ecx, eax
movzx eax, dl
shl ecx, 8
pop edx
movzx eax, byte [eax + str.cw]
xor ecx, eax
xor dword [edi + 0x420], ecx
lea ecx, [edi + 0x424]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x4cffa5
and dword [ebp - 0xc], 0
mov ecx, ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 0x14], ecx
cmp esi, dword [ebp + 8]
jge 0x4cfeb2
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv ebx
lea esi, [edx + eax*8]
mov dword [edi + esi*4 + 4], ecx
mov ecx, dword [edi + 0x3cc]
mov esi, dword [ebp + 0xc]
sub ecx, eax
mov eax, dword [ebp + 0x14]
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edi + ecx*4 + 0x1e4], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
inc eax
add ecx, 4
mov dword [ebp - 0xc], eax
inc esi
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0xc], esi
cmp eax, edx
jl 0x4cffbe
jmp 0x4cfea6
push str.Empty_key
lea ecx, [ebp - 0x1c]
call fcn.004589e1
push 0x56125c
lea eax, [ebp - 0x1c]
push eax
call fcn.004d4a8e
int3