亚洲欧美第一页_禁久久精品乱码_粉嫩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| 精品久久久久香蕉网| 国产精品伦理在线| 男人的天堂久久精品| 99久久国产免费看| 欧美va亚洲va香蕉在线| 亚洲精品ww久久久久久p站| 九九九久久久精品| 欧美日韩激情一区二区三区| 中文字幕欧美区| 极品瑜伽女神91| 欧美乱熟臀69xxxxxx| 亚洲天堂久久久久久久| 国产精品 日产精品 欧美精品| 欧美日韩高清影院| 亚洲精品视频免费观看| 大美女一区二区三区| 精品国产精品一区二区夜夜嗨| 亚洲电影视频在线| 日本高清视频一区二区| 国产精品成人午夜| 国产精品亚洲第一| 久久免费看少妇高潮| 美女网站色91| 日韩免费视频一区二区| 同产精品九九九| 欧美日韩一区二区欧美激情| 亚洲靠逼com| 欧美亚洲国产一区二区三区| 亚洲欧美日韩久久| 99这里都是精品| 综合久久一区二区三区| 成人av资源在线| 亚洲女子a中天字幕| 91老师片黄在线观看| 亚洲精品视频观看| 欧美日韩在线精品一区二区三区激情 | 成人精品一区二区三区四区 | 久久精品人人做| 韩国中文字幕2020精品| 久久综合久久鬼色中文字| 国产精品影视在线| 国产精品乱码一区二区三区软件| 国产精品亚洲а∨天堂免在线| 久久青草国产手机看片福利盒子| 国产高清不卡二三区| 国产精品嫩草影院av蜜臀| aaa欧美色吧激情视频| 亚洲精品免费在线观看| 欧美美女一区二区| 久草精品在线观看| 国产精品你懂的| 欧美日韩黄色影视| 九九**精品视频免费播放| 国产精品久久一卡二卡| 91麻豆123| 久久精品国产亚洲5555| 欧美激情一区二区三区不卡| 91污片在线观看| 婷婷激情综合网| 久久久综合视频| 日本韩国一区二区三区视频| 懂色av一区二区夜夜嗨| 国产精品久久久久久福利一牛影视 | 欧美视频在线一区二区三区| 人人狠狠综合久久亚洲| 国产喷白浆一区二区三区| 色偷偷成人一区二区三区91| 青青草97国产精品免费观看| 国产精品美女久久久久久久久久久| 色伊人久久综合中文字幕| 久久av资源网| 亚洲美女少妇撒尿| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 久久奇米777| 91高清在线观看| 国产美女视频91| 亚洲影视资源网| 欧美精品一区二区三区一线天视频| 99久久99久久久精品齐齐| 午夜影院久久久| 国产精品第一页第二页第三页| 欧美妇女性影城| 91亚洲精品乱码久久久久久蜜桃 | 这里只有精品99re| 成人中文字幕电影| 免费成人在线观看视频| 亚洲黄色免费电影| 国产日韩av一区二区| 欧美一区二区三区视频免费播放| 99久久免费视频.com| 国模少妇一区二区三区| 日韩精品乱码av一区二区| 一区二区三区在线免费观看| 国产欧美va欧美不卡在线| 日韩免费成人网| 宅男在线国产精品| 欧美在线播放高清精品| 成人高清av在线| 国产传媒一区在线| 狠狠色狠狠色综合日日91app| 日韩和欧美的一区| 亚洲午夜久久久久久久久电影院| 中文在线一区二区| 国产丝袜在线精品| 久久久亚洲精华液精华液精华液| 337p亚洲精品色噜噜噜| 欧美日韩aaaaa| 欧美亚洲动漫另类| 精品视频999| 欧美精品久久一区| 欧美高清一级片在线| 777xxx欧美| 欧美变态tickling挠脚心| 日韩亚洲欧美高清| 日韩精品专区在线| 欧美精品一区在线观看| 2023国产精品自拍| 国产欧美精品一区aⅴ影院| 欧美激情一区三区| 中文字幕一区二区5566日韩| 国产精品美日韩| 亚洲欧美日韩精品久久久久| 亚洲日本在线观看| 亚洲无线码一区二区三区| 丝瓜av网站精品一区二区 | 国产成人自拍网| 国产精品一二三四五| 高清免费成人av| 91香蕉视频mp4| 欧美日韩精品系列| 日韩一级片网站| 久久午夜免费电影| 国产精品久久久久久久久搜平片 | 亚洲电影你懂得| 麻豆一区二区三区| 国产成人午夜99999| 99视频一区二区| 欧美军同video69gay| 精品嫩草影院久久| 国产精品电影院| 视频一区二区中文字幕| 国内精品视频666| 91丨porny丨国产| 91精品国产91久久综合桃花| 久久综合久久综合九色| 中文字幕视频一区二区三区久| 亚洲国产精品自拍| 国产一区二区电影| 91精品福利视频| 久久久无码精品亚洲日韩按摩| 中文字幕亚洲精品在线观看| 日精品一区二区| 99久久精品一区二区| 3d成人h动漫网站入口| 国产日韩精品久久久| 香港成人在线视频| 高清免费成人av| 3atv在线一区二区三区| 国产精品免费免费| 污片在线观看一区二区| av一区二区久久| 久久午夜老司机| 亚洲1区2区3区4区| 成人激情小说乱人伦| 日韩午夜在线观看| 亚洲免费在线电影| 国产精品99久久久久| 欧美精品丝袜久久久中文字幕| 中文av字幕一区| 精品亚洲免费视频| 欧美日韩国产a| 亚洲精品亚洲人成人网在线播放| 国产一区二区导航在线播放| 正在播放亚洲一区| 亚洲永久精品大片| 99久久er热在这里只有精品66| 久久综合狠狠综合久久激情| 图片区日韩欧美亚洲| 国产日韩成人精品| 久久精品噜噜噜成人av农村| 日本韩国欧美国产| 亚洲欧美激情小说另类| 国产成人精品aa毛片| 精品国产自在久精品国产| 亚洲第一成年网| 欧美亚洲一区二区在线观看| 中文字幕在线播放不卡一区| 国产精品自拍三区| 精品av综合导航| 久久99精品国产麻豆婷婷| 91精品国产麻豆国产自产在线 | 91麻豆国产福利在线观看| 国产精品天美传媒| 国产69精品久久久久777| 国产亚洲精品久| 国产精品综合一区二区三区| 精品国产乱码久久久久久图片 | 最近中文字幕一区二区三区|