using (BinaryReader b = new BinaryReader(File.Open("C:\Users\Sokrof\Desktop\Randomizadores\Galaxy", FileMode.Open)))
int length = (int)b.BaseStream.Length;
int v1 = b.ReadByte(); pos += sizeof(int);
int v2 = b.ReadByte(); pos += sizeof(int);
int v3 = b.ReadByte(); pos += sizeof(int);
int v4 = b.ReadByte(); pos += sizeof(int);
address1 = v4.ToString("X2") + v3.ToString("X2") + v2.ToString("X2") + v1.ToString("X2");
v1 = b.ReadByte(); pos += sizeof(int);
v2 = b.ReadByte(); pos += sizeof(int);
v3 = b.ReadByte(); pos += sizeof(int);
v4 = b.ReadByte(); pos += sizeof(int);
address2 = v4.ToString("X2") + v3.ToString("X2") + v2.ToString("X2") + v1.ToString("X2");
v1 = b.ReadByte(); pos += sizeof(int);
v2 = b.ReadByte(); pos += sizeof(int);
v3 = b.ReadByte(); pos += sizeof(int);
v4 = b.ReadByte(); pos += sizeof(int);
address2 = v4.ToString("X2") + v3.ToString("X2") + v2.ToString("X2") + v1.ToString("X2") + "\r\n";
int value1 = int.Parse(address1, System.Globalization.NumberStyles.HexNumber);
int value2 = int.Parse(address2, System.Globalization.NumberStyles.HexNumber);
using (BinaryReader b2 = new BinaryReader(File.Open("C:\Users\Sokrof\Desktop\Randomizadores\Galaxy", FileMode.Open)))
String outputName = "C:\Users\Sokrof\Desktop\Randomizadores\Galaxy" + filenumber + ".txt";
BinaryWriter w = new BinaryWriter(File.Create(outputName));
for (int i = value1; i < value2; i++)
int buffer = b2.ReadByte();