Function at 0x4867f0
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
cmp byte [esi + 4], 0
jne 0x486817
push 0x4fbe28
lea ecx, [ebp - 0x38]
call fcn.00490ac9
push 0x4e9530
lea eax, [ebp - 0x38]
push eax
call fcn.00495f48
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x486834
mov edx, dword [ebp + 8]
push edx
push esi
mov eax, ecx
call fcn.00486150
mov esp, ebp
pop ebp
ret 4
cdq
and edx, 3
push edi
lea edi, [edx + eax]
sar edi, 2
xor eax, eax
cmp edi, 4
je 0x48684d
cmp edi, 6
setne al
inc eax
shl eax, 5
mov edx, dword [eax + 0x4e1ec4]
push ebx
mov ebx, dword [eax + 0x4e1ecc]
mov eax, dword [eax + 0x4e1ed4]
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ebx
lea eax, [esi + 0x454]
test edi, edi
jle 0x4868c0
lea edx, [esi + 0x1e8]
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 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 - 0x10]
jne 0x486882
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov eax, 1
mov dword [ebp - 0x1c], eax
cmp dword [esi + 0x3d0], eax
jle 0x4869d0
lea eax, [esi + 0x208]
lea ebx, [esi + 0x434]
mov dword [ebp - 4], eax
test edi, edi
jle 0x486995
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x20]
sub eax, edx
sub ebx, edx
mov ecx, edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x18], edi
jmp 0x486916
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
add eax, ecx
cdq
idiv edi
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
and eax, 0xff
mov dword [ebp - 0x2c], eax
lea eax, [ebx + ecx]
cdq
idiv edi
mov eax, dword [ebp - 0x2c]
mov ebx, dword [eax*4 + 0x4e0698]
mov eax, ecx
inc ecx
mov edx, dword [esi + edx*4 + 0x454]
and edx, 0xff
xor ebx, dword [edx*4 + 0x4e0a98]
cdq
idiv edi
movsx eax, word [esi + edx*4 + 0x456]
and eax, 0xff
xor ebx, dword [eax*4 + 0x4e0298]
mov eax, dword [ebp - 0x14]
movzx edx, byte [eax + 0x23]
xor ebx, dword [edx*4 + 0x4dfe98]
mov edx, dword [ebp - 0x10]
xor ebx, dword [edx]
add edx, 4
mov dword [eax], ebx
add eax, 4
dec dword [ebp - 0x18]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], eax
jne 0x486910
lea eax, [edi*4]
push eax
lea ebx, [esi + 0x434]
lea eax, [esi + 0x454]
push ebx
push eax
call fcn.00498770
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], 0x20
mov edx, dword [ebp - 8]
inc eax
add esp, 0xc
mov dword [ebp - 0x1c], eax
cmp eax, dword [esi + 0x3d0]
jl 0x4868e3
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0xc], 0
test edi, edi
jle 0x486aa7
mov ecx, dword [ebp + 8]
lea eax, [esi + 0x454]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
sub edx, ebx
sub eax, ebx
mov dword [ebp + 8], ebx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
jmp 0x486a00
mov eax, dword [esi + 0x3d0]
mov edx, dword [ebp - 0xc]
lea eax, [edx + eax*8]
mov ebx, dword [esi + eax*4 + 0x1e8]
mov edx, dword [ebp - 8]
movzx eax, byte [edx + 3]
mov edx, ebx
sar edx, 0x18
xor dl, byte [eax + 0x4ded98]
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x2c]
mov byte [ecx], dl
cdq
idiv edi
add dword [ebp - 8], 4
add ecx, 4
movsx eax, word [esi + edx*4 + 0x456]
and eax, 0xff
mov edx, ebx
sar edx, 0x10
xor dl, byte [eax + 0x4ded98]
mov eax, dword [ebp + 8]
mov byte [ecx - 3], dl
cdq
idiv edi
mov eax, dword [esi + edx*4 + 0x454]
sar eax, 8
and eax, 0xff
mov edx, ebx
sar edx, 8
xor dl, byte [eax + 0x4ded98]
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x28]
mov byte [ecx - 2], dl
cdq
idiv edi
inc dword [ebp + 8]
mov eax, dword [esi + edx*4 + 0x454]
and eax, 0xff
mov dl, byte [eax + 0x4ded98]
mov eax, dword [ebp - 0xc]
xor dl, bl
inc eax
mov byte [ecx - 1], dl
mov dword [ebp - 0xc], eax
cmp eax, edi
jl 0x486a00
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4