亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pe-tut6.html

?? 在DOS下編程因為實模式的限制
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
<html>
<head>
<title>Iczelion's PE Tutorial 6: Import Table</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#003366" text="#FFFFFF" link="#FFFFCC" vlink="#FFCCCC" alink="#CCFFCC">
<h1 align="center"><font face="Arial, Helvetica, sans-serif" color="#FFFFCC">Tutorial 
  6: Import Table</font></h1>
<p><font face="MS Sans Serif" size="-1">We will learn about import table in this 
  tutorial. Let me warn you first. This tutorial is a long and difficult one for 
  those who aren't familiar with the import table. You may need to read this tutorial 
  several times and may even have to examine the related structures under a debugger.</font></p>
<p><font face="MS Sans Serif" size="-1">Download<b><a href="files/pe-tut06.zip" style="text-decoration:none"> 
  the example</a></b>.</font></p>
<h3><font face="MS Sans Serif">Theory:</font></h3>
<p><font face="MS Sans Serif" size="-1">First of all, you should know what an 
  import function is. An import function is a function that is not in the caller's 
  module but is called by the module, thus the name &quot;import&quot;. The import 
  functions actually reside in one or more DLLs. Only the information about the 
  functions is kept in the caller's module. That information includes the function 
  names and the names of the DLLs in which they reside. <br>
  Now how can we find out where in the PE file the information is kept? We must 
  turn to<font color="#FFFFCC"><b> the data directory</b></font> for the answer. 
  I'll refresh your memory a bit. Below is the PE header:</font></p>
<blockquote> 
  <p><font face="Fixedsys" size="-1">IMAGE_NT_HEADERS STRUCT<br>
    &nbsp;&nbsp;&nbsp;Signature dd ?<br>
    &nbsp;&nbsp;&nbsp;FileHeader IMAGE_FILE_HEADER &lt;&gt;<br>
    &nbsp;&nbsp;&nbsp;OptionalHeader IMAGE_OPTIONAL_HEADER &lt;&gt;<br>
    IMAGE_NT_HEADERS ENDS</font></p>
</blockquote>
<p><font face="MS Sans Serif" size="-1">The last member of the optional header 
  is the data directory:</font></p>
<p><font face="Fixedsys">IMAGE_OPTIONAL_HEADER32 STRUCT<br>
  &nbsp;&nbsp;&nbsp;.... <br>
  </font><font face="Fixedsys">&nbsp;&nbsp;&nbsp;LoaderFlags dd ? <br>
  &nbsp;&nbsp;&nbsp;NumberOfRvaAndSizes dd ? <br>
  <font color="#FFCCCC">&nbsp;&nbsp; DataDirectory IMAGE_DATA_DIRECTORY 16 dup(<>) 
  </font><br>
  IMAGE_OPTIONAL_HEADER32 ENDS </font></p>
<p><font face="MS Sans Serif" size="-1">The data directory is an array of <font color="#CCFFCC"><b>IMAGE_DATA_DIRECTORY</b></font> 
  structure. A total of 16 members. If you remember the section table as the root 
  directory of the sections in a PE file, you should also think of the data directory 
  as the root directory of the logical components stored inside those sections. 
  To be precise, the data directory contains the locations and sizes of the important 
  data structures in the PE file. Each member contains information about an important 
  data structure. </font></p>
