MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / Recognize

Method Recognize

platform/mac/platform_mac.cpp:109–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 static Ref<Platform> Recognize(BinaryView* view, Metadata* metadata)
110 {
111 bool shouldRecognizeOnIOS = false;
112 if (view->GetFile()->IsBackedByDatabase())
113 {
114 if (auto database = view->GetFile()->GetDatabase())
115 {
116 if (database->HasGlobal("original_version") && database->ReadGlobal("original_version").asInt64() < 6)
117 shouldRecognizeOnIOS = true;
118 }
119 }
120 auto machoPlatform = metadata->Get("machoplatform");
121 if (!machoPlatform || !machoPlatform->IsUnsignedInteger())
122 return nullptr;
123 if (machoPlatform->GetUnsignedInteger() != 2 || shouldRecognizeOnIOS)
124 return g_macArmv7;
125
126 return nullptr;
127 }
128};
129
130

Callers

nothing calls this directly

Calls 9

IsBackedByDatabaseMethod · 0.80
HasGlobalMethod · 0.80
asInt64Method · 0.80
ReadGlobalMethod · 0.80
IsUnsignedIntegerMethod · 0.80
GetUnsignedIntegerMethod · 0.80
GetFileMethod · 0.45
GetDatabaseMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected