Skip to content

Instantly share code, notes, and snippets.

@Pldare
Last active June 20, 2025 16:01
Show Gist options
  • Select an option

  • Save Pldare/fedad16367b105d96ec16914c76196cc to your computer and use it in GitHub Desktop.

Select an option

Save Pldare/fedad16367b105d96ec16914c76196cc to your computer and use it in GitHub Desktop.
some Orgesta Tool
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace Orgesta
{
internal class Program
{
static void Main(string[] args)
{
string file_path = args[0];
string file_name = Path.GetFileName(file_path);
using (FileStream fileStream = new FileStream(file_path, FileMode.Open))
{
byte[] salt = Encoding.UTF8.GetBytes(file_name);
string password = "!<iLGHKnNRWp0ai.";
using (var aes = new AesManaged())
{
aes.KeySize = 128;
aes.Mode = CipherMode.ECB;
aes.Padding = PaddingMode.None;
using (var deriveBytes = new PasswordDeriveBytes(password, salt))
{
aes.Key = deriveBytes.GetBytes(aes.KeySize / 8);
aes.IV = new byte[16];
using (var encryptor = aes.CreateEncryptor())
using (FileStream fs = File.Create(file_path + ".bundle"))
{
int blockSize = aes.BlockSize / 8;
byte[] buffer = new byte[4096];
byte[] cipherBlock = new byte[blockSize];
long blockCounter = 1;
while (true)
{
int bytesRead = fileStream.Read(buffer, 0, buffer.Length);
if (bytesRead == 0) break;
for (int i = 0; i < bytesRead; i++)
{
if (i % blockSize == 0)
{
byte[] counterBytes = new byte[blockSize];
BitConverter.GetBytes(blockCounter++).CopyTo(counterBytes, 0);
encryptor.TransformBlock(counterBytes, 0, blockSize, cipherBlock, 0);
}
buffer[i] ^= cipherBlock[i % blockSize];
}
fs.Write(buffer, 0, bytesRead);
}
}
}
}
}
}
}
}
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace saveDataDec
{
internal class Program
{
static void Main(string[] args)
{
string file_name = args[0];
Console.WriteLine(file_name);
//return;
using (FileStream fileStream = new FileStream(file_name, FileMode.Open))
{
byte[] array = new byte[fileStream.Length];
fileStream.Read(array, 0, array.Length);
byte[] decdata = Decrypt(array);
File.WriteAllBytes(file_name + ".DEC", decdata);
}
}
static byte[] Decrypt(byte[] binData)
{
RijndaelManaged rijndaelManaged = new RijndaelManaged();
rijndaelManaged.Padding = PaddingMode.Zeros;
rijndaelManaged.Mode = CipherMode.CBC;
rijndaelManaged.KeySize = 256;
rijndaelManaged.BlockSize = 128;
byte[] rgbKey = new byte[0];
byte[] rgbIV = new byte[0];
rgbKey = Encoding.UTF8.GetBytes("w5qdv9jr7a6is98235kiqvhuhfqncacf");
rgbIV = Encoding.UTF8.GetBytes("ptmcyvrtk2c83yji");
ICryptoTransform transform = rijndaelManaged.CreateDecryptor(rgbKey, rgbIV);
byte[] array = new byte[binData.Length];
new CryptoStream(new MemoryStream(binData), transform, CryptoStreamMode.Read).Read(array, 0, array.Length);
return array;
}
}
}
@Pldare
Copy link
Copy Markdown
Author

Pldare commented Jun 20, 2025

Prison Princess Tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment