.CHM is "
Compressed HTML." It seems it should be easy to convert to ePub. I suspect it's popular for pirated books because some of them exist as webpages online, and this is a way to bundle those up; it's also possible that some of them come with a disc that has a .chm file, and pirated versions are just copies of the legit ones.
No idea if Kindle will convert those, or if they'd need to first be converted to individual, separate HTML files. The Kindle page at Amazon doesn't list .chm among the filetypes it can convert.