In a medium saucepan, combine the butter and the sugar over medium heat. Heat, stirring occasionally to combine, until the butter is melted. Remove the mixture from the heat and transfer to the bowl of an electric mixer
fitted with a paddle attachment. Beat on medium-low speed, 4-5 minutes, until the mixture is cooled. Mix in the eggs, one at a time, scraping down the sides of the bowl as needed and beating well after each addition. Mix in the vanilla and then the cocoa mixture and beat until incorporated. With the mixer on low speed add in the dry ingredients in two batches, alternating with the sour cream, beating until just combined.