Function at 0x4865e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
add esp, 0xffffff24
push ebx
mov ecx, 0xd
xor eax, eax
push ebp
push esi
push edi
lea edi, [esp + 0x65]
mov byte [esp + 0x64], 0
rep stosd dword es:[edi], eax
mov ecx, 0xd
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov ebp, dword [esp + 0x100]
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
cmp ebp, eax
je 0x4868bd
mov esi, dword [esp + 0xfc]
cmp esi, eax
je 0x4868bd
mov edi, dword [esp + 0x104]
cmp edi, eax
je 0x4868bd
mov ebx, dword [esp + 0x110]
lea eax, [esp + 0x64]
push ebx
push eax
push ebp
call fcn.0047e7f0
mov eax, ebx
mov ecx, edi
and eax, 0xffff
sub ecx, eax
or ecx, ecx
jle 0x48668b
mov edx, ecx
shr ecx, 2
lea edi, [esp + eax + 0x64]
mov eax, 0xa5a5a5a5
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x104]
lea eax, [esp + 0x54]
push eax
push esi
call fcn.0048e2c0
lea eax, [esp + 0x18]
lea edx, [esp + 0x9c]
mov esi, dword [esp + 0xf0]
push eax
mov ecx, dword [esp + 0xfc]
push 0x50
lea eax, [esp + 0x5c]
push edx
push eax
push ecx
push esi
call fcn.004868d0
cmp ax, 0x4a
je 0x486860
cmp ax, 0xa
je 0x486860
cmp ax, 4
je 0x486860
or ax, ax
jne 0x4868c1
cmp esi, 7
jne 0x4867fa
cmp edi, 4
mov ecx, edi
lea eax, [esp + 0x1c]
jb 0x486731
mov dl, byte [esp + ecx + 0x98]
sub ecx, 4
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x9d]
inc eax
mov byte [eax], dl
inc eax
mov dl, byte [esp + ecx + 0x9e]
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x9f]
inc eax
mov byte [eax], dl
inc eax
cmp ecx, 4
jae 0x4866fa
mov edi, dword [esp + 0x104]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x1f]
and eax, 0xff
mov edx, dword [esp + 0x1d]
mov esi, dword [esp + 0x1e]
shl eax, 8
and esi, 0xff
and edx, 0xff
or eax, esi
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x108]
shl eax, 8
and ecx, 0xff
or eax, ecx
mov dword [esp + 0x10], eax
lea ecx, [edx + edx]
xor ecx, eax
mov eax, dword [esp + 0x10c]
jne 0x4867a4
test eax, eax
je 0x48678c
push ebx
push eax
push ebp
call fcn.0047e7f0
mov esi, dword [esp + 0x114]
or esi, esi
je 0x4867ea
lea edx, [esp + 0x10]
push 4
push edx
lea eax, [esp + edi + 0x68]
jmp 0x4867ca
test eax, eax
je 0x4867b4
push ebx
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.0047e7f0
mov esi, dword [esp + 0x114]
or esi, esi
je 0x4867ea
lea edx, [esp + 0x10]
push 4
push edx
lea eax, [esp + edi + 0x20]
push eax
call fcn.0047e7f0
mov cx, word [esp + 0x12]
mov dx, word [esp + 0x10]
mov word [esp + 0x14], cx
mov word [esp + 0x16], dx
mov eax, dword [esp + 0x14]
mov dword [esi], eax
pop edi
pop esi
pop ebp
pop ebx
xor ax, ax
add esp, 0xdc
ret 0x28
cmp esi, 5
jne 0x4868bd
cmp dword [esp + 0xf4], 0x12c0216
jne 0x4868bd
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
shr edx, 2
cmp edx, 1
jb 0x486839
lea ebp, [esp + edx*4 + 0x9c]
mov eax, dword [ebp - 4]
sub ebp, 4
mov dword [ecx], eax
sub ecx, 0xfffffffc
dec edx
jne 0x48682b
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x486850
push ebx
lea ecx, [esp + 0x20]
push eax
push ecx
call fcn.0047e7f0
mov esi, dword [esp + 0x114]
test esi, esi
je 0x4867ea
jmp 0x4867bf
mov eax, dword [esp + 0x10c]
or eax, eax
je 0x486873
push ebx
push eax
push ebp
call fcn.0047e7f0
mov ebx, dword [esp + 0x114]
test ebx, ebx
je 0x4867ea
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + edi + 0x64]
push ecx
push edx
call fcn.0047e7f0
pop edi
mov cx, word [esp + 0xc]
mov ax, word [esp + 0xe]
mov word [esp + 0x10], ax
xor ax, ax
mov word [esp + 0x12], cx
mov edx, dword [esp + 0x10]
mov dword [ebx], edx
pop esi
pop ebp
pop ebx
sub esp, 0xffffff24
ret 0x28
mov ax, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret 0x28