My first ever C++ program lol... Modified your code a bit... But for some reason if I uncomment the XBLA.put(0x01); then it screws up the seekg pointer when doing recursive patches

Now at least it checks to make sure you're modifying the correct type of file.
CODE
#include
#include
using namespace std;
int main (int argc, char** argv) {
fstream XBLA;
for(int i = 1; i < argc; i++) {
XBLA.open (argv, ios::in);
if (!XBLA.is_open()) {
cout << "Couldn't find " << argv << endl;
return 1;
}
char * containerBuffer;
containerBuffer = new char [4];
XBLA.read(containerBuffer,4);
string container = containerBuffer;
if (container == "LIVE" || "PIRS")
{
char * buffer;
buffer = new char [50];
XBLA.seekp(0x237);
//XBLA.put(0x01);
XBLA.seekg(0x00000412);
XBLA.read(buffer, 50);
int i;
string title;
for(i = 0; i <= 50; i++)
{
if (((int)buffer) != 0)
{
title = title + buffer;
}
}
cout << title << " unlocked successfully!" << "\n";
XBLA.close();
}
}
return 0;
}