MCPcopy Create free account
hub / github.com/Sinflower/UberWolf / removeProtectionFromProject

Method removeProtectionFromProject

UberWolfLib/WolfPro.cpp:566–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566std::vector<uint8_t> WolfPro::removeProtectionFromProject(const tString& filePath, const uint32_t& seed) const
567{
568 std::vector<uint8_t> bytes;
569 uint32_t fileSize;
570
571#ifdef PRINT_DEBUG
572 INFO_LOG << std::format(TEXT("Decrypting: {} ..."), filePath) << std::endl;
573#endif
574
575 if (!readFile(filePath, bytes, fileSize)) return bytes;
576
577 srand(seed);
578
579 for (uint8_t& byte : bytes)
580 byte ^= static_cast<uint8_t>(rand());
581
582 return bytes;
583}
584
585std::vector<uint8_t> WolfPro::removeProtectionFromDat(const tString& filePath, const BasicDataFiles& bdf, uint32_t& projectSeed) const
586{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected