diff --git a/src/fileformat/file_format/pe/pe_format.cpp b/src/fileformat/file_format/pe/pe_format.cpp index 9fd200fff..3b7cb807d 100644 --- a/src/fileformat/file_format/pe/pe_format.cpp +++ b/src/fileformat/file_format/pe/pe_format.cpp @@ -1650,7 +1650,7 @@ void PeFormat::loadResourceNodes(std::vector &nodes continue; } auto resource = std::make_unique(); - resource->setOffset(leaf->getOffsetToData() - rva + formatParser->getResourceDirectoryOffset()); + resource->setOffset(getImageLoader().getValidOffsetFromRva(leaf->getOffsetToData())); resource->setSizeInFile(leaf->getSize()); resource->load(this); resourceTable->addResource(std::move(resource));