Self-preservation is highly instinctual. While the more complex "mom is going to kill me" might be out of their ability to grasp, I wouldn't be surprised if an embryo just three weeks after conception could at least understand pain and the desire to avoid it.