On CodeProject I found anarticle with the source code that extracts the icons:
http://www.codeproject.com/KB/winsdk/IconExtraction.aspx
I've tested it.