pe | 导出表 | 确定依赖模块

导入表

确定依赖模块

导入表说明了Pe文件需要依赖哪些模块以及依赖这些模块中的哪些函数。

导入表不是一个,是一堆,导入几个模块就有几张导入表。

导入表的结构 _IMAGE_IMPORT_DESCRIPTOR

typedef struct _IMAGE_IMPORT_DESCRIPTOR {
    union {
        DWORD   Characteristics;            // 0 for terminating null import descriptor
        DWORD   OriginalFirstThunk;         // RVA to original unbound IAT (PIMAGE_THUNK_DATA)
    };
    DWORD   TimeDateStamp;         // 时间戳
    DWORD   ForwarderChain;                 // -1 if no forwarders
    DWORD   Name;            //RVA 指向dll名字,该名字以结尾
    DWORD   FirstThunk;                     // RVA to IAT (if bound this IAT has actual addresses)
} IMAGE_IMPORT_DESCRIPTOR;
typedef IMAGE_IMPORT_DESCRIPTOR UNALIGNED *PIMAGE_IMPORT_DESCRIPTOR;

整个的宽度是20bytes

确定导入表数量:查导入表直到20个0x00

原文地址:https://www.cnblogs.com/Mz1-rc/p/14392737.html