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

Method Recognize

platform/mac/platform_mac.cpp:242–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240 }
241
242 static Ref<Platform> Recognize(BinaryView* view, Metadata* metadata)
243 {
244 auto machoPlatform = metadata->Get("machoplatform");
245 if (!machoPlatform || !machoPlatform->IsUnsignedInteger())
246 return nullptr;
247 if (machoPlatform->GetUnsignedInteger() != 2)
248 return nullptr;
249 if (view->GetFile()->IsBackedByDatabase())
250 {
251 if (auto database = view->GetFile()->GetDatabase())
252 {
253 if (database->HasGlobal("original_version") && database->ReadGlobal("original_version").asInt64() < 6)
254 {
255 LogError("%s", "iOS database was saved with mac platform. Unable to upgrade. For iOS typelibs to"
256 " function properly, this binary must be reopened.");
257 return nullptr;
258 }
259 }
260 }
261 return g_iosArm64;
262 }
263};
264
265

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected