I will pass an internal a trick when all key lost and there is no way to recover the DME ISN from there, or not needed anyway (like the donor CAS). It works on 90% of cases:
You go to key programming, then select all keys lost. you will be asked for ISN or SK. write the following in the ISN location: 00000000 (8 zeros), then click on continue. Ahtohex II will try to make a key for this CAS omitting maintaining the ISN/SK real value.
If you are lucky (90% you are), you will get a CAS with a working key, then you can continue your job by writing the DME ISN, changing VIN,...etc.