| 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 |
nothing calls this directly
no test coverage detected