Preheat oven to 350°F and grease a 9x13-inch baking dish.
In a large bowl, combine hash browns, cream of chicken soup, sour cream, shredded cheddar cheese, 1/2 cup melted butter, diced onion, salt, and pepper until well mixed.
Spread the hash brown mixture evenly into the prepared baking dish.
In a small bowl, mix crushed cornflakes with 1/4 cup melted butter, then sprinkle evenly over the casserole.
Bake uncovered for 45 minutes until the top is golden brown and the casserole is bubbling around the edges.
Let stand for 10 minutes before serving to allow the casserole to set.