MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / peOpenBuffer

Function peOpenBuffer

emmy_hook/src/libpe/libpe.cpp:465–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465PE_STATUS peOpenBuffer( PE *pe, uint8_t * pData, uint32_t dwSize )
466{
467 PE_STATUS status = PE_SUCCESS;
468
469 ZeroMemory( pe, sizeof(PE) );
470
471 sprintf_s( pe->szFileName, "[%08X]", pData );
472
473 if( dwSize < 10 || ( pData[0] != 'M' || pData[1] != 'Z' ) )
474 {
475 status = PE_NOT_PE;
476 goto done;
477 }
478
479 pe->pData = pData;
480 pe->dwFileSize = dwSize;
481
482 status = peParseBuffer( pe );
483
484done:
485
486 if( status != PE_SUCCESS )
487 {
488 peClose(pe);
489 }
490
491 return status;
492}
493
494BOOL peResolveVirtualAddress( PE *pe, uint64_t qwVirtualAddress, PE_ADDRESS *pAddress )
495{

Callers

nothing calls this directly

Calls 2

peParseBufferFunction · 0.85
peCloseFunction · 0.85

Tested by

no test coverage detected