--------------
   L2encdec
--------------

Algorithms supported in both directions:

	111, 120, 121, 211, 212
	411 - 414 (using new private/public pairs)

Decoding only:

	411 - 414 (using L2's original keys)

USAGE: Please start l2encdec and read the explanation.



l2encdec.exe <command> <source file> [destination file]

-l/-g		: decrypts original L2 files
-d/-s		: decrypts files encrypted with "new" RSA pairs

-e/-h <met>	: encrypts file with chosen method. You must provide one
		  of the following: 111, 120, 121, 211, 212, 411, 412, 413, 414
-t         	: ignore tail (i.e. Exteel files have no tail)

Optional commands:

-r <rsa>	: chooses different rsa key pair. 0 is l2encdec's default
		  1 is used for decrypting L2J-VN files. You don't have
		  to provide this command, unless you need a pair
		  other than #0

Source file is mandatory (duh!). Destination file, if not given, will be 
automatically generated (with enc- or dec- prefix). Those prefixes are 
not taken into account, when 121 key is being generated.

l2encdec uses:

- GNU GMP http://www.swox.com/gmp/
- zlib http://www.gzip.org/zlib/

-------------
   patcher
-------------

*** It's always a good idea to backup your whole L2 system subdir. ***

USAGE: patcher.exe [option]

-n		: don't attempt to modify exe file
-x <name>	: specify exe file to change (defaults to l2.exe)
-t		: skip tail in processed files
-h		: prints help page
-f		: enables "force" mode - l2encdec errors will be ignored
		  (useful if you have only a part of the files patched)

Generally - patcher is responsible for reencrypting all "protected"
files. It can also take care of main exe's keys. Thanks to -t and -x
flags, you can use patcher to modify other games, i.e. Exteel.

With L2.exe - it depends on chronicle (C2+) and GG. With some versions L2.exe 
is packed/protected somehow, with others - not. That's where -n option
come into equation. If you want patcher to substitute 41x keys in l2.exe,
just start it w/o any otions, otherwise use -n option. If you use it,
you must use loader to start lineage2.

Details:

1) Copy patcher and l2encdec into lineage2's system subdir
2) Make sure backup dir doesn't exist
3) Start command line prompt, or use something that will keep it 
   (like FAR, etc.)
4) Start patcher, eventually providing required options

Patcher will:

1) make backup subdir under lineage2's system subdir
   (or abort if it's impossible or backup subdir already exists).

2) scan every file in L2's system subdir. If a file with 41x header is found 
   AND it doesn't start with enc- or dec-, then backup copy will be created
   (under backup dir), and an original file will be reencrypted using the
   new key.

If -n option is used (or it fails at l2.exe patching at the end), loader must
be used to start l2.exe

-------------
   loader
-------------

It takes care of rsa key after spawning L2. Copy to l2's system subdir along 
with gg-bps.dll. If patcher succesfully patched L2.exe (and you didn't use
-n option), loader is not needed.

Run loader with -h option to learn about its options. They are simple.

Loader works only on NT line of systems.
Sorry 9x users :(

Note: I haven't tested loader with current (C4+) versions of L2. It should
work, but you never know :) It's effectively obsolete tool atm (until NC
"invents" another pointless idioticy).
