function_BASE_1076.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:idascripts 作者: ctfhacker 项目源码 文件源码
def decompile(cls, ea):
        '''(UNSTABLE) Returns the decompiled code of the basic-block at the address ``ea``.'''
        source = idaapi.decompile(ea)

        res = map(functools.partial(operator.__getitem__, source.eamap), cls.iterate(ea))
        res = itertools.chain(*res)
        formatted = reduce(lambda t,c: t if t[-1].ea == c.ea else t+[c], res, [next(res)])

        res = []
        # FIXME: pretty damn unstable
        try:
            for fmt in formatted:
                res.append( fmt.print1(source.__deref__()) )
        except TypeError: pass
        return '\n'.join(map(idaapi.tag_remove,res))

# function frame attributes
# FIXME: put these in their own object and replace them with aliases
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号