Example Usage
#include <stdio.h>
#include "bddisasm/disasmtypes.h"
#include "bddisasm/bddisasm.h"
int nd_vsnprintf_s(
char *buffer,
size_t sizeOfBuffer,
size_t count,
const char *format,
va_list argptr
)
{
return vsnprintf(buffer, sizeOfBuffer, format, argptr);
}
void* nd_memset(void *s, int c, size_t n)
{
return memset(s, c, n);
}
int main()
{
INSTRUX ix;
uint8_t code[] = { 0x48, 0x8B, 0x48, 0x28 };
NDSTATUS status = NdDecodeEx(&ix, code, sizeof(code), ND_CODE_64, ND_DATA_64);
// Check if decoding failed.
if (!ND_SUCCESS(status))
{
printf("Decode failed with error %x!\n", status);
return -1;
}
// Checking if the instruction is a MOV.
if (ix.Instruction == ND_INS_MOV)
{
printf("The instruction is mov!\n");
}
// Checking if memory is read by the instruction.
if (!!(ix.MemoryAccess & ND_ACCESS_ANY_READ))
{
printf("The instruction reads memory!\n");
}
// Checking if the destination is the RCX register.
if (ND_IS_OP_REG(&ix.Operands[0], ND_REG_GPR, 8, NDR_RCX))
{
printf("The first op is RCX!\n");
}
// Checking if the source is memory.
i
See also
GH-Offset-Dumper
Free
Scan signatures and netvars. Dumps header files, cheat tables and ReClass files.…
mitmproxy2swagger
Free
Automagically reverse-engineer REST APIs via capturing traffic…
Angr
Open Source
Python binary analysis framework supporting both static and dynamic symbolic execution (concolic exe…
NebulaFD
Free
A work in progress, reimagined decompiler for Clickteam Fusion.…
AAIdrive
Open Source
Implementations of some Android Auto features as unofficial IDrive apps…
omni
Open Source
A modern zero-allocation C++23 library for working with low-level Windows within user-space. Iterati…