Boil pistachios 1 minute, drain, rub skins off in a towel. Dry completely, about 20 minutes.
Toast skinned pistachios at 350 degrees F for 8 to 10 minutes until fragrant. Cool completely.
Process toasted pistachios in a food processor to fine crumbs, not paste.
Whisk ground pistachios, flour, cornstarch, baking powder, baking soda, and salt together. Set aside.
Beat butter on medium-high 2 minutes. Add sugar and beat 3 to 4 minutes until pale and fluffy. Add pistachio paste and beat 1 more minute.
Add eggs and egg whites one at a time, scraping bowl between each. Add vanilla and almond extracts.
Add sour cream and mix on low until just combined.
Add flour mixture in three additions, alternating with milk in two additions. Mix on low until just incorporated.
Divide between greased, parchment-lined pans. Bake 28 to 32 minutes until toothpick comes out clean.
Cool in pans 10 minutes, then cool completely on wire rack.
For frosting: beat cream cheese and butter until smooth, 2 to 3 minutes. Add powdered sugar cup by cup. Add pistachio paste, vanilla, salt. Beat on medium 1 to 2 minutes.
Level layers if needed. Assemble with frosting between layers. Crumb coat, refrigerate 20 minutes, apply final layer. Garnish with chopped pistachios.