Registered sex offender accused of attempted kidnapping