32 size_t add_to_lookup(std::string moduleName, HMODULE modulePtr, ULONGLONG moduleBase);
43 return add_to_lookup(moduleName, modulePtr,
reinterpret_cast<ULONGLONG
>(modulePtr));
51 std::map<ULONGLONG, std::set<ExportedFunc>>::const_iterator itr =
va_to_func.find(va);
53 const std::set<ExportedFunc> &fSet = itr->second;
64 std::map<std::string, std::string>::const_iterator found = this->
dll_shortname_to_path.find(short_name);
77 if (dll_path.length() == 0)
return "";
88 if (exp_set == NULL)
return NULL;
90 std::set<ExportedFunc>::iterator fItr = exp_set->begin();
100 enum ADD_FUNC_RES { RES_INVALID = 0, RES_MAPPED = 1, RES_FORWARDED = 2 };
101 ADD_FUNC_RES add_function_to_lookup(HMODULE modulePtr, ULONGLONG moduleBase,
size_t moduleSize, ExportedFunc &currFunc, DWORD callRVA);
103 bool add_forwarded(ExportedFunc &currFunc, DWORD callRVA, PBYTE modulePtr,
size_t moduleSize);
104 bool add_to_maps(ULONGLONG va, ExportedFunc &currFunc);
106 size_t resolve_forwarders(
const ULONGLONG va, ExportedFunc &currFunc);
107 size_t make_ord_lookup_tables(PVOID modulePtr,
size_t moduleSize, std::map<PDWORD, DWORD> &va_to_ord);
void print_va_to_func(std::stringstream &stream) const
std::map< std::string, std::string > dll_shortname_to_path
size_t add_to_lookup(std::string moduleName, HMODULE modulePtr, ULONGLONG moduleBase)
size_t add_to_lookup(std::string moduleName, HMODULE modulePtr)
void associateVaAndFunc(ULONGLONG va, const ExportedFunc &func)
std::string get_dll_path(std::string short_name) const
std::map< ExportedFunc, ULONGLONG > func_to_va
void print_func_to_va(std::stringstream &stream) const
const ExportedFunc * find_export_by_va(ULONGLONG va) const
std::string get_dll_fullname(std::string short_name) const
const std::set< ExportedFunc > * find_exports_by_va(ULONGLONG va) const
std::map< ExportedFunc, std::set< ExportedFunc > > forwarders_lookup
std::map< ULONGLONG, std::set< ExportedFunc > > va_to_func
A definition of ExportedFunc class - used for storing the details of the exported function....
Functions related to operations on files. Wrappers for read/write.
std::string get_file_name(IN const std::string full_path)
Wrappers over various fields in the PE header. Read, write, parse PE headers.
Converting PE from raw to virtual format.