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

Method Recognize

platform/mac/platform_mac.cpp:197–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 }
196
197 static Ref<Platform> Recognize(BinaryView* view, Metadata* metadata)
198 {
199 auto machoPlatform = metadata->Get("machoplatform");
200 if (machoPlatform->GetUnsignedInteger() != 2)
201 return nullptr;
202 if (!machoPlatform || !machoPlatform->IsUnsignedInteger())
203 return nullptr;
204 if (view->GetFile()->IsBackedByDatabase())
205 {
206 if (auto database = view->GetFile()->GetDatabase())
207 {
208 if (database->HasGlobal("original_version") && database->ReadGlobal("original_version").asInt64() < 6)
209 {
210 LogError("%s", "iOS database was saved with mac platform. Unable to upgrade. For iOS typelibs to"
211 " function properly, this binary must be reopened.");
212 return nullptr;
213 }
214 }
215 }
216 return g_iosArmv7;
217 }
218};
219
220class IOSArm64Platform: public Platform

Callers

nothing calls this directly

Calls 9

GetUnsignedIntegerMethod · 0.80
IsUnsignedIntegerMethod · 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