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

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

?? pe-tut7.html

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

<body bgcolor="#000066" text="#FFFFFF" link="#FFFFCC" vlink="#FFCCCC" alink="#CCFFCC">
<h1 align="center"><font face="Arial, Helvetica, sans-serif" color="#FFFFCC">Tutorial 
  7: Export Table</font></h1>
<p><font face="MS Sans Serif" size="-1">We have learned about one part of the 
  dynamic linking, namely the import table, in the previous tutorial. Now we will 
  learn about the other side of the coin, the export table.</font></p>
<p><font face="MS Sans Serif" size="-1">Download <b><a href="files/pe-tut07.zip" style="text-decoration:none">the 
  example</a></b>.</font></p>
<h3><font face="Arial, Helvetica, sans-serif">Theory:</font></h3>
<p><font face="MS Sans Serif" size="-1">When the PE loader runs a program, it 
  loads the associated DLLs into the process address space. It then extracts information 
  about the import functions from the main program. It uses the information to 
  search the DLLs for the addresses of the functions to be patched into the main 
  program. The place in the DLLs where the PE loader looks for the addresses of 
  the functions is the export table.</font></p>
<p><font face="MS Sans Serif" size="-1">When a DLL/EXE exports a function to be 
  used by other DLL/EXE, it can do so in two ways: it can export the function 
  by name or by ordinal only. Say if there is a function named &quot;GetSysConfig&quot; 
  in a DLL, it can choose to tell the other DLLs/EXEs that if they want to call 
  the function, they must specify it by its name, ie. GetSysConfig. The other 
  way is to export by ordinal. What's an ordinal? An ordinal is a 16-bit number 
  that uniquely identifies a function in a particular DLL. This number is unique 
  only within the DLL it refers to. For example, in the above example, the DLL 
  can choose to export the function by ordinal, say, 16. Then the other DLLs/EXEs 
  which want to call this function must specify this number in GetProcAddress. 
  This is called export by ordinal only.</font></p>
<p><font face="MS Sans Serif" size="-1">Export by ordinal only is strongly discouraged 
  because it can cause a maintenance problem for the DLL. If the DLL is upgraded/updated, 
  the programmer of that DLL cannot alter the ordinals of the functions else other 
  programs that depend on the DLL will break.</font></p>
<p><font face="MS Sans Serif" size="-1">Now we can examine the export structure. 
  As with import table, you can find where the export table is from looking at 
  the data directory. In this case, the export table is the first member of the 
  data directory. The export structure is called IMAGE_EXPORT_DIRECTORY. There 
  are 11 members in the structure but only some of them are really used.</font></p>
<table border="1" cellspacing="2" cellpadding="2" align="center">
  <tr bgcolor="#006666"> 
    <th><b><font face="MS Sans Serif" size="-1">Field Name</font></b></th>
    <th><font face="MS Sans Serif" size="-1">Meaning</font></th>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">nName</font></b></td>
    <td><font face="MS Sans Serif" size="-1">The actual name of the module. This 
      field is necessary because the name of the file can be changed. If it's 
      the case, the PE loader will use this internal name.</font></td>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">nBase</font></b></td>
    <td><font face="MS Sans Serif" size="-1">A number that you must bias against 
      the ordinals to get the indexes into the address-of-function array.</font></td>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">NumberOfFunctions</font></b></td>
    <td><font face="MS Sans Serif" size="-1">Total number of functions/symbols 
      that are exported by this module.</font></td>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">NumberOfNames</font></b></td>
    <td><font face="MS Sans Serif" size="-1">Number of functions/symbols that 
      are exported by name. This value is<font color="#CC9900"><b> not</b></font> 
      the number of ALL functions/symbols in the module. For that number, you 
      need to check <font color="#FFFFCC"><b>NumberOfFunctions</b></font>. This 
      value can be 0. In that case, the module may export by ordinal only. If 
      there is no function/symbol to be exported in the first case, the RVA of 
      the export table in the data directory will be 0. </font></td>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">AddressOfFunctions</font></b></td>
    <td><font face="MS Sans Serif" size="-1">An RVA that points to an array of 
      RVAs of the functions/symbols in the module. In short, RVAs to all functions 
      in the module are kept in an array and this field points to the head of 
      that array.</font></td>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">AddressOfNames</font></b></td>
    <td><font face="MS Sans Serif" size="-1">An RVA that points to an array of 
      RVAs of the names of functions in the module.</font></td>
  </tr>
  <tr> 
    <td><b><font face="MS Sans Serif" size="-1">AddressOfNameOrdinals</font></b></td>
    <td><font face="MS Sans Serif" size="-1">An RVA that points to a 16-bit array 
      that contains the ordinals associated with the function names in the AddressOfNames 
      array above.</font></td>
  </tr>
