You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
876 B
33 lines
876 B
#pragma once
|
|
#include <spdlog/spdlog.h>
|
|
#include <cstdint>
|
|
#include <linuxpe>
|
|
#include <optional>
|
|
#include <vector>
|
|
|
|
#include <comp/symbol_table.hpp>
|
|
#include <decomp/routine.hpp>
|
|
|
|
#include <coff/archive.hpp>
|
|
#include <coff/image.hpp>
|
|
|
|
namespace theo::decomp {
|
|
class decomp_t {
|
|
public:
|
|
explicit decomp_t(std::vector<std::uint8_t>& lib, comp::symbol_table_t* syms);
|
|
|
|
std::vector<routine_t> rtns();
|
|
std::vector<std::uint8_t> lib();
|
|
std::vector<coff::image_t*> objs();
|
|
comp::symbol_table_t* syms();
|
|
std::map<coff::section_header_t*, std::size_t>& scn_hash_tbl();
|
|
std::optional<comp::symbol_table_t*> decompose();
|
|
|
|
private:
|
|
const std::vector<std::uint8_t> m_lib;
|
|
std::vector<coff::image_t*> m_objs;
|
|
std::vector<routine_t> m_rtns;
|
|
std::map<coff::section_header_t*, std::size_t> m_scn_hash_tbl;
|
|
comp::symbol_table_t* m_syms;
|
|
};
|
|
} // namespace theo::decomp
|