-
Notifications
You must be signed in to change notification settings - Fork 1
/
securebootview.h
43 lines (30 loc) · 1.01 KB
/
securebootview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Copyright (c) 2023 Jon Palmisciano. All rights reserved.
//
// Use of this source code is governed by the BSD 3-Clause license; a full copy
// of the license can be found in the LICENSE.txt file.
//
#pragma once
#include <binaryninjaapi.h>
namespace BN = BinaryNinja;
class SecureBootView : public BN::BinaryView {
BN::Ref<BN::Logger> m_logger;
BN::Ref<BN::AnalysisCompletionEvent> m_completionEvent;
std::uint64_t m_base;
std::string m_name;
std::uint64_t GetPredictedBaseAddress();
void DefineFixedOffsetSymbols();
void DefineStringAssociatedSymbols();
public:
SecureBootView(BinaryView *data);
bool Init() override;
};
class SecureBootViewType : public BN::BinaryViewType {
public:
SecureBootViewType();
BN::Ref<BN::BinaryView> Create(BN::BinaryView *data) override;
BN::Ref<BN::BinaryView> Parse(BN::BinaryView *data) override;
bool IsTypeValidForData(BN::BinaryView *data) override;
bool IsDeprecated() override;
BN::Ref<BN::Settings> GetLoadSettingsForData(BN::BinaryView *data) override;
};