Good intentions only go so far.
I really wonder how such an event would play out in the real world.
===
Here is your two week notice that we are shutting the doors. We need you to code a non-DRM version of the product.
Hmmm, I am gone in two weeks, do I care what my boss wants?
===
Yes, the answer is a matter of intergrity. Personally, I would be one of those who would spend my two weeks coding the desired product during the day and spending my off time on my CV and seeking a new employer. An interesting side note is that in this type of environment people who are let go are generally, and immediately, isolated from any possibility of doing harm to corporate software/hardware.
Twenty years, or so, ago, I was laid off from an IT position. My access to the computers was removed before I left the HR office and I was escorted while I cleared my belongings from my office. My potential ability to cause harm, had I the desire to do so, was a far greater concern than my ability to contribute prior to my scheduled departure from the payroll. Granted, the company was a DOD contractor which may have played a role in the level of paranoia involved.