There is a game inside which you can take photos of your character and send them to the server. I want to replace these images with mine. The images are stored in the game in JPEG format, I can find the address of the captured image before uploading. I was modifying this memory, then posting the image to the server. As a result, corrupted photos were uploaded to the profile (see attachment). That is, the replacement works, and now I need to replace approximately 500Kb of data with a pre-rendered image. With the help of which GG function can such long memory sections be replaced?