A Reference Architecture for Software Protection