Without writing anything down, I think you should open the aminal, and if you have a cyano imine (like a cyano ketone), the cyanide can be a leaving group. A cyano added to an aldehyde (or imine) can form an anion, as in a cyanide catalyzed benzoin condensation. Let's see what you come up with.