Preheat. Preheat oven to 350℉.
Grease. Grease a 9x13-inch casserole pan with butter or butter spray.
Prep hash browns. While the hash browns are in the bag, lightly hit the bag with a rolling pin to break up the hash browns into small pieces if needed. Place the hashbrowns in a large bowl and stir in the salt and pepper. Spread the hashbrowns into an even layer in the 9x13 pan.
Mix. In a large bowl, melt ½ cup of butter (1 stick). Mix the cheddar cheese, sour cream, ham, cream of chicken soup, and onion with the melted butter. Spread over the hash brown layer.
Add topping. In a medium-sized bowl, melt the remaining ¼ cup of butter (½ stick). Stir the cornflakes together with the melted butter. Spread the cornflake mixture evenly over the soup mixture.
Bake. Bake for 1 hour uncovered. Serve immediately.