How does "Iveles Adam Tesalef Darko"?
Rashi: Evil comes to him due to his sin. Amidst his Iveles, he makes his way crooked and transgresses, and [Shamayim] exacts payment from him. When affliction comes to on him, he is angry at Hashem and thinks that Midas ha'Din does improperly, like Yosef's brothers, who said "Mah Zos Asah Elokim Lanu 1 " (Bereishis 42:18).
R. Yonah: This refers to "v'Atz b'Raglayim Chotei" (2). One is punished when he does not think before his deeds, to be precise in his acts and guard his ways from sin. "Gam b'Lo Da'as Nefesh Lo Tov" (2) - man was obligated to probe his deeds, search his ways and investigate, and repent to Hashem. Due to Iveles, he does not put his deeds to his heart and does not realize his sin. He did not probe his deeds to know if he is guilty in one of Hashem's Mitzvos.
Malbim: Hashem made man so that man can go in the good path, of life, via the laws of Chachmah that He revealed to man. As long as he believes in the laws of Chachmah, he goes in the good path and does not complain that Hashem did not create him straightly. His Iveles and doubts about the ways of Chachmah make his way crooked. Iveles is not attributed to Hashem; it is man's.
This is like Targum Yonasan there - 'what did Hashem do to us? It is not for our sin!' (PF)
Why is he angry at Hashem?
R. Yonah: He questions Hashem's Midos when affliction comes on him. He does not find sin, for he is Tamim in his Midos and does not sin intentionally. Amidst Iveles, he does not know that his Avodah is lacking; he sinned via not contemplating his deeds. Sometimes one's intent is acceptable, but his deeds are not. This is like Iyov said (refer to 19:2:1:4*).
Vilna Gaon: 'One who comes to purify himself, [Shamayim] helps him' (Yuma 38b). Sometimes one begins to learn Torah and do Mitzvos, and ceases because it is very hard for him, for they do not help him, and he is angry at Hashem. It is his fault, for one must go according to his level, and not jump. Due to his folly, he made his way crooked, and he is angry at Hashem!
Malbim: He is angry that Hashem did not create him properly, and did not show to him the good and straight path.