Adobe-GenP
Adobe-GenP copied to clipboard
Error allocating memory
The tool seems to patch most of my files successfully, except for photoshop.exe (2023). Whenever it gets to that part, it crashes with the error:
Error allocating memory.

That's a 'known' bug. Patching process is extremely memory wasteful.
The whole file is read into memory. Converted to hex string and then a regular Expression search and replace is applied.
The hex string quirk is probably there because there maybe some problems when applying the regexp on the real binary data. As I know from Python that stupid string encoding / decoding thing is always I source for 'surprises'. In general I understood the idea and the examples however when it comes to 'real data' I mostly see that some unexpected byte mutations going on. Or maybe because there are limitation of the search string like it gets cut of after some /00 char.
I just decompiled the thing. Renamed the vars and functions and did some refracturing. As well as fully understood the code and saw it design weaknesses. But haven't the time and energy to do something about them and to improve it.
Oh I understand. Sorry I misunderstood this repository
@ByteLabDev Are you running the raw Adobe-GenP-3.0.au3 script or an executable?
If you're running the script directly, the problem might stem from the interpreter limiting the memory allocated to each script.
Compiling the script first as an executable (making sure to select x64) should solve it.