diff --git a/uppsrc/plugin/ndisasm/build_info.h b/uppsrc/plugin/ndisasm/build_info.h new file mode 100644 index 000000000..8d56cc62c --- /dev/null +++ b/uppsrc/plugin/ndisasm/build_info.h @@ -0,0 +1,9 @@ +#define bmYEAR 2016 +#define bmMONTH 3 +#define bmDAY 6 +#define bmHOUR 14 +#define bmMINUTE 3 +#define bmSECOND 5 +#define bmTIME Time(2016, 3, 6, 14, 3, 5) +#define bmMACHINE "MAIN" +#define bmUSER "cxl" diff --git a/uppsrc/plugin/ndisasm/ndisupp.cpp b/uppsrc/plugin/ndisasm/ndisupp.cpp index e4156d484..a24d0f45d 100644 --- a/uppsrc/plugin/ndisasm/ndisupp.cpp +++ b/uppsrc/plugin/ndisasm/ndisupp.cpp @@ -3,6 +3,12 @@ #include "ndisasm.h" extern "C" { +#undef INT64_MIN +#undef INT64_MAX +#undef UINT64_MAX + +#include "lib/compiler.h" +#include "lib/inttypes.h" #include "lib/disasm.h" } @@ -18,4 +24,16 @@ int NDisassemble(char *output, const byte *data, uint64 offset, bool x64)// retu return len; } +#ifdef flagMAIN +CONSOLE_APP_MAIN +{ + long start = 0x4012f8, end = start + 256; + while(start < end) { + char line[NDISASM_OUTBUF_SIZE]; + start += NDisassemble(line, (const byte *)start, start); + puts(line); + } +} +#endif + END_UPP_NAMESPACE