The former SNP chief executive admitted embezzling £400,310.65 from his party over a period of 12 years.