The son of Zurvan's desire is Ohrmazd, warm and moist, the god of goodness, light, and life. The son of his doubt is Ahri- man, cold and dry, lord of darkness and evil. To Ahriman Zurvan had planned to give nothing, for his intent was to bestow the rule of the world upon the son he loved. But Ahriman thrusts himself first out of the womb and claims the rule, to the horror of his father, who exclaims, "My son is light and fragrant, but thou art dark and stinking. And so for a time Ahriman obtains lordship in this world, though the moment of his destruction and the triumph of Ohrmazd is set. The story of Jacob and Esau comes quickly to mind, and indeed what we have here is another set of doublets." [Jeffery Burton Russell, The Devil: Perceptions of Evil from Antiquity to Primitive Christianity p. 111]
What does it tell us about the origins of the Pentateuch if Ezra (for lack of a better name) its author re-purposed Babylonian and Persian myths to construct its 'historical record'? I really don't know. My first sense is that Ezra really didn't know much abou the history of his people before Egypt. But why transform the story of two divine twins into that of two earthly ones? Yet Esau is at once Eeshu, the one who bears the face of Elohim. I think these words (Genesis 33:10) are a confession on the part of its author that something lies deeper under the surface, that the recurring pattern of rival twins goes back to a divine - and ultimately Persian - source.
But what of the idea that the Persians venerated Ohrmazd and the Israelites extolled his wicked rival? I can't help but see something subversive in this - that from its very beginnings, the Pentateuch was rooted in a crypto-theology which kept the real meaning of the narrative away from outsiders.