int[]

dick_nl

Member
Joined
Feb 26, 2004
Messages
20
Using a decompiler I figured out that they dont display the values of an array like "int[] myInts = {1,2,3,4};"
Are they just difficult to reverse engineer (and for that reason a good base for protection)?
 
What I mean is the following:

The next code (C#):
Code:
public void func()
{
int[] arrayOfInt = {1,2,3,4, 10};
int sample = arrayOfInt[3] * arrayOfInt[4] ;
// sample should be 40 now
}

is in the decompiler visible as:
Code:
public void func()
{
int[] arrayOfInt;
int sample = arrayOfInt[3] * arrayOfInt[4] ;
}

So the values that are, in the code, stored in the array arent made readable in the decompiler... Is that always the case!?
 
Last edited by a moderator:
It just means the decompiler you used doesnt know how to reconstruct the array initialization.
 
Im no expert on what the different decompilers can or cannot do, but the initialization will certainly be visible in a disassembly so dont get the idea that your code is protected in some way.
 
It would already had suprised me! Although in the disassembler from M$ I couldnt see it too... but probably theres a way to figure it out...
 
Back
Top