So basically the Cowboys would have to lose out, since they already have 4 divisional wins.
Mathematically it's possible, but it's unlikely. Usually in the AFC it takes a worse record to get the wild card than it does in the NFC, because of New England. This year there's two dominant teams in both conferences, which keeps the less successful (ahem) teams in the hunt a little longer.