<table border="1" cellspacing="2" cellpadding="2" align="center">
  <tr> 
    <th width="55" bgcolor="#006666"> 
      <div align="center"><font face="MS Sans Serif" size="-1">Member</font></div>
    </th>
    <th width="162" bgcolor="#006666"><font face="MS Sans Serif" size="-1">Info 
      inside</font></th>
  </tr>
  <tr> 
    <td width="55" bgcolor="#999900"> 
      <div align="center"><font face="MS Sans Serif" size="-1">0</font></div>
    </td>
    <td width="162" bgcolor="#999900"><font face="MS Sans Serif" size="-1">Export 
      symbols</font></td>
  </tr>
  <tr> 
    <td width="55" bgcolor="#999900"> 
      <div align="center"><font face="MS Sans Serif" size="-1">1</font></div>
    </td>
    <td width="162" bgcolor="#999900"><font face="MS Sans Serif" size="-1">Import 
      symbols</font></td>
  </tr>
  <tr> 
    <td width="55" bgcolor="#999900"> 
      <div align="center"><font face="MS Sans Serif" size="-1">2</font></div>
    </td>
    <td width="162" bgcolor="#999900"><font face="MS Sans Serif" size="-1">Resources</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">3</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Exception</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">4</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Security</font></td>
  </tr>
  <tr> 
    <td width="55" bgcolor="#999900"> 
      <div align="center"><font face="MS Sans Serif" size="-1">5</font></div>
    </td>
    <td width="162" bgcolor="#999900"><font face="MS Sans Serif" size="-1">Base 
      relocation</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">6</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Debug</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">7</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Copyright string</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">8</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Unknown</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">9</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Thread local storage 
      (TLS)</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">10</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Load configuration</font></td>
  </tr>
  <tr> 
    <td width="55" bgcolor="#999900"> 
      <div align="center"><font face="MS Sans Serif" size="-1">11</font></div>
    </td>
    <td width="162" bgcolor="#999900"><font face="MS Sans Serif" size="-1">Bound 
      Import</font></td>
  </tr>
  <tr> 
    <td width="55" bgcolor="#999900"> 
      <div align="center"><font face="MS Sans Serif" size="-1">12</font></div>
    </td>
    <td width="162" bgcolor="#999900"><font face="MS Sans Serif" size="-1">Import 
      Address Table</font></td>
  </tr>
  <tr> 
    <td width="55"> 
      <div align="center"><font face="MS Sans Serif" size="-1">13</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">Delay Import</font></td>
  </tr>
  <tr> 
    <td width="55">
      <div align="center"><font face="MS Sans Serif" size="-1">14</font></div>
    </td>
    <td width="162"><font face="MS Sans Serif" size="-1">COM descriptor</font></td>
  </tr>
</table>
<p><font face="MS Sans Serif" size="-1">Only the members painted in gold are known 
  to me. Now that you know what each member of the data directory contains, we 
  can learn about the member in detail. Each member of the data directory is a 
  structure called <font color="#CCFFCC"><b>IMAGE_DATA_DIRECTORY</b></font> which 
  has the following definition:</font></p>
<p><font face="Fixedsys">IMAGE_DATA_DIRECTORY STRUCT <br>
  &nbsp;&nbsp;VirtualAddress dd ? <br>
  &nbsp;&nbsp;isize dd ? <br>
  IMAGE_DATA_DIRECTORY ENDS </font></p>
<p><font face="MS Sans Serif" size="-1"><b><font color="#FFFFCC">VirtualAddress</font></b> 
  is actually the relative virtual address (RVA) of the data structure. For example, 
  if this structure is for import symbols, this field contains the RVA of the 
  <font color="#CCFFCC"> <b>IMAGE_IMPORT_DESCRIPTOR </b></font>array. <br>
  <font color="#FFFFCC"><b>isize </b></font>contains the size in bytes of the 
  data structure referred to by <font color="#FFFFCC"><b>VirtualAddress</b></font>. 
  </font></p>
<p><font face="MS Sans Serif" size="-1">Here's the general scheme on finding important 
  data structures in a PE file:</font></p>
<ol>
  <li><font face="MS Sans Serif" size="-1">From the DOS header, you go to the 
    PE header</font></li>
  <li><font face="MS Sans Serif" size="-1">Obtain the address of the data directory 
    in the optional header.</font></li>
  <li><font face="MS Sans Serif" size="-1">Multiply the size of <font color="#CCFFCC"><b>IMAGE_DATA_DIRECTORY 
    </b></font>with the member index you want: for example if you want to know 
    where the import symbols are, you must multiply the size of <font color="#CCFFCC"><b>IMAGE_DATA_DIRECTORY</b></font> 
    (8 bytes) with 1.</font></li>
  <li><font face="MS Sans Serif" size="-1">Add the result to the address of the 
    data directory and you have the address of the <font color="#CCFFCC"><b>IMAGE_DATA_DIRECTORY</b></font> 
    structure that contains the info about the desired data structure.</font></li>
</ol>
<p><font face="MS Sans Serif" size="-1">Now we will enter into the real discussion 
  about the import table. The address of the import table is contained in the 
  <font color="#FFFFCC"> <b>VirtualAddress</b></font> field of the second member 
  of the data directory. The import table is actually an array of <font color="#CCFFCC"><b>IMAGE_IMPORT_DESCRIPTOR</b></font> 
  structures. Each structure contains information about a DLL the PE file imports 
  symbols from. For example, if the PE file imports functions from 10 different 
  DLLs, there will be 10 members in this array. The array is terminated by the 
  member which contain all zeroes. Now we can examine the structure in detail:</font></p>
