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

Method GetLoadSettingsForData

view/pe/teview.cpp:384–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384Ref<Settings> TEViewType::GetLoadSettingsForData(BinaryView* data)
385{
386 Ref<BinaryView> viewRef = Parse(data);
387 if (!viewRef || !viewRef->Init())
388 {
389 m_logger->LogWarn("Failed to initialize view of type '%s'. Generating default load settings.", GetName().c_str());
390 viewRef = data;
391 }
392
393 // specify default load settings that can be overridden
394 Ref<Settings> settings = GetDefaultLoadSettingsForData(viewRef);
395 vector<string> overrides = {"loader.platform", "loader.imageBase"};
396 for (const auto& override : overrides)
397 {
398 if (settings->Contains(override))
399 settings->UpdateProperty(override, "readOnly", false);
400 }
401
402 return settings;
403}

Callers

nothing calls this directly

Calls 5

LogWarnMethod · 0.80
c_strMethod · 0.80
UpdatePropertyMethod · 0.80
InitMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected