Ejemplo n.º 1
0
        private void readOptionalHeader(SourceFile source)
        {
            magicNum                = source.getTwo();
            majorLinkerVersion      = source.getOne();
            minorLinkerVersion      = source.getOne();
            sizeOfCode              = source.getFour();
            sizeOfInitializedData   = source.getFour();
            sizeOfUninitializedData = source.getFour();
            addressOfEntryPoint     = source.getFour();
            baseOfCode              = source.getFour();
            baseOfData              = source.getFour();
            imageBase               = source.getFour();
            sectionAlignment        = source.getFour();
            fileAlignment           = source.getFour();
            majorOSVersion          = source.getTwo();
            minorOSVersion          = source.getTwo();
            majorImageVersion       = source.getTwo();
            minorImageVersion       = source.getTwo();
            majorSubsystemVersion   = source.getTwo();
            minorSubsystemVersion   = source.getTwo();
            win32VersionValue       = source.getFour();
            sizeOfImage             = source.getFour();
            sizeOfHeaders           = source.getFour();
            checksum                = source.getFour();
            subsystem               = source.getTwo();
            dLLCharacteristics      = source.getTwo();
            sizeOfStackReserve      = source.getFour();
            sizeOfStackCommit       = source.getFour();
            sizeOfHeapReserve       = source.getFour();
            sizeOfHeapCommit        = source.getFour();
            loaderFlags             = source.getFour();
            numberOfRvaAndSizes     = source.getFour();

            dExportTable            = DataDirectory.readDataDirectory(source);
            dImportTable            = DataDirectory.readDataDirectory(source);
            dResourceTable          = DataDirectory.readDataDirectory(source);
            exceptionTable          = DataDirectory.readDataDirectory(source);
            certificatesTable       = DataDirectory.readDataDirectory(source);
            baseRelocationTable     = DataDirectory.readDataDirectory(source);
            debugTable              = DataDirectory.readDataDirectory(source);
            architecture            = DataDirectory.readDataDirectory(source);
            globalPtr               = DataDirectory.readDataDirectory(source);
            threadLocalStorageTable = DataDirectory.readDataDirectory(source);
            loadConfigurationTable  = DataDirectory.readDataDirectory(source);
            boundImportTable        = DataDirectory.readDataDirectory(source);
            importAddressTable      = DataDirectory.readDataDirectory(source);
            delayImportDescriptor   = DataDirectory.readDataDirectory(source);
            CLRRuntimeHeader        = DataDirectory.readDataDirectory(source);
            reserved = DataDirectory.readDataDirectory(source);
        }
Ejemplo n.º 2
0
        public static ResImageGroupDataEntry parseData(SourceFile src)
        {
            ResImageGroupDataEntry cgdata = new ResImageGroupDataEntry();

            cgdata.bWidth      = src.getOne();
            cgdata.bHeight     = src.getOne();
            cgdata.bColorCount = src.getOne();
            uint res = src.getOne();

            cgdata.wPlanes      = src.getTwo();
            cgdata.wBitCount    = src.getTwo();
            cgdata.dwBytesInRes = src.getFour();
            cgdata.nID          = src.getTwo();
            cgdata.image        = null;
            return(cgdata);
        }