<p><font face="Fixedsys">IMAGE_IMPORT_DESCRIPTOR STRUCT <br>
  &nbsp;&nbsp;union <br>
  &nbsp;&nbsp;&nbsp; Characteristics dd ? <br>
  &nbsp;&nbsp;&nbsp; OriginalFirstThunk dd ? <br>
  &nbsp; ends <br>
  &nbsp; TimeDateStamp dd ? <br>
  &nbsp; ForwarderChain dd ? <br>
  &nbsp; Name1 dd ? <br>
  &nbsp; FirstThunk dd ? <br>
  IMAGE_IMPORT_DESCRIPTOR ENDS </font></p>
<p><font face="MS Sans Serif" size="-1">The first member of this structure is 
  a union. Actually, the union only provides the alias for <font color="#FFFFCC"><b>OriginalFirstThunk</b></font>, 
  so you can call it &quot;Characteristics&quot;. This member contains the the 
  RVA of an array of <font color="#CCFFCC"><b>IMAGE_THUNK_DATA</b></font> structures. 
  <br>
  What is <font color="#CCFFCC"><b>IMAGE_THUNK_DATA</b></font>? It's a union of 
  dword size. Usually, we interpret it as <font color="#FFFFCC">the pointer</font> 
  to an <font color="#CCFFCC"><b>IMAGE_IMPORT_BY_NAME</b></font> structure. Note 
  that <font color="#CCFFCC"><b>IMAGE_THUNK_DATA</b></font> contains the pointer 
  to an <font color="#CCFFCC"><b>IMAGE_IMPORT_BY_NAME</b></font> structure: not 
  the structure itself. <br>
  Look at it this way: There are several <font color="#CCFFCC"><b>IMAGE_IMPORT_BY_NAME</b></font> 
  structures. We collect the RVA of those structures (<font color="#CCFFCC"><b>IMAGE_THUNK_DATAs</b></font>) 
  into an array, terminate it with 0. Then we put the RVA of the array into <font color="#FFFFCC"><b>OriginalFirstThunk</b></font>.<br>
  The <font color="#CCFFCC"><b>IMAGE_IMPORT_BY_NAME</b></font> structure contains 
  information about an import function. Now let's see what <font color="#CCFFCC"><b>IMAGE_IMPORT_BY_NAME</b></font> 
  structure looks like:</font></p>
<p><font face="Fixedsys">IMAGE_IMPORT_BY_NAME STRUCT <br>
  &nbsp; Hint dw ? <br>
  &nbsp; Name1 db ? <br>
  IMAGE_IMPORT_BY_NAME ENDS </font></p>
<p><font face="MS Sans Serif" size="-1"><b><font color="#FFFFCC">Hint </font></b>contains 
  the index into the export table of the DLL the function resides in. This field 
  is for use by the PE loader so it can look up the function in the DLL's export 
  table quickly.This value is not essential and some linkers may set the value 
  in this field to 0.<br>
  <font color="#FFFFCC"><b>Name1</b></font> contains the name of the import function. 
  The name is an ASCIIZ string. Note that Name1's size is defined as byte but 
  it's really a variable-sized field. It's just that there is no way to represent 
  a variable-sized field in a structure. The structure is provided so that you 
  can refer to the data structure with descriptive names.<br>
  </font></p>
<p><font face="MS Sans Serif" size="-1"><b><font color="#FFFFCC">TimeDateStamp</font></b> 
  and <font color="#FFFFCC"><b>ForwarderChain</b></font> are advanced stuff: We 
  will talk about them after you have firm grasp of the other members.</font></p>
<p><font face="MS Sans Serif" size="-1"><b><font color="#FFFFCC">Name1</font></b> 
  contains the RVA to the name of the DLL, in short, the pointer to the name of 
  the DLL. The string is an ASCIIZ one.</font></p>
