Preheat the oven to 350°F. Grease a 9x13 casserole dish, set aside.
In a large sauté pan over medium-high heat, melt butter. Add onion and cook until translucent, about 5 to 7 minutes. Add garlic and cook for 30 seconds. Remove from the heat and set aside.
In a large bowl, combine all remaining ingredients: sour cream, cream of chicken soup, ½ cup melted butter, black pepper, shredded hash brown potatoes and shredded cheddar cheese; stir until well blended. Fold in the cooked onion mixture and pour into prepared baking dish.
In a medium sized bowl, combine the cornflakes and melted butter. Sprinkle evenly over the top of the casserole.
Bake for 40 to 45 minutes, or until bubbly and the top is browned. Serve hot!
