long () { // AKA VirtualAddress + VirtualSize of the latest section, must be dividable by SectionAlignment long sectionAlignment = myImageOptionalHeader.getSectionAlignment().getValue(); long result = 0; long lastVA = 0; for (ImageSectionHeader header : mySectionHeaders) { long va = ((Value)header.getVirtualAddress()).getValue(); if (lastVA < va) { result = header.getVirtualSize().getValue() + va; } } if (result % sectionAlignment != 0) { result += sectionAlignment - result % sectionAlignment; } return result; }