Some more context would be very, very helpful here. Basically it's the logoi of the kakoi. So : Place appropriate preposition for whatever the dative stands for syntactically + the dative (logois) however it is translated here (reasons? speeches? whatever?) + of the + whatever the translation of "kakois" is here (evils, bad men, something else?)
The general rule is that anything between an article and the noun in belongs to is related to the noun. Η του ποταμού όχθη = η όχθη του ποταμού = the bank of the river.