1. 程式人生 > >ildasm for .net2.0的一處修正

ildasm for .net2.0的一處修正

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!