0x00 问题场景
在使用IDA寻找函数交叉引用时,提示报错。此问题在F5反编译汇编代码使也会出现。
报错信息如下:
0x02原因分析:
hex-rays官方写到:
The current function is bigger than the maximal permitted size.
The maximal permitted size is specified by the MAX_FUNCSIZE configuration parameter.
大义为:当前函数大小大于允许的最大值,函数大小最大值有配置文件中的MAX_FUNCSIZE
变量控制。
MAX_FUNCSIZE
的定义如下:
Specifies the maximal decompilable function size, in KBs. Only reachable basic blocks are taken into consideration.
Default: 64
大义为:反编译函数大小最大值,使用KB单位计算。只有可读的基本块被统计在内。默认值是64,即64KB。
出现这个报错,说明反编译函数的大小已经超过了64。
0x02 解决方案
- 修改配置文件:
【IDA 安装目录】\cfg\hexrays.cfg
源文件为:
MAX_FUNCSIZE = 64 // Functions over 64K are not decompiled
修改为
MAX_FUNCSIZE = 1024 // Functions over 64K are not decompiled
- 重新启动IDA,使配置生效。
0x03 题外话
如果函数太大,逻辑太负载,及时调大MAX_FUNCSIZE
也会出现新的错误,比如too complex function
,这种情况就无能为力了。官方也解决不了。
如果调大以后,出现卡死问题,建议把值调小一些。
0x04 参考文献
https://www.hex-rays.com/products/decompiler/manual/failures.shtml#29