Function at 0x47a6f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x38]
mov eax, ecx
mov ebx, 1
mov dword [esp + 0x20], eax
xor edx, edx
mov dword [esp + 0x1c], ebx
movzx ecx, word [edi]
mov esi, ecx
test cx, cx
je 0x47a73b
mov esi, 0xff
jmp 0x47a720
cmp cx, si
ja 0x47a732
movzx ecx, word [edi + edx*2 + 2]
inc edx
test cx, cx
jne 0x47a720
jmp 0x47a73b
mov ebx, ecx
shr ebx, 8
mov dword [esp + 0x1c], ebx
mov ecx, dword [eax + 0xc]
mov esi, dword [esp + 0x3c]
mov byte [esi + ecx], bl
mov edx, dword [eax + 0xc]
mov ebx, dword [esp + 0x34]
inc edx
xor ebp, ebp
mov dword [eax + 8], edx
mov dword [esp + 0x14], ebp
lea ecx, [edx + 1]
mov dword [eax + 0xc], ecx
lea edx, [ebx + 1]
nop
mov cl, byte [ebx]
inc ebx
test cl, cl
jne 0x47a760
sub ebx, edx
mov dword [esp + 0x24], ebx
cmp word [edi], bp
je 0x47a987
movzx edx, word [edi + ebp*2]
lea edi, [edi + ebp*2]
mov ebx, edx
mov dword [esp + 0x18], edx
shr ebx, 8
mov dword [esp + 0x2c], ebx
cmp ebp, dword [esp + 0x24]
jae 0x47a8bb
mov eax, dword [esp + 0x34]
xor ebx, ebx
add eax, ebp
mov esi, edi
mov dword [esp + 0x28], eax
movzx ecx, word [esi]
test cx, cx
je 0x47a7be
movsx edx, byte [eax + ebx]
cmp ecx, edx
jne 0x47a7be
inc ebx
add esi, 2
cmp ebx, 0x81
jl 0x47a7a2
mov eax, dword [esp + 0x20]
cmp ebx, 2
jl 0x47a810
mov ecx, dword [eax + 4]
add ebp, ebx
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x14], ebp
cmp ecx, 8
jne 0x47a7ef
mov edx, dword [eax + 8]
mov cl, byte [eax]
mov byte [esi + edx], cl
mov edx, dword [eax + 0xc]
mov dword [eax + 8], edx
lea ecx, [edx + 1]
mov dword [eax + 0xc], ecx
xor ecx, ecx
add ecx, 2
sub bl, 2
mov dword [eax + 4], ecx
mov cl, byte [eax]
shl cl, 2
or cl, 3
mov byte [eax], cl
mov ecx, dword [eax + 0xc]
mov byte [esi + ecx], bl
inc dword [eax + 0xc]
jmp 0x47a978
mov ebp, dword [esp + 0x28]
mov cl, byte [esp + 0x18]
sub cl, byte [ebp]
xor ebx, ebx
mov byte [esp + 0x13], cl
mov al, cl
movzx esi, word [edi]
test si, si
je 0x47a851
mov ecx, esi
shr ecx, 8
cmp cl, byte [esp + 0x1c]
jne 0x47a851
movsx edx, byte [ebx + ebp]
movzx ecx, al
add edx, ecx
xor edx, esi
test dl, dl
jne 0x47a851
inc ebx
add edi, 2
cmp ebx, 0x81
jl 0x47a823
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x3c]
cmp ebx, 2
jl 0x47a8b7
mov ecx, dword [eax + 4]
add ebp, ebx
mov dword [esp + 0x14], ebp
cmp ecx, 8
jne 0x47a886
mov edx, dword [eax + 8]
mov cl, byte [eax]
mov byte [esi + edx], cl
mov edx, dword [eax + 0xc]
mov dword [eax + 8], edx
lea ecx, [edx + 1]
mov dword [eax + 0xc], ecx
xor ecx, ecx
mov dl, byte [esp + 0x13]
add ecx, 2
mov dword [eax + 4], ecx
sub bl, 2
mov cl, byte [eax]
or bl, 0x80
shl cl, 2
or cl, 3
mov byte [eax], cl
mov ecx, dword [eax + 0xc]
mov byte [esi + ecx], bl
inc dword [eax + 0xc]
mov ecx, dword [eax + 0xc]
mov byte [ecx + esi], dl
inc dword [eax + 0xc]
jmp 0x47a978
mov ebx, dword [esp + 0x2c]
mov ecx, dword [eax + 4]
test bl, bl
jne 0x47a8f5
cmp ecx, 8
jne 0x47a8dd
mov edx, dword [eax + 8]
mov cl, byte [eax]
mov byte [esi + edx], cl
mov edx, dword [eax + 0xc]
mov dword [eax + 8], edx
lea ecx, [edx + 1]
mov dword [eax + 0xc], ecx
xor ecx, ecx
mov edx, dword [esp + 0x18]
add ecx, 2
shl byte [eax], 2
mov dword [eax + 4], ecx
mov ecx, dword [eax + 0xc]
mov byte [esi + ecx], dl
jmp 0x47a970
cmp bl, byte [esp + 0x1c]
jne 0x47a932
cmp ecx, 8
jne 0x47a916
mov edx, dword [eax + 8]
mov cl, byte [eax]
mov byte [esi + edx], cl
mov edx, dword [eax + 0xc]
mov dword [eax + 8], edx
lea ecx, [edx + 1]
mov dword [eax + 0xc], ecx
xor ecx, ecx
mov edx, dword [esp + 0x18]
add ecx, 2
mov dword [eax + 4], ecx
mov cl, byte [eax]
shl cl, 2
or cl, 1
mov byte [eax], cl
mov ecx, dword [eax + 0xc]
mov byte [esi + ecx], dl
jmp 0x47a970
cmp ecx, 8
jne 0x47a94d
mov edx, dword [eax + 8]
mov cl, byte [eax]
mov byte [esi + edx], cl
mov edx, dword [eax + 0xc]
mov dword [eax + 8], edx
lea ecx, [edx + 1]
mov dword [eax + 0xc], ecx
xor ecx, ecx
mov edx, dword [esp + 0x18]
add ecx, 2
mov dword [eax + 4], ecx
mov cl, byte [eax]
shl cl, 2
or cl, 2
mov byte [eax], cl
mov ecx, dword [eax + 0xc]
mov byte [esi + ecx], dl
inc dword [eax + 0xc]
mov ecx, dword [eax + 0xc]
mov byte [ecx + esi], bl
inc dword [eax + 0xc]
inc ebp
mov dword [esp + 0x14], ebp
mov edi, dword [esp + 0x38]
cmp word [edi + ebp*2], 0
jne 0x47a776
mov dl, byte [eax]
mov ecx, 8
sub ecx, dword [eax + 4]
shl dl, cl
mov ecx, dword [eax + 8]
pop edi
mov byte [esi + ecx], dl
mov eax, dword [eax + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc