2018-11-05 13:11:08 +00:00
|
|
|
#pragma once
|
2021-09-28 11:15:54 +00:00
|
|
|
#include "types.h"
|
|
|
|
|
2018-11-05 13:11:08 +00:00
|
|
|
#include <nn/hac/KernelInitialProcessHeader.h>
|
|
|
|
|
2021-09-28 11:15:54 +00:00
|
|
|
namespace nstool {
|
2018-11-05 13:11:08 +00:00
|
|
|
|
|
|
|
class KipProcess
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
KipProcess();
|
|
|
|
|
|
|
|
void process();
|
|
|
|
|
2021-09-28 11:15:54 +00:00
|
|
|
void setInputFile(const std::shared_ptr<tc::io::IStream>& file);
|
2018-11-05 13:11:08 +00:00
|
|
|
void setCliOutputMode(CliOutputMode type);
|
|
|
|
void setVerifyMode(bool verify);
|
|
|
|
private:
|
|
|
|
const std::string kModuleName = "KipProcess";
|
|
|
|
|
2021-09-28 11:15:54 +00:00
|
|
|
std::shared_ptr<tc::io::IStream> mFile;
|
2018-11-05 13:11:08 +00:00
|
|
|
CliOutputMode mCliOutputMode;
|
|
|
|
bool mVerify;
|
|
|
|
|
|
|
|
nn::hac::KernelInitialProcessHeader mHdr;
|
2021-09-28 11:15:54 +00:00
|
|
|
tc::ByteData mTextBlob, mRoBlob, mDataBlob;
|
2018-11-05 13:11:08 +00:00
|
|
|
|
|
|
|
void importHeader();
|
|
|
|
void importCodeSegments();
|
|
|
|
void displayHeader();
|
|
|
|
void displayKernelCap(const nn::hac::KernelCapabilityControl& kern);
|
2021-09-28 11:15:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|