#pragma once #include #include #include #include #include #include #include #include "common.h" #include "RoMetadataProcess.h" class NsoProcess { public: NsoProcess(); void process(); void setInputFile(const fnd::SharedPtr& file); void setCliOutputMode(CliOutputMode type); void setVerifyMode(bool verify); void setInstructionType(nn::hac::npdm::InstructionType type); void setListApi(bool listApi); void setListSymbols(bool listSymbols); const RoMetadataProcess& getRoMetadataProcess() const; private: const std::string kModuleName = "NsoProcess"; fnd::SharedPtr mFile; CliOutputMode mCliOutputMode; bool mVerify; nn::hac::npdm::InstructionType mInstructionType; bool mListApi; bool mListSymbols; nn::hac::NsoHeader mHdr; fnd::Vec mTextBlob, mRoBlob, mDataBlob; RoMetadataProcess mRoMeta; void importHeader(); void importCodeSegments(); void displayNsoHeader(); void processRoMeta(); };