Function at 0x4661c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x24]
mov eax, ecx
push ebp
push esi
mov esi, dword [esp + 0x28]
xor ecx, ecx
mov dword [eax], ebx
push edi
mov dword [esp + 0x18], eax
movzx edx, word [esi]
mov byte [esp + 0x10], 1
test dx, dx
je 0x46620a
mov edi, 0xff
jmp 0x4661f0
cmp dx, di
ja 0x466202
movzx edx, word [esi + ecx*2 + 2]
inc ecx
test dx, dx
jne 0x4661f0
jmp 0x46620a
mov cl, byte [esi + ecx*2 + 1]
mov byte [esp + 0x10], cl
mov ecx, dword [eax + 0x10]
xor ebp, ebp
mov dl, byte [esp + 0x10]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x14], ebp
mov byte [ebx + ecx], dl
mov ecx, dword [eax + 0x10]
inc ecx
lea edx, [edi + 1]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
lea esp, [esp]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x466230
sub edi, edx
mov dword [esp + 0x1c], edi
cmp word [esi], bp
je 0x46647c
lea edi, [esi + ebp*2]
mov cl, byte [edi + 1]
mov dl, byte [edi]
mov byte [esp + 0x13], cl
mov byte [esp + 0x11], dl
cmp ebp, dword [esp + 0x1c]
jae 0x46639b
mov eax, dword [esp + 0x28]
xor ebx, ebx
add eax, ebp
mov esi, edi
mov dword [esp + 0x20], eax
mov edi, edi
movzx ecx, word [esi]
test cx, cx
je 0x46628c
movsx edx, byte [eax + ebx]
cmp ecx, edx
jne 0x46628c
inc ebx
add esi, 2
cmp ebx, 0x81
jl 0x466270
mov eax, dword [esp + 0x18]
cmp ebx, 2
jl 0x4662e4
add ebp, ebx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x4662bd
mov esi, dword [eax + 0xc]
mov edx, dword [eax]
mov cl, byte [eax + 4]
mov byte [esi + edx], cl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov cl, byte [eax + 4]
sub bl, 2
mov edx, dword [esp + 0x30]
add dword [eax + 8], 2
shl cl, 2
or cl, 3
mov byte [eax + 4], cl
mov ecx, dword [eax + 0x10]
mov byte [edx + ecx], bl
mov ebx, edx
inc dword [eax + 0x10]
jmp 0x46646d
mov ebp, dword [esp + 0x20]
mov cl, byte [esp + 0x11]
sub cl, byte [ebp]
xor ebx, ebx
mov byte [esp + 0x12], cl
mov al, cl
movzx esi, word [edi]
test si, si
je 0x466325
mov ecx, esi
shr ecx, 8
cmp cl, byte [esp + 0x10]
jne 0x466325
movsx edx, byte [ebx + ebp]
movzx ecx, al
add edx, ecx
xor edx, esi
test dl, dl
jne 0x466325
inc ebx
add edi, 2
cmp ebx, 0x81
jl 0x4662f7
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
cmp ebx, 2
jl 0x466393
add ebp, ebx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x46635a
mov esi, dword [eax + 0xc]
mov edx, dword [eax]
mov cl, byte [eax + 4]
mov byte [esi + edx], cl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov cl, byte [eax + 4]
sub bl, 2
mov edx, dword [esp + 0x30]
or bl, 0x80
add dword [eax + 8], 2
shl cl, 2
or cl, 3
mov byte [eax + 4], cl
mov ecx, dword [eax + 0x10]
mov byte [edx + ecx], bl
inc dword [eax + 0x10]
mov ecx, dword [eax + 0x10]
mov ebx, dword [esp + 0x30]
mov dl, byte [esp + 0x12]
mov byte [ecx + ebx], dl
inc dword [eax + 0x10]
jmp 0x46646d
mov ebx, dword [esp + 0x30]
mov cl, byte [esp + 0x13]
test cl, cl
jne 0x4663d8
cmp dword [eax + 8], 8
jne 0x4663c1
mov esi, dword [eax + 0xc]
mov edx, dword [eax]
mov cl, byte [eax + 4]
mov byte [esi + edx], cl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov ecx, dword [eax + 0x10]
add dword [eax + 8], 2
mov dl, byte [esp + 0x11]
shl byte [eax + 4], 2
mov byte [ebx + ecx], dl
jmp 0x466465
cmp cl, byte [esp + 0x10]
jne 0x46641c
cmp dword [eax + 8], 8
jne 0x466400
mov esi, dword [eax + 0xc]
mov edx, dword [eax]
mov cl, byte [eax + 4]
mov byte [esi + edx], cl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov cl, byte [eax + 4]
add dword [eax + 8], 2
mov dl, byte [esp + 0x11]
shl cl, 2
or cl, 1
mov byte [eax + 4], cl
mov ecx, dword [eax + 0x10]
mov byte [ebx + ecx], dl
jmp 0x466465
cmp dword [eax + 8], 8
jne 0x46643e
mov esi, dword [eax + 0xc]
mov edx, dword [eax]
mov cl, byte [eax + 4]
mov byte [esi + edx], cl
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
inc ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0
mov cl, byte [eax + 4]
add dword [eax + 8], 2
mov dl, byte [esp + 0x11]
shl cl, 2
or cl, 2
mov byte [eax + 4], cl
mov ecx, dword [eax + 0x10]
mov byte [ebx + ecx], dl
inc dword [eax + 0x10]
mov ecx, dword [eax + 0x10]
mov dl, byte [esp + 0x13]
mov byte [ecx + ebx], dl
inc dword [eax + 0x10]
inc ebp
mov dword [esp + 0x14], ebp
mov esi, dword [esp + 0x2c]
cmp word [esi + ebp*2], 0
jne 0x466246
mov dl, byte [eax + 4]
mov ecx, 8
sub ecx, dword [eax + 8]
shl dl, cl
mov ecx, dword [eax + 0xc]
pop edi
pop esi
pop ebp
mov byte [ebx + ecx], dl
mov eax, dword [eax + 0x10]
pop ebx
add esp, 0x14
ret 0xc