亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产欧美日产一区| 成+人+亚洲+综合天堂| 国产一区二区女| 91在线观看成人| 精品国产乱码久久久久久浪潮| 欧美国产日韩a欧美在线观看| 天天做天天摸天天爽国产一区| 不卡欧美aaaaa| 日韩免费视频一区| 日本vs亚洲vs韩国一区三区二区| 99热在这里有精品免费| 日韩欧美国产一区二区三区| 亚洲午夜久久久久久久久电影院 | 成人深夜在线观看| 欧美男生操女生| 亚洲免费在线电影| 成人午夜精品在线| 精品国产区一区| 日本在线不卡一区| 在线播放亚洲一区| 亚洲bt欧美bt精品| 欧美在线视频全部完| 国产欧美日韩久久| 丰满放荡岳乱妇91ww| 久久嫩草精品久久久精品一| 免费欧美高清视频| 日韩一区二区三区四区五区六区| 亚洲电影中文字幕在线观看| 色av成人天堂桃色av| 国产精品久久久久久妇女6080| 国产一区二区美女诱惑| 精品国产百合女同互慰| 国产在线日韩欧美| 久久婷婷国产综合国色天香| 国产麻豆视频一区| 久久久久久免费网| 国产成人在线视频网站| 中日韩av电影| av亚洲产国偷v产偷v自拍| 国产精品三级久久久久三级| 成人黄色一级视频| 国产精品二区一区二区aⅴ污介绍| 成人精品一区二区三区四区| 国产精品成人免费在线| 成人黄色小视频| 亚洲丝袜制服诱惑| 欧美午夜电影在线播放| 日韩综合小视频| 欧美成人精品福利| 成人污污视频在线观看| 有码一区二区三区| 日韩一区二区三区观看| 国产在线国偷精品产拍免费yy| 久久久www成人免费无遮挡大片| 国产1区2区3区精品美女| 国产精品高清亚洲| 欧美在线看片a免费观看| 日本欧美韩国一区三区| 国产丝袜美腿一区二区三区| 91麻豆福利精品推荐| 青青草97国产精品免费观看无弹窗版| 日韩精品资源二区在线| 成人小视频免费观看| 亚洲国产成人va在线观看天堂| 日韩免费视频线观看| 成人免费电影视频| 三级久久三级久久久| 久久久久国产免费免费 | 日韩伦理电影网| 欧美精品在线一区二区三区| 国内精品免费**视频| 亚洲男人都懂的| 精品日韩欧美在线| 色综合色综合色综合色综合色综合 | 成人一区二区视频| 亚洲一区中文日韩| 久久综合资源网| 欧美日韩高清一区二区| 国产成人精品1024| 麻豆精品一区二区av白丝在线| 国产精品看片你懂得| 6080日韩午夜伦伦午夜伦| 成人黄色电影在线| 免费在线一区观看| 亚洲一区二区三区四区在线免费观看| 久久综合成人精品亚洲另类欧美 | 成人教育av在线| 蜜桃av一区二区| 亚洲已满18点击进入久久| 欧美韩日一区二区三区| 91精品国产91久久久久久一区二区| 福利视频网站一区二区三区| 裸体歌舞表演一区二区| 亚洲国产日韩av| 亚洲日本va在线观看| 欧美国产禁国产网站cc| 日韩一区二区不卡| 精品视频全国免费看| 91亚洲精品一区二区乱码| 国产精品1024久久| 久久精品国产99国产精品| 日本伊人午夜精品| 亚洲国产一区二区视频| 亚洲天堂免费看| 国产精品久久夜| 欧美国产一区在线| 久久久精品一品道一区| 久久免费精品国产久精品久久久久| 欧美精品aⅴ在线视频| 欧美在线三级电影| 欧美性猛交xxxx乱大交退制版| 91麻豆自制传媒国产之光| eeuss鲁片一区二区三区| 国产精品99久久久久久有的能看| 精品一区二区综合| 国内精品伊人久久久久av影院 | 中日韩免费视频中文字幕| 久久美女艺术照精彩视频福利播放| 日韩一区二区免费视频| 日韩一区二区电影网| 精品久久99ma| 精品国产髙清在线看国产毛片 | 亚洲人一二三区| 18成人在线视频| 亚洲一区二区三区四区五区中文| 亚洲精品久久嫩草网站秘色| 一卡二卡三卡日韩欧美| 亚洲高清三级视频| 久久电影国产免费久久电影 | 91香蕉视频mp4| 色欲综合视频天天天| 欧洲在线/亚洲| 欧美日韩国产在线播放网站| 日韩丝袜美女视频| 久久精品一区二区三区不卡| 国产精品国产三级国产专播品爱网| 国产精品福利影院| 午夜精品久久一牛影视| 青青青伊人色综合久久| 国产精品综合视频| 97久久精品人人澡人人爽| 欧洲一区在线观看| 欧美一级黄色片| 国产欧美日韩综合| 亚洲综合区在线| 久久福利资源站| 91麻豆精东视频| 欧美v日韩v国产v| 国产欧美精品在线观看| 午夜欧美大尺度福利影院在线看| 美女精品自拍一二三四| 国产99精品在线观看| 欧美日韩一区高清| 久久青草国产手机看片福利盒子| 亚洲日本在线视频观看| 精品一区二区影视| 91激情五月电影| 久久综合999| 亚洲成人免费电影| 成人一级片网址| 日韩丝袜情趣美女图片| 亚洲欧美日韩国产另类专区 | 一本一本久久a久久精品综合麻豆| 欧美美女激情18p| 国产精品网友自拍| 日本三级亚洲精品| 99精品热视频| 久久久久亚洲综合| 首页亚洲欧美制服丝腿| 91麻豆国产在线观看| 久久亚洲一级片| 日韩电影一区二区三区四区| av中文字幕亚洲| 久久久精品tv| 蜜桃av一区二区三区电影| 欧美优质美女网站| 国产精品久久久久久久久晋中| 精品亚洲成a人在线观看| 91国产丝袜在线播放| 国产精品系列在线| 国产成人综合精品三级| 久久综合九色综合97婷婷女人 | 国产精品白丝jk黑袜喷水| 这里只有精品电影| 天天色图综合网| 欧美在线影院一区二区| 中文成人av在线| av动漫一区二区| 国产精品免费丝袜| 成+人+亚洲+综合天堂| 国产精品丝袜91| 高清在线不卡av| 国产免费成人在线视频| 韩国女主播成人在线观看| 777a∨成人精品桃花网| 天堂蜜桃91精品| 91精品欧美久久久久久动漫| 丝瓜av网站精品一区二区| 欧美精品日日鲁夜夜添| 日本麻豆一区二区三区视频|