</table>
<p><font face="MS Sans Serif" size="-1">Just reading the above table may not give 
  you the real picture of the export table. The simplified explanation below will 
  clarify the concept.</font></p>
<p><font face="MS Sans Serif" size="-1">The export table exists for use by the 
  PE loader. First of all, the module must keep the addresses of all exported 
  functions somewhere so the PE loader can look them up. It keeps them in an array 
  that is pointed to by the field <font color="#FFFFCC"><b>AddressOfFunctions</b></font>. 
  The number of elements in the array is kept in <font color="#FFFFCC"><b>NumberOfFunctions</b></font>. 
  Thus if the module exports 40 functions, it must have <font color="#CC6600"><b> 
  </b></font> 40 members in the array pointed to by <font color="#FFFFCC"><b>AddressOfFunctions 
  </b></font>and <font color="#FFFFCC"> <b>NumberOfFunctions</b></font> must contain 
  a value 40. Now if some functions are exported by names, the module must keep 
  the names in the file. It keeps the RVAs to the names in an array so the PE 
  loader can look them up. That array is pointed to by<font color="#FFFFCC"><b> 
  AddressOfNames </b></font>and the number of names in <font color="#FFFFCC"><b>NumberOfNames</b></font>. 
  Think about the job of the PE loader, it knows the names of the functions, it 
  must somehow obtain the addresses of those functions. Up to now, the module 
  has two arrays: the names and the addresses but there is no linkage between 
  them. Thus we need something that relates the names of the functions to their 
  addresses. The PE specification uses indexes into the address array as that 
  essential linkage. Thus if the PE loader finds the name it looks for in the 
  name array, it can obtain <font color="#999900"><b>the index into the address 
  table</b></font> for that name too. The indexes are kept in another array (the 
  last one) pointed to by the field <font color="#FFFFCC"><b>AddressOfNameOrdinals</b></font>. 
  Since this array exists as the linkage between the names and the addresses, 
  it must have exactly the same number of elements as the name array, ie. each 
  name can have one and only one associated address. The reverse is not true: 
  an address may have several names associated with it. Thus we can have &quot;aliases&quot; 
  that refer to the same address. To make the linkage works, both name and index 
  arrays must run in parallel, ie. the first element in the index array must hold 
  the index for the first name and so on.</font></p>
