memory.dll
memory.dll copied to clipboard
[Suggestion] 3 additional CreateCodeCave methods
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.
@hollow87