Heat butter in a large pot over medium heat. Stir in onion; cook until soft and translucent. Pour in chicken broth, and bring to a boil. Stir in garlic, bay leaves, cayenne pepper, Cajun seasoning, salt, and pepper. Stir corn into boiling broth. Simmer about 10 minutes. Reduce heat to medium low.
Remove 1 cup of soup, and set aside to cool slightly. Then pour into a food processor. Pour in half-and-half. Puree for 30 to 45 seconds, and set aside.
In a small bowl, stir together flour and milk. Slowly stir into simmering soup. Stirring constantly, simmer for 1 to 2 minutes. Then stir in pureed mixture.
Reduce heat to low, stir in crab meat, and cook until warmed through, about 5 minutes.