Skip to content

Commit

Permalink
fix spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
zecoxao committed Jun 2, 2022
1 parent 2a2b926 commit 7439a10
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pspdecrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) {
string outDir = "";
string outFile = "";
string preipl = "";
string logStr;
string logStr;
bool preiplSet = false;
u8 preiplBuf[MAX_PREIPL_SIZE];
u32 preiplSize = 0;
Expand Down Expand Up @@ -207,15 +207,15 @@ int main(int argc, char *argv[]) {
cout << "Input is an encrypted PSP executable encrypted with tag " << hex << setw(8) << *(u32*)&inData[0xD0] << endl;
} else {
int outSize = pspDecryptPRX((const u8*)inData, (u8 *)outData, size, nullptr, true);
u32 plainSize = (u32)*(u32_le *)&inData[0x28];
u8 out[plainSize];
if ((outData[0] == 0x1F && (u8)outData[1] == 0x8B) ||
u32 plainSize = (u32)*(u32_le *)&inData[0x28];
u8 out[plainSize];
if ((outData[0] == 0x1F && (u8)outData[1] == 0x8B) ||
memcmp(outData, "2RLZ", 4) == 0 || memcmp(outData, "KL4E", 4) == 0
|| memcmp(outData, "KL3E", 4) == 0){
pspDecompress((u8*)outData, outSize, out, plainSize, logStr, NULL);
WriteFile(outFile.c_str(), out, plainSize);
|| memcmp(outData, "KL3E", 4) == 0){
pspDecompress((u8*)outData, outSize, out, plainSize, logStr, NULL);
WriteFile(outFile.c_str(), out, plainSize);
}else {
WriteFile(outFile.c_str(), outData, outSize);
WriteFile(outFile.c_str(), outData, outSize);
}
}
break;
Expand Down

0 comments on commit 7439a10

Please sign in to comment.