CVE-2016-15006 (published 2023-01-02T08:15Z)

A vulnerability, which was classified as problematic, has been found in enigmaX up to 2.2. This issue affects the function getSeed of the file main.c of the component Scrambling Table Handler. The manipulation leads to predictable seed in pseudo-random number generator (prng). The attack may be initiated remotely. The complexity of an attack is rather high. The exploitation is known to be difficult. Upgrading to version 2.3 is able to address this issue. The identifier of the patch is 922bf90ca14a681629ba0b807a997a81d70225b5. It is recommended to upgrade the affected component. The identifier VDB-217181 was assigned to this vulnerability.

CVSS v3 base score: 5.3, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N)

Weakness information:
cwe_id: CWE-337
cwe_name: Predictable Seed in Pseudo-Random Number Generator (PRNG)
description: A Pseudo-Random Number Generator (PRNG) is initialized from a predictable seed, such as the process ID or system time.
extended_description: The use of predictable seeds significantly reduces the number of possible seeds that an attacker would need to test in order to predict which random numbers will be generated by the PRNG.
         

Fix information:
repo_url: https://github.com/pfmonville/enigmaX
commit_details: repo_url: https://github.com/pfmonville/enigmaX
author: pfmonville
author_date: 2016-08-29 23:14:29+02:00
msg: 2.3

+ now the order of the scrambling tables when using a keyfile is
defined by the keyfile and not only with the password. Even if someone
has the password, without the keyfile it is impossible to do any
frequency analysis attack
~ fix the scrambling when a keyfile is used (previously the 16 tables
were the same)
~ some tweaks to descriptions
repository: repo_url: https://github.com/pfmonville/enigmaX
repo_name: pfmonville/enigmaX
description: cryptographic program (console) in C
repo_language: C
owner: pfmonville
file_changes: filename: main.c
change_type: ModificationType.MODIFY
diff: @@ -91,8 +91,10 @@ static unsigned char scrambleAsciiTables[16][256];
 static unsigned char unscrambleAsciiTables[16][256];
 static char isCrypting = 1;
 static char scrambling = 1;
+static char usingKeyFile = 0;
 static char isCodingInverted = 0;
 static long numberOfBuffer;
+static char scramblingTablesOrder[BUFFER_SIZE];
 
 char passPhrase[16384];
 uint64_t passIndex = 0;
@@ -109,10 +111,10 @@ static void usage(int status)
 
 	if(status == 0){
 		fprintf(dest,
-			"%s(1)\t\t\tcopyright <Pierre-François Monville>\t\t\t%s(1)\n\nNAME\n\t%s -- crypt or decrypt any data\n\nSYNOPSIS\n\t%s [-h | --help] FILE [-s | --standard | KEYFILE]\n\nDESCRIPTION\n\t(FR) permet de chiffrer et de déchiffrer toutes les données entrées en paramètre le mot de passe demandé au début est hashé puis sert de graine pour le PRNG le PRNG permet de fournir une clé unique égale à la longueur du fichier à coder. La clé unique subit un xor avec le mot de passe (le mot de passe est répété autant de fois que nécéssaire). Le fichier subit un xor avec cette clé Puis un brouilleur est utilisé, il mélange la table des caractères (ascii) en utilisant le PRNG ou en utilisant le keyFile fourni.\n\t(EN) Can crypt and decrypt any data given in argument. The password asked is hashed to be used as a seed for the PRNG. The PRNG gives a unique key which has the same length as the source file. The key is xored with the password (the password is repeated as long as necessary). The file is then xored with this new key, then a scrambler is used. It scrambles the ascii table using the PRNG or the keyFile given\n\nOPTIONS\n\tthe options are as follows:\n\n\t-h | --help\tfurther help.\n\n\t-s | --standard\tput the scrambler on off.\n\n\t-i | --inverted\tinverts the coding/decoding process, first it xors then it scrambles.\n\nEXIT STATUS\n\tthe %s program exits 0 on success, and anything else if an error occurs.\n\nEXAMPLES\n\tthe command:\t%s file1\n\n\tlets you choose between crypting or decrypting then it will prompt for a password that crypt/decrypt file1 as xfile1 in the same folder, file1 is not modified.\n\n\tthe command:\t%s file2 keyfile1\n\n\tlets you choose between crypting or decrypting, will prompt for the password that crypt/decrypt file2, uses keyfile1 to generate the scrambler then crypt/decrypt file2 as file2x in the same folder, file2 is not modified.\n\n\tthe command:\t%s file3 -s\n\n\tlets you choose between crypting or decrypting, will prompt for a password that crypt/decrypt the file without using the scrambler, resulting in using the unique key only.\n", progName, progName, progName, progName, progName, progName, progName, progName);
+			"%s(1)\t\t\tcopyright <Pierre-François Monville>\t\t\t%s(1)\n\nNAME\n\t%s -- crypt or decrypt any data\n\nSYNOPSIS\n\t%s [-h | --help] FILE [-s | --standard | KEYFILE]\n\nDESCRIPTION\n\t(FR) permet de chiffrer et de déchiffrer toutes les données entrées en paramètre le mot de passe demandé au début est hashé puis sert de graine pour le PRNG le PRNG permet de fournir une clé unique égale à la longueur du fichier à coder. La clé unique subit un xor avec le mot de passe (le mot de passe est répété autant de fois que nécéssaire). Le fichier subit un xor avec cette clé Puis un brouilleur est utilisé, il mélange la table des caractères (ascii) en utilisant le PRNG ou en utilisant le keyFile fourni.\n\t(EN) Can crypt and decrypt any data given in argument. The password asked is hashed to be used as a seed for the PRNG. The PRNG gives a unique key which has the same length as the source file. The key is xored with the password (the password is repeated as long as necessary). The file is then xored with this new key, then a scrambler is used. It scrambles the ascii table using the PRNG or the keyFile given\n\nOPTIONS\n\tthe options are as follows:\n\n\t-h | --help\tfurther help.\n\n\t-s | --standard\tput the scrambler on off.\n\n\t-i | --inverted\tinverts the coding/decoding process, first it xors then it scrambles.\n\n\tKEYFILE    \tthe path to a file which will be used to scramble the substitution's tables and choose in which order they will be used instead of the PRNG only (starting at 2.5 ko for the keyfile is great, however not interesting to be too heavy) \n\nEXIT STATUS\n\tthe %s program exits 0 on success, and anything else if an error occurs.\n\nEXAMPLES\n\tthe command:\t%s file1\n\n\tlets you choose between crypting or decrypting then it will prompt for a password that crypt/decrypt file1 as xfile1 in the same folder, file1 is not modified.\n\n\tthe command:\t%s file2 keyfile1\n\n\tlets you choose between crypting or decrypting, will prompt for the password that crypt/decrypt file2, uses keyfile1 to generate the scrambler then crypt/decrypt file2 as file2x in the same folder, file2 is not modified.\n\n\tthe command:\t%s file3 -s\n\n\tlets you choose between crypting or decrypting, will prompt for a password that crypt/decrypt the file without using the scrambler, resulting in using the unique key only.\n", progName, progName, progName, progName, progName, progName, progName, progName);
 	} else{
 		fprintf(dest,
-			"Usage : %s [-h | --help] FILE [-s | --standard | -i | --inverted] [KEYFILE]\nOptions :\n  -h --help :\t\tfurther help\n  -s --standard :\tput the scrambler off\n  -i --inverted :\tinverts the coding/decoding process\n  KEYFILE :\t\tpath to a keyfile that generates the scrambler instead of the password\n", progName);
+			"Version : 2.3\nUsage : %s [-h | --help] FILE [-s | --standard | -i | --inverted] [KEYFILE]\nOptions :\n  -h --help :\t\tfurther help\n  -s --standard :\tput the scrambler off\n  -i --inverted :\tinverts the coding/decoding process\n  KEYFILE :\t\tpath to a keyfile that scrambles the substitution's tables and choose they order instead of the PRNG only\n", progName);
 	}
 	exit(status);
 }
