1. The PE file resources are stored in a tree structure.
2. resource Directory:
typedef struct
{< br> DWORD characteristics;
DWORD timedatestamp;
word majorversion;
word minorversion;
word numberofnamedentries;
word numberofidentries;
}image_resource_directory;
define directoryentries [];
>< br> directoryentries follows image_resource_directory,
the number is = numberofnamedentries + numberofidentries.
Typedef struct
{
DWORD name;
DWORD offsettodata;
} Image_resource_directory_entry;
If the offsettodata field is not the offset of another resource directory, it is a pointer to a specific resource entity. If
A high value (0x80000000) indicates that the Directory Project points to another subdirectory, while the remaining 31 digits
The metadata is the offset position of another image_resource_directory (calculated from the resource section ).
). If the maximum bit is not set, the 31 digits are
The offset position of image_resource_data_entry (counted from the resource section ).
The image_resource_data_entry structure contains the location, size, and code of the original resource data.
Page.
Directoryentries []
---------
---> The next directory or image_resource_data_entry
---------
---------
typedef struct _ image_resource_data_entry {
DWORD offsettodata;
DWORD size;
DWORD codePage;
DWORD reserved;
}image_resource_data_entry, * pimage_resource_data_entry;