<p><font face="MS Sans Serif" size="-1"><b><font color="#FFFFCC">FirstThunk</font></b> 
  is very similar to <font color="#FFFFCC"><b>OriginalFirstThunk</b></font>, ie. 
  it contains an RVA of an array of <font color="#CCFFCC"><b>IMAGE_THUNK_DATA</b></font> 
  structures(a different array though). <br>
  Ok, if you're still confused, look at it this way: There are several <font color="#CCFFCC"> 
  <b>IMAGE_IMPORT_BY_NAME </b></font>structures. You create two arrays, then fill 
  them with the RVAs of those <font color="#CCFFCC"><b>IMAGE_IMPORT_BY_NAME</b></font> 
  structures, so both arrays contain exactly the same values (i.e. exact duplicate). 
  Now you assign the RVA of the first array to <font color="#FFFFCC"><b>OriginalFirstThunk</b></font> 
  and the RVA of the second array to <font color="#FFFFCC"><b>FirstThunk</b></font>.</font></p>
<table border="0" cellspacing="1" cellpadding="1" align="center">
  <tr> 
    <th bgcolor="#006666" width="152"><font face="MS Sans Serif" size="-1">OriginalFirstThunk</font></th>
    <th width="58"><font face="MS Sans Serif" size="-1"></font></th>
    <th width="183" bgcolor="#006666"><font face="MS Sans Serif" size="-1">IMAGE_IMPORT_BY_NAME</font></th>
    <th width="27"><font face="MS Sans Serif" size="-1"></font></th>
    <th bgcolor="#006666" width="152"><font face="MS Sans Serif" size="-1">FirstThunk</font></th>
  </tr>
  <tr> 
    <td width="152"> 
      <p align="center"> | </p>
    </td>
    <td width="58">&nbsp;</td>
    <td width="183"> 
      <div align="center"></div>
    </td>
    <td width="27">&nbsp;</td>
    <td width="152"> 
      <div align="center"><font face="MS Sans Serif" size="-1">|</font></div>
    </td>
  </tr>
  <tr> 
    <td width="152"> 
      <table border="1" cellspacing="2" cellpadding="2" align="center">
        <tr bgcolor="#666600"> 
          <td> 
            <div align="center"><font face="MS Sans Serif" size="-1">IMAGE_THUNK_DATA</font></div>
          </td>
        </tr>
        <tr bgcolor="#666600"> 
          <td> 
            <div align="center"><font face="MS Sans Serif" size="-1">IMAGE_THUNK_DATA</font></div>
          </td>
        </tr>
        <tr bgcolor="#666600"> 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费在线观看视频一区| 视频一区中文字幕国产| 在线综合+亚洲+欧美中文字幕| 91丝袜美女网| 99精品黄色片免费大全| 成人网在线免费视频| 成人黄色777网| 91亚洲精品乱码久久久久久蜜桃| 成人午夜av影视| 色欧美88888久久久久久影院| www.欧美.com| 欧美三级中文字幕在线观看| 在线欧美小视频| 日韩一区二区电影| 久久一二三国产| 国产精品狼人久久影院观看方式| 中文字幕在线不卡一区二区三区| 亚洲精品欧美二区三区中文字幕| 亚洲成人资源在线| 精品一区二区三区不卡 | 欧美猛男gaygay网站| 欧美巨大另类极品videosbest| 欧美精品日韩一区| 久久精品一区四区| 亚洲精品国久久99热| 午夜精品福利一区二区三区av | 久久毛片高清国产| 一区免费观看视频| 天天亚洲美女在线视频| 国产一区二区三区免费看| 99久久综合色| 欧美一区二区视频观看视频| 国产亚洲一区字幕| 亚洲妇熟xx妇色黄| 国产精品123| 欧美日韩精品三区| 国产精品麻豆一区二区| 亚洲国产精品久久艾草纯爱| 国产一区二区三区在线观看免费 | 久久精品视频一区二区| 日韩一区有码在线| 国内一区二区视频| 精品视频一区二区三区免费| 久久精品综合网| 日本va欧美va瓶| 日本黄色一区二区| 国产亚洲精品精华液| 日日摸夜夜添夜夜添精品视频| 成人深夜福利app| 欧美大片国产精品| 午夜精品影院在线观看| www.性欧美| 欧美—级在线免费片| 日韩高清一区在线| 欧美优质美女网站| 中文字幕日本不卡| 国产成人精品亚洲日本在线桃色| 91精品国产入口| 亚洲在线一区二区三区| 成人h动漫精品| 国产精品网站一区| 国产福利91精品一区| 精品福利视频一区二区三区| 奇米影视在线99精品| 欧美三级日本三级少妇99| 亚洲免费成人av| 91色视频在线| 亚洲乱码中文字幕| 色综合色狠狠综合色| 国产精品国产三级国产三级人妇 | 五月天激情综合网| 欧美三级欧美一级| 午夜不卡在线视频| 欧美精品黑人性xxxx| 日韩高清不卡在线| 欧美一区二区网站| 麻豆精品国产传媒mv男同| 欧美一级艳片视频免费观看| 青青草伊人久久| 欧美岛国在线观看| 国产精品一区久久久久| 久久精品男人天堂av| 国产**成人网毛片九色 | 成人18视频在线播放| 国产性做久久久久久| 成人美女视频在线看| 国产精品黄色在线观看| 色美美综合视频| 午夜激情综合网| 精品少妇一区二区三区免费观看| 经典三级一区二区| 国产精品久久一级| 欧美亚州韩日在线看免费版国语版| 一区二区三区中文免费| 在线不卡中文字幕播放| 久久成人免费日本黄色| 国产精品久久久久久久久免费樱桃 | 粉嫩av一区二区三区在线播放| 国产欧美综合在线观看第十页| jlzzjlzz欧美大全| 亚洲第一成年网| 久久亚洲捆绑美女| 97se亚洲国产综合自在线| 亚洲国产成人tv| 久久精品一区四区| 欧美综合一区二区| 国产一区二区不卡老阿姨| 亚洲婷婷综合色高清在线| 欧美日产国产精品| 成人免费毛片高清视频| 亚洲福利视频一区二区| 久久久久久9999| 欧美三级日韩三级| 成人网在线免费视频| 日本欧美大码aⅴ在线播放| 国产精品系列在线| 日韩欧美中文字幕精品| 99久久精品国产一区| 日韩—二三区免费观看av| 中文字幕一区二区在线播放 | 狠狠色丁香婷婷综合久久片| 亚洲欧洲国产日韩| 日韩欧美中文字幕制服| 色婷婷精品大在线视频| 国产精品自拍三区| 日本强好片久久久久久aaa| 亚洲欧美综合色| 国产欧美日韩中文久久| 日韩欧美一二区| 欧美精品一二三| 日本丶国产丶欧美色综合| 成人综合婷婷国产精品久久| 久久国产视频网| 午夜精品视频在线观看| 最好看的中文字幕久久| 欧美激情中文字幕| 久久久久久久久久久黄色| 日韩免费在线观看| 日韩一区二区免费高清| 欧美一区午夜视频在线观看| 91福利在线播放| 91亚洲精品乱码久久久久久蜜桃| 国产不卡在线一区| 国产毛片精品一区| 国产酒店精品激情| 极品美女销魂一区二区三区免费 | 国产精品一区二区你懂的| 美女网站色91| 日韩av电影天堂| 日本伊人色综合网| 午夜精品久久久久久久久久久| 亚洲美女一区二区三区| 亚洲精品高清视频在线观看| 亚洲另类色综合网站| 一区二区三区在线高清| 亚洲精品自拍动漫在线| 亚洲黄色小视频| 亚洲福利视频导航| 免费人成在线不卡| 久久精品国产精品亚洲综合| 久久电影网站中文字幕| 国产一区二区三区免费播放| 国产成人精品www牛牛影视| 99久久综合国产精品| 色噜噜狠狠成人网p站| 欧美私人免费视频| 91精品国产入口| www精品美女久久久tv| 欧美国产一区二区| 亚洲欧美福利一区二区| 亚洲国产精品久久人人爱| 日韩黄色在线观看| 国产91在线观看| 日本精品一级二级| 日韩欧美在线1卡| 国产视频911| 亚洲九九爱视频| 久久精品国产亚洲a| 国产91丝袜在线播放| 91在线你懂得| 日韩一区二区三区精品视频| 中文字幕第一区二区| 亚洲国产美国国产综合一区二区| 手机精品视频在线观看| 国产成人夜色高潮福利影视| 色婷婷久久一区二区三区麻豆| 欧美一区二区成人| 一色屋精品亚洲香蕉网站| 日韩电影免费一区| 不卡高清视频专区| 欧美一区二区三区精品| 日韩一区中文字幕| 久久电影网电视剧免费观看| 色av成人天堂桃色av| 精品成人一区二区三区四区| 亚洲欧美日韩在线| 国产一区二区三区免费看 | 久久久777精品电影网影网| 亚洲视频一二区| 国产激情偷乱视频一区二区三区|