For the Cake: Adjust oven rack to middle position and preheat oven to 350°F (175°C). Line bottoms of two 9-inch cake pans with parchment paper and lightly coat the inside with nonstick cooking spray.
In a large bowl, sift flour, cocoa, baking soda, and salt, and whisk to combine; set aside. In a medium bowl, whisk sugar, sour cream, oil, eggs, vanilla, and espresso powder until smooth.
Whisk wet ingredients into dry ingredients until smooth. Divide batter evenly between prepared pans and smooth cake tops with rubber spatula. Bake until cake is just firm and a toothpick inserted into center comes out with just a few moist crumbs attached, 22 to 25 minutes.
Let cakes cool in pans for 15 minutes. Remove cakes from pans, discard parchment, and let cool completely on wire rack, about 1 hour.
For the Frosting: Meanwhile, in a food processor, process butter, confectioners' sugar, cocoa, and salt until combined and smooth, about 30 seconds, scraping down sides of bowl as necessary. Add corn syrup and vanilla and process until smooth, about 30 seconds, scraping down sides of bowl as necessary. Add chocolate and process until smooth and creamy, about 30 seconds. (See notes.)
To Assemble the Cake: Place one cake, top side up, on a serving platter or cake pedestal. Using offset spatula, spread about 1 cup frosting over top of cake layer. Center second cake, bottom side up, on top, and press lightly to adhere. Spread remaining frosting evenly over top and sides of assembled cake. To decorate, use the back of a soup spoon to make decorative swirls on the cake or decorate as desired. Serve.
