Answer the question
In order to leave comments, you need to log in
Why can't the decompiler convert the code?
There is this code:
.method private hidebysig
instance uint8[] '1' (
string '1'
) cil managed
{
// Method begins at RVA 0x22c4
// Code size 43 (0x2b)
.maxstack 5
.locals init (
[0] uint8[],
[1] int32
)
IL_0000: call void [mscorlib]System.Console::WriteLine(string)
IL_0005: ldarg.1
IL_0006: callvirt instance uint8[] [mscorlib]System.Text.Encoding::GetBytes(string)
IL_000b: stloc.0
IL_000c: ldc.i4.0
IL_000d: stloc.1
IL_000e: br.s IL_0023
// loop start (head: IL_0023)
IL_0010: ldloc.0
IL_0011: ldloc.1
IL_0012: ldloc.0
IL_0013: ldloc.1
IL_0014: ldelem.u1
IL_0015: ldc.i4 168
IL_001a: ldloc.1
IL_001b: sub
IL_001c: xor
IL_001d: conv.u1
IL_001e: stelem.i1
IL_001f: ldloc.1
IL_0020: ldc.i4.2
IL_0021: add
IL_0022: stloc.1
IL_0023: ldloc.1
IL_0024: ldloc.0
IL_0025: ldlen
IL_0026: conv.i4
IL_0027: blt.s IL_0010
// end loop
IL_0029: ldloc.0
IL_002a: ret
} // end of method '1'::'1'
Answer the question
In order to leave comments, you need to log in
The code of the loop itself from the point of view of ilspy looks like this:
for (int i = 0; i < bytes.Length; i += 2)
bytes[i] = (byte)((int)bytes[i] ^ 168 - i);
for (int i = 0; i < bytes.Length; i += 2)
bytes[i] = (byte)((i - 168) ^ bytes[i]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question