memory.dll icon indicating copy to clipboard operation
memory.dll copied to clipboard

[Suggestion] 3 additional CreateCodeCave methods

Open marcusx2 opened this issue 5 years ago • 1 comments

public UIntPtr CreateCodeCave(string code, string newBytes, int replaceCount, int size = 4096, string file = "");
public UIntPtr CreateCodeCaveCall(string code, string newBytes, int replaceCount, int size = 4096, string file = "");
public UIntPtr CreateCodeCaveCall(string code, byte[] newBytes, int replaceCount, int size = 4096, string file = "");

So the first method is an overload, that accepts a string with the bytes. Similar to how writing a byte array works, for consistency and convenience(on Cheat Engine at least, when you copy bytes it comes on the form of a string, ready to use on the writeMemory function).

The other 2 methods are for creating a code cave using a call instruction instead of a jump instruction, for convenience. Sometimes I will create a trampoline where used to be a call instruction, so I just like to keep it as a call instead of converting to a jump.

marcusx2 avatar Jun 24 '20 02:06 marcusx2

@hollow87

erfg12 avatar Mar 18 '21 17:03 erfg12