I would like to access the IMAGE_LOAD_CONFIG_DIRECTORY of a PE file using C#. I have tried for quite some time now to access this structure via the GetImageConfigInformation however all attempts have been unsuccessful.
I would like to know is there another header that points to the IMAGE_LOAD_CONFIG_DIRECTORY structure in a portable executable? The goal here being to just read the module in like I would any other file and then parse the required entries to find this structure.
Are there any other simpler ways of accessing this information from a PE file?
You first need to locate the data directories part of the PE optional header. If the Load Config Table is present, it will be the 11th data directory in the "array" of data directories (that is, the data directory entry at index 10).