Could someone please tell me, if it is used regularly or rarely, and what the situation is?
Also, could someone please assist me in understanding this code, as it is difficult to follow:
From what I believe, since no elements in Key3 and Key4 are being set directly, uKey3 and uKey4 are pointers to Key3 and Key4, and besides checking to see if Key1, Key2...4 are not null and their length is greater than 0, the main manipulation happens within the for loop.
So, given if you knew everything was valid, and you did not give that kind of access to Key1 or Key2, would this be the same as the above?
I'm getting lost in the if statements. It's given that Key3 and Key4 have been declared with a length of 256, and it would be terrible if Key1 and Key2 ever became null or lost their values, so why give it the ability, and why are the if statements important/what exactly are they doing?
Could someone please clear this up for me?
Also, could someone please assist me in understanding this code, as it is difficult to follow:
Code:
public unsafe void SetKeys(uint inKey1, uint inKey2)
{
byte[] CS$0$0000;
uint dwKey1 = ((inKey1 + inKey2) ^ 0x4321) ^ inKey1;
uint dwKey2 = dwKey1 * dwKey1;
this.Key3 = new byte[0x100];
this.Key4 = new byte[0x100];
if (((CS$0$0000 = ConquerKeys.Key1) != null) && (CS$0$0000.Length != 0))
{
goto Label_0045;
}
fixed (void* uKey1 = null)
{
byte[] CS$0$0001;
goto Label_004E;
Label_0045:
uKey1 = CS$0$0000;
Label_004E:
if (((CS$0$0001 = this.Key3) != null) && (CS$0$0001.Length != 0))
{
goto Label_0064;
}
fixed (void* uKey3 = null)
{
byte[] CS$0$0002;
byte[] CS$0$0003;
goto Label_006D;
Label_0064:
uKey3 = CS$0$0001;
Label_006D:
if (((CS$0$0002 = ConquerKeys.Key2) == null) || (CS$0$0002.Length == 0))
{
fixed (void* uKey2 = null)
{
}
}
if (((CS$0$0003 = this.Key4) == null) || (CS$0$0003.Length == 0))
{
uKey4 = null;
}
else
{
uKey4 = CS$0$0003;
}
for (byte i = 0; i < 0x40; i = (byte) (i + 1))
{
uKey3[i * 4] = dwKey1 ^ uKey1[i * 4];
uKey4[i * 4] = dwKey2 ^ uKey2[i * 4];
}
}
}
uKey2 = null;
fixed (void* uKey4 = null)
{
this.OutCounter = 0;
this.UsingAlternate = true;
}
}
So, given if you knew everything was valid, and you did not give that kind of access to Key1 or Key2, would this be the same as the above?
Code:
public unsafe void SetKeys(uint inKey1, uint inKey2)
{
uint dwKey1 = ((inKey1 + inKey2) ^ 0x4321) ^ inKey1;
uint dwKey2 = dwKey1 * dwKey1;
this.Key3 = new byte[0x100];
this.Key4 = new byte[0x100];
for (byte i = 0; i < 0x40; i = (byte) (i + 1))
{
this.Key3[i * 4] = dwKey1 ^ uKey1[i * 4];
this.Key4[i * 4] = dwKey2 ^ uKey2[i * 4];
}
this.OutCounter = 0;
this.UsingAlternate = true;
}
Could someone please clear this up for me?