Skip to content

Curve/lime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

221 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘‹ Introduction

Lime is a cross-platform library that is focused on game modding and tries to provide you with useful features for your journey.

πŸ—’οΈ Features

  • 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
  • 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).

βš™οΈ Configuration

Cross-Platform Entrypoint

set(lime_entrypoint "Static" / "Platform")

Default is: Disabled

πŸ“¦ Installation

  • 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)

πŸ“– Examples

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

🌐 Who's using Lime

Extend the list!

Footnotes

  1. It is not possible to accurately determine the previous instruction, thus lime will return possible candidates. ↩