The .rsrc section stores resources associated with a Windows executable or DLL. Typical resources include icons, dialogs, menus, version information, strings, and application-defined binary data.
A raw payload can be added as an RCDATA resource and linked into the executable without representing it as a C array. RCDATA is intended for application-defined binary data, and the resource compiler includes the supplied bytes directly in the resulting PE image.
This approach is especially convenient for payloads maintained as separate binary files. It does not exist because .data or .rdata have a small fixed payload limit; those sections can also contain large objects. Resources simply provide a cleaner build-time method for embedding and identifying external data.
The steps below illustrate how to store a payload in the .rsrc section.


Resource.rc is the default name), and select the Add Resource option.

calc.ico, but the payload does not need to be disguised as an icon. A file such as payload.bin can be imported directly because Visual Studio will ask for the resource type in the following step.
RCDATA.