@@ -316,6 +318,7 @@ void getSeed(char* password){
 	have been switched
  */
 void scramble(FILE* keyFile){
+	printf("scrambling substitution's tables...\n");
 	for (int j = 0; j < 16; ++j)
 	{
 		char temp = 0;
@@ -325,15 +328,17 @@ void scramble(FILE* keyFile){
 			scrambleAsciiTables[j][i] = i;
 		}
 
-		if (keyFile != NULL){
+		if (usingKeyFile){
 			int size;
 			char extractedString[BUFFER_SIZE] = "";
+			unsigned char random256;
 			while((size = fread(extractedString, 1, BUFFER_SIZE, keyFile)) > 0){
 				for (int i = 0; i < size; ++i)
 				{
+					random256 = generateNumber() ^ extractedString[i];
 					temp = scrambleAsciiTables[j][i%256];
-					scrambleAsciiTables[j][i%256] = scrambleAsciiTables[j][(unsigned char)(extractedString[i])];
-					scrambleAsciiTables[j][(unsigned char)(extractedString[i])] = temp;
+					scrambleAsciiTables[j][i%256] = scrambleAsciiTables[j][random256];
+					scrambleAsciiTables[j][random256] = temp;
 				}
 			}
 			rewind(keyFile);
@@ -350,6 +355,25 @@ void scramble(FILE* keyFile){
 			}
 		}
 	}
+	if(usingKeyFile){
+		int j = 0;
+		char temp[BUFFER_SIZE];
+		while(j < BUFFER_SIZE){
+			int charactersRead = fread(temp, 1, BUFFER_SIZE, keyFile);
+			if(charactersRead == 0){
+				rewind(keyFile);
+				continue;
+			}
+			for (int i = 0; i < charactersRead; ++i)
+			{
+				scramblingTablesOrder[j] = temp[i] & (1+2+4+8);
+				j++;
+				if(j == BUFFER_SIZE){
+					break;
+				}
+			}
+		}
+	}
 }
 
 
@@ -393,16 +417,23 @@ void unscramble(){
 void codingXOR(char* extractedString, char* keyString, char* xoredString, int bufferLength)
 {
 	int i;
+	char* tablenumber;
+
+	if(usingKeyFile){
+		tablenumber = scramblingTablesOrder;
+	}else{
+		tablenumber = keyString;
+	}
 
 	if(isCodingInverted){
 		for (i = 0; i < bufferLength; ++i)
 		{
-			xoredString[i] = scrambleAsciiTables[keyString[i] & (1+2+4+8)][(unsigned char)(extractedString[i] ^ keyString[i])];
+			xoredString[i] = scrambleAsciiTables[tablenumber[i] & (1+2+4+8)][(unsigned char)(extractedString[i] ^ keyString[i])];
 		}
 	}else{
 		for (i = 0; i < bufferLength; ++i)
 		{
-			xoredString[i] = scrambleAsciiTables[keyString[i] & (1+2+4+8)][(unsigned char)extractedString[i]] ^ keyString[i];
+			xoredString[i] = scrambleAsciiTables[tablenumber[i] & (1+2+4+8)][(unsigned char)extractedString[i]] ^ keyString[i];
 		}
 	}
 }
@@ -426,16 +457,23 @@ void codingXOR(char* extractedString, char* keyString, char* xoredString, int bu
 void decodingXOR(char* extractedString, char* keyString, char* xoredString, int bufferLength)
 {
 	int i;
+	char* tablenumber;
+
+	if(usingKeyFile){
+		tablenumber = scramblingTablesOrder;
+	}else{
+		tablenumber = keyString;
+	}
 
 	if(isCodingInverted){
 		for (i = 0; i < bufferLength; ++i)
 		{
-			xoredString[i] = unscrambleAsciiTables[keyString[i] & (1+2+4+8)][(unsigned char)extractedString[i]] ^ keyString[i];
+			xoredString[i] = unscrambleAsciiTables[tablenumber[i] & (1+2+4+8)][(unsigned char)extractedString[i]] ^ keyString[i];
 		}
 	}else{
 		for (i = 0; i < bufferLength; ++i)
 		{
-			xoredString[i] = unscrambleAsciiTables[keyString[i] & (1+2+4+8)][(unsigned char)(extractedString[i] ^ keyString[i])];
+			xoredString[i] = unscrambleAsciiTables[tablenumber[i] & (1+2+4+8)][(unsigned char)(extractedString[i] ^ keyString[i])];
 		}
 	}
 }
@@ -475,7 +513,7 @@ void standardXOR(char* extractedString, char* keyString, char* xoredString, int
 	mainFile : pointer to the file given by the user
 	extractedString : will contains the data extracted from the source file in a string format
 	keyString : will contains a part of the unique key in a string format
-	returned value : the size of the data reed
+	returned value : the size of the data read
 
 	read a packet of data from the source file
 	return the length of the packet which is the buffer size (BUFFER_SIZE)
@@ -782,6 +820,10 @@ int main(int argc, char const *argv[])
 			printf("Error: Too many arguments\n");
 			usage(1);
 		}
+
+		if(keyFile != NULL){
+			usingKeyFile = 1;
+		}
 		
 	}
 

programming_language: C
filename: main.s
change_type: ModificationType.MODIFY
diff: @@ -478,7 +478,7 @@ Ltmp31:
 	pushq	%r13
 	pushq	%r12
 	pushq	%rbx
-	subq	$16408, %rsp            ## imm = 0x4018
+	subq	$16424, %rsp            ## imm = 0x4028
 Ltmp32:
 	.cfi_offset %rbx, -56
 Ltmp33:
@@ -489,30 +489,30 @@ Ltmp35:
 	.cfi_offset %r14, -32
 Ltmp36:
 	.cfi_offset %r15, -24
-	movq	%rdi, %r12
+	movq	%rdi, -16440(%rbp)      ## 8-byte Spill
 	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
 	movq	(%rax), %rax
 	movq	%rax, -48(%rbp)
-	xorl	%r13d, %r13d
-	testq	%r12, %r12
-	je	LBB8_8
-## BB#1:
-	leaq	_scrambleAsciiTables(%rip), %rax
+	leaq	L_str(%rip), %rdi
+	callq	_puts
+	leaq	_scrambleAsciiTables(%rip), %r13
+	xorl	%r14d, %r14d
 	pxor	%xmm1, %xmm1
 	movdqa	LCPI8_0(%rip), %xmm2    ## xmm2 = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-	leaq	-16432(%rbp), %r14
-	leaq	_scrambleAsciiTables(%rip), %r15
+	movq	_passPhrase@GOTPCREL(%rip), %rsi
+	movq	%r13, %r12
 	.align	4, 0x90
-LBB8_2:                                 ## %vector.ph
+LBB8_1:                                 ## %vector.ph
                                         ## =>This Loop Header: Depth=1
-                                        ##     Child Loop BB8_3 Depth 2
+                                        ##     Child Loop BB8_2 Depth 2
                                         ##     Child Loop BB8_5 Depth 2
-                                        ##       Child Loop BB8_7 Depth 3
-	movq	%rax, -16440(%rbp)      ## 8-byte Spill
+                                        ##     Child Loop BB8_9 Depth 2
+                                        ##       Child Loop BB8_11 Depth 3
+	movq	%r12, %rax
 	xorl	%ecx, %ecx
 	.align	4, 0x90
-LBB8_3:                                 ## %vector.body
-                                        ##   Parent Loop BB8_2 Depth=1
+LBB8_2:                                 ## %vector.body
+                                        ##   Parent Loop BB8_1 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movd	%ecx, %xmm0
 	pshufb	%xmm1, %xmm0
@@ -521,150 +521,202 @@ LBB8_3:                                 ## %vector.body
 	addq	$16, %rcx
 	addq	$16, %rax
 	cmpq	$256, %rcx              ## imm = 0x100
-	jne	LBB8_3
-## BB#4:                                ## %middle.block
-                                        ##   in Loop: Header=BB8_2 Depth=1
+	jne	LBB8_2
+## BB#3:                                ## %middle.block
+                                        ##   in Loop: Header=BB8_1 Depth=1
+	movb	_usingKeyFile(%rip), %al
+	andb	$1, %al
+	je	LBB8_4
+## BB#7:                                ##   in Loop: Header=BB8_1 Depth=1
 	movl	$16384, %esi            ## imm = 0x4000
-	movq	%r14, %rdi
+	leaq	-16432(%rbp), %rbx
+	movq	%rbx, %rdi
 	callq	___bzero
-	jmp	LBB8_5
-	.align	4, 0x90
-LBB8_6:                                 ## %.lr.ph.preheader
-                                        ##   in Loop: Header=BB8_5 Depth=2
-	movl	%eax, %r8d
-	xorl	%ecx, %ecx
+	movl	$1, %esi
+	movl	$16384, %edx            ## imm = 0x4000
+	movq	%rbx, %rdi
+	jmp	LBB8_9
 	.align	4, 0x90
-LBB8_7:                                 ## %.lr.ph
-                                        ##   Parent Loop BB8_2 Depth=1
-                                        ##     Parent Loop BB8_5 Depth=2
-                                        ## =>    This Inner Loop Header: Depth=3
-	movl	%ecx, %edx
-	sarl	$31, %edx
-	shrl	$24, %edx
-	addl	%ecx, %edx
-	andl	$-256, %edx
-	movl	%ecx, %esi
-	subl	%edx, %esi
-	movslq	%esi, %rdx
-	movq	%r13, %rsi
-	shlq	$8, %rsi
-	addq	%r15, %rsi
-	movb	(%rdx,%rsi), %bl
-	movzbl	-16432(%rbp,%rcx), %edi
-	movb	(%rdi,%rsi), %al
-	movb	%al, (%rdx,%rsi)
-	movb	%bl, (%rdi,%rsi)
-	incq	%rcx
-	cmpl	%ecx, %r8d
-	jne	LBB8_7
-LBB8_5:                                 ## %.loopexit
-                                        ##   Parent Loop BB8_2 Depth=1
-                                        ## =>  This Loop Header: Depth=2
-                                        ##       Child Loop BB8_7 Depth 3
+LBB8_8:                                 ## %.loopexit11
+                                        ##   in Loop: Header=BB8_9 Depth=2
+	movq	%rdx, _seed.0(%rip)
+	movq	%rcx, _seed.1(%rip)
 	movl	$1, %esi
 	movl	$16384, %edx            ## imm = 0x4000
-	movq	%r14, %rdi
-	movq	%r12, %rcx
+	leaq	-16432(%rbp), %rdi
+LBB8_9:                                 ## %.loopexit11
+                                        ##   Parent Loop BB8_1 Depth=1
+                                        ## =>  This Loop Header: Depth=2
+                                        ##       Child Loop BB8_11 Depth 3
+	movq	-16440(%rbp), %rcx      ## 8-byte Reload
 	callq	_fread
 	testl	%eax, %eax
-	jg	LBB8_6
-## BB#16:                               ## %._crit_edge
-                                        ##   in Loop: Header=BB8_2 Depth=1
-	movq	%r12, %rdi
-	callq	_rewind
-	incq	%r13
-	movq	-16440(%rbp), %rax      ## 8-byte Reload
-	addq	$256, %rax              ## imm = 0x100
-	cmpq	$16, %r13
-	pxor	%xmm1, %xmm1
-	movdqa	LCPI8_0(%rip), %xmm2    ## xmm2 = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-	jne	LBB8_2
-	jmp	LBB8_14
-LBB8_8:                                 ## %.preheader5.us.preheader
+	jle	LBB8_12
+## BB#10:                               ## %.lr.ph24
+                                        ##   in Loop: Header=BB8_9 Depth=2
 	movq	_seed.0(%rip), %rdx
-	movq	_seed.1(%rip), %r15
-	leaq	_scrambleAsciiTables(%rip), %r9
-	movq	_passIndex(%rip), %r14
-	xorl	%r11d, %r11d
-	pxor	%xmm0, %xmm0
-	movdqa	LCPI8_0(%rip), %xmm1    ## xmm1 = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
-	movq	_passPhrase@GOTPCREL(%rip), %r10
-	movq	%r9, %rax
+	movq	_seed.1(%rip), %rcx
+	movl	%eax, %r8d
+	xorl	%esi, %esi
 	.align	4, 0x90
-LBB8_9:                                 ## %vector.ph45
-                                        ## =>This Loop Header: Depth=1
-                                        ##     Child Loop BB8_10 Depth 2
-                                        ##     Child Loop BB8_11 Depth 2
-	movq	%rax, -16440(%rbp)      ## 8-byte Spill
-	movq	%rax, %rbx
-	xorl	%edi, %edi
+LBB8_11:                                ##   Parent Loop BB8_1 Depth=1
+                                        ##     Parent Loop BB8_9 Depth=2
+                                        ## =>    This Inner Loop Header: Depth=3
+	leal	(%rcx,%rdx), %r9d
+	xorq	%rdx, %rcx
+	movq	%rdx, %rbx
+	rolq	$55, %rbx
+	movq	%rcx, %rdx
+	shlq	$14, %rdx
+	xorq	%rcx, %rdx
+	xorq	%rbx, %rdx
+	rolq	$36, %rcx
+	movzbl	-16432(%rbp,%rsi), %r10d
+	movl	%esi, %eax
+	sarl	$31, %eax
+	shrl	$24, %eax
+	addl	%esi, %eax
+	andl	$-256, %eax
+	movl	%esi, %edi
+	subl	%eax, %edi
+	movslq	%edi, %r15
+	movq	%r14, %rdi
+	shlq	$8, %rdi
+	addq	%r13, %rdi
+	movb	(%r15,%rdi), %r11b
+	movzbl	%r9b, %ebx
+	xorq	%r10, %rbx
+	movb	(%rbx,%rdi), %al
+	movb	%al, (%r15,%rdi)
+	movb	%r11b, (%rbx,%rdi)
+	incq	%rsi
+	cmpl	%esi, %r8d
+	jne	LBB8_11
+	jmp	LBB8_8
 	.align	4, 0x90
-LBB8_10:                                ## %vector.body41
-                                        ##   Parent Loop BB8_9 Depth=1
-                                        ## =>  This Inner Loop Header: Depth=2
-	movd	%edi, %xmm2
-	pshufb	%xmm0, %xmm2
-	paddb	%xmm1, %xmm2
-	movdqa	%xmm2, (%rbx)
-	addq	$16, %rdi
-	addq	$16, %rbx
-	xorl	%eax, %eax
-	cmpq	$256, %rdi              ## imm = 0x100
-	jne	LBB8_10
+LBB8_4:                                 ## %.preheader12
+                                        ##   in Loop: Header=BB8_1 Depth=1
+	movq	%r12, -16448(%rbp)      ## 8-byte Spill
+	movq	_seed.0(%rip), %rdx
+	movq	_seed.1(%rip), %rax
+	xorl	%r9d, %r9d
+	movq	_passIndex(%rip), %r15
 	.align	4, 0x90
-LBB8_11:                                ## %.preheader3.us
-                                        ##   Parent Loop BB8_9 Depth=1
+LBB8_5:                                 ##   Parent Loop BB8_1 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
-	leal	(%r15,%rdx), %r12d
-	xorq	%rdx, %r15
-	movq	%rdx, %rdi
-	rolq	$55, %rdi
-	movq	%r15, %rdx
+	leal	(%rax,%rdx), %r8d
+	xorq	%rdx, %rax
+	movq	%rdx, %rbx
+	rolq	$55, %rbx
+	movq	%rax, %rdx
 	shlq	$14, %rdx
-	xorq	%r15, %rdx
-	xorq	%rdi, %rdx
-	rolq	$36, %r15
-	movzbl	(%r10,%r14), %r13d
-	incl	%r14d
-	andl	$16383, %r14d           ## imm = 0x3FFF
-	movl	%eax, %esi
+	xorq	%rax, %rdx
+	xorq	%rbx, %rdx
+	rolq	$36, %rax
+	movzbl	(%rsi,%r15), %r10d
+	incl	%r15d
+	andl	$16383, %r15d           ## imm = 0x3FFF
+	movq	%rsi, %r12
+	movl	%r9d, %esi
 	sarl	$31, %esi
 	shrl	$24, %esi
-	addl	%eax, %esi
+	addl	%r9d, %esi
 	andl	$-256, %esi
-	movl	%eax, %ecx
-	subl	%esi, %ecx
-	movslq	%ecx, %rcx
-	movq	%r11, %rsi
-	shlq	$8, %rsi
-	addq	%r9, %rsi
-	movb	(%rcx,%rsi), %r8b
-	movzbl	%r12b, %edi
-	xorq	%r13, %rdi
-	movb	(%rdi,%rsi), %bl
-	movb	%bl, (%rcx,%rsi)
-	movb	%r8b, (%rdi,%rsi)
-	incl	%eax
-	cmpl	$2560, %eax             ## imm = 0xA00
-	jne	LBB8_11
-## BB#12:                               ## %.loopexit4.us
-                                        ##   in Loop: Header=BB8_9 Depth=1
-	incq	%r11
-	movq	-16440(%rbp), %rax      ## 8-byte Reload
-	addq	$256, %rax              ## imm = 0x100
-	cmpq	$16, %r11
-	jne	LBB8_9
-## BB#13:                               ## %.us-lcssa.us.loopexit
+	movl	%r9d, %edi
+	subl	%esi, %edi
+	movslq	%edi, %rsi
+	movq	%r14, %rdi
+	shlq	$8, %rdi
+	addq	%r13, %rdi
+	movb	(%rsi,%rdi), %r11b
+	movzbl	%r8b, %ebx
+	xorq	%r10, %rbx
+	movb	(%rbx,%rdi), %cl
+	movb	%cl, (%rsi,%rdi)
+	movq	%r12, %rsi
+	movb	%r11b, (%rbx,%rdi)
+	incl	%r9d
+	cmpl	$2560, %r9d             ## imm = 0xA00
+	jne	LBB8_5
+## BB#6:                                ## %.loopexit13
+                                        ##   in Loop: Header=BB8_1 Depth=1
 	movq	%rdx, _seed.0(%rip)
-	movq	%r15, _seed.1(%rip)
-	movq	%r14, _passIndex(%rip)
-LBB8_14:                                ## %.us-lcssa.us
+	movq	%rax, _seed.1(%rip)
+	movq	%r15, _passIndex(%rip)
+	movq	-16448(%rbp), %r12      ## 8-byte Reload
+	jmp	LBB8_13
+	.align	4, 0x90
+LBB8_12:                                ## %._crit_edge.25
+                                        ##   in Loop: Header=BB8_1 Depth=1
+	movq	-16440(%rbp), %rdi      ## 8-byte Reload
+	callq	_rewind
+	pxor	%xmm1, %xmm1
+	movdqa	LCPI8_0(%rip), %xmm2    ## xmm2 = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
+	movq	_passPhrase@GOTPCREL(%rip), %rsi
+LBB8_13:                                ##   in Loop: Header=BB8_1 Depth=1
+	incq	%r14
+	addq	$256, %r12              ## imm = 0x100
+	cmpq	$16, %r14
+	jne	LBB8_1
+## BB#14:
+	movb	_usingKeyFile(%rip), %al
+	andb	$1, %al
+	je	LBB8_23
+## BB#15:
+	xorl	%ebx, %ebx
+	leaq	-16432(%rbp), %r14
+	leaq	_scramblingTablesOrder(%rip), %r15
+	movq	-16440(%rbp), %r12      ## 8-byte Reload
+	jmp	LBB8_18
+	.align	4, 0x90
+LBB8_17:                                ## %.lr.ph.split.us
+                                        ##   in Loop: Header=BB8_18 Depth=1
+	movq	%r12, %rdi
+	callq	_rewind
+LBB8_18:                                ## %.lr.ph.split.us
+                                        ## =>This Loop Header: Depth=1
+                                        ##     Child Loop BB8_22 Depth 2
+	movl	$1, %esi
+	movl	$16384, %edx            ## imm = 0x4000
+	movq	%r14, %rdi
+	movq	%r12, %rcx
+	callq	_fread
+	testl	%eax, %eax
+	je	LBB8_17
+## BB#19:                               ## %.preheader
+                                        ##   in Loop: Header=BB8_18 Depth=1
+	testl	%eax, %eax
+	jle	LBB8_16
+## BB#20:                               ## %.lr.ph17.preheader
+                                        ##   in Loop: Header=BB8_18 Depth=1
+	cltq
+	movslq	%ebx, %rbx
+	xorl	%ecx, %ecx
+	.align	4, 0x90
+LBB8_22:                                ## %.lr.ph17
+                                        ##   Parent Loop BB8_18 Depth=1
+                                        ## =>  This Inner Loop Header: Depth=2
+	movb	-16432(%rbp,%rcx), %dl
+	andb	$15, %dl
+	movb	%dl, (%rbx,%r15)
+	cmpl	$16383, %ebx            ## imm = 0x3FFF
+	je	LBB8_23
+## BB#21:                               ##   in Loop: Header=BB8_22 Depth=2
+	incq	%rcx
+	incq	%rbx
+	cmpq	%rax, %rcx
+	jl	LBB8_22
+LBB8_16:                                ## %.loopexit
+                                        ##   in Loop: Header=BB8_18 Depth=1
+	cmpl	$16383, %ebx            ## imm = 0x3FFF
+	jle	LBB8_18
+LBB8_23:
 	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
 	movq	(%rax), %rax
 	cmpq	-48(%rbp), %rax
-	jne	LBB8_17
-## BB#15:                               ## %.us-lcssa.us
-	addq	$16408, %rsp            ## imm = 0x4018
+	jne	LBB8_25
+## BB#24:
+	addq	$16424, %rsp            ## imm = 0x4028
 	popq	%rbx
 	popq	%r12
 	popq	%r13
@@ -672,7 +724,7 @@ LBB8_14:                                ## %.us-lcssa.us
 	popq	%r15
 	popq	%rbp
 	retq
-LBB8_17:                                ## %.us-lcssa.us
+LBB8_25:
 	callq	___stack_chk_fail
 	.cfi_endproc
 
@@ -733,6 +785,10 @@ Ltmp41:
 	movq	%rsp, %rbp
 Ltmp42:
 	.cfi_def_cfa_register %rbp
+	movb	_usingKeyFile(%rip), %al
+	andb	$1, %al
+	leaq	_scramblingTablesOrder(%rip), %r9
+	cmoveq	%rsi, %r9
 	movb	_isCodingInverted(%rip), %al
 	andb	$1, %al
 	je	LBB10_1
@@ -744,39 +800,40 @@ Ltmp42:
 	.align	4, 0x90
 LBB10_6:                                ## %.lr.ph
                                         ## =>This Inner Loop Header: Depth=1
-	movzbl	(%rsi), %r9d
-	movb	(%rdi), %al
-	xorb	%r9b, %al
-	movzbl	%al, %eax
-	andl	$15, %r9d
-	shlq	$8, %r9
-	addq	%r8, %r9
-	movb	(%rax,%r9), %al
+	movb	(%rsi), %al
+	xorb	(%rdi), %al
+	movzbl	%al, %r10d
+	movzbl	(%r9), %eax
+	andl	$15, %eax
+	shlq	$8, %rax
+	addq	%r8, %rax
+	movb	(%r10,%rax), %al
 	movb	%al, (%rdx)
 	incq	%rdi
 	incq	%rsi
+	incq	%r9
 	incq	%rdx
 	decl	%ecx
 	jne	LBB10_6
 	jmp	LBB10_7
-LBB10_1:                                ## %.preheader1
+LBB10_1:                                ## %.preheader2
 	testl	%ecx, %ecx
 	jle	LBB10_7
 ## BB#2:
 	leaq	_scrambleAsciiTables(%rip), %r8
 	.align	4, 0x90
-LBB10_3:                                ## %.lr.ph5
+LBB10_3:                                ## %.lr.ph6
                                         ## =>This Inner Loop Header: Depth=1
-	movzbl	(%rdi), %r9d
-	movzbl	(%rsi), %r10d
-	movl	%r10d, %eax
-	andl	$15, %eax
-	shlq	$8, %rax
-	addq	%r8, %rax
-	movb	(%r9,%rax), %al
-	xorb	%r10b, %al
+	movzbl	(%rdi), %r10d
+	movzbl	(%r9), %r11d
+	andl	$15, %r11d
+	shlq	$8, %r11
+	addq	%r8, %r11
+	movb	(%rsi), %al
+	xorb	(%r10,%r11), %al
 	movb	%al, (%rdx)
 	incq	%rdi
+	incq	%r9
 	incq	%rsi
 	incq	%rdx
 	decl	%ecx
@@ -799,6 +856,10 @@ Ltmp44:
 	movq	%rsp, %rbp
 Ltmp45:
 	.cfi_def_cfa_register %rbp
+	movb	_usingKeyFile(%rip), %al
+	andb	$1, %al
+	leaq	_scramblingTablesOrder(%rip), %r9
+	cmoveq	%rsi, %r9
 	movb	_isCodingInverted(%rip), %al
 	andb	$1, %al
 	je	LBB11_1
@@ -810,40 +871,41 @@ Ltmp45:
 	.align	4, 0x90
 LBB11_6:                                ## %.lr.ph
                                         ## =>This Inner Loop Header: Depth=1
-	movzbl	(%rdi), %r9d
-	movzbl	(%rsi), %r10d
-	movl	%r10d, %eax
-	andl	$15, %eax
-	shlq	$8, %rax
-	addq	%r8, %rax
-	movb	(%r9,%rax), %al
-	xorb	%r10b, %al
+	movzbl	(%rdi), %r10d
+	movzbl	(%r9), %r11d
+	andl	$15, %r11d
+	shlq	$8, %r11
+	addq	%r8, %r11
+	movb	(%rsi), %al
+	xorb	(%r10,%r11), %al
 	movb	%al, (%rdx)
 	incq	%rdi
+	incq	%r9
 	incq	%rsi
 	incq	%rdx
 	decl	%ecx
 	jne	LBB11_6
 	jmp	LBB11_7
-LBB11_1:                                ## %.preheader1
+LBB11_1:                                ## %.preheader2
 	testl	%ecx, %ecx
 	jle	LBB11_7
 ## BB#2:
 	leaq	_unscrambleAsciiTables(%rip), %r8
 	.align	4, 0x90
-LBB11_3:                                ## %.lr.ph5
+LBB11_3:                                ## %.lr.ph6
                                         ## =>This Inner Loop Header: Depth=1
-	movzbl	(%rsi), %r9d
-	movb	(%rdi), %al
-	xorb	%r9b, %al
-	movzbl	%al, %eax
-	andl	$15, %r9d
-	shlq	$8, %r9
-	addq	%r8, %r9
-	movb	(%rax,%r9), %al
+	movb	(%rsi), %al
+	xorb	(%rdi), %al
+	movzbl	%al, %r10d
+	movzbl	(%r9), %eax
+	andl	$15, %eax
+	shlq	$8, %rax
+	addq	%r8, %rax
+	movb	(%r10,%rax), %al
 	movb	%al, (%rdx)
 	incq	%rdi
 	incq	%rsi
+	incq	%r9
 	incq	%rdx
 	decl	%ecx
 	jne	LBB11_3
@@ -1062,20 +1124,20 @@ Ltmp64:
 	.cfi_offset %r14, -32
 Ltmp65:
 	.cfi_offset %r15, -24
-	movq	%rdi, %r14
+	movq	%rdi, %r15
 	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
 	movq	(%rax), %rax
 	movq	%rax, -48(%rbp)
-	movq	_fileName(%rip), %rbx
-	movq	%rbx, %rdi
+	movq	_fileName(%rip), %r14
+	movq	%r14, %rdi
 	callq	_strlen
 	incl	%eax
 	addq	$15, %rax
 	movabsq	$8589934576, %rcx       ## imm = 0x1FFFFFFF0
 	andq	%rax, %rcx
-	movq	%rsp, %r15
-	subq	%rcx, %r15
-	movq	%r15, %rsp
+	movq	%rsp, %rbx
+	subq	%rcx, %rbx
+	movq	%rbx, %rsp
 	leaq	-16432(%rbp), %rdi
 	movl	$16384, %esi            ## imm = 0x4000
 	movq	%rdi, %r13
@@ -1086,27 +1148,27 @@ Ltmp65:
 	leaq	-49200(%rbp), %rdi
 	movl	$16384, %esi            ## imm = 0x4000
 	callq	___bzero
-	leaq	L_.str(%rip), %rcx
+	leaq	L_.str.1(%rip), %rcx
 	leaq	_pathToMainFile(%rip), %r8
 	movl	$0, %esi
 	movq	$-1, %rdx
 	xorl	%eax, %eax
-	movq	%r15, %rdi
-	movq	%rbx, %r9
+	movq	%rbx, %rdi
+	movq	%r14, %r9
 	callq	___sprintf_chk
-	leaq	L_.str.1(%rip), %rsi
-	movq	%r15, %rdi
+	leaq	L_.str.2(%rip), %rsi
+	movq	%rbx, %rdi
 	callq	_fopen
 	movq	%rax, -49208(%rbp)      ## 8-byte Spill
 	testq	%rax, %rax
 	je	LBB14_52
 ## BB#1:
-	leaq	L_str(%rip), %rdi
+	leaq	L_str.35(%rip), %rdi
 	callq	_puts
 	movb	_scrambling(%rip), %bl
 	andb	$1, %bl
-	movq	%r14, %rdi
-	movq	%r14, %r12
+	movq	%r15, %rdi
+	movq	%r15, %r12
 	callq	_feof
 	testb	%bl, %bl
 	je	LBB14_2
@@ -1117,8 +1179,8 @@ Ltmp65:
 	movq	%rbx, -49216(%rbp)      ## 8-byte Spill
 	jne	LBB14_35
 ## BB#13:
-	leaq	-16432(%rbp), %r12
-	leaq	-32816(%rbp), %r13
+	leaq	-16432(%rbp), %r13
+	leaq	-32816(%rbp), %r12
 	movq	_passPhrase@GOTPCREL(%rip), %r15
 	.align	4, 0x90
 LBB14_14:                               ## %.lr.ph
@@ -1130,18 +1192,18 @@ LBB14_14:                               ## %.lr.ph
                                         ##     Child Loop BB14_47 Depth 2
 	movl	$1, %esi
 	movl	$16384, %edx            ## imm = 0x4000
-	movq	%r12, %rdi
+	movq	%r13, %rdi
 	movq	%rbx, %rcx
 	callq	_fread
 	testl	%eax, %eax
 	jle	LBB14_24
-## BB#15:                               ## %.lr.ph.i.30
+## BB#15:                               ## %.lr.ph.i.29
                                         ##   in Loop: Header=BB14_14 Depth=1
 	movq	_seed.0(%rip), %rdx
 	movq	_seed.1(%rip), %rcx
 	movq	_passIndex(%rip), %rsi
 	movl	%eax, %r8d
-	movq	%r13, %r9
+	movq	%r12, %r9
 	.align	4, 0x90
 LBB14_16:                               ##   Parent Loop BB14_14 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
@@ -1161,7 +1223,7 @@ LBB14_16:                               ##   Parent Loop BB14_14 Depth=1
 	incq	%r9
 	decl	%r8d
 	jne	LBB14_16
-## BB#17:                               ## %.lr.ph.i.41.preheader
+## BB#17:                               ## %.lr.ph.i.40.preheader
                                         ##   in Loop: Header=BB14_14 Depth=1
 	movq	%rsi, _passIndex(%rip)
 	movq	%rdx, _seed.0(%rip)
@@ -1187,8 +1249,8 @@ LBB14_16:                               ##   Parent Loop BB14_14 Depth=1
 	andl	$15, %edx
 	subq	%rdx, %rsi
 	leaq	-49200(%rbp), %rdi
-	movq	%r13, %rbx
-	movq	%r12, %rdx
+	movq	%r12, %rbx
+	movq	%r13, %rdx
 	.align	4, 0x90
 LBB14_20:                               ## %vector.body
                                         ##   Parent Loop BB14_14 Depth=1
@@ -1207,7 +1269,7 @@ LBB14_20:                               ## %vector.body
 	movq	%rcx, %rbx
 	je	LBB14_24
 	.align	4, 0x90
-LBB14_22:                               ## %.lr.ph.i.41.preheader87
+LBB14_22:                               ## %.lr.ph.i.40.preheader86
                                         ##   in Loop: Header=BB14_14 Depth=1
 	leaq	-49200(%rbp,%rbx), %rcx
 	leaq	-32816(%rbp,%rbx), %rdx
@@ -1215,7 +1277,7 @@ LBB14_22:                               ## %.lr.ph.i.41.preheader87
 	movl	%eax, %edi
 	subl	%ebx, %edi
 	.align	4, 0x90
-LBB14_23:                               ## %.lr.ph.i.41
+LBB14_23:                               ## %.lr.ph.i.40
                                         ##   Parent Loop BB14_14 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movb	(%rdx), %bl
@@ -1256,14 +1318,14 @@ LBB14_26:                               ##   in Loop: Header=BB14_14 Depth=1
 	testl	%edx, %edx
 	jne	LBB14_27
 ## BB#49:                               ##   in Loop: Header=BB14_14 Depth=1
-	movq	%r12, %r13
+	movq	%r13, %r12
 	cvtsi2ssl	%r14d, %xmm1
 	cvtsi2ssl	%ebx, %xmm0
 	divss	%xmm0, %xmm1
 	movss	%xmm1, -49228(%rbp)     ## 4-byte Spill
 	movaps	%xmm1, %xmm0
 	mulss	LCPI14_0(%rip), %xmm0
-	cvttss2si	%xmm0, %r12d
+	cvttss2si	%xmm0, %r13d
 	xorl	%edi, %edi
 	callq	_time
 	movq	_loadBar.startingTime(%rip), %rsi
@@ -1281,13 +1343,13 @@ LBB14_26:                               ##   in Loop: Header=BB14_14 Depth=1
 	mulss	LCPI14_3(%rip), %xmm3
 	cvttss2si	%xmm3, %esi
 	xorl	%eax, %eax
-	leaq	L_.str.28(%rip), %rdi
+	leaq	L_.str.29(%rip), %rdi
 	callq	_printf
-	testl	%r12d, %r12d
-	movl	%r12d, %ebx
+	testl	%r13d, %r13d
+	movl	%r13d, %ebx
 	jle	LBB14_46
 	.align	4, 0x90
-LBB14_50:                               ## %.lr.ph5.i.11
+LBB14_50:                               ## %.lr.ph5.i
                                         ##   Parent Loop BB14_14 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movl	$61, %edi
@@ -1296,32 +1358,32 @@ LBB14_50:                               ## %.lr.ph5.i.11
 	jne	LBB14_50
 ## BB#45:                               ## %.preheader.i.10
                                         ##   in Loop: Header=BB14_14 Depth=1
-	cmpl	$49, %r12d
+	cmpl	$49, %r13d
 	jg	LBB14_48
-LBB14_46:                               ## %.lr.ph.i.14.preheader
+LBB14_46:                               ## %.lr.ph.i.13.preheader
                                         ##   in Loop: Header=BB14_14 Depth=1
 	movl	$50, %ebx
-	subl	%r12d, %ebx
+	subl	%r13d, %ebx
 	.align	4, 0x90
-LBB14_47:                               ## %.lr.ph.i.14
+LBB14_47:                               ## %.lr.ph.i.13
                                         ##   Parent Loop BB14_14 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movl	$32, %edi
 	callq	_putchar
 	decl	%ebx
 	jne	LBB14_47
-LBB14_48:                               ## %._crit_edge.i.12
+LBB14_48:                               ## %._crit_edge.i.11
                                         ##   in Loop: Header=BB14_14 Depth=1
 	movb	$1, %al
-	leaq	L_.str.31(%rip), %rdi
+	leaq	L_.str.32(%rip), %rdi
 	movsd	-49224(%rbp), %xmm0     ## 8-byte Reload
                                         ## xmm0 = mem[0],zero
 	callq	_printf
 	movq	___stdoutp@GOTPCREL(%rip), %rax
 	movq	(%rax), %rdi
 	callq	_fflush
-	movq	%r13, %r12
-	leaq	-32816(%rbp), %r13
+	movq	%r12, %r13
+	leaq	-32816(%rbp), %r12
 LBB14_27:                               ## %loadBar.exit.backedge
                                         ##   in Loop: Header=BB14_14 Depth=1
 	movq	-49216(%rbp), %rbx      ## 8-byte Reload
@@ -1330,7 +1392,7 @@ LBB14_27:                               ## %loadBar.exit.backedge
 	testl	%eax, %eax
 	je	LBB14_14
 	jmp	LBB14_35
-LBB14_2:                                ## %loadBar.exit26.preheader
+LBB14_2:                                ## %loadBar.exit25.preheader
 	xorl	%r15d, %r15d
 	testl	%eax, %eax
 	movq	%r12, %rbx
@@ -1338,10 +1400,10 @@ LBB14_2:                                ## %loadBar.exit26.preheader
 	movq	%r13, %r14
 	jne	LBB14_35
 ## BB#3:
-	movq	_passPhrase@GOTPCREL(%rip), %r12
-	leaq	_scrambleAsciiTables(%rip), %r13
+	movq	_passPhrase@GOTPCREL(%rip), %r13
+	leaq	_scrambleAsciiTables(%rip), %r12
 	.align	4, 0x90
-LBB14_4:                                ## %.lr.ph51
+LBB14_4:                                ## %.lr.ph50
                                         ## =>This Loop Header: Depth=1
                                         ##     Child Loop BB14_6 Depth 2
                                         ##     Child Loop BB14_11 Depth 2
@@ -1354,6 +1416,7 @@ LBB14_4:                                ## %.lr.ph51
 	movq	%rbx, %rcx
 	callq	_fread
 	testl	%eax, %eax
+	leaq	-32816(%rbp), %r11
 	jle	LBB14_8
 ## BB#5:                                ## %.lr.ph.i
                                         ##   in Loop: Header=BB14_4 Depth=1
@@ -1361,7 +1424,7 @@ LBB14_4:                                ## %.lr.ph51
 	movq	_seed.1(%rip), %rcx
 	movq	_passIndex(%rip), %rsi
 	movl	%eax, %r8d
-	leaq	-32816(%rbp), %r9
+	movq	%r11, %r9
 	.align	4, 0x90
 LBB14_6:                                ##   Parent Loop BB14_4 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
@@ -1374,7 +1437,7 @@ LBB14_6:                                ##   Parent Loop BB14_4 Depth=1
 	xorq	%rcx, %rdx
 	xorq	%rbx, %rdx
 	rolq	$36, %rcx
-	xorb	(%r12,%rsi), %dil
+	xorb	(%r13,%rsi), %dil
 	movb	%dil, (%r9)
 	incl	%esi
 	andl	$16383, %esi            ## imm = 0x3FFF
@@ -1388,8 +1451,13 @@ LBB14_6:                                ##   Parent Loop BB14_4 Depth=1
 	movq	%rcx, _seed.1(%rip)
 LBB14_8:                                ## %fillBuffer.exit
                                         ##   in Loop: Header=BB14_4 Depth=1
-	movb	_isCodingInverted(%rip), %cl
+	movb	_usingKeyFile(%rip), %cl
 	andb	$1, %cl
+	movq	%r11, %rcx
+	leaq	_scramblingTablesOrder(%rip), %rdx
+	cmovneq	%rdx, %rcx
+	movb	_isCodingInverted(%rip), %dl
+	andb	$1, %dl
 	je	LBB14_9
 ## BB#28:                               ## %.preheader.i
                                         ##   in Loop: Header=BB14_4 Depth=1
@@ -1398,56 +1466,57 @@ LBB14_8:                                ## %fillBuffer.exit
 ## BB#29:                               ## %.lr.ph.i.8.preheader
                                         ##   in Loop: Header=BB14_4 Depth=1
 	movl	%eax, %r8d
-	movq	%r14, %rdx
-	leaq	-32816(%rbp), %rsi
-	leaq	-49200(%rbp), %rdi
+	movq	%r14, %rsi
+	movq	%r11, %rdi
+	leaq	-49200(%rbp), %rbx
 	.align	4, 0x90
 LBB14_30:                               ## %.lr.ph.i.8
                                         ##   Parent Loop BB14_4 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
-	movzbl	(%rsi), %ebx
-	movb	(%rdx), %cl
-	xorb	%bl, %cl
-	movzbl	%cl, %ecx
-	andl	$15, %ebx
-	shlq	$8, %rbx
-	addq	%r13, %rbx
-	movb	(%rcx,%rbx), %cl
-	movb	%cl, (%rdi)
+	movb	(%rdi), %dl
+	xorb	(%rsi), %dl
+	movzbl	%dl, %r9d
+	movzbl	(%rcx), %edx
+	andl	$15, %edx
+	shlq	$8, %rdx
+	addq	%r12, %rdx
+	movb	(%r9,%rdx), %dl
+	movb	%dl, (%rbx)
+	incq	%rbx
 	incq	%rdi
 	incq	%rsi
-	incq	%rdx
+	incq	%rcx
 	decl	%r8d
 	jne	LBB14_30
 	jmp	LBB14_31
 	.align	4, 0x90
-LBB14_9:                                ## %.preheader1.i
+LBB14_9:                                ## %.preheader2.i
                                         ##   in Loop: Header=BB14_4 Depth=1
 	testl	%eax, %eax
 	jle	LBB14_31
-## BB#10:                               ## %.lr.ph5.i.preheader
+## BB#10:                               ## %.lr.ph6.i.preheader
                                         ##   in Loop: Header=BB14_4 Depth=1
-	movl	%eax, %ecx
-	movq	%r14, %rdx
-	leaq	-32816(%rbp), %rsi
-	leaq	-49200(%rbp), %rdi
+	movl	%eax, %r9d
+	movq	%r14, %r10
+	movq	%r11, %rdi
+	leaq	-49200(%rbp), %rsi
 	.align	4, 0x90
-LBB14_11:                               ## %.lr.ph5.i
+LBB14_11:                               ## %.lr.ph6.i
                                         ##   Parent Loop BB14_4 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
-	movzbl	(%rdx), %r8d
-	movzbl	(%rsi), %r9d
-	movl	%r9d, %ebx
-	andl	$15, %ebx
-	shlq	$8, %rbx
-	addq	%r13, %rbx
-	movb	(%r8,%rbx), %bl
-	xorb	%r9b, %bl
-	movb	%bl, (%rdi)
-	incq	%rdi
+	movzbl	(%r10), %r8d
+	movzbl	(%rcx), %edx
+	andl	$15, %edx
+	shlq	$8, %rdx
+	addq	%r12, %rdx
+	movb	(%rdi), %bl
+	xorb	(%r8,%rdx), %bl
+	movb	%bl, (%rsi)
 	incq	%rsi
-	incq	%rdx
-	decl	%ecx
+	incq	%rdi
+	incq	%r10
+	incq	%rcx
+	decl	%r9d
 	jne	LBB14_11
 LBB14_31:                               ## %codingXOR.exit
                                         ##   in Loop: Header=BB14_4 Depth=1
@@ -1503,39 +1572,39 @@ LBB14_33:                               ##   in Loop: Header=BB14_4 Depth=1
 	mulss	LCPI14_3(%rip), %xmm3
 	cvttss2si	%xmm3, %esi
 	xorl	%eax, %eax
-	leaq	L_.str.28(%rip), %rdi
+	leaq	L_.str.29(%rip), %rdi
 	callq	_printf
 	testl	%r14d, %r14d
 	movl	%r14d, %ebx
 	jle	LBB14_40
 	.align	4, 0x90
-LBB14_44:                               ## %.lr.ph5.i.20
+LBB14_44:                               ## %.lr.ph5.i.19
                                         ##   Parent Loop BB14_4 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movl	$61, %edi
 	callq	_putchar
 	decl	%ebx
 	jne	LBB14_44
-## BB#39:                               ## %.preheader.i.16
+## BB#39:                               ## %.preheader.i.15
                                         ##   in Loop: Header=BB14_4 Depth=1
 	cmpl	$49, %r14d
 	jg	LBB14_42
-LBB14_40:                               ## %.lr.ph.i.25.preheader
+LBB14_40:                               ## %.lr.ph.i.24.preheader
                                         ##   in Loop: Header=BB14_4 Depth=1
 	movl	$50, %ebx
 	subl	%r14d, %ebx
 	.align	4, 0x90
-LBB14_41:                               ## %.lr.ph.i.25
+LBB14_41:                               ## %.lr.ph.i.24
                                         ##   Parent Loop BB14_4 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movl	$32, %edi
 	callq	_putchar
 	decl	%ebx
 	jne	LBB14_41
-LBB14_42:                               ## %._crit_edge.i.21
+LBB14_42:                               ## %._crit_edge.i.20
                                         ##   in Loop: Header=BB14_4 Depth=1
 	movb	$1, %al
-	leaq	L_.str.31(%rip), %rdi
+	leaq	L_.str.32(%rip), %rdi
 	movsd	-49224(%rbp), %xmm0     ## 8-byte Reload
                                         ## xmm0 = mem[0],zero
 	callq	_printf
@@ -1543,7 +1612,7 @@ LBB14_42:                               ## %._crit_edge.i.21
 	movq	(%rax), %rdi
 	callq	_fflush
 	leaq	-16432(%rbp), %r14
-LBB14_34:                               ## %loadBar.exit26.backedge
+LBB14_34:                               ## %loadBar.exit25.backedge
                                         ##   in Loop: Header=BB14_4 Depth=1
 	movq	-49216(%rbp), %rbx      ## 8-byte Reload
 	movq	%rbx, %rdi
@@ -1594,9 +1663,9 @@ LBB14_37:
 	popq	%rbp
 	retq
 LBB14_52:
-	movq	%r15, %rdi
+	movq	%rbx, %rdi
 	callq	_perror
-	leaq	L_str.47(%rip), %rdi
+	leaq	L_str.49(%rip), %rdi
 	callq	_puts
 	movl	$1, %edi
 	callq	_exit
@@ -1657,9 +1726,9 @@ Ltmp73:
 	addq	$15, %rax
 	movabsq	$8589934576, %rcx       ## imm = 0x1FFFFFFF0
 	andq	%rax, %rcx
-	movq	%rsp, %r12
-	subq	%rcx, %r12
-	movq	%r12, %rsp
+	movq	%rsp, %r15
+	subq	%rcx, %r15
+	movq	%r15, %rsp
 	leaq	-16432(%rbp), %rdi
 	movl	$16384, %esi            ## imm = 0x4000
 	callq	___bzero
@@ -1671,7 +1740,7 @@ Ltmp73:
 	callq	___bzero
 	leaq	_scrambleAsciiTables(%rip), %rax
 	xorl	%ebx, %ebx
-	leaq	_unscrambleAsciiTables(%rip), %r15
+	leaq	_unscrambleAsciiTables(%rip), %r12
 	.align	4, 0x90
 LBB15_1:                                ## %.preheader.i
                                         ## =>This Loop Header: Depth=1
@@ -1684,7 +1753,7 @@ LBB15_2:                                ##   Parent Loop BB15_1 Depth=1
 	movzbl	(%rdx), %edi
 	movq	%rbx, %rcx
 	shlq	$8, %rcx
-	addq	%r15, %rcx
+	addq	%r12, %rcx
 	movb	%sil, (%rdi,%rcx)
 	incq	%rsi
 	incq	%rdx
@@ -1696,26 +1765,26 @@ LBB15_2:                                ##   Parent Loop BB15_1 Depth=1
 	cmpq	$16, %rbx
 	jne	LBB15_1
 ## BB#4:                                ## %unscramble.exit
-	leaq	L_.str.4(%rip), %rcx
+	leaq	L_.str.5(%rip), %rcx
 	movl	$0, %esi
 	movq	$-1, %rdx
 	xorl	%eax, %eax
-	movq	%r12, %rdi
+	movq	%r15, %rdi
 	movq	%r14, %r8
 	callq	___sprintf_chk
 	leaq	_pathToMainFile(%rip), %r14
 	movl	$1000, %edx             ## imm = 0x3E8
 	movq	%r14, %rdi
-	movq	%r12, %rsi
+	movq	%r15, %rsi
 	callq	___strcat_chk
-	leaq	L_.str.1(%rip), %rsi
+	leaq	L_.str.2(%rip), %rsi
 	movq	%r14, %rdi
 	callq	_fopen
 	movq	%rax, -49208(%rbp)      ## 8-byte Spill
 	testq	%rax, %rax
 	je	LBB15_54
 ## BB#5:
-	leaq	L_str.35(%rip), %rdi
+	leaq	L_str.37(%rip), %rdi
 	callq	_puts
 	movb	_scrambling(%rip), %bl
 	andb	$1, %bl
@@ -1731,8 +1800,8 @@ LBB15_2:                                ##   Parent Loop BB15_1 Depth=1
 	movq	%rbx, -49216(%rbp)      ## 8-byte Spill
 	jne	LBB15_39
 ## BB#17:
-	leaq	-16432(%rbp), %r12
-	leaq	-32816(%rbp), %r13
+	leaq	-16432(%rbp), %r13
+	leaq	-32816(%rbp), %r12
 	movq	_passPhrase@GOTPCREL(%rip), %r15
 	.align	4, 0x90
 LBB15_18:                               ## %.lr.ph
@@ -1744,18 +1813,18 @@ LBB15_18:                               ## %.lr.ph
                                         ##     Child Loop BB15_49 Depth 2
 	movl	$1, %esi
 	movl	$16384, %edx            ## imm = 0x4000
-	movq	%r12, %rdi
+	movq	%r13, %rdi
 	movq	%rbx, %rcx
 	callq	_fread
 	testl	%eax, %eax
 	jle	LBB15_28
-## BB#19:                               ## %.lr.ph.i.33
+## BB#19:                               ## %.lr.ph.i.32
                                         ##   in Loop: Header=BB15_18 Depth=1
 	movq	_seed.0(%rip), %rdx
 	movq	_seed.1(%rip), %rcx
 	movq	_passIndex(%rip), %rsi
 	movl	%eax, %r8d
-	movq	%r13, %r9
+	movq	%r12, %r9
 	.align	4, 0x90
 LBB15_20:                               ##   Parent Loop BB15_18 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
@@ -1775,7 +1844,7 @@ LBB15_20:                               ##   Parent Loop BB15_18 Depth=1
 	incq	%r9
 	decl	%r8d
 	jne	LBB15_20
-## BB#21:                               ## %.lr.ph.i.44.preheader
+## BB#21:                               ## %.lr.ph.i.43.preheader
                                         ##   in Loop: Header=BB15_18 Depth=1
 	movq	%rsi, _passIndex(%rip)
 	movq	%rdx, _seed.0(%rip)
@@ -1801,8 +1870,8 @@ LBB15_20:                               ##   Parent Loop BB15_18 Depth=1
 	andl	$15, %edx
 	subq	%rdx, %rsi
 	leaq	-49200(%rbp), %rdi
-	movq	%r13, %rbx
-	movq	%r12, %rdx
+	movq	%r12, %rbx
+	movq	%r13, %rdx
 	.align	4, 0x90
 LBB15_24:                               ## %vector.body
                                         ##   Parent Loop BB15_18 Depth=1
@@ -1821,7 +1890,7 @@ LBB15_24:                               ## %vector.body
 	movq	%rcx, %rbx
 	je	LBB15_28
 	.align	4, 0x90
-LBB15_26:                               ## %.lr.ph.i.44.preheader90
+LBB15_26:                               ## %.lr.ph.i.43.preheader89
                                         ##   in Loop: Header=BB15_18 Depth=1
 	leaq	-49200(%rbp,%rbx), %rcx
 	leaq	-32816(%rbp,%rbx), %rdx
@@ -1829,7 +1898,7 @@ LBB15_26:                               ## %.lr.ph.i.44.preheader90
 	movl	%eax, %edi
 	subl	%ebx, %edi
 	.align	4, 0x90
-LBB15_27:                               ## %.lr.ph.i.44
+LBB15_27:                               ## %.lr.ph.i.43
                                         ##   Parent Loop BB15_18 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movb	(%rdx), %bl
@@ -1870,14 +1939,14 @@ LBB15_30:                               ##   in Loop: Header=BB15_18 Depth=1
 	testl	%edx, %edx
 	jne	LBB15_31
 ## BB#51:                               ##   in Loop: Header=BB15_18 Depth=1
-	movq	%r12, %r13
+	movq	%r13, %r12
 	cvtsi2ssl	%r14d, %xmm1
 	cvtsi2ssl	%ebx, %xmm0
 	divss	%xmm0, %xmm1
 	movss	%xmm1, -49228(%rbp)     ## 4-byte Spill
 	movaps	%xmm1, %xmm0
 	mulss	LCPI15_0(%rip), %xmm0
-	cvttss2si	%xmm0, %r12d
+	cvttss2si	%xmm0, %r13d
 	xorl	%edi, %edi
 	callq	_time
 	movq	_loadBar.startingTime(%rip), %rsi
@@ -1895,10 +1964,10 @@ LBB15_30:                               ##   in Loop: Header=BB15_18 Depth=1
 	mulss	LCPI15_3(%rip), %xmm3
 	cvttss2si	%xmm3, %esi
 	xorl	%eax, %eax
-	leaq	L_.str.28(%rip), %rdi
+	leaq	L_.str.29(%rip), %rdi
 	callq	_printf
-	testl	%r12d, %r12d
-	movl	%r12d, %ebx
+	testl	%r13d, %r13d
+	movl	%r13d, %ebx
 	jle	LBB15_48
 	.align	4, 0x90
 LBB15_52:                               ## %.lr.ph5.i
@@ -1910,12 +1979,12 @@ LBB15_52:                               ## %.lr.ph5.i
 	jne	LBB15_52
 ## BB#47:                               ## %.preheader.i.3
                                         ##   in Loop: Header=BB15_18 Depth=1
-	cmpl	$49, %r12d
+	cmpl	$49, %r13d
 	jg	LBB15_50
 LBB15_48:                               ## %.lr.ph.i.preheader
                                         ##   in Loop: Header=BB15_18 Depth=1
 	movl	$50, %ebx
-	subl	%r12d, %ebx
+	subl	%r13d, %ebx
 	.align	4, 0x90
 LBB15_49:                               ## %.lr.ph.i
                                         ##   Parent Loop BB15_18 Depth=1
@@ -1927,15 +1996,15 @@ LBB15_49:                               ## %.lr.ph.i
 LBB15_50:                               ## %._crit_edge.i
                                         ##   in Loop: Header=BB15_18 Depth=1
 	movb	$1, %al
-	leaq	L_.str.31(%rip), %rdi
+	leaq	L_.str.32(%rip), %rdi
 	movsd	-49224(%rbp), %xmm0     ## 8-byte Reload
                                         ## xmm0 = mem[0],zero
 	callq	_printf
 	movq	___stdoutp@GOTPCREL(%rip), %rax
 	movq	(%rax), %rdi
 	callq	_fflush
-	movq	%r13, %r12
-	leaq	-32816(%rbp), %r13
+	movq	%r12, %r13
+	leaq	-32816(%rbp), %r12
 LBB15_31:                               ## %loadBar.exit.backedge
                                         ##   in Loop: Header=BB15_18 Depth=1
 	movq	-49216(%rbp), %rbx      ## 8-byte Reload
@@ -1944,8 +2013,8 @@ LBB15_31:                               ## %loadBar.exit.backedge
 	testl	%eax, %eax
 	je	LBB15_18
 	jmp	LBB15_39
-LBB15_6:                                ## %loadBar.exit29.preheader
-	xorl	%r12d, %r12d
+LBB15_6:                                ## %loadBar.exit28.preheader
+	xorl	%r15d, %r15d
 	testl	%eax, %eax
 	movq	%r13, %rbx
 	movq	%rbx, -49216(%rbp)      ## 8-byte Spill
@@ -1953,7 +2022,7 @@ LBB15_6:                                ## %loadBar.exit29.preheader
 ## BB#7:
 	movq	_passPhrase@GOTPCREL(%rip), %r13
 	.align	4, 0x90
-LBB15_8:                                ## %.lr.ph54
+LBB15_8:                                ## %.lr.ph53
                                         ## =>This Loop Header: Depth=1
                                         ##     Child Loop BB15_10 Depth 2
                                         ##     Child Loop BB15_15 Depth 2
@@ -1966,6 +2035,7 @@ LBB15_8:                                ## %.lr.ph54
 	movq	%rbx, %rcx
 	callq	_fread
 	testl	%eax, %eax
+	leaq	-32816(%rbp), %r11
 	jle	LBB15_12
 ## BB#9:                                ## %.lr.ph.i.5
                                         ##   in Loop: Header=BB15_8 Depth=1
@@ -1973,7 +2043,7 @@ LBB15_8:                                ## %.lr.ph54
 	movq	_seed.1(%rip), %rcx
 	movq	_passIndex(%rip), %rsi
 	movl	%eax, %r8d
-	leaq	-32816(%rbp), %r9
+	movq	%r11, %r9
 	.align	4, 0x90
 LBB15_10:                               ##   Parent Loop BB15_8 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
@@ -2000,8 +2070,13 @@ LBB15_10:                               ##   Parent Loop BB15_8 Depth=1
 	movq	%rcx, _seed.1(%rip)
 LBB15_12:                               ## %fillBuffer.exit
                                         ##   in Loop: Header=BB15_8 Depth=1
-	movb	_isCodingInverted(%rip), %cl
+	movb	_usingKeyFile(%rip), %cl
 	andb	$1, %cl
+	movq	%r11, %rsi
+	leaq	_scramblingTablesOrder(%rip), %rcx
+	cmovneq	%rcx, %rsi
+	movb	_isCodingInverted(%rip), %dl
+	andb	$1, %dl
 	je	LBB15_13
 ## BB#32:                               ## %.preheader.i.11
                                         ##   in Loop: Header=BB15_8 Depth=1
@@ -2009,56 +2084,57 @@ LBB15_12:                               ## %fillBuffer.exit
 	jle	LBB15_35
 ## BB#33:                               ## %.lr.ph.i.16.preheader
                                         ##   in Loop: Header=BB15_8 Depth=1
-	movl	%eax, %ecx
-	movq	%r14, %rdx
-	leaq	-32816(%rbp), %rsi
-	leaq	-49200(%rbp), %rdi
+	movl	%eax, %r9d
+	movq	%r14, %r10
+	movq	%r11, %rdi
+	leaq	-49200(%rbp), %rbx
 	.align	4, 0x90
 LBB15_34:                               ## %.lr.ph.i.16
                                         ##   Parent Loop BB15_8 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
-	movzbl	(%rdx), %r8d
-	movzbl	(%rsi), %r9d
-	movl	%r9d, %ebx
-	andl	$15, %ebx
-	shlq	$8, %rbx
-	addq	%r15, %rbx
-	movb	(%r8,%rbx), %bl
-	xorb	%r9b, %bl
-	movb	%bl, (%rdi)
+	movzbl	(%r10), %r8d
+	movzbl	(%rsi), %edx
+	andl	$15, %edx
+	shlq	$8, %rdx
+	addq	%r12, %rdx
+	movb	(%rdi), %cl
+	xorb	(%r8,%rdx), %cl
+	movb	%cl, (%rbx)
+	incq	%rbx
 	incq	%rdi
+	incq	%r10
 	incq	%rsi
-	incq	%rdx
-	decl	%ecx
+	decl	%r9d
 	jne	LBB15_34
 	jmp	LBB15_35
 	.align	4, 0x90
-LBB15_13:                               ## %.preheader1.i
+LBB15_13:                               ## %.preheader2.i
                                         ##   in Loop: Header=BB15_8 Depth=1
 	testl	%eax, %eax
 	jle	LBB15_35
-## BB#14:                               ## %.lr.ph5.i.17.preheader
+## BB#14:                               ## %.lr.ph6.i.preheader
                                         ##   in Loop: Header=BB15_8 Depth=1
 	movl	%eax, %r8d
-	movq	%r14, %rdx
-	leaq	-32816(%rbp), %rsi
-	leaq	-49200(%rbp), %rdi
+	movq	%r14, %rcx
+	movq	%r11, %rdi
+	leaq	-49200(%rbp), %rbx
 	.align	4, 0x90
-LBB15_15:                               ## %.lr.ph5.i.17
+LBB15_15:                               ## %.lr.ph6.i
                                         ##   Parent Loop BB15_8 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
-	movzbl	(%rsi), %ebx
-	movb	(%rdx), %cl
-	xorb	%bl, %cl
-	movzbl	%cl, %ecx
-	andl	$15, %ebx
-	shlq	$8, %rbx
-	addq	%r15, %rbx
-	movb	(%rcx,%rbx), %cl
-	movb	%cl, (%rdi)
+	movb	(%rdi), %dl
+	xorb	(%rcx), %dl
+	movzbl	%dl, %r9d
+	movzbl	(%rsi), %edx
+	andl	$15, %edx
+	shlq	$8, %rdx
+	addq	%r12, %rdx
+	movb	(%r9,%rdx), %dl
+	movb	%dl, (%rbx)
+	incq	%rbx
 	incq	%rdi
+	incq	%rcx
 	incq	%rsi
-	incq	%rdx
 	decl	%r8d
 	jne	LBB15_15
 LBB15_35:                               ## %decodingXOR.exit
@@ -2068,7 +2144,7 @@ LBB15_35:                               ## %decodingXOR.exit
 	leaq	-49200(%rbp), %rdi
 	movq	-49208(%rbp), %rcx      ## 8-byte Reload
 	callq	_fwrite
-	incq	%r12
+	incq	%r15
 	movl	_numberOfBuffer(%rip), %ebx
 	movb	_loadBar.firstCall(%rip), %al
 	andb	$1, %al
@@ -2085,13 +2161,13 @@ LBB15_37:                               ##   in Loop: Header=BB15_8 Depth=1
 	sarq	$37, %rcx
 	shrq	$63, %rax
 	leal	1(%rcx,%rax), %ecx
-	movl	%r12d, %eax
+	movl	%r15d, %eax
 	cltd
 	idivl	%ecx
 	testl	%edx, %edx
 	jne	LBB15_38
 ## BB#45:                               ##   in Loop: Header=BB15_8 Depth=1
-	cvtsi2ssl	%r12d, %xmm1
+	cvtsi2ssl	%r15d, %xmm1
 	cvtsi2ssl	%ebx, %xmm0
 	divss	%xmm0, %xmm1
 	movss	%xmm1, -49228(%rbp)     ## 4-byte Spill
@@ -2115,39 +2191,39 @@ LBB15_37:                               ##   in Loop: Header=BB15_8 Depth=1
 	mulss	LCPI15_3(%rip), %xmm3
 	cvttss2si	%xmm3, %esi
 	xorl	%eax, %eax
-	leaq	L_.str.28(%rip), %rdi
+	leaq	L_.str.29(%rip), %rdi
 	callq	_printf
 	testl	%r14d, %r14d
 	movl	%r14d, %ebx
 	jle	LBB15_42
 	.align	4, 0x90
-LBB15_46:                               ## %.lr.ph5.i.23
+LBB15_46:                               ## %.lr.ph5.i.22
                                         ##   Parent Loop BB15_8 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movl	$61, %edi
 	callq	_putchar
 	decl	%ebx
 	jne	LBB15_46
-## BB#41:                               ## %.preheader.i.19
+## BB#41:                               ## %.preheader.i.18
                                         ##   in Loop: Header=BB15_8 Depth=1
 	cmpl	$49, %r14d
 	jg	LBB15_44
-LBB15_42:                               ## %.lr.ph.i.28.preheader
+LBB15_42:                               ## %.lr.ph.i.27.preheader
                                         ##   in Loop: Header=BB15_8 Depth=1
 	movl	$50, %ebx
 	subl	%r14d, %ebx
 	.align	4, 0x90
-LBB15_43:                               ## %.lr.ph.i.28
+LBB15_43:                               ## %.lr.ph.i.27
                                         ##   Parent Loop BB15_8 Depth=1
                                         ## =>  This Inner Loop Header: Depth=2
 	movl	$32, %edi
 	callq	_putchar
 	decl	%ebx
 	jne	LBB15_43
-LBB15_44:                               ## %._crit_edge.i.24
+LBB15_44:                               ## %._crit_edge.i.23
                                         ##   in Loop: Header=BB15_8 Depth=1
 	movb	$1, %al
-	leaq	L_.str.31(%rip), %rdi
+	leaq	L_.str.32(%rip), %rdi
 	movsd	-49224(%rbp), %xmm0     ## 8-byte Reload
                                         ## xmm0 = mem[0],zero
 	callq	_printf
@@ -2155,7 +2231,7 @@ LBB15_44:                               ## %._crit_edge.i.24
 	movq	(%rax), %rdi
 	callq	_fflush
 	leaq	-16432(%rbp), %r14
-LBB15_38:                               ## %loadBar.exit29.backedge
+LBB15_38:                               ## %loadBar.exit28.backedge
                                         ##   in Loop: Header=BB15_8 Depth=1
 	movq	-49216(%rbp), %rbx      ## 8-byte Reload
 	movq	%rbx, %rdi
@@ -2179,9 +2255,9 @@ LBB15_39:                               ## %.loopexit
 	popq	%rbp
 	retq
 LBB15_54:
-	movq	%r12, %rdi
+	movq	%r15, %rdi
 	callq	_perror
-	leaq	L_str.47(%rip), %rdi
+	leaq	L_str.49(%rip), %rdi
 	callq	_puts
 	movl	$1, %edi
 	callq	_exit
@@ -2222,14 +2298,14 @@ LBB16_1:
 	cmpl	$2, (%rax)
 	jne	LBB16_4
 ## BB#2:
-	leaq	L_str.38(%rip), %rdi
+	leaq	L_str.40(%rip), %rdi
 	callq	_puts
 	jmp	LBB16_3
 LBB16_4:
-	leaq	L_.str.7(%rip), %rdi
+	leaq	L_.str.8(%rip), %rdi
 	callq	_perror
 LBB16_3:
-	leaq	L_str.47(%rip), %rdi
+	leaq	L_str.49(%rip), %rdi
 	callq	_puts
 	movl	$1, %edi
 	callq	_exit
@@ -2292,61 +2368,61 @@ LBB17_3:
 	jle	LBB17_87
 ## BB#4:
 	cmpl	$5, %r15d
-	jge	LBB17_21
+	jge	LBB17_88
 ## BB#5:
 	movq	8(%r13), %rbx
-	leaq	L_.str.9(%rip), %rsi
+	leaq	L_.str.10(%rip), %rsi
 	movq	%rbx, %rdi
 	callq	_strcmp
 	testl	%eax, %eax
-	je	LBB17_88
+	je	LBB17_89
 ## BB#6:
-	leaq	L_.str.10(%rip), %rsi
+	leaq	L_.str.11(%rip), %rsi
 	movq	%rbx, %rdi
 	callq	_strcmp
 	testl	%eax, %eax
-	je	LBB17_88
+	je	LBB17_89
 ## BB#7:
 	xorl	%r14d, %r14d
 	cmpl	$3, %r15d
 	jl	LBB17_23
 ## BB#8:
 	movq	16(%r13), %r14
-	leaq	L_.str.11(%rip), %rsi
+	leaq	L_.str.12(%rip), %rsi
 	movq	%r14, %rdi
 	callq	_strcmp
 	testl	%eax, %eax
 	je	LBB17_10
 ## BB#9:
-	leaq	L_.str.12(%rip), %rsi
+	leaq	L_.str.13(%rip), %rsi
 	movq	%r14, %rdi
 	callq	_strcmp
 	testl	%eax, %eax
 	je	LBB17_10
-## BB#14:
-	leaq	L_.str.15(%rip), %rsi
+## BB#15:
+	leaq	L_.str.16(%rip), %rsi
 	movq	%r14, %rdi
 	callq	_strcmp
 	testl	%eax, %eax
-	je	LBB17_16
-## BB#15:
-	leaq	L_.str.16(%rip), %rsi
+	je	LBB17_17
+## BB#16:
+	leaq	L_.str.17(%rip), %rsi
 	movq	%r14, %rdi
 	callq	_strcmp
 	testl	%eax, %eax
-	je	LBB17_16
-## BB#18:
-	leaq	L_.str.13(%rip), %rsi
+	je	LBB17_17
+## BB#19:
+	leaq	L_.str.14(%rip), %rsi
 	movq	%r14, %rdi
 	callq	_fopen
 	movq	%rax, %r14
 	testq	%r14, %r14
-	je	LBB17_19
-## BB#20:
+	je	LBB17_20
+## BB#21:
 	cmpl	$4, %r15d
-	jl	LBB17_23
-LBB17_21:
-	leaq	L_str.50(%rip), %rdi
+	jl	LBB17_22
+LBB17_88:
+	leaq	L_str.52(%rip), %rdi
 	callq	_puts
 	movl	$1, %edi
 	callq	_usage
@@ -2357,28 +2433,30 @@ LBB17_10:
 	jl	LBB17_23
 ## BB#11:
 	movq	24(%r13), %rdi
-	leaq	L_.str.13(%rip), %rsi
+	leaq	L_.str.14(%rip), %rsi
 	callq	_fopen
 	testq	%rax, %rax
 	je	LBB17_12
-## BB#22:
-	leaq	L_str.49(%rip), %rdi
+## BB#14:
+	leaq	L_str.51(%rip), %rdi
 	callq	_puts
 	xorl	%r14d, %r14d
 	jmp	LBB17_23
-LBB17_16:
+LBB17_17:
 	movb	$1, _isCodingInverted(%rip)
 	xorl	%r14d, %r14d
 	cmpl	$4, %r15d
 	jl	LBB17_23
-## BB#17:
+## BB#18:
 	movq	24(%r13), %rdi
-	leaq	L_.str.13(%rip), %rsi
+	leaq	L_.str.14(%rip), %rsi
 	callq	_fopen
 	movq	%rax, %r14
 	testq	%r14, %r14
 	je	LBB17_12
-LBB17_23:
+LBB17_22:
+	movb	$1, _usingKeyFile(%rip)
+LBB17_23:                               ## %.thread
 	movq	8(%r13), %rbx
 	movq	%rbx, %rdi
 	callq	_strlen
@@ -2407,7 +2485,7 @@ LBB17_27:
 	leaq	-1056(%rbp), %rdi
 	movl	$1008, %esi             ## imm = 0x3F0
 	callq	___bzero
-	leaq	L_.str.18(%rip), %rdi
+	leaq	L_.str.19(%rip), %rdi
 	xorl	%eax, %eax
 	callq	_printf
 	movq	___stdoutp@GOTPCREL(%rip), %rax
@@ -2514,7 +2592,7 @@ LBB17_36:
 	movl	$1, %edi
 	callq	_calloc
 	movq	%rax, %r12
-	leaq	L_.str.19(%rip), %rcx
+	leaq	L_.str.20(%rip), %rcx
 	movl	$0, %esi
 	movq	$-1, %rdx
 	xorl	%eax, %eax
@@ -2532,7 +2610,7 @@ LBB17_36:
 	movq	%rax, %rbx
 	subq	$16, %rsp
 	movq	%r15, (%rsp)
-	leaq	L_.str.20(%rip), %rcx
+	leaq	L_.str.21(%rip), %rcx
 	leaq	-1056(%rbp), %r14
 	movl	$0, %esi
 	movl	$1008, %edx             ## imm = 0x3F0
@@ -2553,7 +2631,7 @@ LBB17_36:
 	testl	%eax, %eax
 	jne	LBB17_37
 ## BB#38:
-	leaq	L_str.42(%rip), %rdi
+	leaq	L_str.44(%rip), %rdi
 	callq	_puts
 	movq	%r12, _fileName(%rip)
 	leaq	_pathToMainFile(%rip), %r14
@@ -2568,7 +2646,7 @@ LBB17_36:
 	movq	%rsp, %r13
 	subq	%rax, %r13
 	movq	%r13, %rsp
-	leaq	L_.str.23(%rip), %rcx
+	leaq	L_.str.24(%rip), %rcx
 	movl	$0, %esi
 	movq	$-1, %rdx
 	xorl	%eax, %eax
@@ -2576,13 +2654,13 @@ LBB17_36:
 	movq	%r14, %r8
 	movq	%r12, %r9
 	callq	___sprintf_chk
-	leaq	L_.str.13(%rip), %rsi
+	leaq	L_.str.14(%rip), %rsi
 	movq	%r13, %rdi
 	callq	_fopen
 	movq	%rax, %rbx
 	testq	%rbx, %rbx
 	je	LBB17_47
-## BB#39:                               ## %.thread
+## BB#39:                               ## %.thread20
 	movq	%r12, -1080(%rbp)       ## 8-byte Spill
 	movq	%r15, %rsp
 	movq	-1088(%rbp), %r12       ## 8-byte Reload
@@ -2592,7 +2670,7 @@ LBB17_50:
 	movq	%r14, -1072(%rbp)       ## 8-byte Spill
 	movq	%rbx, _fileName(%rip)
 LBB17_51:
-	leaq	L_.str.13(%rip), %rsi
+	leaq	L_.str.14(%rip), %rsi
 	movq	%rbx, %rdi
 	callq	_fopen
 	movq	%rax, %rbx
@@ -2629,10 +2707,10 @@ LBB17_40:
 	movl	$1, %eax
 	cmovgq	%rcx, %rax
 	movq	%rax, _numberOfBuffer(%rip)
-	leaq	L_.str.24(%rip), %r14
+	leaq	L_.str.25(%rip), %r14
 	movq	___stdinp@GOTPCREL(%rip), %r15
 	leaq	-1056(%rbp), %rbx
-	leaq	L_.str.25(%rip), %r13
+	leaq	L_.str.26(%rip), %r13
 	xorl	%r12d, %r12d
 	.align	4, 0x90
 LBB17_41:                               ## =>This Loop Header: Depth=1
@@ -2713,10 +2791,10 @@ LBB17_59:                               ## %readString.exit
                                         ##   in Loop: Header=BB17_41 Depth=1
 	cmpl	$99, %eax
 	jne	LBB17_41
-LBB17_61:                               ## %.thread20.loopexit
+LBB17_61:                               ## %.thread22.loopexit
 	movb	$1, %r12b
-LBB17_62:                               ## %.thread20
-	leaq	L_.str.26(%rip), %rdi
+LBB17_62:                               ## %.thread22
+	leaq	L_.str.27(%rip), %rdi
 	xorl	%ebx, %ebx
 	xorl	%eax, %eax
 	callq	_printf
@@ -2768,7 +2846,7 @@ LBB17_69:                               ## %.preheader3.i.15
 	cmpl	$10, %eax
 	jne	LBB17_71
 LBB17_73:                               ## %readString.exit19
-	leaq	L_.str.25(%rip), %rdi
+	leaq	L_.str.26(%rip), %rdi
 	xorl	%eax, %eax
 	callq	_printf
 	movw	(%r14), %di
@@ -2841,7 +2919,7 @@ LBB17_79:
 	callq	_decode
 LBB17_80:
 	movq	-1064(%rbp), %r14       ## 8-byte Reload
-	leaq	L_str.40(%rip), %rdi
+	leaq	L_str.42(%rip), %rdi
 	callq	_puts
 	movq	%rbx, %rdi
 	callq	_fclose
@@ -2862,7 +2940,7 @@ LBB17_85:
 	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
 	movq	(%rcx), %rcx
 	cmpq	-48(%rbp), %rcx
-	jne	LBB17_89
+	jne	LBB17_90
 ## BB#86:
 	leaq	-40(%rbp), %rsp
 	popq	%rbx
@@ -2880,7 +2958,7 @@ LBB17_32:
 LBB17_47:
 	movq	%r13, %rdi
 	callq	_perror
-	leaq	L_str.47(%rip), %rdi
+	leaq	L_str.49(%rip), %rdi
 	callq	_puts
 	movq	%r15, %rsp
 	movl	$1, %eax
@@ -2888,33 +2966,33 @@ LBB17_47:
 LBB17_52:
 	movq	8(%r13), %rdi
 	callq	_perror
-	leaq	L_str.47(%rip), %rdi
+	leaq	L_str.49(%rip), %rdi
 	callq	_puts
 	movl	$1, %eax
 	jmp	LBB17_85
-LBB17_88:
+LBB17_89:
 	xorl	%edi, %edi
 	callq	_usage
 LBB17_87:
 	movl	$1, %edi
 	callq	_usage
-LBB17_89:
+LBB17_90:
 	callq	___stack_chk_fail
 LBB17_37:
-	leaq	L_str.44(%rip), %rdi
+	leaq	L_str.46(%rip), %rdi
 	jmp	LBB17_26
 LBB17_25:
-	leaq	L_str.46(%rip), %rdi
+	leaq	L_str.48(%rip), %rdi
 LBB17_26:
 	callq	_puts
-	leaq	L_str.47(%rip), %rdi
+	leaq	L_str.49(%rip), %rdi
 	callq	_puts
 	movl	$1, %edi
 	callq	_exit
 LBB17_12:
 	movq	24(%r13), %rdi
 	jmp	LBB17_13
-LBB17_19:
+LBB17_20:
 	movq	16(%r13), %rdi
 LBB17_13:
 	callq	_perror
@@ -2950,7 +3028,7 @@ Ltmp88:
 	movq	%rdx, 16(%rsp)
 	movq	%rdx, 8(%rsp)
 	movq	%rdx, (%rsp)
-	leaq	L_.str.32(%rip), %rsi
+	leaq	L_.str.33(%rip), %rsi
 	xorl	%eax, %eax
 	movq	%rdx, %r8
 	movq	%rdx, %r9
@@ -2959,7 +3037,7 @@ Ltmp88:
 	movl	%ebx, %edi
 	callq	_exit
 LBB18_2:
-	leaq	L_.str.33(%rip), %rsi
+	leaq	L_.str.34(%rip), %rsi
 	xorl	%eax, %eax
 	callq	_fprintf
 	movl	%ebx, %edi
@@ -2971,12 +3049,14 @@ LBB18_2:
 .zerofill __DATA,__bss,_seed.0,8,4      ## @seed.0
 .zerofill __DATA,__bss,_seed.1,8,3      ## @seed.1
 .zerofill __DATA,__bss,_scrambleAsciiTables,4096,4 ## @scrambleAsciiTables
+.zerofill __DATA,__bss,_usingKeyFile,1,0 ## @usingKeyFile
 	.comm	_passPhrase,16384,4     ## @passPhrase
+.zerofill __DATA,__bss,_scramblingTablesOrder,16384,4 ## @scramblingTablesOrder
 .zerofill __DATA,__bss,_unscrambleAsciiTables,4096,4 ## @unscrambleAsciiTables
 .zerofill __DATA,__bss,_isCodingInverted,1,0 ## @isCodingInverted
 .zerofill __DATA,__bss,_fileName,8,3    ## @fileName
 	.section	__TEXT,__cstring,cstring_literals
-L_.str:                                 ## @.str
+L_.str.1:                               ## @.str.1
 	.asciz	"%sx%s"
 
 	.section	__DATA,__data
@@ -2985,112 +3065,116 @@ _pathToMainFile:
 	.asciz	"./\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
 
 	.section	__TEXT,__cstring,cstring_literals
-L_.str.1:                               ## @.str.1
+L_.str.2:                               ## @.str.2
 	.asciz	"w+"
 
 .zerofill __DATA,__bss,_scrambling,1,0  ## @scrambling
 .zerofill __DATA,__bss,_numberOfBuffer,8,3 ## @numberOfBuffer
 .zerofill __DATA,__bss,__isADirectory,1,0 ## @_isADirectory
-L_.str.4:                               ## @.str.4
+L_.str.5:                               ## @.str.5
 	.asciz	"x%s"
 
-L_.str.7:                               ## @.str.7
+L_.str.8:                               ## @.str.8
 	.asciz	"stat"
 
 .zerofill __DATA,__bss,_progName,8,3    ## @progName
-L_.str.9:                               ## @.str.9
+L_.str.10:                              ## @.str.10
 	.asciz	"-h"
 
-L_.str.10:                              ## @.str.10
+L_.str.11:                              ## @.str.11
 	.asciz	"--help"
 
-L_.str.11:                              ## @.str.11
+L_.str.12:                              ## @.str.12
 	.asciz	"-s"
 
-L_.str.12:                              ## @.str.12
+L_.str.13:                              ## @.str.13
 	.asciz	"--standard"
 
-L_.str.13:                              ## @.str.13
+L_.str.14:                              ## @.str.14
 	.asciz	"r"
 
-L_.str.15:                              ## @.str.15
+L_.str.16:                              ## @.str.16
 	.asciz	"-i"
 
-L_.str.16:                              ## @.str.16
+L_.str.17:                              ## @.str.17
 	.asciz	"--inverted"
 
-L_.str.18:                              ## @.str.18
+L_.str.19:                              ## @.str.19
 	.asciz	"regrouping the folder in one file using tar, may be long..."
 
-L_.str.19:                              ## @.str.19
+L_.str.20:                              ## @.str.20
 	.asciz	"%s.tar"
 
-L_.str.20:                              ## @.str.20
+L_.str.21:                              ## @.str.21
 	.asciz	"cd %s && tar -cf %s %s &>/dev/null"
 
-L_.str.23:                              ## @.str.23
+L_.str.24:                              ## @.str.24
 	.asciz	"%s%s"
 
-L_.str.24:                              ## @.str.24
+L_.str.25:                              ## @.str.25
 	.asciz	"Crypt(C) or Decrypt(d):"
 
-L_.str.25:                              ## @.str.25
+L_.str.26:                              ## @.str.26
 	.asciz	"\033[F\033[J"
 
-L_.str.26:                              ## @.str.26
+L_.str.27:                              ## @.str.27
 	.asciz	"Password:"
 
 .zerofill __DATA,__bss,_loadBar.firstCall,1,0 ## @loadBar.firstCall
 .zerofill __DATA,__bss,_loadBar.startingTime,8,3 ## @loadBar.startingTime
-L_.str.28:                              ## @.str.28
+L_.str.29:                              ## @.str.29
 	.asciz	" %3d%% ["
 
-L_.str.31:                              ## @.str.31
-	.asciz	"] %.0f        \r"
-
 L_.str.32:                              ## @.str.32
-	.asciz	"%s(1)\t\t\tcopyright <Pierre-Fran\303\247ois Monville>\t\t\t%s(1)\n\nNAME\n\t%s -- crypt or decrypt any data\n\nSYNOPSIS\n\t%s [-h | --help] FILE [-s | --standard | KEYFILE]\n\nDESCRIPTION\n\t(FR) permet de chiffrer et de d\303\251chiffrer toutes les donn\303\251es entr\303\251es en param\303\250tre le mot de passe demand\303\251 au d\303\251but est hash\303\251 puis sert de graine pour le PRNG le PRNG permet de fournir une cl\303\251 unique \303\251gale \303\240 la longueur du fichier \303\240 coder. La cl\303\251 unique subit un xor avec le mot de passe (le mot de passe est r\303\251p\303\251t\303\251 autant de fois que n\303\251c\303\251ssaire). Le fichier subit un xor avec cette cl\303\251 Puis un brouilleur est utilis\303\251, il m\303\251lange la table des caract\303\250res (ascii) en utilisant le PRNG ou en utilisant le keyFile fourni.\n\t(EN) Can crypt and decrypt any data given in argument. The password asked is hashed to be used as a seed for the PRNG. The PRNG gives a unique key which has the same length as the source file. The key is xored with the password (the password is repeated as long as necessary). The file is then xored with this new key, then a scrambler is used. It scrambles the ascii table using the PRNG or the keyFile given\n\nOPTIONS\n\tthe options are as follows:\n\n\t-h | --help\tfurther help.\n\n\t-s | --standard\tput the scrambler on off.\n\n\t-i | --inverted\tinverts the coding/decoding process, first it xors then it scrambles.\n\nEXIT STATUS\n\tthe %s program exits 0 on success, and anything else if an error occurs.\n\nEXAMPLES\n\tthe command:\t%s file1\n\n\tlets you choose between crypting or decrypting then it will prompt for a password that crypt/decrypt file1 as xfile1 in the same folder, file1 is not modified.\n\n\tthe command:\t%s file2 keyfile1\n\n\tlets you choose between crypting or decrypting, will prompt for the password that crypt/decrypt file2, uses keyfile1 to generate the scrambler then crypt/decrypt file2 as file2x in the same folder, file2 is not modified.\n\n\tthe command:\t%s file3 -s\n\n\tlets you choose between crypting or decrypting, will prompt for a password that crypt/decrypt the file without using the scrambler, resulting in using the unique key only.\n"
+	.asciz	"] %.0f        \r"
 
 L_.str.33:                              ## @.str.33
-	.asciz	"Usage : %s [-h | --help] FILE [-s | --standard | -i | --inverted] [KEYFILE]\nOptions :\n  -h --help :\t\tfurther help\n  -s --standard :\tput the scrambler off\n  -i --inverted :\tinverts the coding/decoding process\n  KEYFILE :\t\tpath to a keyfile that generates the scrambler instead of the password\n"
+	.asciz	"%s(1)\t\t\tcopyright <Pierre-Fran\303\247ois Monville>\t\t\t%s(1)\n\nNAME\n\t%s -- crypt or decrypt any data\n\nSYNOPSIS\n\t%s [-h | --help] FILE [-s | --standard | KEYFILE]\n\nDESCRIPTION\n\t(FR) permet de chiffrer et de d\303\251chiffrer toutes les donn\303\251es entr\303\251es en param\303\250tre le mot de passe demand\303\251 au d\303\251but est hash\303\251 puis sert de graine pour le PRNG le PRNG permet de fournir une cl\303\251 unique \303\251gale \303\240 la longueur du fichier \303\240 coder. La cl\303\251 unique subit un xor avec le mot de passe (le mot de passe est r\303\251p\303\251t\303\251 autant de fois que n\303\251c\303\251ssaire). Le fichier subit un xor avec cette cl\303\251 Puis un brouilleur est utilis\303\251, il m\303\251lange la table des caract\303\250res (ascii) en utilisant le PRNG ou en utilisant le keyFile fourni.\n\t(EN) Can crypt and decrypt any data given in argument. The password asked is hashed to be used as a seed for the PRNG. The PRNG gives a unique key which has the same length as the source file. The key is xored with the password (the password is repeated as long as necessary). The file is then xored with this new key, then a scrambler is used. It scrambles the ascii table using the PRNG or the keyFile given\n\nOPTIONS\n\tthe options are as follows:\n\n\t-h | --help\tfurther help.\n\n\t-s | --standard\tput the scrambler on off.\n\n\t-i | --inverted\tinverts the coding/decoding process, first it xors then it scrambles.\n\n\tKEYFILE    \tthe path to a file which will be used to scramble the substitution's tables and choose in which order they will be used instead of the PRNG only (starting at 2.5 ko for the keyfile is great, however not interesting to be too heavy) \n\nEXIT STATUS\n\tthe %s program exits 0 on success, and anything else if an error occurs.\n\nEXAMPLES\n\tthe command:\t%s file1\n\n\tlets you choose between crypting or decrypting then it will prompt for a password that crypt/decrypt file1 as xfile1 in the same folder, file1 is not modified.\n\n\tthe command:\t%s file2 keyfile1\n\n\tlets you choose between crypting or decrypting, will prompt for the password that crypt/decrypt file2, uses keyfile1 to generate the scrambler then crypt/decrypt file2 as file2x in the same folder, file2 is not modified.\n\n\tthe command:\t%s file3 -s\n\n\tlets you choose between crypting or decrypting, will prompt for a password that crypt/decrypt the file without using the scrambler, resulting in using the unique key only.\n"
+
+L_.str.34:                              ## @.str.34
+	.asciz	"Version : 2.3\nUsage : %s [-h | --help] FILE [-s | --standard | -i | --inverted] [KEYFILE]\nOptions :\n  -h --help :\t\tfurther help\n  -s --standard :\tput the scrambler off\n  -i --inverted :\tinverts the coding/decoding process\n  KEYFILE :\t\tpath to a keyfile that scrambles the substitution's tables and choose they order instead of the PRNG only\n"
 
 	.align	4                       ## @str
 L_str:
-	.asciz	"starting encryption..."
+	.asciz	"scrambling substitution's tables..."
 
 	.align	4                       ## @str.35
 L_str.35:
-	.asciz	"starting decryption..."
+	.asciz	"starting encryption..."
 
-	.align	4                       ## @str.38
-L_str.38:
-	.asciz	"error: file's path is not correct, one or several directories and or file are missing"
+	.align	4                       ## @str.37
+L_str.37:
+	.asciz	"starting decryption..."
 
 	.align	4                       ## @str.40
 L_str.40:
-	.asciz	"Done                                                                  "
+	.asciz	"error: file's path is not correct, one or several directories and or file are missing"
 
 	.align	4                       ## @str.42
 L_str.42:
-	.asciz	"\rregrouping the folder in one file using tar... Done          "
+	.asciz	"Done                                                                  "
 
 	.align	4                       ## @str.44
 L_str.44:
-	.asciz	"\nerror: unable to tar your file"
+	.asciz	"\rregrouping the folder in one file using tar... Done          "
 
 	.align	4                       ## @str.46
 L_str.46:
+	.asciz	"\nerror: unable to tar your file"
+
+	.align	4                       ## @str.48
+L_str.48:
 	.asciz	"error: several trailing '/' in the path of your file"
 
-L_str.47:                               ## @str.47
+L_str.49:                               ## @str.49
 	.asciz	"exiting"
 
-	.align	4                       ## @str.49
-L_str.49:
+	.align	4                       ## @str.51
+L_str.51:
 	.asciz	"Warning: with the -s|--standard option, the keyfile will not bu used"
 
-	.align	4                       ## @str.50
-L_str.50:
+	.align	4                       ## @str.52
+L_str.52:
 	.asciz	"Error: Too many arguments"
 
 

programming_language: Batchfile