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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push edi
mov edi, ecx
mov dword [ebp - 0x1c], edi
cmp byte [edi + 4], 0
jne 0x50fd18
push 0x5c3dc0
lea ecx, [ebp - 0x2c]
call fcn.005149e8
lea eax, [ebp - 0x2c]
push 0x5a85a0
push eax
call fcn.00514630
mov eax, dword [ebp + 8]
push ebx
push esi
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
shl ecx, 0x18
inc eax
shl edx, 0x10
or ecx, edx
inc eax
xor edx, edx
mov dh, byte [eax]
or ecx, edx
inc eax
movzx edx, byte [eax]
movzx esi, byte [eax + 1]
or ecx, edx
inc eax
xor ecx, dword [edi + 0x1e8]
movzx edx, byte [eax + 1]
shl esi, 0x18
inc eax
mov dword [ebp - 0x14], ecx
shl edx, 0x10
or esi, edx
inc eax
xor edx, edx
mov dh, byte [eax]
or esi, edx
inc eax
movzx edx, byte [eax]
or esi, edx
inc eax
xor esi, dword [edi + 0x1ec]
movzx edx, byte [eax + 1]
mov dword [ebp - 0x10], esi
movzx esi, byte [eax]
shl esi, 0x18
inc eax
shl edx, 0x10
or esi, edx
inc eax
xor edx, edx
mov dh, byte [eax]
or esi, edx
inc eax
movzx edx, byte [eax]
or esi, edx
inc eax
xor esi, dword [edi + 0x1f0]
movzx edx, byte [eax + 1]
mov dword [ebp - 0xc], esi
movzx esi, byte [eax]
shl esi, 0x18
inc eax
shl edx, 0x10
or esi, edx
inc eax
xor edx, edx
mov dh, byte [eax]
mov dl, byte [eax + 1]
mov eax, dword [edi + 0x3d0]
or edx, esi
mov dword [ebp - 0x20], eax
xor edx, dword [edi + 0x1f4]
cmp eax, 1
mov esi, 0xff
mov dword [ebp - 8], edx
jle 0x50fed1
lea edx, [edi + 0x210]
dec eax
mov dword [ebp + 8], edx
mov dword [ebp - 4], eax
xor eax, eax
xor ebx, ebx
mov al, byte [ebp - 7]
mov bl, byte [ebp - 0xd]
mov edi, dword [eax*4 + 0x58c1bc]
xor eax, eax
xor edi, dword [ebx*4 + 0x58b9bc]
mov al, byte [ebp - 0x12]
xor ebx, ebx
xor edi, dword [eax*4 + 0x58bdbc]
mov eax, dword [ebp - 0xc]
and eax, esi
mov bl, byte [ebp - 0xe]
xor edi, dword [eax*4 + 0x58c5bc]
xor eax, eax
mov al, byte [ebp - 9]
xor edi, dword [edx - 4]
mov eax, dword [eax*4 + 0x58b9bc]
xor eax, dword [ebx*4 + 0x58bdbc]
xor ebx, ebx
mov bl, ch
and ecx, esi
xor eax, dword [ebx*4 + 0x58c1bc]
mov ebx, dword [ebp - 8]
and ebx, esi
xor eax, dword [ebx*4 + 0x58c5bc]
xor ebx, ebx
mov bl, byte [ebp - 0xa]
xor eax, dword [edx]
xor edx, edx
mov dl, byte [ebp - 5]
mov edx, dword [edx*4 + 0x58b9bc]
xor edx, dword [ebx*4 + 0x58bdbc]
xor ebx, ebx
mov bl, byte [ebp - 0xf]
mov dword [ebp - 0x18], edx
xor edx, dword [ebx*4 + 0x58c1bc]
xor edx, dword [ecx*4 + 0x58c5bc]
mov ecx, dword [ebp + 8]
xor edx, dword [ecx + 4]
xor ecx, ecx
mov cl, byte [ebp - 6]
mov dword [ebp - 0x18], edx
xor edx, edx
mov dl, byte [ebp - 0xb]
mov ecx, dword [ecx*4 + 0x58bdbc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
xor ecx, dword [edx*4 + 0x58c1bc]
xor edx, edx
mov dl, byte [ebp - 0x11]
mov dword [ebp - 8], eax
xor ecx, dword [edx*4 + 0x58b9bc]
mov edx, dword [ebp - 0x10]
and edx, esi
mov dword [ebp - 0x10], edi
xor ecx, dword [edx*4 + 0x58c5bc]
mov edx, dword [ebp + 8]
xor ecx, dword [edx - 8]
add edx, 0x20
dec dword [ebp - 4]
mov dword [ebp + 8], edx
mov dword [ebp - 0x14], ecx
jne 0x50fdda
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
shl eax, 5
mov edx, dword [eax + edi + 0x1e8]
lea edi, [eax + edi + 0x1e8]
xor eax, eax
mov ebx, edx
mov al, byte [ebp - 0x11]
mov dword [ebp - 4], edx
sar ebx, 0x18
mov al, byte [eax + 0x58a8bc]
xor al, bl
mov bl, al
mov eax, dword [ebp + 0xc]
mov byte [eax], bl
xor ebx, ebx
mov bl, byte [ebp - 6]
sar edx, 0x10
mov bl, byte [ebx + 0x58a8bc]
xor bl, dl
xor edx, edx
mov dl, byte [ebp - 0xb]
mov byte [eax + 1], bl
mov ebx, dword [ebp - 4]
mov dl, byte [edx + 0x58a8bc]
sar ebx, 8
xor dl, bl
xor ebx, ebx
mov byte [eax + 2], dl
mov edx, dword [ebp - 0x10]
and edx, esi
mov bl, byte [ebp - 0xd]
mov dl, byte [edx + 0x58a8bc]
xor dl, byte [ebp - 4]
mov byte [eax + 3], dl
mov edx, dword [edi + 4]
mov bl, byte [ebx + 0x58a8bc]
mov dword [ebp - 4], edx
sar edx, 0x18
xor bl, dl
xor edx, edx
mov dl, byte [ebp - 0x12]
mov byte [eax + 4], bl
mov ebx, dword [ebp - 4]
mov dl, byte [edx + 0x58a8bc]
sar ebx, 0x10
xor dl, bl
mov ebx, dword [ebp - 4]
mov byte [eax + 5], dl
xor edx, edx
mov dl, byte [ebp - 7]
sar ebx, 8
mov dl, byte [edx + 0x58a8bc]
xor dl, bl
xor ebx, ebx
mov byte [eax + 6], dl
mov edx, dword [ebp - 0xc]
and edx, esi
mov bl, byte [ebp - 9]
mov dl, byte [edx + 0x58a8bc]
xor dl, byte [ebp - 4]
mov byte [eax + 7], dl
mov edx, dword [edi + 8]
mov bl, byte [ebx + 0x58a8bc]
mov dword [ebp - 4], edx
sar edx, 0x18
xor bl, dl
xor edx, edx
mov dl, byte [ebp - 0xe]
mov byte [eax + 8], bl
mov ebx, dword [ebp - 4]
mov dl, byte [edx + 0x58a8bc]
sar ebx, 0x10
xor dl, bl
mov ebx, dword [ebp - 4]
mov byte [eax + 9], dl
xor edx, edx
mov dl, ch
sar ebx, 8
mov dl, byte [edx + 0x58a8bc]
xor dl, bl
mov byte [eax + 0xa], dl
mov edx, dword [ebp - 8]
and ecx, esi
and edx, esi
pop esi
mov dl, byte [edx + 0x58a8bc]
xor dl, byte [ebp - 4]
mov byte [eax + 0xb], dl
mov edi, dword [edi + 0xc]
xor edx, edx
mov ebx, edi
mov dl, byte [ebp - 5]
mov dword [ebp - 4], edi
sar ebx, 0x18
mov dl, byte [edx + 0x58a8bc]
xor dl, bl
mov ebx, edi
mov byte [eax + 0xc], dl
xor edx, edx
mov dl, byte [ebp - 0xa]
sar ebx, 0x10
mov dl, byte [edx + 0x58a8bc]
xor dl, bl
mov ebx, edi
mov byte [eax + 0xd], dl
xor edx, edx
mov dl, byte [ebp - 0xf]
sar ebx, 8
mov dl, byte [edx + 0x58a8bc]
xor dl, bl
pop ebx
mov byte [eax + 0xe], dl
mov cl, byte [ecx + 0x58a8bc]
xor cl, byte [ebp - 4]
pop edi
mov byte [eax + 0xf], cl
leave
ret 8