@@ -28,6 +28,7 @@ static void Main(string[] args)
2828 char method = ( char ) Console . Read ( ) ;
2929 string path ;
3030 string EngineVersion = "4.18.0" ;
31+ string saveName = "" ;
3132 switch ( method )
3233 {
3334 case '0' :
@@ -42,6 +43,7 @@ static void Main(string[] args)
4243 if ( p . ProcessName == ProcessName || p . Id . ToString ( ) == ProcessName )
4344 {
4445 Console . WriteLine ( $ "\n Found { p . ProcessName } ") ;
46+ saveName = p . ProcessName ;
4547 searcher = new Searcher ( p ) ;
4648 found = true ;
4749 break ;
@@ -72,6 +74,8 @@ static void Main(string[] args)
7274 return ;
7375 }
7476
77+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
78+
7579 game = new Process ( ) { StartInfo = { FileName = path } } ;
7680 game . Start ( ) ;
7781 Thread . Sleep ( 1000 ) ;
@@ -98,6 +102,8 @@ static void Main(string[] args)
98102 return ;
99103 }
100104
105+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
106+
101107 searcher = new Searcher ( File . ReadAllBytes ( path ) ) ;
102108 searcher . SetFilePath ( path ) ;
103109 EngineVersion = searcher . SearchEngineVersion ( ) ;
@@ -111,6 +117,9 @@ static void Main(string[] args)
111117 Console . Read ( ) ;
112118 Console . Read ( ) ;
113119 path = Console . ReadLine ( ) . Replace ( "\" " , "" ) ;
120+
121+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
122+
114123 if ( ! File . Exists ( path ) )
115124 {
116125 Console . ForegroundColor = ConsoleColor . Red ;
@@ -125,6 +134,9 @@ static void Main(string[] args)
125134 Console . Read ( ) ;
126135 Console . Read ( ) ;
127136 path = Console . ReadLine ( ) . Replace ( "\" " , "" ) ;
137+
138+ saveName = path . Split ( "\\ " ) [ path . Split ( "\\ " ) . Length - 1 ] ;
139+
128140 if ( ! File . Exists ( path ) )
129141 {
130142 Console . ForegroundColor = ConsoleColor . Red ;
@@ -139,25 +151,36 @@ static void Main(string[] args)
139151
140152 if ( aesKeys . Count > 0 )
141153 {
154+ string WriteToFile = "" ;
155+ string txt = aesKeys . Count == 1 ? $ "Found { aesKeys . Count } AES Key in { took } ms\n " : $ "Found { aesKeys . Count } AES Keys in { took } ms\n ";
156+
157+ WriteToFile += txt ;
158+
142159 Console . ForegroundColor = ConsoleColor . Green ;
143- Console . WriteLine ( aesKeys . Count == 1 ? $ " \n Found { aesKeys . Count } AES Key in { took } ms" : $ " \n Found { aesKeys . Count } AES Keys in { took } ms" ) ;
160+ Console . Write ( " \n " + txt ) ;
144161 Console . ForegroundColor = ConsoleColor . White ;
145162 int EngineVersionI = 17 ;
146163 if ( EngineVersion != "" ) EngineVersionI = Convert . ToInt32 ( EngineVersion . Split ( "." ) [ 1 ] ) ;
147164 if ( EngineVersionI < 18 )
148165 {
149166 foreach ( KeyValuePair < ulong , string > o in aesKeys )
150167 {
151- Console . WriteLine ( $ "{ aesKeys [ o . Key ] } at { o . Key } ") ;
168+ txt = $ "{ aesKeys [ o . Key ] } at { o . Key } \n ";
169+ Console . Write ( txt ) ;
170+ WriteToFile += txt ;
152171 } ;
153172 }
154173 else
155174 {
156175 foreach ( KeyValuePair < ulong , string > o in aesKeys )
157176 {
158- Console . WriteLine ( $ "{ aesKeys [ o . Key ] } ({ System . Convert . ToBase64String ( GetHex ( aesKeys [ o . Key ] [ 2 ..aesKeys [ o . Key ] . Length ] ) ) } ) at { o . Key } ") ;
177+ txt = $ "{ aesKeys [ o . Key ] } ({ System . Convert . ToBase64String ( GetHex ( aesKeys [ o . Key ] [ 2 ..aesKeys [ o . Key ] . Length ] ) ) } ) at { o . Key } \n ";
178+ Console . Write ( txt ) ;
179+ WriteToFile += txt ;
159180 } ;
160181 }
182+
183+ File . WriteAllText ( saveName + "_aes_keys.txt" , WriteToFile ) ;
161184 }
162185 else
163186 {
0 commit comments