Lime is a cross-platform library that is focused on game modding and tries to provide you with useful features for your journey.
- Detours
- x86/x86-64
- Lambda support
- Cross-Platform Calling Convention support (extendable!)
- Instruction
- Get next / prev1 instruction
- Get immediates, displacement, size, mnemonic
- Calculate absolute target (follow relative instructions...)
- Memory Pages
- Allocate pages
- Anywhere
- Exactly at specified address
- In Β±2GB range of specified address
- Update / Restore protection
- Allocate pages
- Libraries
- Iterate Loaded Libraries
- Iterate Symbols
- Load Libraries
- Address
- Read / Write Data
- Signature Scanner
- Supports Traditional & IDA Signatures
- Cross-Platform Entrypoint
- [MinGW] Proxy-DLL Generation
Note
Lime follows RAII so you won't have to care about manually cleaning anything up (i.e. when allocating a page).
set(lime_entrypoint "Static" / "Platform")Default is:
Disabled
-
Using CPM
CPMFindPackage( NAME lime VERSION 7.0.0 GIT_REPOSITORY "https://github.com/Curve/lime" )
-
Using FetchContent
include(FetchContent) FetchContent_Declare(lime GIT_REPOSITORY "https://github.com/Curve/lime" GIT_TAG v7.0.0) FetchContent_MakeAvailable(lime) target_link_libraries(<target> cr::lime)
lime::make_hook(func, [](auto &hook, int param) {
return std::move(hook).reset()(param + 10);
});
using enum lime::calling_convention;
lime::make_hook<int(void *), cc_fastcall>(0xDEADBEEF, [](auto &hook, void* self) {
return hook.original()(self);
});For more examples see tests
Footnotes
-
It is not possible to accurately determine the previous instruction, thus lime will return possible candidates. β©