#pragma once #include "MachO.h" #include "SharedCache.h" // Process `SharedCacheMachOHeader`. class SharedCacheMachOProcessor { BinaryNinja::Ref m_view; BinaryNinja::Ref m_logger; std::shared_ptr m_vm; bool m_applyFunctions = true; public: explicit SharedCacheMachOProcessor( BinaryNinja::Ref view, std::shared_ptr vm); // Initialize header information such as sections and symbols. void ApplyHeader(const SharedCache& cache, SharedCacheMachOHeader& header); uint64_t ApplyHeaderSections(SharedCacheMachOHeader& header); void ApplyHeaderDataVariables(SharedCacheMachOHeader& header); void ApplyUnmappedLocalSymbols(const SharedCache& cache, const SharedCacheMachOHeader& header, BinaryNinja::Ref typeLib); };