Here's the steps to convert from section alignment to file alignment:
- Find the RVA for the data
- From the RVA, derive the section to which the data referenced belongs. This is trivial, since sections don’t overlap. The starting addresses of the various sections are available in the file header
- Find the difference between the RVA and the starting address of the section to find the data offset, ie, offset of that data within a section.
- From the file header, for the same section, find the location of the same section in the file.
- Add the data offset to the location of section in the file, to find the address of the data in the file.
But I just don't understand that, can someone elaborate with more details?