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

Disassembly:
mov ecx, dword [esp + 0xc]
sub esp, 0x118
mov eax, ecx
sub eax, 0x80
push edi
je 0x4d1fe7
sub eax, 0x40
je 0x4d1fd8
sub eax, 0x40
je 0x4d1fc9
or eax, 0xffffffff
pop edi
add esp, 0x118
ret
mov edi, dword [esp + 0x120]
mov dword [edi], 0xe
jmp 0x4d1ff4
mov edi, dword [esp + 0x120]
mov dword [edi], 0xc
jmp 0x4d1ff4
mov edi, dword [esp + 0x120]
mov dword [edi], 0xa
mov eax, dword [esp + 0x124]
push esi
push ecx
push eax
lea ecx, [esp + 0x10]
lea esi, [edi + 8]
push ecx
mov dword [edi + 4], esi
call fcn.004d1a40
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
shl eax, 4
add eax, edx
mov edx, dword [eax]
mov dword [esi], edx
mov ecx, dword [eax + 4]
add eax, 4
mov dword [esi + 4], ecx
mov edx, dword [eax + 4]
add esi, 4
add eax, 4
add esi, 4
mov dword [esi], edx
mov ecx, dword [eax + 4]
add eax, 4
add esi, 4
mov dword [esi], ecx
mov ecx, dword [edi]
add esp, 0xc
add esi, 4
dec ecx
sub eax, 0x1c
test ecx, ecx
jle 0x4d21cc
push ebx
jmp 0x4d2060
movzx edi, byte [eax + 2]
movzx edi, byte [edi + 0x51d118]
mov ebx, dword [edi*4 + 0x51eb18]
movzx edx, byte [eax + 3]
movzx edx, byte [edx + 0x51d118]
mov edx, dword [edx*4 + 0x51ef18]
movzx edi, byte [eax + 1]
movzx edi, byte [edi + 0x51d118]
xor edx, ebx
mov ebx, dword [edi*4 + 0x51e718]
mov edi, dword [eax]
xor edx, ebx
and edi, 0xff
movzx edi, byte [edi + 0x51d118]
xor edx, dword [edi*4 + 0x51e318]
mov dword [esi], edx
movzx edi, byte [eax + 6]
movzx edi, byte [edi + 0x51d118]
mov ebx, dword [edi*4 + 0x51eb18]
movzx edx, byte [eax + 7]
movzx edx, byte [edx + 0x51d118]
mov edx, dword [edx*4 + 0x51ef18]
movzx edi, byte [eax + 5]
movzx edi, byte [edi + 0x51d118]
add eax, 4
xor edx, ebx
mov ebx, dword [edi*4 + 0x51e718]
mov edi, dword [eax]
xor edx, ebx
and edi, 0xff
movzx edi, byte [edi + 0x51d118]
xor edx, dword [edi*4 + 0x51e318]
mov dword [esi + 4], edx
movzx edi, byte [eax + 6]
movzx edi, byte [edi + 0x51d118]
mov ebx, dword [edi*4 + 0x51eb18]
movzx edx, byte [eax + 7]
movzx edx, byte [edx + 0x51d118]
mov edx, dword [edx*4 + 0x51ef18]
movzx edi, byte [eax + 5]
movzx edi, byte [edi + 0x51d118]
add eax, 4
add esi, 4
xor edx, ebx
mov ebx, dword [edi*4 + 0x51e718]
mov edi, dword [eax]
and edi, 0xff
movzx edi, byte [edi + 0x51d118]
xor edx, ebx
xor edx, dword [edi*4 + 0x51e318]
mov dword [esi + 4], edx
movzx edi, byte [eax + 6]
movzx edi, byte [edi + 0x51d118]
mov ebx, dword [edi*4 + 0x51eb18]
movzx edx, byte [eax + 7]
movzx edx, byte [edx + 0x51d118]
movzx edi, byte [eax + 5]
movzx edi, byte [edi + 0x51d118]
mov edx, dword [edx*4 + 0x51ef18]
add eax, 4
add esi, 4
xor edx, ebx
mov ebx, dword [edi*4 + 0x51e718]
mov edi, dword [eax]
and edi, 0xff
movzx edi, byte [edi + 0x51d118]
xor edx, ebx
mov ebx, dword [edi*4 + 0x51e318]
add esi, 4
xor edx, ebx
mov dword [esi], edx
add esi, 4
add eax, 0xffffffe4
dec ecx
jne 0x4d2060
pop ebx
mov ecx, dword [eax]
mov dword [esi], ecx
mov edx, dword [eax + 4]
add eax, 4
add esi, 4
mov dword [esi], edx
mov ecx, dword [eax + 4]
add eax, 4
add esi, 4
mov dword [esi], ecx
mov edx, dword [eax + 4]
mov dword [esi + 4], edx
pop esi
xor eax, eax
pop edi
add esp, 0x118
ret