11 if (!myName)
return false;
13 if (upperLimit == 0)
return false;
16 if (isInvalid)
return false;
36 if (func == NULL)
return;
47 this->thunksList.push_back(via);
49 thunkToLibMap[via] = num;
58 thunkToLibMap.clear();
65 size_t entriesCount = this->entries.size();
67 for (
size_t i = 0; i < entriesCount; i++) {
69 if (lib == NULL)
continue;
73 for (
size_t fI = 0; fI < funcCount; fI++) {
81 std::map<offset_t, size_t>::iterator libItr = thunkToLibMap.find(thunk);
82 if (libItr == thunkToLibMap.end())
return NULL;
84 size_t libId = libItr->second;
92 if (!lib)
return NULL;
94 std::map<offset_t, size_t>::iterator funcItr = lib->
thunkToFuncMap.find(thunk);
104 if (func == NULL)
return "";
121 size_t oldCount = this->importsCount;
122 this->importsCount = 0;
124 if (!getDataDirectory()) {
125 return (oldCount != this->importsCount);
131 for (cntr = 0; cntr < LIMIT; cntr++) {
132 if (loadNextEntry(cntr) ==
false)
break;
135 this->importsCount = cntr;
136 return (oldCount != this->importsCount);
143 char *libName = this->getLibraryName();
151 thunkToFuncMap.clear();
158 if (this->getPtr() == NULL) {
161 for (cntr = 0; cntr < LIMIT; cntr++) {
162 if (loadNextEntry(cntr) ==
false)
break;
171 QString functionName;
173 uint64_t val = getOrdinal();
174 static char buf[0xFF];
175 snprintf(buf, 0xFF,
"<ord: %llX>",
static_cast<unsigned long long>(val));
178 char *fName = this->getFunctionName();
179 if (!fName)
return "";
180 functionName = fName;
187 QString functionName = getShortName();
189 if (!p)
return functionName;
192 if (!libName)
return functionName;
194 functionName =
"[" + QString(libName) +
"]." + functionName;
const offset_t INVALID_ADDR
bufsize_t getMaxSizeFromPtr(BYTE *ptr)
virtual QString getName()=0
virtual ExeNodeWrapper * getEntryAt(size_t fieldId)
virtual size_t getEntriesCount()
static bufsize_t thunkSize(Executable::exe_bits bits)
ImportBaseEntryWrapper * thunkToLib(offset_t thunk)
QString thunkToFuncName(offset_t thunk)
virtual void reloadMapping()
virtual void clearMapping()
static size_t EntriesLimit
QString thunkToLibName(offset_t thunk)
ImportBaseFuncWrapper * thunkToFunction(offset_t thunk)
void addMapping(ExeNodeWrapper *func)
static size_t EntriesLimit
static bufsize_t NameLenLimit
virtual char * getLibraryName()=0
std::map< offset_t, size_t > thunkToFuncMap
virtual QString getName()
virtual offset_t callVia()=0
virtual PENodeWrapper * getParentNode()
bool isNameValid(Executable *pe, char *myName)
bool hasNonPrintable(const char *ptr, size_t maxInp)
size_t noWhiteCount(char *buf, size_t bufSize)