So in my desperate need to make some application shortcut look pretty in linux, i needed to extract the icon from a windows exe.
The icoutils package provides some very nice tools, one of them being wrestool which i used.
EXAMPLES List all resources in file `write.exe': $ wrestool -l write.exe --type=3 --name=1 --lang=1033 [type=icon offset=0x3120 size=752] --type=3 --name=2 --lang=1033 [type=icon offset=0x3410 size=304] --type=14 --name=1 --lang=1033 [type=group_icon offset=0x3540 size=34] --type=16 --name=1 --lang=1033 [type=version offset=0x3564 size=808] List all (group-) icon resource in file `write.exe': $ wrestool -l --type=group_icon write.exe --type=14 --name=1 --lang=1033 [type=group_icon offset=0x3540 size=34] Extract all icons to current directory, naming the destination files `write.exe_T_N.ico': $ wrestool -x --output=. -t14 write.exe $ ls *.ico