Preheat your oven to 350°F (175°C).
Prepare a 9x13 inch baking pan by greasing it or lining it with parchment paper.
In a large bowl, melt the butter and stir in the sugar until fully combined.
Add the eggs one at a time, mixing well after each addition.
Mix in the flour, cocoa powder, and vanilla extract until just combined.
Fold in the chopped pistachios gently into the brownie batter.
Pour half of the brownie batter into the prepared pan, smoothing it evenly.
In a separate bowl, mix the kunafa with syrup to ensure it's moist.
Spread the moistened kunafa evenly over the brownie batter.
Spoon the remaining brownie batter over the kunafa, smoothing the top layer.
Bake in the preheated oven for 25-30 minutes, or until a toothpick comes out with moist crumbs.
Allow to cool in the pan before slicing into squares.