|
|
|
#1
|
|||
|
|||
|
It took me a while but I understood haha, thanks. the only downside is that the quickbms executable is 19.3 MB and compressed 3.79 MB, this will overshadow almost all the gain I will have by decrypting the data.pak. But do what you know...that's life. If someone could create a C++ program from this BMS script, the executable would not exceed 100kb....
|
| Sponsored Links |
|
#2
|
||||
|
||||
|
Quote:
Even though I've only ever dabbled in python scripting, writing a C++ application proved to be quite simple, here's the source code: Code:
#include <fstream>
#include <vector>
#include <cstdint>
#include <iostream>
uint8_t reencrypt_byte(uint8_t d) {
return (d < 128) ? (d * 2)
: static_cast<uint8_t>(2 * d - 255);
}
int main(int argc, char* argv[]) {
if (argc != 3) {
std::cerr << "Usage: reenc <infile> <outfile>\n";
return 1;
}
// Read input file
std::ifstream fin(argv[1], std::ios::binary);
if (!fin) { perror("Error opening input"); return 1; }
std::vector<uint8_t> buf((std::istreambuf_iterator<char>(fin)),
std::istreambuf_iterator<char>());
// Transform in place
for (auto &b : buf) {
b = reencrypt_byte(b);
}
// Write output file
std::ofstream fout(argv[2], std::ios::binary);
if (!fout) { perror("Error opening output"); return 1; }
fout.write(reinterpret_cast<char*>(buf.data()), buf.size());
return 0;
}
Last edited by L33THAK0R; 24-04-2025 at 08:34. |
|
#3
|
|||
|
|||
|
Couldn't you (if it's not too much to ask) simply produce a tool that looks like this pak_enc_dec that can be put in a chain like this: -mpak_enc_dec+oggre+srep+msc+lolz.
To be honest, your program I don't understand how it works. and it also has a dependency on dlls - which is not a big problem since when compressed it drops from 1.50mb to 343kb... Sorry if I'm being noob in any way. Last edited by teusma; 24-04-2025 at 19:44. |
|
#4
|
||||
|
||||
|
Quote:
|
|
#5
|
|||
|
|||
|
forget it, I managed to create myself (with the help of AI) a tool(with only 29kb) that can be used like this: -mpak+oggre+srep+msc+lolz reaching all types
of files inside the data.pak already decrypted. this ambition I had to make this repack was more for sport - because it doesn't save much space - due to the amount of .ogg and .wav being small, but even so it was a delight to compress after applying the decryption. I'll leave the tool here for anyone who wants to use it too: Last edited by teusma; 10-05-2025 at 18:14. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Borderlands 2 GOTY | omdj | PC Games - CD/DVD Conversions | 12 | 07-06-2026 22:52 |
| Tom Clancy's Splinter Cell Conviction | Faks | PC Games - Protection List | 3 | 03-06-2010 02:10 |
| Having a nightmare with Iomega USB ZipCD - Help! | Tranced | CD/DVD-Writers | 2 | 03-04-2005 06:00 |
| PMA Update failure....????????? | dannyk | DVD Backup Forum | 1 | 05-01-2005 14:19 |
| HELP ME PLZ!!!! | Dalvin | DC Games | 0 | 02-01-2001 22:15 |