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

Function BNSharedCacheControllerApplyImage

view/sharedcache/core/ffi.cpp:168–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 }
167
168 bool BNSharedCacheControllerApplyImage(
169 BNSharedCacheController* controller, BNBinaryView* data, BNSharedCacheImage* image)
170 {
171 Ref<BinaryView> view = new BinaryView(BNNewViewReference(data));
172 // LoadImage will use the header, lets do everyone a favor and use the existing image!
173 if (const auto realImage = controller->object->GetCache().GetImageAt(image->headerAddress))
174 return controller->object->ApplyImage(*view, *realImage);
175 // They gave us an unknown image, we will not have header information.
176 return controller->object->ApplyImage(*view, ImageFromApi(*image));
177 }
178
179 bool BNSharedCacheControllerApplyRegion(
180 BNSharedCacheController* controller, BNBinaryView* data, BNSharedCacheRegion* region)

Callers 1

ApplyImageMethod · 0.85

Calls 3

ImageFromApiFunction · 0.70
GetImageAtMethod · 0.45
ApplyImageMethod · 0.45

Tested by

no test coverage detected