[difficulty: 4] [protection: crc64 control]
I don't want to give away too much yet. The routine is very small. So hopefully very little time reversing and more time keygenning.
EDIT: so it wasn't as hard as I thought! Villani killed it without even knowing the underlying scheme (which, to me, is even more impressive). Artif owned it up also with ease :) Both solutions posted, thanks guys.