Preheat the oven to 350˚F. Grease a 9x13-inch casserole dish with butter.
In a medium bowl, make the topping by gently crushing the cornflakes. Toss with 4 tablespoons of melted butter and set aside.
In a small skillet, melt 4 tablespoons of butter over medium heat. Add the onion and cook until tender, about 5 minutes.
In a large bowl, combine the butter and onions, sour cream, condensed soup, and 2 cups of cheese. Season to taste with salt & black pepper.
Gently stir in the hash brown potatoes. Transfer the mixture to the prepared baking dish.
Top with the remaining ½ cup of cheese and sprinkle the topping over top.
Bake for 40-45 minutes or until browned and bubbly.
