https://github.com/archercreat/libx86
Simple library-wrapper around triton for emulation/disassembly
https://github.com/archercreat/libx86
cmkr cpp reverse-engineering triton
Last synced: 8 months ago
JSON representation
Simple library-wrapper around triton for emulation/disassembly
- Host: GitHub
- URL: https://github.com/archercreat/libx86
- Owner: archercreat
- Created: 2022-02-02T15:50:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-23T11:30:42.000Z (about 4 years ago)
- Last Synced: 2025-06-21T06:35:09.706Z (9 months ago)
- Topics: cmkr, cpp, reverse-engineering, triton
- Language: CMake
- Homepage:
- Size: 27.3 KB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# libx86
*libx86* is a simple library-wrapper around triton for emulation/disassembly that i use in my other projects.
## Usage
Usage can be found in `example` folder.
```c++
#include
#include
#include
int test()
{
int x = 0;
return x ^ 1337;
}
int main()
{
auto emu = x86::emulator( triton::arch::ARCH_X86_64 );
emu.map( 0, { (const uint8_t*)test, (const uint8_t*)test + 100 } );
auto r = x86::unroll( emu.api.get(), 0 );
r.dump();
emu.execute( r.stream );
auto ret = emu.value( triton::arch::ID_REG_X86_RAX );
std::printf( "rax: %lu\n", ret );
assert( ret == 1337 );
return EXIT_SUCCESS;
}
```