If you do well, will you not be accepted? And if you do not do well, sin is crouching at the door. Its desire is for you, and you must rule over it.”
7. If thou does well . In these words God reproves Cain for having been unjustly angry, inasmuch as the blame of the whole evil lay with himself. For foolish indeed was his complaint and indignation at the rejection of sacrifices, the defects of which he had taken no care to amend.
God is here reasoning with Cain, to convince him of the sin and folly of his anger and discontent, and to bring him into a good temper again, that further mischief might be prevented. It is an instance of God's patience and condescending goodness that he would deal thus tenderly with so bad a man, in so bad an affair.
Commenting on Genesis 4:6-7
And Cain talked with Abel,.... Or "said", or "spoke unto" him (l); either what the Lord God said to him in the foregoing verses, as Aben Ezra; or he spoke to him in a kind and friendly manner, and thereby got him to take a walk in the field with him.