I didn't quote Genesis. But now I will:
Genesis 4:3-7
3 And in process of time it came to pass, that Cain brought of the fruit of the ground an offering unto the Lord.
4 And Abel, he also brought of the firstlings of his flock and of the fat thereof. And the Lord had respect unto Abel and to his offering:
5 But unto Cain and to his offering he had not respect. And Cain was very wroth, and his countenance fell.
6 And the Lord said unto Cain, Why art thou wroth? and why is thy countenance fallen?
7 If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him.
The Lord had respect for Abel's offering and the Lord did not have respect for Cain's offering. Why? In Genesis it doesn't give the reason why the Lord didn't have respect for Cain's offering but the Book of Moses does tell us why. The reason is because offerings were to be made in the similitude of the sacrifice of the Only Begotten of the Father who was chosen before the foundation of the world and was to come in the meridian of time. Cain knew that an offering was to be made that way but was tempted of Satan to offer an unacceptable offering. Upon doing so his offering was rejected. God then tells Cain that if thou doest well thou shalt be accepted but if thou doest not well, sin lieth at the door.