Posted by MrEoUS on 1/24/2000, 3:48 am
128.109.131.47
Hello all!
Since there are some good explanations about first part of task3 (thanks evilTeach) I'll post only keygen. It's written on Java and self-explanatory.
import java.io.*;class AcousticaKeyGen
{
// magic bytes from 0x499B28
private static final byte[] nameArray =
{
42, -21, 12, -67, 124, 125, 61, -59,
-55, 1, 124, -6, -44, 104, -94, 125
};
// magic bytes from 0x499B38
private static final byte[] companyArray =
{
-22, 20, 43, 63, 87, -100, -16, 124,
13, 14, -1, 2, 54, 74, 25, 14
};// very simple algorithm (0x446a74)
// multiply every character of name and company by magic numbers
// sum it and append to AC200
private static String Generator(String name, String company)
{
int key = 0;
for (int i = 1; i != name.length() + 1; i++)
{
key += nameArray[i & 15] * name.charAt(i-1);
}
for (int i = 1; i != company.length() + 1; i++)
{
key += companyArray[i & 15] * company.charAt(i-1);
}key %= 100000;
Integer Key = new Integer(key);
return new String("AC200-"+Key.toString());
}
public static void main(String[] args)
{
try
{
BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Acoustica keygen by MrEoUS");
System.out.print("Enter your name: ");
String name = d.readLine();
System.out.print("Enter your company: ");
String company = d.readLine();
String key = Generator(name, company);
System.out.println("The code for " + name + " " + company + " is " + key );
}
catch (Exception e) {}
}
}BTW I've had some problems with so-called portability of java byte code. At first I declared magic arrays as arrays of ints since I couldn't initialize byte arrays with hex numbers (strange, huh?). Then I had to cast those ints to bytes and that's where different JVMs lost signs and produced different results. I thought that this fact is worth to mention. And I also think that for us reversers Java's very important field and we should learn its assembler and reverse it since a lot of progs now are written totally on Java. Thanks for sparing time to read this.
Regards, MrEoUS