decompiling

Are these encoded codes? [duplicate]

…衆ロ難τιáo~ 提交于 2019-12-02 12:44:10
Possible Duplicate: What does the jsr keyword mean? i used a decompiler to decompile a .class file it seems that it decompiled everything except some code at the bottom are very strange and since im new to java im not sure what they mean: static { String[] tmp5_2 = new String[6]; jsr 50; tmp5_2[0] = "pH@JeAE"; String[] tmp13_5 = tmp5_2; jsr 42; tmp13_5[1] = "lRMMoF"; String[] tmp21_13 = tmp13_5; jsr 34; tmp21_13[2] = "KHUT;\f\19VSv\rRHJkBJH@dL\18OAu"; String[] tmp29_21 = tmp21_13; jsr 26; tmp29_21[3] = "\18\14\22\n1\r\f\15\21"; String[] tmp37_29 = tmp29_21; jsr 18; tmp37_29[4] = "wTD

How to use ICSharpCode.Decompiler to decompile a whole assembly to a text file?

时间秒杀一切 提交于 2019-12-02 10:13:28
I need to get either the whole IL Code or Decompiled Source Code to a text file. Is that possible with the ILSpy Decompile Engine ICSharpCode.Decompiler? With ILSpy, you can select an assembly node in the tree view, and then use File > Save Code to save the result to disk. ILSpy will use the currently selected language to do so, so it can both disassemble and decompile. When decompiling to C#, the save dialog will have options for saving a C# project (.csproj) with separate source code files per class; or a single C# file (.cs) for the whole assembly. To decompile programmatically, use the

How are closures implemented in scala?

雨燕双飞 提交于 2019-12-02 03:12:38
问题 How are the variables outside of the scope of the function pulled into the function when it's created? I tried decompiling, but I had trouble understanding it. It looked like it uses putfield. Does putfield make a pointer to an object reference? 回答1: The answer is "it depends". There will probably be some major changes to this with the scala 2.11 release. Hopefully 2.11 will be able to inline simple closures. But anyway, let's try to give an answer for the current scala version (javap below

Decompiled assembly - unusual code

核能气质少年 提交于 2019-12-02 02:44:41
I decompiled an assembly using ILSpy, and one class in particular got my attention: public class CustomTextStream : NetworkStream { private EventHandler<CustomEventArgs> someEvent; public event EventHandler<CustomEventArgs> SomePublicEvent { add { EventHandler<CustomEventArgs> eventHandler = this.someEvent; EventHandler<CustomEventArgs> eventHandler2; do { eventHandler2 = eventHandler; EventHandler<CustomEventArgs> value2 = (EventHandler<CustomEventArgs>)Delegate.Combine(eventHandler2, value); eventHandler = Interlocked.CompareExchange<EventHandler<CustomEventArgs>>( ref this.someEvent, value2

How are closures implemented in scala?

二次信任 提交于 2019-12-02 01:14:03
How are the variables outside of the scope of the function pulled into the function when it's created? I tried decompiling, but I had trouble understanding it. It looked like it uses putfield. Does putfield make a pointer to an object reference? The answer is "it depends". There will probably be some major changes to this with the scala 2.11 release. Hopefully 2.11 will be able to inline simple closures. But anyway, let's try to give an answer for the current scala version (javap below is from scala 2.10.2). Below is a very simple closure that uses a val and a var, and the javap output of the

How can I reassemble java bytecode generated by javap? [duplicate]

天大地大妈咪最大 提交于 2019-12-02 01:08:26
问题 This question already has answers here : Is there a java classfile / bytecode editor to edit instructions? [closed] (4 answers) Closed 6 years ago . I want to be able to edit bytecode and recompile into executable class files. I have no idea how to do this. I have tried decompiling with javap -c and -v, edit something, and change it back to my Class file, but I get an error "Error: Could not find or load main class Test.class". I would also like to generate java source from the bytecode. Any

What's the purpose of looping “xorl %edx,%eax; shrl $1,%edx”?

你离开我真会死。 提交于 2019-12-01 21:41:02
问题 I have the following x86 assembly code: movl 8(%ebp), %edx //get an argument from the caller movl $0, %eax testl %edx, %edx je .L1 .L2: // what's the purpose of this loop body? xorl %edx, %eax shrl $1, %edx jne .L2 .L1: andl $1, %eax The corresponding C code that the textbook gives as follows int f1(unsigned x) { int y = 0; while(x != 0) { __________; } return __________; } The book asks readers to fill the blank and answer the question of "What does it do?" I can't combine the loop body in

What's the purpose of looping “xorl %edx,%eax; shrl $1,%edx”?

好久不见. 提交于 2019-12-01 18:23:26
I have the following x86 assembly code: movl 8(%ebp), %edx //get an argument from the caller movl $0, %eax testl %edx, %edx je .L1 .L2: // what's the purpose of this loop body? xorl %edx, %eax shrl $1, %edx jne .L2 .L1: andl $1, %eax The corresponding C code that the textbook gives as follows int f1(unsigned x) { int y = 0; while(x != 0) { __________; } return __________; } The book asks readers to fill the blank and answer the question of "What does it do?" I can't combine the loop body in one C expression. I can tell what the loop body does, but I have no idea about its purpose. The textbook

What types of executables can be decompiled?

蹲街弑〆低调 提交于 2019-12-01 18:03:41
I think that java executables (jar files) are trivial to decompile and get the source code. What about other languages? .net and all? Which all languages can compile only to a decompile-able code? In general, languages like Java, C#, and VB.NET are relatively easy to decompile because they are compiled to an intermediary language, not pure machine language. In their IL form, they retain more metadata than C code does when compiled to machine language. Technically you aren't getting the original source code out, but a variation on the source code that, when compiled, will give you the compiled

What types of executables can be decompiled?

心不动则不痛 提交于 2019-12-01 17:42:30
问题 I think that java executables (jar files) are trivial to decompile and get the source code. What about other languages? .net and all? Which all languages can compile only to a decompile-able code? 回答1: In general, languages like Java, C#, and VB.NET are relatively easy to decompile because they are compiled to an intermediary language, not pure machine language. In their IL form, they retain more metadata than C code does when compiled to machine language. Technically you aren't getting the