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

Method Recognize

platform/mac/platform_mac.cpp:153–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151 }
152
153 static Ref<Platform> Recognize(BinaryView* view, Metadata* metadata)
154 {
155 bool shouldRecognizeOnIOS = false;
156 if (view->GetFile()->IsBackedByDatabase())
157 {
158 if (auto database = view->GetFile()->GetDatabase())
159 {
160 if (database->HasGlobal("original_version") && database->ReadGlobal("original_version").asInt64() < 6)
161 shouldRecognizeOnIOS = true;
162 }
163 }
164 auto machoPlatform = metadata->Get("machoplatform");
165 if (!machoPlatform || !machoPlatform->IsUnsignedInteger())
166 return nullptr;
167 if (machoPlatform->GetUnsignedInteger() != 2 || shouldRecognizeOnIOS)
168 return g_macArm64;
169
170 return nullptr;
171 }
172};
173
174

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