Genesis 4:5-7

ISV(i) 5 but he did not look favorably upon Cain and his offering. When Cain became very upset and downcast, 6 the LORD asked Cain, "Why are you so upset? Why are you downcast? 7 If you do what is appropriate, you'll be accepted, won't you? But if you don't do what is appropriate, sin is crouching near your doorway, turning toward you. However, you must take dominion over it."