天马阁

 找回密码
 立即注册
                                        →→→→→→→→→→→→ 1点击查看所有VIP教程目录长列表(总教程数269个) 2办理VIP详情进入 ←←←←←←←←←←←←
1 x64CE与x64dbg入门基础教程 7课 已完结 2 x64汇编语言基础教程 16课 已完结 3 x64辅助入门基础教程 9课 已完结 4 C++x64内存辅助实战技术教程 149课 已完结
5 C++x64内存检测与过检测技术教程 10课 已完结 6 C+x64二叉树分析遍历与LUA自动登陆教程 19课已完结 7 C++BT功能原理与x64实战教程 29课 已完结 8 C+FPS框透视与自瞄x64实现原理及防护思路 30课完结
64驱?封? 9 64反驱? 10 64位V? 11 绝? 12 ???课?
13 64透 ? 14 64U ? 15 64Q ? 16 64功 ?
17 64U ? 18 64模 ? 19 64多 ? 20 64网 ?
21 64注 ? 22 64火 ? 23 64棋 ? 24 64自二链L?
25 64破 ? VIP会员办理QQ: 89986068   
【请先加好友,然后到好友列表双击联系客服办理,不然可能无法接受到信息。】
27 加入2000人交流群637034024 3 28 免责声明?
查看: 1202|回复: 0

易语言和VC++的对比

[复制链接]

13

主题

0

回帖

16

积分

编程入门

Rank: 1

天马币
26
发表于 2024-3-1 13:58:10 | 显示全部楼层 |阅读模式
晚上无聊,易语言 和 Visual C++ 6.0 (以下内容简称C++) 编写了 相同的代码
但是编译后 用OD 查看其汇编代码 表示很无奈

C++ 的汇编代码结构清晰 代码量少

而易语言代码浑浊 上跳下跳 占用不少字节(相对C++)

下面 我贴上 两个程序的汇编代码

C++:

00401005  /$ /E9 06000000   jmp Hello.WinMain
0040100A  |  |CC            int3
0040100B  |  |CC            int3
0040100C  |  |CC            int3
0040100D  |  |CC            int3
0040100E  |  |CC            int3
0040100F  |  |CC            int3
00401010 >|> \55            push ebp
00401011  |.  8BEC          mov ebp,esp
00401013  |.  83EC 40       sub esp,0x40
00401016  |.  53            push ebx
00401017  |.  56            push esi
00401018  |.  57            push edi
00401019  |.  8D7D C0       lea edi,[local.16]
0040101C  |.  B9 10000000   mov ecx,0x10
00401021  |.  B8 CCCCCCCC   mov eax,0xCCCCCCCC
00401026  |.  F3:AB         rep stos dword ptr es:[edi]
00401028  |.  8BF4          mov esi,esp
0040102A  |.  6A 00         push 0x0                                 ; /Style = MB_OK|MB_APPLMODAL
0040102C  |.  68 2C204200   push Hello.0042202C                      ; |Title = "C++"
00401031  |.  68 1C204200   push Hello.0042201C                      ; |Text = "Hello Word"
00401036  |.  6A 00         push 0x0                                 ; |hOwner = NULL
00401038  |.  FF15 ACA24200 call dword ptr ds:[<&USER32.MessageBoxA>>; \MessageBoxA
0040103E  |.  3BF4          cmp esi,esp
00401040  |.  E8 3B000000   call Hello._chkesp
00401045  |.  33C0          xor eax,eax
00401047  |.  5F            pop edi
00401048  |.  5E            pop esi
00401049  |.  5B            pop ebx
0040104A  |.  83C4 40       add esp,0x40
0040104D  |.  3BEC          cmp ebp,esp
0040104F  |.  E8 2C000000   call Hello._chkesp
00401054  |.  8BE5          mov esp,ebp
00401056  |.  5D            pop ebp
00401057  \.  C2 1000       retn 0x10

占用字节 82 byte

E

00401150   .  83EC 64       sub esp,0x64
00401153   .  56            push esi
00401154   .  8B7424 74     mov esi,dword ptr ss:[esp+0x74]
00401158   .  57            push edi
00401159   .  8B7E 08       mov edi,dword ptr ds:[esi+0x8]
0040115C   .  57            push edi
0040115D   .  E8 AE830000   call E_langua.00409510
00401162   .  83C4 04       add esp,0x4
00401165   .  85C0          test eax,eax
00401167   .  74 10         je short E_langua.00401179
00401169   .  8D4424 08     lea eax,dword ptr ss:[esp+0x8]
0040116D   .  50            push eax
0040116E   .  56            push esi
0040116F   .  E8 2CFFFFFF   call E_langua.004010A0
00401174   .  83C4 08       add esp,0x8
00401177   .  EB 42         jmp short E_langua.004011BB
00401179   >  81FF 04000080 cmp edi,0x80000004                       ;  分支 (案例 80000002..80000004)
0040117F   .  75 04         jnz short E_langua.00401185
00401181   .  8B0E          mov ecx,dword ptr ds:[esi]               ;  案例 80000004 (SINGLE STEP) --> 分支 00401179
00401183   .  EB 3A         jmp short E_langua.004011BF
00401185   >  81FF 02000080 cmp edi,0x80000002
0040118B   .  75 12         jnz short E_langua.0040119F
0040118D   .  8B16          mov edx,dword ptr ds:[esi]               ;  案例 80000002 (DATATYPE MISALIGNMENT) --> 分支 00401179
0040118F   .  8D4C24 08     lea ecx,dword ptr ss:[esp+0x8]
00401193   .  51            push ecx
00401194   .  52            push edx
00401195   .  E8 C6470100   call E_langua.00415960
0040119A   .  83C4 08       add esp,0x8
0040119D   .  EB 1C         jmp short E_langua.004011BB
0040119F   >  81FF 03000080 cmp edi,0x80000003
004011A5   .  75 1C         jnz short E_langua.004011C3
004011A7   .  8B4E 04       mov ecx,dword ptr ds:[esi+0x4]           ;  案例 80000003 (BREAKPOINT) --> 分支 00401179
004011AA   .  8B16          mov edx,dword ptr ds:[esi]
004011AC   .  8D4424 08     lea eax,dword ptr ss:[esp+0x8]
004011B0   .  50            push eax
004011B1   .  51            push ecx
004011B2   .  52            push edx
004011B3   .  E8 D8400100   call E_langua.00415290
004011B8   .  83C4 0C       add esp,0xC
004011BB   >  8D4C24 08     lea ecx,dword ptr ss:[esp+0x8]
004011BF   >  85C9          test ecx,ecx
004011C1   .  75 09         jnz short E_langua.004011CC
004011C3   >  C64424 08 00  mov byte ptr ss:[esp+0x8],0x0            ;  分支 00401179 默认案例
004011C8   .  8D4C24 08     lea ecx,dword ptr ss:[esp+0x8]
004011CC   >  8B46 20       mov eax,dword ptr ds:[esi+0x20]
004011CF   .  BA 9C414700   mov edx,E_langua.0047419C
004011D4   .  85C0          test eax,eax
004011D6   .  74 03         je short E_langua.004011DB
004011D8   .  8B56 18       mov edx,dword ptr ds:[esi+0x18]
004011DB   >  8B46 0C       mov eax,dword ptr ds:[esi+0xC]
004011DE   .  8BF0          mov esi,eax
004011E0   .  F7D6          not esi
004011E2   .  81E6 00100000 and esi,0x1000
004011E8   .  8D0470        lea eax,dword ptr ds:[eax+esi*2]
004011EB   .  50            push eax                                 ; /Style
004011EC   .  52            push edx                                 ; |Title
004011ED   .  51            push ecx                                 ; |Text
004011EE   .  6A 00         push 0x0                                 ; |hOwner = NULL
004011F0   .  FF15 A0334600 call dword ptr ds:[<&USER32.MessageBoxA>>; \MessageBoxA
004011F6   .  5F            pop edi
004011F7   .  83F8 03       cmp eax,0x3                              ;  分支 (案例 2..7)
004011FA   .  5E            pop esi
004011FB   .  75 0F         jnz short E_langua.0040120C
004011FD   .  8B4C24 68     mov ecx,dword ptr ss:[esp+0x68]          ;  案例 3 --> 分支 004011F7
00401201   .  B8 02000000   mov eax,0x2
00401206   .  8901          mov dword ptr ds:[ecx],eax
00401208   .  83C4 64       add esp,0x64
0040120B   .  C3            retn
0040120C   >  83F8 02       cmp eax,0x2
0040120F   .  75 0F         jnz short E_langua.00401220
00401211   .  8B5424 68     mov edx,dword ptr ss:[esp+0x68]          ;  案例 2 --> 分支 004011F7
00401215   .  B8 01000000   mov eax,0x1
0040121A   .  8902          mov dword ptr ds:[edx],eax
0040121C   .  83C4 64       add esp,0x64
0040121F   .  C3            retn
00401220   >  83F8 05       cmp eax,0x5
00401223   .  75 0F         jnz short E_langua.00401234
00401225   .  8B4C24 68     mov ecx,dword ptr ss:[esp+0x68]          ;  案例 5 --> 分支 004011F7
00401229   .  B8 04000000   mov eax,0x4
0040122E   .  8901          mov dword ptr ds:[ecx],eax
00401230   .  83C4 64       add esp,0x64
00401233   .  C3            retn
00401234   >  83F8 07       cmp eax,0x7
00401237   .  75 0F         jnz short E_langua.00401248
00401239   .  8B5424 68     mov edx,dword ptr ss:[esp+0x68]          ;  案例 7 --> 分支 004011F7
0040123D   .  B8 06000000   mov eax,0x6
00401242   .  8902          mov dword ptr ds:[edx],eax
00401244   .  83C4 64       add esp,0x64
00401247   .  C3            retn
00401248   >  83F8 06       cmp eax,0x6
0040124B   .  75 0F         jnz short E_langua.0040125C
0040124D   .  8B4C24 68     mov ecx,dword ptr ss:[esp+0x68]          ;  案例 6 --> 分支 004011F7
00401251   .  B8 05000000   mov eax,0x5
00401256   .  8901          mov dword ptr ds:[ecx],eax
00401258   .  83C4 64       add esp,0x64
0040125B   .  C3            retn
0040125C   >  33D2          xor edx,edx                              ;  分支 004011F7 默认案例
0040125E   .  8B4C24 68     mov ecx,dword ptr ss:[esp+0x68]
00401262   .  83F8 04       cmp eax,0x4
00401265   .  0F95C2        setne dl
00401268   .  4A            dec edx
00401269   .  83E2 03       and edx,0x3
0040126C   .  8BC2          mov eax,edx
0040126E   .  8901          mov dword ptr ds:[ecx],eax
00401270   .  83C4 64       add esp,0x64
00401273   .  C3            retn

占用字节 291 byte
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

天马阁|C/C++辅助教程|安卓逆向安全| 论坛导航|免责申明|Archiver||网站地图
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表天马阁立场!
任何人不得以任何方式翻录、盗版或出售本站视频,一经发现我们将追究其相关责任!
我们一直在努力成为最好的编程论坛!
Copyright© 2010-2021 All Right Reserved.
快速回复 返回顶部 返回列表