<table border="0" cellspacing="2" cellpadding="2" align="center">
  <tr> 
    <th bgcolor="#006666"><font face="MS Sans Serif" size="-1">AddressOfNames</font></th>
    <th><font face="MS Sans Serif" size="-1"></font></th>
    <th bgcolor="#006666"><font face="MS Sans Serif" size="-1">AddressOfNameOrdinals</font></th>
  </tr>
  <tr> 
    <td> 
      <div align="center"><font face="MS Sans Serif" size="-1">|</font></div>
    </td>
    <td> 
      <div align="center"><font face="MS Sans Serif" size="-1"></font></div>
    </td>
    <td> 
      <div align="center"><font face="MS Sans Serif" size="-1">|</font></div>
    </td>
  </tr>
  <tr> 
    <td> 
      <table border="1" cellspacing="2" cellpadding="2" align="center">
        <tr bgcolor="#660066"> 
          <td><font face="MS Sans Serif" size="-1">RVA of Name 1</font></td>
        </tr>
        <tr bgcolor="#660066"> 
          <td><font face="MS Sans Serif" size="-1">RVA of Name 2</font></td>
        </tr>
        <tr bgcolor="#660066"> 
          <td><font face="MS Sans Serif" size="-1">RVA of Name 3</font></td>
        </tr>
        <tr bgcolor="#660066"> 
          <td><font face="MS Sans Serif" size="-1">RVA of Name 4</font></td>
        </tr>
        <tr bgcolor="#660066"> 
          <td> 
            <div align="center"><font face="MS Sans Serif" size="-1">...</font></div>
          </td>
        </tr>
        <tr bgcolor="#660066"> 
          <td><font face="MS Sans Serif" size="-1">RVA of Name N</font></td>
        </tr>
      </table>
    </td>
    <td> 
      <table border="0" cellspacing="2" cellpadding="2" align="center">
        <tr> 
          <td><font face="MS Sans Serif" size="-1">&lt;--&gt;</font></td>
        </tr>
        <tr> 
          <td><font face="MS Sans Serif" size="-1">&lt;--&gt;</font></td>
        </tr>
        <tr> 
          <td><font face="MS Sans Serif" size="-1">&lt;--&gt;</font></td>
        </tr>
        <tr> 
          <td><font face="MS Sans Serif" size="-1">&lt;--&gt;</font></td>
        </tr>
        <tr> 
          <td> 
            <div align="center"><font face="MS Sans Serif" size="-1">...</font></div>
          </td>
        </tr>
        <tr> 
          <td><font face="MS Sans Serif" size="-1">&lt;--&gt;</font></td>
        </tr>
      </table>
    </td>
    <td> 
      <table border="1" cellspacing="2" cellpadding="2" align="center">
        <tr bgcolor="#003300"> 
          <td><font face="MS Sans Serif" size="-1">Index of Name 1</font></td>
        </tr>
        <tr bgcolor="#003300"> 
          <td><font face="MS Sans Serif" size="-1">Index of Name 2</font></td>
        </tr>
        <tr bgcolor="#003300"> 
          <td><font face="MS Sans Serif" size="-1">Index of Name 3</font></td>
        </tr>
        <tr bgcolor="#003300"> 
          <td><font face="MS Sans Serif" size="-1">Index of Name 4</font></td>
        </tr>
        <tr bgcolor="#003300"> 
          <td> 
            <div align="center"><font face="MS Sans Serif" size="-1">...</font></div>
          </td>
        </tr>
        <tr bgcolor="#003300"> 
          <td><font face="MS Sans Serif" size="-1">Index of Name N</font></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<p><font face="MS Sans Serif" size="-1">An example or two is in order. If we have 
  the name of an export function and we need to get its address in the module, 
  we can do like this:</font></p>
<ol>
  <li><font face="MS Sans Serif" size="-1">Go to the PE header</font></li>
  <li><font face="MS Sans Serif" size="-1">Read the virtual address of the export 
    table in the data directory</font></li>
  <li><font face="MS Sans Serif" size="-1">Go to the export table and obtain the 
    number of names (<font color="#FFFFCC"><b>NumberOfNames</b></font>)</font></li>
  <li><font face="MS Sans Serif" size="-1">Walk the arrays pointed to by <font color="#FFFFCC"><b>AddressOfNames</b></font> 
    and<font color="#FFFFCC"><b> AddressOfNameOrdinals</b></font> in parallel, 
    searching for the matching name. If the name is found in the <font color="#FFFFCC"><b>AddressOfNames</b></font> 
    array, you must extract the value in the associated element in the <font color="#FFFFCC"><b>AddressOfNameOrdinals</b></font> 
    array. For example, if you find the RVA of the matching name in 77th element 
    of the <font color="#FFFFCC"><b>AddressOfNames </b></font>array, you must 
    extract the value stored in the 77th element of the <font color="#FFFFCC"><b>AddressOfNameOrdinals</b></font> 
    array. If you walk the array until <font color="#FFFFCC"><b>NumberOfNames</b></font> 
    elements are examined, you know that the name is not in this module.</font></li>
  <li><font face="MS Sans Serif" size="-1">Use the value from the <font color="#FFFFCC"><b>AddressOfNameOrdinals</b></font> 
    array as the index into the <font color="#FFFFCC"><b>AddressOfFunctions</b></font> 
    array. Say, if the value is 5, you must extract the value in the 5th element 
    of the <font color="#FFFFCC"><b>AddressOfFunctions</b></font> array. That 
    value is the RVA of the function.</font></li>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久精品tv| 亚洲一区二区欧美日韩| 亚洲欧美日本韩国| 亚洲成av人在线观看| 国产精品亚洲人在线观看| 91福利社在线观看| 久久久国产综合精品女国产盗摄| 一区二区三区精品在线观看| 国产一区二区三区四区五区入口| 在线视频亚洲一区| 国产欧美日韩另类一区| 日日嗨av一区二区三区四区| 白白色亚洲国产精品| 日韩一区二区高清| 亚洲精品免费在线播放| 国产91精品久久久久久久网曝门| 在线不卡中文字幕播放| 亚洲精品视频观看| 99免费精品在线观看| 久久久亚洲精品石原莉奈| 日本不卡一区二区三区| 在线视频国内自拍亚洲视频| 中文字幕一区二区在线播放| 国产一区二区三区观看| 日韩一区二区三区精品视频| 亚洲一区二区三区视频在线 | 7777精品伊人久久久大香线蕉的| 国产精品网曝门| 国产乱子伦视频一区二区三区 | 亚洲自拍偷拍图区| 不卡影院免费观看| 国产欧美精品一区二区色综合 | 成人激情小说网站| 久久精品一区蜜桃臀影院| 激情久久五月天| 日韩欧美区一区二| 美女网站在线免费欧美精品| 欧美喷水一区二区| 天天影视网天天综合色在线播放 | 欧洲另类一二三四区| 亚洲精品成a人| 一本一道波多野结衣一区二区| 国产精品久久久久久久久快鸭 | 成人av在线播放网址| 欧美激情一区二区三区不卡 | 免费观看在线色综合| 51午夜精品国产| 蜜臀av一区二区在线观看| 欧美一卡二卡三卡四卡| 九九国产精品视频| 久久综合久久99| 国产九色sp调教91| 国产色产综合产在线视频| 国产mv日韩mv欧美| 亚洲色图一区二区| 欧美午夜精品久久久| 日本欧美一区二区在线观看| 精品嫩草影院久久| 国产电影一区在线| 中文字幕在线播放不卡一区| 欧美午夜精品久久久久久超碰 | 男女男精品网站| 久久久综合视频| 91老师片黄在线观看| 亚洲国产中文字幕| 精品精品国产高清一毛片一天堂| 国产精品夜夜嗨| 一区二区三区日韩| 欧美大片在线观看一区二区| 国产成人免费视频网站| 亚洲免费高清视频在线| 亚洲日本欧美天堂| 91精品在线麻豆| 国产精品一区二区无线| 一区二区三区在线观看视频| 精品美女一区二区三区| 99v久久综合狠狠综合久久| 婷婷国产v国产偷v亚洲高清| 久久久www免费人成精品| 91在线观看下载| 青青草97国产精品免费观看 | 色哟哟日韩精品| 精品一区二区三区在线观看| 亚洲精品成人a在线观看| 亚洲精品在线观看视频| 在线视频中文字幕一区二区| 国产精品一区二区三区四区| 午夜成人免费电影| 中文字幕一区二区三| 日韩欧美一区二区三区在线| 色婷婷久久综合| 国产成人综合视频| 香蕉久久夜色精品国产使用方法| 欧美国产一区在线| 日韩欧美另类在线| 91视频免费看| 高清视频一区二区| 日本精品视频一区二区| 国内成人免费视频| 亚洲国产精品一区二区www在线| 日本一区二区三区在线不卡| 日韩欧美黄色影院| 欧美喷水一区二区| 91国在线观看| 91麻豆精东视频| www.亚洲人| 国产99精品国产| 国产毛片精品视频| 国模套图日韩精品一区二区| 日韩不卡一二三区| 亚洲成人av一区二区三区| 亚洲人成在线播放网站岛国| 欧美国产日韩亚洲一区| 国产亚洲一区二区三区| 久久久久久夜精品精品免费| 日韩欧美在线网站| 日韩一区国产二区欧美三区| 欧美精品视频www在线观看| 精品视频在线免费| 91黄色小视频| 欧美日韩色综合| 欧美精品日韩一本| 91精品国产综合久久小美女| 欧洲国内综合视频| 欧美三级在线播放| 欧美日韩高清不卡| 欧美日韩精品久久久| 欧美日韩不卡一区二区| 欧美一级二级三级乱码| 91麻豆精品国产无毒不卡在线观看 | 美女视频网站黄色亚洲| 毛片av中文字幕一区二区| 久久av老司机精品网站导航| 麻豆精品精品国产自在97香蕉| 久久成人综合网| 国产一区二区电影| av在线播放一区二区三区| 99久久综合色| 欧美在线你懂得| 欧美电影免费观看高清完整版在线观看 | 色综合天天性综合| 欧美日韩国产首页| 一区二区三区不卡在线观看| 亚洲黄色小视频| 日本欧美一区二区| 国产一区 二区| 色综合久久中文字幕综合网| 欧美日韩亚洲综合一区二区三区| 日韩欧美国产综合| 欧美激情一区二区三区全黄| 一区二区三区成人在线视频| 蜜臀久久久久久久| 波多野结衣在线一区| 在线亚洲精品福利网址导航| 日韩一区二区三区观看| 欧美经典一区二区| 亚洲高清不卡在线观看| 日韩av在线播放中文字幕| 国产不卡视频一区| 一本大道久久a久久综合| 日韩欧美色综合网站| 亚洲婷婷综合久久一本伊一区| 亚洲电影激情视频网站| 国产成人自拍网| 欧美精品久久一区| 国产日韩精品视频一区| 亚洲中国最大av网站| 国产精品影音先锋| 在线不卡a资源高清| 国产精品天干天干在线综合| 午夜精品免费在线| 成人一级黄色片| 91精品国产综合久久久蜜臀图片 | 91高清视频在线| 欧美国产综合一区二区| 蜜臀久久99精品久久久久久9| 91色视频在线| 久久精品夜夜夜夜久久| 日韩中文字幕av电影| 盗摄精品av一区二区三区| 欧美一区二区久久| 亚洲精品国产第一综合99久久 | 国产成人精品亚洲午夜麻豆| 欧美三级电影精品| 亚洲欧洲成人av每日更新| 国产精品一区二区在线看| 91精品蜜臀在线一区尤物| 一区二区三区四区不卡视频| 9人人澡人人爽人人精品| 精品国产一区二区三区不卡| 亚洲bt欧美bt精品| 色综合久久久久| 国产精品天美传媒| 国产成人av一区二区三区在线| 精品久久国产老人久久综合| 日韩福利电影在线| 欧美久久久久中文字幕| 亚洲成人综合网站| 欧美视频中文字幕| 亚洲精品视频观看|