Skip to content

Commit eeacbb1

Browse files
committed
Bug due to engine version detecting
1 parent 3b0b98c commit eeacbb1

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

AESKeys/Embers.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AES Keys for Embers
2+
3+
| Version | Key |
4+
| ----------------- | --------------------------------------------------------------------- |
5+
| | 0x86BABDD6D5151539445C30B6709999362EA51C91B6D4845DC302C27DF92E6EEA |

UEAESKeyFinder/Program.cs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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($"\nFound {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 ? $"\nFound {aesKeys.Count} AES Key in {took}ms" : $"\nFound {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
{

UEAESKeyFinder/Searcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public Dictionary<ulong, string> FindAllPattern(out long t)
252252
}
253253
}
254254
}
255-
else
255+
256256
{
257257
// Based on "?Callback@FEncryptionKeyRegistration@@SAXQEAE@Z"
258258
// https://github.com/EpicGames/UnrealEngine/blob/5df54b7ef1714f28fb5da319c3e83d96f0bedf08/Engine/Source/Runtime/Core/Public/Modules/ModuleManager.h#L841

0 commit comments

Comments
 (0)