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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [edi + 0x3c8]
sub esp, 0x2c
cmp eax, 0x10
jne 0x4deb83
mov eax, dword [ebp + 8]
push eax
push edi
mov eax, ecx
call fcn.004de7a0
mov esp, ebp
pop ebp
ret 4
cdq
push ebx
and edx, 3
push esi
lea esi, [edx + eax]
sar esi, 2
xor eax, eax
cmp esi, 4
je 0x4deb9d
cmp esi, 6
setne al
inc eax
shl eax, 5
mov edx, dword [eax + 0x50aa10]
mov dword [ebp - 0x18], edx
mov edx, dword [eax + 0x50aa18]
mov eax, dword [eax + 0x50aa20]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
lea eax, [edi + 0x450]
test esi, esi
jle 0x4dec08
lea edx, [edi + 4]
mov dword [ebp - 4], edx
mov dword [ebp - 8], esi
mov edi, edi
movzx edx, byte [ecx]
shl edx, 0x18
mov dword [eax], edx
movzx edx, byte [ecx + 1]
shl edx, 0x10
or dword [eax], edx
movzx edx, byte [ecx + 2]
shl edx, 8
or dword [eax], edx
movzx ebx, byte [ecx + 3]
or dword [eax], ebx
mov ebx, dword [ebp - 4]
mov ebx, dword [ebx]
add dword [ebp - 4], 4
mov edx, eax
xor dword [edx], ebx
add ecx, 4
add eax, 4
dec dword [ebp - 8]
jne 0x4debd0
mov eax, 1
mov dword [ebp - 0x14], eax
cmp dword [edi + 0x3cc], eax
jle 0x4ded0c
lea eax, [edi + 0x24]
lea ebx, [edi + 0x430]
mov dword [ebp - 4], eax
test esi, esi
jle 0x4decd7
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0x20]
sub eax, ecx
sub ebx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], esi
jmp 0x4dec57
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
add eax, ecx
cdq
idiv esi
mov eax, dword [edi + edx*4 + 0x450]
sar eax, 8
and eax, 0xff
mov dword [ebp - 0x2c], eax
lea eax, [ebx + ecx]
cdq
idiv esi
mov eax, dword [edi + edx*4 + 0x450]
mov edx, dword [ebp - 0x2c]
mov ebx, dword [edx*4 + 0x5081e8]
and eax, 0xff
xor ebx, dword [eax*4 + 0x5085e8]
mov eax, ecx
cdq
idiv esi
mov eax, dword [ebp - 0xc]
add eax, 4
inc ecx
mov dword [ebp - 0xc], eax
movsx edx, word [edi + edx*4 + 0x452]
and edx, 0xff
xor ebx, dword [edx*4 + 0x507de8]
movzx edx, byte [eax + 0x1f]
xor ebx, dword [edx*4 + 0x5079e8]
mov edx, dword [ebp - 8]
xor ebx, dword [edx]
add edx, 4
dec dword [ebp - 0x10]
mov dword [eax - 4], ebx
mov dword [ebp - 8], edx
jne 0x4dec51
lea eax, [esi*4]
push eax
lea ebx, [edi + 0x430]
lea eax, [edi + 0x450]
push ebx
push eax
call fcn.004ebc70
mov eax, dword [ebp - 0x14]
add dword [ebp - 4], 0x20
inc eax
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp eax, dword [edi + 0x3cc]
jl 0x4dec28
xor ebx, ebx
mov edi, edi
mov ecx, dword [edi + 0x3cc]
mov eax, ebx
and eax, 3
lea edx, [eax + ecx*8]
mov ecx, dword [edi + edx*4 + 4]
cmp eax, 3
ja case.default.0x4ded2b
jmp dword [eax*4 + 0x4dedd0]
movzx eax, byte [edi + 0x453]
mov edx, dword [ebp + 8]
sar ecx, 0x18
xor cl, byte [eax + str.cw]
mov byte [ebx + edx], cl
jmp case.default.0x4ded2b
mov eax, dword [ebp - 0x18]
inc eax
cdq
idiv esi
sar ecx, 0x10
movsx eax, word [edi + edx*4 + 0x452]
mov edx, dword [ebp + 8]
and eax, 0xff
xor cl, byte [eax + str.cw]
mov byte [ebx + edx], cl
jmp case.default.0x4ded2b
mov eax, dword [ebp - 0x1c]
add eax, 2
cdq
idiv esi
sar ecx, 8
mov eax, dword [edi + edx*4 + 0x450]
mov edx, dword [ebp + 8]
sar eax, 8
and eax, 0xff
xor cl, byte [eax + str.cw]
mov byte [ebx + edx], cl
jmp case.default.0x4ded2b
mov eax, dword [ebp - 0x20]
add eax, 3
cdq
idiv esi
mov eax, dword [edi + edx*4 + 0x450]
and eax, 0xff
mov dl, byte [eax + str.cw]
mov eax, dword [ebp + 8]
xor dl, cl
mov byte [ebx + eax], dl
inc ebx
cmp ebx, 0x18
jl 0x4ded10
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4