I'm writing a handy reverse tool in C++ with manual assembling/disassembling shell, to automate my work!
I need an assembler library. Is there any library, embedding in C++?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.Sign up to join this community
Oleh Yuschuk released a light-weight open-source assembler library that you can download from http://ollydbg.de/srcdescr.htm
Function Assemble(), as expected, converts command from ASCII form to binary 32 bit code.
// Assemble one of the commands above. First try form with 32-bit immediate. pasm="ADD [DWORD 475AE0],1"; printf("%s:\n",pasm); j=Assemble(pasm,0x400000,&am,0,0,errtext); n=sprintf(s,"%3i ",j); for (i=0; i<j; i++) n+=sprintf(s+n,"%02X ",am.code[i]); if (j<=0) sprintf(s+n," error=\"%s\"",errtext); printf("%s\n",s);
You can take one of these projects (I choose the alphabetic order to sort them):
EDIT: Each of these projects either contains a library that can be used as it is, or can be wrapped into a library that you will have to code by yourself with the features that you request.