()
| 6 | class Program |
| 7 | { |
| 8 | static void Main() |
| 9 | { |
| 10 | string localLowPath = Path.Combine( |
| 11 | Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), |
| 12 | "AppData", "LocalLow"); |
| 13 | |
| 14 | string inputRoot = Path.Combine(localLowPath, "com_proximabeta", "NIKKE"); |
| 15 | string outputRoot = Path.Combine(Directory.GetCurrentDirectory(), "Decrypted"); |
| 16 | |
| 17 | foreach (string inputFile in Directory.GetFiles(inputRoot, "*", SearchOption.AllDirectories)) |
| 18 | { |
| 19 | string relativePath = Path.GetRelativePath(inputRoot, inputFile); |
| 20 | string outputFilePath = Path.Combine(outputRoot, relativePath); |
| 21 | |
| 22 | // those two will be ignored |
| 23 | if (inputFile.EndsWith("ApasRemoteConfig") || inputFile.EndsWith("LipassRemoteConfig")) |
| 24 | continue; |
| 25 | |
| 26 | Directory.CreateDirectory(Path.GetDirectoryName(outputFilePath)!); |
| 27 | |
| 28 | try |
| 29 | { |
| 30 | if (DecryptFile(inputFile, outputFilePath)) |
| 31 | Console.WriteLine($"Decrypted: {relativePath}"); |
| 32 | } |
| 33 | catch (Exception ex) |
| 34 | { |
| 35 | if (ex.Message.Contains("Invalid magic")) |
| 36 | continue; |
| 37 | Console.WriteLine($"Failed: {relativePath} => {ex.Message}"); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | Console.WriteLine("All files processed."); |
| 42 | } |
| 43 | |
| 44 | static bool DecryptFile(string inputPath, string outputPath) |
| 45 | { |
nothing calls this directly
no outgoing calls
no test coverage detected