NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.52k stars 5.86k forks source link

bad instruction data #2694

Open yov3v opened 3 years ago

yov3v commented 3 years ago

Describe the bug I am trying to reverse engineer an Assembly-CSharp.dll but there's not any code in any function. / WARNING: Bad instruction - Truncating control flow here /

To Reproduce

Expected behavior I need to see the code and other stuff Screenshots

image

Attachments If applicable, please attach any files that caused problems or log files generated by the software.

Environment (please complete the following information):

Additional context

emteere commented 3 years ago

Is this .NET CIL(MSIL) byte code? Support will most likely be included in a near term release.

yov3v commented 3 years ago

Is this .NET CIL(MSIL) byte code? Support will most likely be included in a near term release.

It was extracted with IL2CPPDumper. Idk how to understand if it's a byte code

Danil6969 commented 3 years ago

Oh, IL2CPP. That's a metadata file, there's no code in it. There must be machine code in some other file, not in this.

yov3v commented 3 years ago

Oh, IL2CPP. That's a metadata file, there's no code in it. There must be machine code in some other file, not in this.

oh, the file's name is "Assembly-CSharp-firstpass" it's probably a metadata file as you said

nightlark commented 3 years ago

Is this .NET CIL(MSIL) byte code? Support will most likely be included in a near term release.

@emteere is the CIL code mostly written somewhere and just getting ready to be pushed upstream to the main Ghidra repo, or closer to something on the roadmap moving into the implementation phase? Searching in the repo, I see some code for parsing CLI headers but not a processor module for it (though there is a lot going on).

emteere commented 2 years ago

There is a CLR processor. We're fairly close to putting it out. Had hoped for earlier than now. The processor module is fairly stable but needs some work to better integrate with the decompiler for parameter identification and other decompiler specific issues.