Preheat oven to 350F.
Heat 1 tablespoon of the butter in a skillet over medium heat until melted. Add the diced onion and saute until soft and translucent.
In a large mixing bowl, combine the cooked onions, hash browns, 1/2 cup (1 stick/8 tablespoons) of melted butter, cream of chicken soup, sour cream, grated cheddar cheese, salt, and pepper. Scoop this mixture into a greased 9x13-inch glass baking dish.
In a skillet, heat the remaining 3 tablespoons of butter over medium heat until melted. Add the slightly crushed corn flake cereal and saute, stirring often, until lightly browned; about 2-3 minutes. Spread the browned corn flakes over top of the casserole.
Bake the casserole for 40-45 minutes at 350F. Cool slightly before serving.