Radak on Genesis 4,7

(א) הלא אם תטיב שאת, אם תטיב לבך ומעשיך יהיה לך שאת, פירוש כפרה וסליחה ...

והחכם ר' אברהם בן עזרא פי' שאת ענין נשיאה לפי שאמר שנפלו פניו, אמר לו האל, אם תטיב תשא פניך תמורת מה שנפלו, או אשא פני אליך.

ובב"ר (כ"ב) אם תטיב שאת, ברכה, ואם לא תטיב שאת קללה.

ד"א אם תטיב שאת, אני מוחל לך על כל עוונותיך, ואם לא תטיב חטא של אותו האיש גדוש ומגודש.

ר' ברכיה בשם ר' שמעון בר חמא אמר "אשרי נשוי פשע כסוי חטאה" (תהלים ל"ב) אשרי אדם שהוא גבוה מחטאו ומפשעו ולא פשעו גבוה ממנו.

(ב) לפתח חטאת רובץ, לפתחך יהיה חטאת רובץ שתכשל בו תמיד בצאתך ובבאך, כלומר, העון אשר עמך תכשל בו תמיד כאלו אבן נגף קבוע בפתחך שתכשל בו תמיד בצאתך ובבאך. ובאמרו חטאת לשון זכר שאמר רובץ ר"ל זה הדבר הגורם החטאת והוא יצר הרע, והוא הנחש, והוא השטן. ובב"ר (שם) רובצת אין כתיב כאן אלא רובץ, בתחלה תש כנקבה ולבסוף מתגבר כגבור. (ג) ואליך תשוקתו, שיהיה שוקק תמיד אליך ומטעה אותך ומתאוה להכשילך, (ד) תשוקתו ענין תאוה וחשק וכן (ג' ט"ז) ואל אישך תשוקתך. ואתה תמשל בו, (ה) הוא ימשול בך ויכשילוך אם לא תסירנו מעליך, ואם תרצה אתה תמשול בו ותכניעו לפניך, ובזה הראה לו היכולת הנתינה בבחירה, כמו שאמר משה רבינו ע"ה (דברים ל"א ט"ו) "הנה נתתי לפניך את החיים ואת הטוב את המות ואת הרע ובחרת בחיים":

(1) הלא אם תיטיב שאת, when your heart will be good and your deeds will be of benefit for you...

The scholar Rabbi Avraham Ibn Ezra explains the concept שאת mentioned in our verse as derived from נשיאה the lifting of something, the opposite of ויפלו פניו, Cain's face having “fallen.”

G’d told Cain's that if he were to become good, mend his ways, then his face would be “lifted,” he could hold his head high. G’d Himself would raise Cain's face for him.

(2) ואם לא תיטיב לפתח חטאת רובץ, as if the Torah had written not in general terms לפתח, “at the entrance,” but לפתחך, “at your entrance.” The word רובץ, crouches, lies in wait...the temptation to commit a sin is ever present for such people. Sin is a constant peril, an obstacle waiting to trip you up. It awaits you both coming and going.

(3) ואליך תשוקתו, its desire is centered on you; it is constantly engaged in trying to seduce you by making you stumble.

(5) ואתה תמשול בו, he will have control over you only if you do not actively remove him (it) from your presence. If you want to, you can control it, govern it, resulting in your humbling it before you.

By saying these words G’d demonstrated to Cain the immense power inherent in his possessing free choice. Moses repeated this thought at the end of his life when in his parting speech he said to the Jewish people (Deut. 30,15) ראה נתתי לפניך היום את החיים ואת הטוב ואת המות ואת הרע. “See here, I have placed before you this day life, and the good, or death and the evil.” Moses added the admonition: ”choose the life!”