| 首页 | 技术文章 | 软件下载 | 博客 | 论坛 | 精品教程 | 黑客动画 | 视频资源 | 在线服务 | 黑客游戏 | 

您现在的位置: 中国X黑客小组 >> 技术文章 >> 编程技术 >> 黑客编程 >> 文章正文 用户登录 新用户注册
  黑客反汇编高速入门2          【字体:
黑客反汇编高速入门2
作者:哽咽    文章来源:CnXHacker.Net    点击数:    更新时间:2007-6-2    
e64Tab[c3 & 0x3f];

  000a6 83 e6 3f  and  esi, 63   ; 0000003fH
  000a9 40   inc  eax
  000aa 8a 92 00 00 00
 00   mov  dl, BYTE PTR _EnBase64Tab[edx]
  000b0 88 50 ff  mov  BYTE PTR [eax-1], dl
  000b3 8a 96 00 00 00
 00   mov  dl, BYTE PTR _EnBase64Tab[esi]
  000b9 88 10   mov  BYTE PTR [eax], dl
  000bb 40   inc  eax
  000bc 4b   dec  ebx
  000bd 75 83   jne  SHORT $L129542
  000bf 8b 54 24 10  mov  edx, DWORD PTR _nMod$[esp+20]
  000c3 5f   pop  edi
  000c4 5b   pop  ebx
$L129544:

; 26   :         nDstLen += 4;
; 27   :      }
; 28   : 
; 29   :     // 编码余下的字节
; 30   :     if (nMod == 1)

  000c5 83 fa 01  cmp  edx, 1
  000c8 75 4b   jne  SHORT $L129545

; 31   :     {
; 32   :         c1 = *pSrc++;

  000ca 8a 09   mov  cl, BYTE PTR [ecx]
  000cc 5e   pop  esi
  000cd 88 4c 24 10  mov  BYTE PTR _c1$[esp+4], cl

; 33   :         *pDst++ = EnBase64Tab[(c1 & 0xfc) >> 2];

  000d1 8b 4c 24 10  mov  ecx, DWORD PTR _c1$[esp+4]
  000d5 81 e1 ff 00 00
 00   and  ecx, 255  ; 000000ffH
  000db 8b d1   mov  edx, ecx

; 34   :         *pDst++ = EnBase64Tab[((c1 & 0x03) << 4)];

  000dd 83 e1 03  and  ecx, 3
  000e0 c1 ea 02  shr  edx, 2
  000e3 c1 e1 04  shl  ecx, 4
  000e6 8a 92 00 00 00
 00   mov  dl, BYTE PTR _EnBase64Tab[edx]
  000ec 88 10   mov  BYTE PTR [eax], dl
  000ee 8a 89 00 00 00
 00   mov  cl, BYTE PTR _EnBase64Tab[ecx]
  000f4 40   inc  eax
  000f5 88 08   mov  BYTE PTR [eax], cl
  000f7 40   inc  eax

; 35   :         *pDst++ = '=';

  000f8 c6 00 3d  mov  BYTE PTR [eax], 61 ; 0000003dH

; 45   :         *pDst++ = EnBase64Tab[((c2 & 0x0f) << 2)];

  000fb 40   inc  eax

; 46   :         *pDst++ = '=';

  000fc c6 00 3d  mov  BYTE PTR [eax], 61 ; 0000003dH
  000ff 40   inc  eax

; 47   :         nDstLen += 4;

  00100 83 c5 04  add  ebp, 4

; 48   :     }
; 49   : 
; 50   :     // 输出加个结束符
; 51   :     *pDst = '\0';

  00103 c6 00 00  mov  BYTE PTR [eax], 0

; 52   : 
; 53   :     return nDstLen;

  00106 8b c5   mov  eax, ebp
  00108 5d   pop  ebp

; 54   : }

  00109 59   pop  ecx
  0010a c3   ret  0
$L132338:

; 12   : 
; 13   :     // 每次取3个字节,编码成4个字符
; 14   :     for (int i = 0; i < nDiv; i ++)

  0010b 8b 44 24 14  mov  eax, DWORD PTR _pDst$[esp+8]
  0010f 8b 4c 24 10  mov  ecx, DWORD PTR _pSrc$[esp+8]
  00113 eb b0   jmp  SHORT $L129544
$L129545:

; 36   :         *pDst++ = '=';
; 37   :         nDstLen += 4;
; 38   :     }
; 39   :     else if (nMod == 2)

  00115 83 fa 02  cmp  edx, 2
  00118 75 5b   jne  SHORT $L132337

