Calibre does the conversion. If you have a book that you're just converting to .mobi and have a recent version of Calibre, Calibre will do it automatically. If it's a .mobi book that was already in your Calibre library, just re-convert it to .mobil, and Calibre will add the ASIN. (The change came with a recent version of Calibre, but I don't know which one.)
It's a great feature.