Preheat oven to 350 degrees F.
In a large mixing bowl, whisk together the cocoa, sugar, flour, baking soda, and salt.
In another medium mixing bowl, combine the stout, melted butter, and vanilla. Beat in eggs, 1 at time. Mix in sour cream until thoroughly combined and smooth. Gradually mix the dry ingredients into the wet mixture.
Lightly grease 24 muffin tins. Divide the batter equally between muffin tins, filling each 3/4 full. Bake for about 12 minutes and then rotate the pans. Bake another 12 to 13 minutes until risen, nicely domed, and set in the middle but still soft and tender. Cool before turning out.
To make the icing: In a medium bowl with a hand mixer, beat the cream cheese on medium speed until light and fluffy. Gradually beat in the heavy cream. On low speed, slowly mix in the confectioners' sugar until incorporated and smooth. Cover with plastic wrap and refrigerate until ready to use. Icing can be made several hours ahead and kept covered and chilled.
Top each cupcake with a heap of frosting and dust with cocoa.