38 std::cout <<
"[!] Image size at: " << std::hex <<
module_base <<
" undetermined, using calculated size: " <<
pe_vsize << std::endl;
74 std::cout <<
"[!] Failed reading Image at: " << std::hex << this->moduleBase <<
" img size: " <<
pe_vsize << std::endl;
83 if (!vBuf)
return false;
101 if (!vBuf)
return false;
130 IN std::string dumpFileName,
132 IN OPTIONAL const peconv::ExportsMapper* exportsMap,
136 if (!vBuf || !isValidPe())
return false;
138 std::cout <<
"Dumping using relocBase: " << std::hex << relocBase <<
"\n";
140 if (exportsMap !=
nullptr) {
141 const bool fixed = peconv::fix_imports(this->vBuf, this->vBufSize, *exportsMap, notCovered);
144 std::cerr <<
"[-] Unable to fix imports!" << std::endl;
148 if (
dumpMode == peconv::PE_DUMP_AUTO) {
166 return peconv::dump_pe(dumpFileName.c_str(),
this->vBuf,
this->vBufSize,
this->relocBase,
dumpMode);
171 if (!vBuf)
return false;
172 return peconv::dump_to_file(dumpFileName.c_str(), vBuf, vBufSize);
177 if (!vBuf)
return false;
static size_t calcImgSize(HANDLE processHandle, HMODULE modBaseAddr, BYTE *headerBuffer, size_t headerBufferSize, IMAGE_SECTION_HEADER *hdr_ptr=NULL)
bool fillFromBuffer(ULONGLONG module_base, util::ByteBuffer &data_cache)
size_t calcRemoteImgSize(ULONGLONG module_base) const
bool _readRemote(ULONGLONG module_base, size_t pe_vsize)
bool readRemote(ULONGLONG module_base, size_t pe_vsize)
bool dumpPeToFile(IN std::string dumpFileName, IN OUT peconv::t_pe_dump_mode &dumpMode, IN OPTIONAL const peconv::ExportsMapper *exportsMap=NULL, OUT OPTIONAL peconv::ImpsNotCovered *notCovered=NULL)
bool resizeLastSection(size_t new_img_size)
bool resizeBuffer(size_t new_size)
bool dumpToFile(IN std::string dumpFileName)
#define MASK_TO_DWORD(val)
bool is_code(BYTE *loadedData, size_t loadedSize)
size_t fill_iat(BYTE *vBuf, size_t vBufSize, IN const peconv::ExportsMapper *exportsMap, IN OUT IATBlock &iat, IN ThunkFoundCallback *callback)
size_t getDataSize(bool trimmed=false) const
const BYTE * getData(bool trimmed=false) const