📄 反汇编.txt
字号:
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
; jle $L132346
00028 8b 74 24 1c mov esi, DWORD PTR _pSrc$[esp+20]
$L129563:
; 82 : {
; 83 : // 取4个字节
; 84 : c1 = DeBase64Tab[*pSrc++];
0002c 0f be 06 movsx eax, BYTE PTR [esi]
0002f 46 inc esi
00030 8a 90 00 00 00
00 mov dl, BYTE PTR _DeBase64Tab[eax]
; 85 : c2 = DeBase64Tab[*pSrc++];
00036 0f be 06 movsx eax, BYTE PTR [esi]
; 86 : lc1 = *pSrc;
00039 8a 5e 01 mov bl, BYTE PTR [esi+1]
0003c 46 inc esi
0003d 88 5c 24 13 mov BYTE PTR _lc1$[esp+24], bl
; 87 : c3 = DeBase64Tab[*pSrc++];
00041 46 inc esi
00042 0f be db movsx ebx, bl
00045 8a 80 00 00 00
00 mov al, BYTE PTR _DeBase64Tab[eax]
; 88 : lc2 = *pSrc;
; 89 : c4 = DeBase64Tab[*pSrc++];
0004b 46 inc esi
0004c 8a 9b 00 00 00
00 mov bl, BYTE PTR _DeBase64Tab[ebx]
00052 88 5c 24 20 mov BYTE PTR _c3$[esp+20], bl
00056 8a 5e ff mov bl, BYTE PTR [esi-1]
00059 88 5c 24 24 mov BYTE PTR 16+[esp+20], bl
0005d 0f be db movsx ebx, bl
00060 8a 9b 00 00 00
00 mov bl, BYTE PTR _DeBase64Tab[ebx]
00066 88 5c 24 1c mov BYTE PTR _c4$[esp+20], bl
; 90 :
; 91 : if (lc2 == '=')
0006a 8a 5c 24 24 mov bl, BYTE PTR 16+[esp+20]
0006e 80 fb 3d cmp bl, 61 ; 0000003dH
00071 74 43 je SHORT $L132344
; 106 : }
; 107 : break;
; 108 : }
; 109 :
; 110 : // 解码成3个字符
; 111 : *pDst++ = (c1 << 2) | (c2 >> 4);
00073 8a d8 mov bl, al
; 112 : *pDst++ = (c2 << 4) | (c3 >> 2);
; 113 : *pDst++ = (c3 << 6) | c4;
; 114 :
; 115 : nDstLen += 3;
00075 83 c7 03 add edi, 3
00078 c0 eb 04 shr bl, 4
0007b c0 e2 02 shl dl, 2
0007e 0a da or bl, dl
00080 8a 54 24 20 mov dl, BYTE PTR _c3$[esp+20]
00084 88 19 mov BYTE PTR [ecx], bl
00086 8a da mov bl, dl
00088 c0 eb 02 shr bl, 2
0008b c0 e0 04 shl al, 4
0008e 41 inc ecx
0008f 0a d8 or bl, al
00091 8b 44 24 14 mov eax, DWORD PTR _nDiv$[esp+24]
00095 88 19 mov BYTE PTR [ecx], bl
00097 8a 5c 24 1c mov bl, BYTE PTR _c4$[esp+20]
0009b c0 e2 06 shl dl, 6
0009e 41 inc ecx
0009f 0a d3 or dl, bl
000a1 88 11 mov BYTE PTR [ecx], dl
000a3 41 inc ecx
000a4 45 inc ebp
000a5 3b e8 cmp ebp, eax
000a7 7c 83 jl SHORT $L129563
; 116 : }
; 117 :
; 118 : // 输出加个结束符
; 119 : *pDst = '\0';
; 120 :
; 121 : return nDstLen;
000a9 8b c7 mov eax, edi
000ab 5f pop edi
000ac 5e pop esi
000ad 5d pop ebp
000ae c6 01 00 mov BYTE PTR [ecx], 0
000b1 5b pop ebx
; 122 : }
000b2 83 c4 08 add esp, 8
000b5 c3 ret 0
$L132344:
; 92 : {
; 93 : if (lc1 == '=')
000b6 80 7c 24 13 3d cmp BYTE PTR _lc1$[esp+24], 61 ; 0000003dH
000bb 75 19 jne SHORT $L129567
; 94 : { //原文中除3后余数是1
; 95 : c3 = 0;
; 96 : c4 = 0;
; 97 : *pDst++ = (c1 << 2) | (c2 >> 4);
000bd c0 e8 04 shr al, 4
000c0 c0 e2 02 shl dl, 2
000c3 0a c2 or al, dl
000c5 88 01 mov BYTE PTR [ecx], al
000c7 41 inc ecx
; 98 : nDstLen += 1;
000c8 47 inc edi
; 116 : }
; 117 :
; 118 : // 输出加个结束符
; 119 : *pDst = '\0';
; 120 :
; 121 : return nDstLen;
000c9 8b c7 mov eax, edi
000cb 5f pop edi
000cc 5e pop esi
000cd 5d pop ebp
000ce c6 01 00 mov BYTE PTR [ecx], 0
000d1 5b pop ebx
; 122 : }
000d2 83 c4 08 add esp, 8
000d5 c3 ret 0
$L129567:
; 99 : }
; 100 : else
; 101 : { //原文中除3后余数是2
; 102 : c4 = 0;
; 103 : *pDst++ = (c1 << 2) | (c2 >> 4);
000d6 8a d8 mov bl, al
000d8 c0 eb 04 shr bl, 4
000db c0 e2 02 shl dl, 2
000de 0a da or bl, dl
; 104 : *pDst++ = (c2 << 4) | (c3 >> 2);
000e0 8a 54 24 20 mov dl, BYTE PTR _c3$[esp+20]
000e4 88 19 mov BYTE PTR [ecx], bl
000e6 41 inc ecx
000e7 c0 ea 02 shr dl, 2
000ea c0 e0 04 shl al, 4
000ed 0a d0 or dl, al
000ef 88 11 mov BYTE PTR [ecx], dl
000f1 41 inc ecx
; 105 : nDstLen += 2;
000f2 83 c7 02 add edi, 2
$L132346:
; 116 : }
; 117 :
; 118 : // 输出加个结束符
; 119 : *pDst = '\0';
; 120 :
; 121 : return nDstLen;
000f5 8b c7 mov eax, edi
000f7 5f pop edi
000f8 5e pop esi
000f9 5d pop ebp
000fa c6 01 00 mov BYTE PTR [ecx], 0
000fd 5b pop ebx
; 122 : }
000fe 83 c4 08 add esp, 8
00101 c3 ret 0
?DecodeBase64@@YAHPBDPAEH@Z ENDP ; DecodeBase64
_TEXT ENDS
_DATA SEGMENT
COMM ??_B?1???id@?$ctype@G@std@@$D@@9@51:BYTE ; ??_B?1???id@?$ctype@G@std@@$D@@9@51
_DATA ENDS
; COMDAT _$E383
_TEXT SEGMENT
_$E383 PROC NEAR ; COMDAT
00000 8a 0d 00 00 00
00 mov cl, BYTE PTR ??_B?1???id@?$ctype@G@std@@$D@@9@51 ; ??_B?1???id@?$ctype@G@std@@$D@@9@51
00006 b0 01 mov al, 1
00008 84 c8 test cl, al
0000a 75 08 jne SHORT $L132352
0000c 0a c8 or cl, al
0000e 88 0d 00 00 00
00 mov BYTE PTR ??_B?1???id@?$ctype@G@std@@$D@@9@51, cl ; ??_B?1???id@?$ctype@G@std@@$D@@9@51
$L132352:
00014 e9 00 00 00 00 jmp _$E382
_$E383 ENDP
_TEXT ENDS
PUBLIC ?id@?$ctype@G@std@@$E ; std::ctype<unsigned short>::id
EXTRN _atexit:NEAR
; COMDAT _$E382
_TEXT SEGMENT
_$E382 PROC NEAR ; COMDAT
; 467 : {_Ctype = _Lobj._Getctype(); }
00000 68 00 00 00 00 push OFFSET FLAT:?id@?$ctype@G@std@@$E ; std::ctype<unsigned short>::id
00005 e8 00 00 00 00 call _atexit
0000a 59 pop ecx
0000b c3 ret 0
_$E382 ENDP
_TEXT ENDS
; COMDAT ?id@?$ctype@G@std@@$E
_TEXT SEGMENT
?id@?$ctype@G@std@@$E PROC NEAR ; std::ctype<unsigned short>::id, COMDAT
00000 c3 ret 0
?id@?$ctype@G@std@@$E ENDP ; std::ctype<unsigned short>::id
_TEXT ENDS
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -