Icons in PE are very sensitive to resource table ordering. Here's what works:

We can't use editpe
's builtin set_icon
because it lays out Icon
and Icon Group
together before/after the RCData
. Instead, we
need a custom implementation that places RCData between the icon entries. This means we defer Icon Group
to always happen during PortableExecutable::build
.
After the fix: