Что-то вроде:
[Редактировать: добавлены необходимые заголовки:]
#include <fstream>
#include <algorithm>
#include <vector>
#include <ios>
// define some place to hold the data:
std::vector<char> binary_data;
// open the file and make sure we read it intact:
std::ifstream file("filename.exe", std::ios::binary);
file.unsetf(std::ios_base::skipws);
// read data from file into vector:
std::copy(std::istream_iterator<char>(file),
std::istream_iterator<char>(),
std::back_inserter(binary_data));
// Edit the binary data as needed...
// create new file:
std::ofstream new_file("new_file.exe", std::ios::binary);
// Write data from vector to new file:
std::copy(binary_data.begin(),
binary_data.end(),
std::ostream_iterator<char>(new_file));
Это довольно элементарный C ++, но я сразу предполагаю, что вы на самом деле не готовы заниматься шифрованием, если не знаете этого.