summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/MachOProcessor.h
blob: 0564a831ebcb2beccc42efdea0d4c81b97c53e5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "MachO.h"

// Process `SharedCacheMachOHeader`.
class SharedCacheMachOProcessor
{
	BinaryNinja::Ref<BinaryNinja::BinaryView> m_view;
	BinaryNinja::Ref<BinaryNinja::Logger> m_logger;
	std::shared_ptr<VirtualMemory> m_vm;

	bool m_applyFunctions = true;

public:
	explicit SharedCacheMachOProcessor(
		BinaryNinja::Ref<BinaryNinja::BinaryView> view, std::shared_ptr<VirtualMemory> vm);

	// Initialize header information such as sections and symbols.
	void ApplyHeader(SharedCacheMachOHeader& header);

	uint64_t ApplyHeaderSections(SharedCacheMachOHeader& header);

	void ApplyHeaderDataVariables(SharedCacheMachOHeader& header);
};