Thaw pastry on bench and heat oven to 390 (200C) and line a cookie tray with parchment paper.
In a medium sized frypan over a medium heat, melt butter and cook onion for around 5 minutes till soft and translucent. Add chicken and cook through.
Add wine to the fry pan and continue to cook for around 5 minutes. Season with salt and pepper.
In a small bowl mix together the cornflour and water to create a paste. Add this to the chicken mixture and mix through. Remove from heat.
Take the first sheet of the puff pastry and place on a cutting board. Leaving a 1 ½ inch border around all sides make about 8 evenly spaced slits along the width of the pastry sheet.
Place the second sheet on the cookie tray and spoon on 2 teaspoons of the cranberry sauce. Spread evenly over sheet leaving a 1 ½ inch border. Spoon chicken mixture into the centre, then spread out leaving the 1 ½ inch border. Place the Brie slices on top. Using your fingers place remaining 3 teaspoons of cranberry sauce in small blobs over the top.
With a pastry brush (or your fingers), brush some of the beaten egg around the 1 ½ inch border. Place the first pastry sheet on top of the second, press down the border with your fingers and brush the egg over the pie.
Cook for around 20 minutes until the pastry is golden brown. Let stand for 5 minutes before cutting.