堆栈图,主要目的就是练习一下JCC指令的熟练度,供参考
版权声明:本文为博主原创文章,转载请附上原文出处链接和本声明。2019-09-10,23:41:41。
作者By-----溺心与沉浮----博客园
堆栈完整代码:
1 0040118E |. 6A 09 PUSH 9 2 00401190 |. 6A 0C PUSH 0C 3 00401192 |. 6A 05 PUSH 5 4 00401194 |. E8 85FEFFFF CALL HelloWor.0040101E 5 00401199 |. 83C4 0C ADD ESP,0C 6 7 00401100 /> \55 PUSH EBP 8 00401101 |. 8BEC MOV EBP,ESP 9 00401103 |. 83EC 40 SUB ESP,40 10 00401106 |. 53 PUSH EBX 11 00401107 |. 56 PUSH ESI 12 00401108 |. 57 PUSH EDI 13 00401109 |. 8D7D C0 LEA EDI,DWORD PTR SS:[EBP-40] 14 0040110C |. B9 10000000 MOV ECX,10 15 00401111 |. B8 CCCCCCCC MOV EAX,CCCCCCCC 16 00401116 |. F3:AB REP STOS DWORD PTR ES:[EDI] 17 00401118 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 18 0040111B |. 3B45 0C CMP EAX,DWORD PTR SS:[EBP+C] 19 0040111E |. 7E 12 JLE SHORT HelloWor.00401132 20 00401120 |. 8B4D 08 MOV ECX,DWORD PTR SS:[EBP+8] 21 00401123 |. 3B4D 10 CMP ECX,DWORD PTR SS:[EBP+10] 22 00401126 |. 7E 05 JLE SHORT HelloWor.0040112D 23 00401128 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 24 0040112B |. EB 15 JMP SHORT HelloWor.00401142 25 0040112D |> 8B45 10 MOV EAX,DWORD PTR SS:[EBP+10] 26 00401130 |. EB 10 JMP SHORT HelloWor.00401142 27 00401132 |> 8B55 0C MOV EDX,DWORD PTR SS:[EBP+C] 28 00401135 |. 3B55 10 CMP EDX,DWORD PTR SS:[EBP+10] 29 00401138 |. 7E 05 JLE SHORT HelloWor.0040113F 30 0040113A |. 8B45 0C MOV EAX,DWORD PTR SS:[EBP+C] 31 0040113D |. EB 03 JMP SHORT HelloWor.00401142 32 0040113F |> 8B45 10 MOV EAX,DWORD PTR SS:[EBP+10] 33 00401142 |> 5F POP EDI 34 00401143 |. 5E POP ESI 35 00401144 |. 5B POP EBX 36 00401145 |. 8BE5 MOV ESP,EBP 37 00401147 |. 5D POP EBP 38 00401148 \. C3 RETN
核心功能块,真正代码块
核心功能块:
1 00401118 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 2 0040111B |. 3B45 0C CMP EAX,DWORD PTR SS:[EBP+C] 3 0040111E |. 7E 12 JLE SHORT HelloWor.00401132 4 00401120 |. 8B4D 08 MOV ECX,DWORD PTR SS:[EBP+8] 5 00401123 |. 3B4D 10 CMP ECX,DWORD PTR SS:[EBP+10] 6 00401126 |. 7E 05 JLE SHORT HelloWor.0040112D 7 00401128 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8] 8 0040112B |. EB 15 JMP SHORT HelloWor.00401142 9 0040112D |> 8B45 10 MOV EAX,DWORD PTR SS:[EBP+10] 10 00401130 |. EB 10 JMP SHORT HelloWor.00401142 11 00401132 |> 8B55 0C MOV EDX,DWORD PTR SS:[EBP+C] 12 00401135 |. 3B55 10 CMP EDX,DWORD PTR SS:[EBP+10] 13 00401138 |. 7E 05 JLE SHORT HelloWor.0040113F 14 0040113A |. 8B45 0C MOV EAX,DWORD PTR SS:[EBP+C] 15 0040113D |. EB 03 JMP SHORT HelloWor.00401142 16 0040113F |> 8B45 10 MOV EAX,DWORD PTR SS:[EBP+10]
版权声明:本文为博主原创文章,转载请附上原文出处链接和本声明。2019-09-10,23:41:41。
作者By-----溺心与沉浮----博客园
堆栈图这一块内容写的不好,后面我再想办法尽量把每一步骤都写明白整理上来,这是我自己做的练习,都在EXCEL上,贴上来,方便自己参考