ildasm for .net2.0的一处修正

博客讲述了作者发现ildasm 2.0在处理System.Runtime.CompilerServices.SuppressIldasmAttribute时存在的问题,以及如何通过patch来修正这个问题。文章还提到SSCLI的便利性,并展示了ida反汇编的代码与SSCLI中的原始代码进行对比。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ildasm2.0在检测System.Runtime.CompilerServices.SuppressIldasmAttribute时会拒绝反编译。

于是把这处检测给patch了。

顺便说一下,sscli的多么的爽,下面的代码分别是ida反汇编出的和sscli中的,对比下看看。

.text:0042FB93                 call    HasSuppressingAttribute(void)
.text:0042FB98                 test    alal
.text:0042FB9A                 jz      short loc_42FBE7
.text:0042FB9C                 cmp     int g_fDumpHeader, edi
.text:0042FBA2                 jz      short loc_42FBB5
.text:0042FBA4                 push    _iobuf * g_pFile
.text:0042FBAA                 push    IMAGE_COR20_HEADER * g_CORHeader
.text:0042FBB0                 call    DumpHeader(IMAGE_COR20_HEADER *,void *)
.text:0042FBB5
.text:0042FBB5 loc_42FBB5:                             ; CODE XREF: DumpFile(char *)+43Fj
.text:0042FBB5                 cmp     int g_fDumpMetaInfo, edi
.text:0042FBBB                 jz      short loc_42FBCC
.text:0042FBBD                 push    _iobuf * g_pFile ; int
.text:0042FBC3                 push    edi             ; int
.text:0042FBC4                 push    [ebp+103Ch+lpMultiByteStr] ; char *
.text:0042FBC7                 call    DumpMetaInfo(char *,char *,void *)
.text:0042FBCC
.text:0042FBCC loc_42FBCC:                             ; CODE XREF: DumpFile(char *)+458j
.text:0042FBCC                 push    1EEh            ; lpString
.text:0042FBD1                 call    RstrUTF(uint)
.text:0042FBD6                 push    eax             ; lpMultiByteStr
.text:0042FBD7                 push    _iobuf * g_pFile ; FILE *
.text:0042FBDD                 call    printError(void *,char *)
.text:0042FBE2                 jmp     loc_4305A3

 


 

     if (HasSuppressingAttribute())
    
{
        
if (g_fDumpHeader)
            DumpHeader(g_CORHeader,g_pFile);
        
if(g_fDumpMetaInfo) 
            DumpMetaInfo(pszFilename,NULL,g_pFile);
        printError(g_pFile,RstrUTF(IDS_E_SUPPRESSED));
        
goto CloseFileAndExit;
    }

 

真希望sscli继续出3.0!

下载去这里http://bbs.pediy.com/showthread.php?s=&threadid=37914

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值