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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, dword [edi + 0xf0]
mov dword [ebp - 0x10], esi
cmp eax, 0x10
jne 0x4fd1de
push edi
push dword [ebp + 8]
call fcn.004fc710
add esp, 8
jmp 0x4fd2e0
cmp eax, 0x18
je 0x4fd4a1
cmp eax, 0x20
jne 0x4fd4a1
mov esi, dword [ebp + 8]
mov edx, 1
push esi
push edi
mov dword [ebp - 8], edx
mov dword [edi + 0xf0], 0xe
call fcn.004def80
lea eax, [esi + 0x10]
push eax
lea eax, [edi + 0x10]
push eax
call fcn.004def80
add esp, 0x10
mov dword [ebp - 0xc], 2
lea eax, [edi + 0x22]
nop word [eax + eax]
movzx edi, byte [eax - 3]
movzx edx, byte [eax - 5]
add edi, str.cw
movzx ebx, byte [eax - 4]
add edx, str.cw
movzx esi, byte [eax - 6]
add ebx, str.cw
mov ecx, dword [ebp - 8]
add esi, str.cw
test byte [ebp - 0xc], 1
mov byte [ebp + 0xf], cl
jne 0x4fd28f
mov dl, byte [edx]
xor dl, cl
mov byte [ebp - 1], dl
mov dl, cl
add dl, dl
mov cl, dl
xor cl, 0x1b
cmp byte [ebp + 0xf], 0
movzx ecx, cl
mov dword [ebp - 8], ecx
movzx ecx, dl
mov edx, dword [ebp - 8]
cmovge edx, ecx
mov ch, byte [ebp - 1]
mov dword [ebp - 8], edx
jmp 0x4fd297
mov ch, byte [esi]
mov esi, edi
mov edi, ebx
mov ebx, edx
mov cl, byte [ebx]
mov dl, byte [edi]
mov bl, byte [esi]
mov byte [eax - 2], ch
mov byte [eax - 1], cl
mov byte [eax], dl
mov byte [eax + 1], bl
mov ecx, dword [eax - 0x22]
xor dword [eax - 2], ecx
mov ecx, dword [eax - 0x1e]
xor ecx, dword [eax - 2]
mov edx, dword [eax - 0x1a]
xor edx, ecx
mov dword [eax + 2], ecx
mov ecx, dword [eax - 0x16]
xor ecx, edx
mov dword [eax + 6], edx
mov dword [eax + 0xa], ecx
add eax, 0x10
mov ecx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, 0xf
jl 0x4fd230
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp - 0x10]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x4fd34c
mov ecx, esi
lea eax, [edi + 8]
shl ecx, 4
lea ebx, [edi + 8]
add eax, ecx
mov dword [ebp + 0xc], eax
nop
mov edi, dword [eax - 8]
lea ebx, [ebx + 0x10]
mov edx, dword [eax - 4]
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov eax, dword [ebx - 0x18]
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
mov dword [edi - 8], eax
mov eax, dword [ebx - 0x14]
mov dword [edi - 4], eax
mov eax, dword [ebx - 0x10]
mov dword [edi], eax
mov eax, dword [ebx - 0xc]
mov dword [edi + 4], eax
mov edi, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov dword [ebx - 0x18], edi
sub eax, 0x10
sub dword [ebp - 0xc], 1
mov dword [ebx - 0x14], edx
mov dword [ebx - 0x10], esi
mov dword [ebx - 0xc], ecx
mov dword [ebp + 0xc], eax
jne 0x4fd300
mov esi, dword [ebp - 0x10]
cmp esi, 1
jle 0x4fd498
mov edx, dword [ebp + 0x10]
add edx, 0x12
dec esi
nop dword [eax]
movzx eax, byte [edx + 1]
lea edx, [edx + 0x10]
movzx ecx, byte [eax + str.cw]
movzx eax, byte [edx - 0x11]
mov ecx, dword [ecx*4 + 0x54b6d0]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aed0]
movzx eax, byte [edx - 0x12]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aad0]
movzx eax, byte [edx - 0x10]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54b2d0]
movzx eax, byte [edx - 0xb]
mov dword [edx - 0x12], ecx
movzx ecx, byte [eax + str.cw]
movzx eax, byte [edx - 0xc]
mov ecx, dword [ecx*4 + 0x54b6d0]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54b2d0]
movzx eax, byte [edx - 0xd]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aed0]
movzx eax, byte [edx - 0xe]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aad0]
movzx eax, byte [edx - 7]
mov dword [edx - 0xe], ecx
movzx ecx, byte [eax + str.cw]
movzx eax, byte [edx - 8]
mov ecx, dword [ecx*4 + 0x54b6d0]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54b2d0]
movzx eax, byte [edx - 9]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aed0]
movzx eax, byte [edx - 0xa]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aad0]
movzx eax, byte [edx - 3]
mov dword [edx - 0xa], ecx
movzx ecx, byte [eax + str.cw]
movzx eax, byte [edx - 4]
mov ecx, dword [ecx*4 + 0x54b6d0]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54b2d0]
movzx eax, byte [edx - 5]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aed0]
movzx eax, byte [edx - 6]
movzx eax, byte [eax + str.cw]
xor ecx, dword [eax*4 + 0x54aad0]
mov dword [edx - 6], ecx
sub esi, 1
jne 0x4fd360
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret