Function at 0x46e000
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 0x46e04a
mov edi, 0xff
jmp 0x46e030
cmp dx, di
ja 0x46e042
movzx edx, word [esi + ecx*2 + 2]
inc ecx
test dx, dx
jne 0x46e030
jmp 0x46e04a
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 0x46e070
sub edi, edx
mov dword [esp + 0x1c], edi
cmp word [esi], bp
je 0x46e2bc
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 0x46e1db
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 0x46e0cc
movsx edx, byte [eax + ebx]
cmp ecx, edx
jne 0x46e0cc
inc ebx
add esi, 2
cmp ebx, 0x81
jl 0x46e0b0
mov eax, dword [esp + 0x18]
cmp ebx, 2
jl 0x46e124
add ebp, ebx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x46e0fd
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 0x46e2ad
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 0x46e165
mov ecx, esi
shr ecx, 8
cmp cl, byte [esp + 0x10]
jne 0x46e165
movsx edx, byte [ebx + ebp]
movzx ecx, al
add edx, ecx
xor edx, esi
test dl, dl
jne 0x46e165
inc ebx
add edi, 2
cmp ebx, 0x81
jl 0x46e137
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
cmp ebx, 2
jl 0x46e1d3
add ebp, ebx
cmp dword [eax + 8], 8
mov dword [esp + 0x14], ebp
jne 0x46e19a
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 0x46e2ad
mov ebx, dword [esp + 0x30]
mov cl, byte [esp + 0x13]
test cl, cl
jne 0x46e218
cmp dword [eax + 8], 8
jne 0x46e201
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 0x46e2a5
cmp cl, byte [esp + 0x10]
jne 0x46e25c
cmp dword [eax + 8], 8
jne 0x46e240
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 0x46e2a5
cmp dword [eax + 8], 8
jne 0x46e27e
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 0x46e086
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