Program Register;

Uses Gentypes, Crt;

Var Reg:RegisterRec;
    RF:File of RegisterRec;
    S:String;
    Name,Brd:String;
    I:Integer;
Begin
  CheckBreak:=False;
  Clrscr;
  TextAttr:=9;
  Writeln ('ViSiON Registration Creation Utilition Thingy');
  TextAttr:=12;
  Writeln ('Written by: ME');  { Actually THE ELEMENTAL, but fuck you all! }
  Writeln;
  TextAttr:=10;
  Writeln ('Enter SysopName (30 Characters): ');
  TextAttr:=13; Readln (Name);
  TextAttr:=10;
  Writeln ('Enter BoardName: ');
  TextAttr:=13; Readln (Brd);
  TextAttr:=10;
  Writeln ('Enter Serial Number: ');
  TextAttr:=13; Readln (Reg.Serial);

  { Now for the Encryption PART! Kiss my Ass!! }

  S:=Name;
  For I:=1 to Length(Name) Do
   S[I]:=Chr((Ord(Name[I]) XOR $12) + I);
  Reg.Sysop:=S;

  S:=Brd;
  For I:=1 to Length(Brd) Do
   S[I]:=Chr((Ord(Brd[I]) XOR $08) - I);
  Reg.BoardName:=S;
  Assign (RF,'ViSiON.REG');
  Rewrite (RF);
  Write (RF,Reg);
  Close (RF);
End.
