ryan-weil/Code-Cave — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small Windows C++ project that demonstrates code cave injection in a PE executable I own. I want to choose an input exe, have the tool find a gap of unused bytes, inject a simple MessageBoxA payload there, apply the needed relocations because the payload is position dependent, and save a patched copy instead of overwriting the original.

Keep it focused on the demo from the readme, not a general malware loader. The target file can be assumed to already import MessageBoxA, and if it doesn’t, the program should stop with a clear error instead of trying to edit the import table. Please add helpful console output so I can see what cave was used, where the payload was written, and whether relocations were applied. Include a short readme with build steps in Visual Studio, how to test it safely on a throwaway executable, and any limitations.

Want more depth? Deep Reverse