Melt butter with sugar in a saucepan over medium-low heat, stirring to combine. Remove from heat, and pour into a mixing bowl. With an electric mixer on medium-low speed, beat until mixture is cooled, 4 to 5 minutes. Add eggs, one at a time, beating until each is incorporated, scraping down sides of bowl as needed. Add vanilla, then cocoa mixture, and beat until combined. Reduce speed to low. Add flour mixture in two batches, alternating with the sour cream, and beating until just combined after each.