小编dar*_*rkf的帖子

如何从Assembly生成控制流图?

对于上下文,我试图将AVM2(ActionScript虚拟机2)字节码/汇编中的反编译器编写为高级ActionScript 3代码.据我所知,这需要我分析程序集并从中生成结果控制流图,以便推导出诸如循环和条件分支(if/else)之类的结构.

鉴于一些组装如下:

0         getlocal0         
1         pushscope         
2         findpropstrict    {, private, }::trace
4         pushstring        "one"
6         callproperty      {, private, }::trace (1)
9         pop               
10        pushbyte          5
12        pushbyte          3
14        ifngt             L1

18        findpropstrict    {, private, }::trace
20        pushstring        "two"
22        callproperty      {, private, }::trace (1)
25        pop               

L1: 
26        findpropstrict    {, private, }::trace
28        pushstring        "three"
30        callproperty      {, private, }::trace (1)
33        coerce_a          
34        setlocal1         
35        getlocal1         
36        returnvalue       
37        kill              1
Run Code Online (Sandbox Code Playgroud)

什么是生成控制流图的算法?

assembly computer-science decompiling control-flow control-flow-graph

1
推荐指数
1
解决办法
1382
查看次数