![]() |
|
#6
|
||||
|
||||
|
First.
Code:
IL_0000: ldarg.1 // load a
IL_0001: ldarg.2 // load b (which is a reference)
IL_0002: ldind.i4 //dereference b (bc it is is reference: int&)
IL_0003: call BitConverter::ToUInt() //call and put result on stack
Code:
IL_0008: ldarg.2 // load b on stack for later use
IL_0009: ldarg.2 // load b
IL_000a: ldind.i4 //dereference it
IL_000b: ldc.i4.4 //load interger-constant "4" to stack
IL_000c: add //add the values of b and "4" and put the result on the stack
Code:
<value: result of b+4> <reference: b> (was loaded at IL_0008) <value: return value of the BitConverter call> Then the last piece of the puzzle: Code:
IL_000d: stind.i4 //store the result of "b+4" in b Code:
<value: return value of the BitConverter call> Code:
IL_000e: ret So in conclusion the method does two things: 1) b += 4 and 2) return BitConverter(). So reflector is right and the others are wrong. You should file a bug report. A more literal decompilation would be: Code:
private uint e(byte[] a, ref int b)
{
uint32 tmp = BitConverter.ToUInt32(a, b);
b += 4;
return tmp;
}
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Decompiling the mov compiler | chants | General Discussion | 3 | 12-08-2016 21:16 |
| VB3 decompiling | wasq | General Discussion | 23 | 05-23-2005 02:30 |
| decompiling back to C++? | Rhodium | General Discussion | 44 | 10-11-2004 08:30 |