That is really not so easy. An icon consists in fact of up to four resources namely an icongroup resource, and an icon resource for each of the 3 possible bit depths 1, 4, and 8 bits. For the principle you best check an old Inside Macintosh Volume since LabVIEW binary files are more or less Macintosh OS 9 type resource files, with some minor modifications and of course many non Macintosh type resources in them.
But since LabVIEW version 8.2 there is a private application method to extract the icon of a VI without loading it.
Get VI Icon.vi