A Mac asking for a pincode means that it has been locked, by the owner, using Find My Mac. Astute owners do this so that it is useless if stolen. If you really are the rightful owner then you will have to take it to the Apple Store and argue about the cost of unlocking it. The first thing they will do is to check if it has been reported as stolen.