bool DelayImpEntryWrapper::loadNextEntry(size_t entryNum)
 {
    DelayImpFuncWrapper* entry = new DelayImpFuncWrapper(this->m_PE, this, entryNum);
    if (entry->getPtr() == NULL) {
        delete entry;
        return false;
    }
    bool isOk = false;
    uint64_t thunk = entry->getNumValue(DelayImpFuncWrapper::NAMETHUNK_ADDR, &isOk);
    if (!isOk || thunk == INVALID_ADDR || thunk == 0) {
        delete entry;
        return false;
    }
    this->entries.push_back(entry);

    DelayImpDirWrapper *impDir = dynamic_cast<DelayImpDirWrapper*>(this->parentNode);
    if (impDir) impDir->addMapping(entry);
    return true;
 }
示例#2
0
bool DelayImpEntryWrapper::wrap()
{
    clear();

    for (int i = 0; i < DelayImpEntryWrapper::entriesLimit;  i++) { //

        DelayImpFuncWrapper* entry = new DelayImpFuncWrapper(this->m_Exe, this, i);
        if (entry->getPtr() == NULL) {
            delete entry;
            break;
        }
        bool isOk = false;
        uint64_t val = entry->getNumValue(DelayImpFuncWrapper::NAMETHUNK_ADDR, &isOk);
        if (!isOk || val == INVALID_ADDR || val == 0) {
            delete entry;
            break;
        }
        this->entries.push_back(entry);

        DelayImpDirWrapper *impDir = dynamic_cast<DelayImpDirWrapper*>(this->parentNode);
        if (impDir) impDir->addFuncMapping(entry);
    }
    return true;
}