; 40   :     {
; 41   :         c1 = *pSrc++;

  0011a 8a 11   mov  dl, BYTE PTR [ecx]

; 42   :         c2 = *pSrc++;

  0011c 8a 49 01  mov  cl, BYTE PTR [ecx+1]
  0011f 88 54 24 14  mov  BYTE PTR _c1$[esp+8], dl
  00123 88 4c 24 10  mov  BYTE PTR _c2$[esp+8], cl

; 43   :         *pDst++ = EnBase64Tab[(c1 & 0xfc) >> 2];

  00127 8b 4c 24 14  mov  ecx, DWORD PTR _c1$[esp+8]
  0012b 81 e1 ff 00 00
 00   and  ecx, 255  ; 000000ffH
  00131 8b d1   mov  edx, ecx

; 44   :         *pDst++ = EnBase64Tab[((c1 & 0x03) << 4) | ((c2 & 0xf0) >> 4)];

  00133 83 e1 03  and  ecx, 3
  00136 c1 ea 02  shr  edx, 2
  00139 c1 e1 04  shl  ecx, 4
  0013c 8a 92 00 00 00
 00   mov  dl, BYTE PTR _EnBase64Tab[edx]
  00142 88 10   mov  BYTE PTR [eax], dl
  00144 8b 54 24 10  mov  edx, DWORD PTR _c2$[esp+8]
  00148 81 e2 ff 00 00
 00   and  edx, 255  ; 000000ffH
  0014e 40   inc  eax
  0014f 8b f2   mov  esi, edx

; 45   :         *pDst++ = EnBase64Tab[((c2 & 0x0f) << 2)];

  00151 83 e2 0f  and  edx, 15   ; 0000000fH
  00154 c1 ee 04  shr  esi, 4
  00157 0b f1   or  esi, ecx
  00159 40   inc  eax
  0015a 40   inc  eax
  0015b 8a 8e 00 00 00
 00   mov  cl, BYTE PTR _EnBase64Tab[esi]
  00161 88 48 fe  mov  BYTE PTR [eax-2], cl
  00164 8a 14 95 00 00
 00 00   mov  dl, BYTE PTR _EnBase64Tab[edx*4]
  0016b 88 50 ff  mov  BYTE PTR [eax-1], dl

; 46   :         *pDst++ = '=';

  0016e c6 00 3d  mov  BYTE PTR [eax], 61 ; 0000003dH
  00171 40   inc  eax

; 47   :         nDstLen += 4;

  00172 83 c5 04  add  ebp, 4
$L132337:

; 48   :     }
; 49   : 
; 50   :     // 输出加个结束符
; 51   :     *pDst = '\0';

  00175 c6 00 00  mov  BYTE PTR [eax], 0

; 52   : 
; 53   :     return nDstLen;

  00178 8b c5   mov  eax, ebp
  0017a 5e   pop  esi
  0017b 5d   pop  ebp

; 54   : }

  0017c 59   pop  ecx
  0017d c3   ret  0
?EncodeBase64@@YAHPBEPADH@Z ENDP   ; EncodeBase64
_TEXT ENDS
PUBLIC ?DecodeBase64@@YAHPBDPAEH@Z   ; DecodeBase64
; COMDAT ?DecodeBase64@@YAHPBDPAEH@Z
_TEXT SEGMENT
_pSrc$ = 8
_pDst$ = 12
_nSrcLen$ = 16
_c3$ = 12
_c4$ = 8
_lc1$ = -5
_nDiv$ = -4
?DecodeBase64@@YAHPBDPAEH@Z PROC NEAR   ; DecodeBase64, COMDAT

; 74   : {

  00000 83 ec 08  sub  esp, 8

; 75   :     unsigned char c1, c2, c3, c4;    // 输入缓冲区读出4个字节
; 76   :  unsigned char lc1, lc2;
; 77   :     int nDstLen = 0;             // 输出的字符计数
; 78   :     int nDiv = nSrcLen / 4;      // 输入数据长度除以4得到的倍数

  00003 8b 44 24 14  mov  eax, DWORD PTR _nSrcLen$[esp+4]

; 79   : 
; 80   :     // 每次取4个字节,解码成3个字符
; 81   :     for (int i = 0; i < nDiv; i ++)

  00007 8b 4c 24 10  mov  ecx, DWORD PTR _pDst$[esp+4]
  0000b 99   cdq
  0000c 83 e2 03  and  edx, 3
  0000f 53   push  ebx
  00010 55   push  ebp
  00011 03 c2   add  eax, edx
  00013 56   push  esi
  00014 57   push  edi
  00015 c1 f8 02  sar  eax, 2
  00018 33 ff   xor  edi, edi
  0001a 33 ed   xor  ebp, ebp
  0001c 85 c0   test  eax, eax
  0001e 89 44 24 14  mov  DWORD PTR _nDiv$[esp+24], eax
  00022 0f 8e cd 00 00
 00 

文章录入:IceRiver    责任编辑:IceRiver 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    美国最大黑客盗窃案 美国密情
    微软推新计划打击黑客帮助安
    无ARP欺骗的嗅探技术
    赛门铁克:谨防黑客借奥运发
    瑞星公司07月03日发布 每日计
    黑客入侵花旗银行ATM 窃取用
    XSS漏洞另一个攻击趋势
    “伪颗粒”变种后台秘密监视
    灰鸽子变种NH远程控制用户偷
    06月27日病毒播报
      网友评论:(只显示最新5条。评论内容只代表网友观点,与本站立场无关!)
    Powered by ICE RIVER - STUDIO
    » CnXHacker.CoM   © CopyRight 2002-2006, CnXHacker.CoM™, Inc. All Rights Reserved.