A hefty custodial sentence is almost certain after the former SNP chief executive embezzled £400,000 from the party.