Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error allocating memory #5

Open
ByteLabDev opened this issue Feb 13, 2023 · 4 comments
Open

Error allocating memory #5

ByteLabDev opened this issue Feb 13, 2023 · 4 comments

Comments

@ByteLabDev
Copy link

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.

@ByteLabDev
Copy link
Author

image

@cw2k
Copy link
Owner

cw2k commented Feb 13, 2023

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.

@ByteLabDev
Copy link
Author

Oh I understand. Sorry I misunderstood this repository

@hexfactor
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants