mirror of
https://github.com/x64dbg/testplugin.git
synced 2026-11-10 05:31:25 -10:00
Compare commits
1
Commits
v25
...
unicorn_porn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8352c2859 |
No files matched your search
@@ -382,6 +382,66 @@ bool cbGraph(int argc, char* argv[])
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "unicorn/unicorn.h"
|
||||
|
||||
bool cbUnicorn(int argc, char* argv[])
|
||||
{
|
||||
// code to be emulated
|
||||
#define X86_CODE32 "\x41\x4a" // INC ecx; DEC edx
|
||||
|
||||
// memory address where emulation starts
|
||||
duint address = 0x1000000;
|
||||
|
||||
uc_engine* uc;
|
||||
uc_err err;
|
||||
int r_ecx = 0x1234; // ECX register
|
||||
int r_edx = 0x7890; // EDX register
|
||||
|
||||
_plugin_logprintf("Emulate i386code\n");
|
||||
|
||||
// Initialize emulator in X86-32bit mode
|
||||
err = uc_open(UC_ARCH_X86, UC_MODE_32, &uc);
|
||||
if(err != UC_ERR_OK)
|
||||
{
|
||||
_plugin_logprintf("Failed on uc_open() with error returned: %u\n", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
// map 2MB memory for this emulation
|
||||
uc_mem_map(uc, address, 2 * 1024 * 1024, UC_PROT_ALL);
|
||||
|
||||
// write machine code to be emulated to memory
|
||||
if(uc_mem_write(uc, address, X86_CODE32, sizeof(X86_CODE32) - 1))
|
||||
{
|
||||
_plugin_logprintf("Failed to write emulation code to memory, quit!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// initialize machine registers
|
||||
uc_reg_write(uc, UC_X86_REG_ECX, &r_ecx);
|
||||
uc_reg_write(uc, UC_X86_REG_EDX, &r_edx);
|
||||
|
||||
// emulate code in infinite time & unlimited instructions
|
||||
err = uc_emu_start(uc, address, address + sizeof(X86_CODE32) - 1, 0, 0);
|
||||
if(err)
|
||||
{
|
||||
_plugin_logprintf("Failed on uc_emu_start() with error returned %u: %s\n",
|
||||
err, uc_strerror(err));
|
||||
}
|
||||
|
||||
// now print out some registers
|
||||
_plugin_logprintf("Emulation done. Below is the CPU context\n");
|
||||
|
||||
uc_reg_read(uc, UC_X86_REG_ECX, &r_ecx);
|
||||
uc_reg_read(uc, UC_X86_REG_EDX, &r_edx);
|
||||
_plugin_logprintf(">>> ECX = 0x%x\n", r_ecx);
|
||||
_plugin_logprintf(">>> EDX = 0x%x\n", r_edx);
|
||||
|
||||
uc_close(uc);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void testInit(PLUG_INITSTRUCT* initStruct)
|
||||
{
|
||||
_plugin_logprintf("[TEST] pluginHandle: %d\n", pluginHandle);
|
||||
@@ -393,6 +453,8 @@ void testInit(PLUG_INITSTRUCT* initStruct)
|
||||
_plugin_logputs("[TEST] error registering the \"grs\" command!");
|
||||
if(!_plugin_registercommand(pluginHandle, "graph", cbGraph, true))
|
||||
_plugin_logputs("[TEST] error registering the \"graph\" command!");
|
||||
if(!_plugin_registercommand(pluginHandle, "unicorn", cbUnicorn, false))
|
||||
_plugin_logputs("[TEST} error registering the \"unicorn\" command!");
|
||||
}
|
||||
|
||||
void testStop()
|
||||
@@ -400,6 +462,8 @@ void testStop()
|
||||
_plugin_unregistercommand(pluginHandle, "plugin1");
|
||||
_plugin_unregistercommand(pluginHandle, "DumpProcess");
|
||||
_plugin_unregistercommand(pluginHandle, "grs");
|
||||
_plugin_unregistercommand(pluginHandle, "graph");
|
||||
_plugin_unregistercommand(pluginHandle, "unicorn");
|
||||
_plugin_menuclear(hMenu);
|
||||
_plugin_menuclear(hMenuDisasm);
|
||||
_plugin_menuclear(hMenuDump);
|
||||
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
#ifndef UNICORN_ARM_H
|
||||
#define UNICORN_ARM_H
|
||||
|
||||
/* Unicorn Engine */
|
||||
/* By Nguyen Anh Quynh <[email protected]>, 2015 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201)
|
||||
#endif
|
||||
|
||||
//> ARM registers
|
||||
typedef enum uc_arm_reg
|
||||
{
|
||||
UC_ARM_REG_INVALID = 0,
|
||||
UC_ARM_REG_APSR,
|
||||
UC_ARM_REG_APSR_NZCV,
|
||||
UC_ARM_REG_CPSR,
|
||||
UC_ARM_REG_FPEXC,
|
||||
UC_ARM_REG_FPINST,
|
||||
UC_ARM_REG_FPSCR,
|
||||
UC_ARM_REG_FPSCR_NZCV,
|
||||
UC_ARM_REG_FPSID,
|
||||
UC_ARM_REG_ITSTATE,
|
||||
UC_ARM_REG_LR,
|
||||
UC_ARM_REG_PC,
|
||||
UC_ARM_REG_SP,
|
||||
UC_ARM_REG_SPSR,
|
||||
UC_ARM_REG_D0,
|
||||
UC_ARM_REG_D1,
|
||||
UC_ARM_REG_D2,
|
||||
UC_ARM_REG_D3,
|
||||
UC_ARM_REG_D4,
|
||||
UC_ARM_REG_D5,
|
||||
UC_ARM_REG_D6,
|
||||
UC_ARM_REG_D7,
|
||||
UC_ARM_REG_D8,
|
||||
UC_ARM_REG_D9,
|
||||
UC_ARM_REG_D10,
|
||||
UC_ARM_REG_D11,
|
||||
UC_ARM_REG_D12,
|
||||
UC_ARM_REG_D13,
|
||||
UC_ARM_REG_D14,
|
||||
UC_ARM_REG_D15,
|
||||
UC_ARM_REG_D16,
|
||||
UC_ARM_REG_D17,
|
||||
UC_ARM_REG_D18,
|
||||
UC_ARM_REG_D19,
|
||||
UC_ARM_REG_D20,
|
||||
UC_ARM_REG_D21,
|
||||
UC_ARM_REG_D22,
|
||||
UC_ARM_REG_D23,
|
||||
UC_ARM_REG_D24,
|
||||
UC_ARM_REG_D25,
|
||||
UC_ARM_REG_D26,
|
||||
UC_ARM_REG_D27,
|
||||
UC_ARM_REG_D28,
|
||||
UC_ARM_REG_D29,
|
||||
UC_ARM_REG_D30,
|
||||
UC_ARM_REG_D31,
|
||||
UC_ARM_REG_FPINST2,
|
||||
UC_ARM_REG_MVFR0,
|
||||
UC_ARM_REG_MVFR1,
|
||||
UC_ARM_REG_MVFR2,
|
||||
UC_ARM_REG_Q0,
|
||||
UC_ARM_REG_Q1,
|
||||
UC_ARM_REG_Q2,
|
||||
UC_ARM_REG_Q3,
|
||||
UC_ARM_REG_Q4,
|
||||
UC_ARM_REG_Q5,
|
||||
UC_ARM_REG_Q6,
|
||||
UC_ARM_REG_Q7,
|
||||
UC_ARM_REG_Q8,
|
||||
UC_ARM_REG_Q9,
|
||||
UC_ARM_REG_Q10,
|
||||
UC_ARM_REG_Q11,
|
||||
UC_ARM_REG_Q12,
|
||||
UC_ARM_REG_Q13,
|
||||
UC_ARM_REG_Q14,
|
||||
UC_ARM_REG_Q15,
|
||||
UC_ARM_REG_R0,
|
||||
UC_ARM_REG_R1,
|
||||
UC_ARM_REG_R2,
|
||||
UC_ARM_REG_R3,
|
||||
UC_ARM_REG_R4,
|
||||
UC_ARM_REG_R5,
|
||||
UC_ARM_REG_R6,
|
||||
UC_ARM_REG_R7,
|
||||
UC_ARM_REG_R8,
|
||||
UC_ARM_REG_R9,
|
||||
UC_ARM_REG_R10,
|
||||
UC_ARM_REG_R11,
|
||||
UC_ARM_REG_R12,
|
||||
UC_ARM_REG_S0,
|
||||
UC_ARM_REG_S1,
|
||||
UC_ARM_REG_S2,
|
||||
UC_ARM_REG_S3,
|
||||
UC_ARM_REG_S4,
|
||||
UC_ARM_REG_S5,
|
||||
UC_ARM_REG_S6,
|
||||
UC_ARM_REG_S7,
|
||||
UC_ARM_REG_S8,
|
||||
UC_ARM_REG_S9,
|
||||
UC_ARM_REG_S10,
|
||||
UC_ARM_REG_S11,
|
||||
UC_ARM_REG_S12,
|
||||
UC_ARM_REG_S13,
|
||||
UC_ARM_REG_S14,
|
||||
UC_ARM_REG_S15,
|
||||
UC_ARM_REG_S16,
|
||||
UC_ARM_REG_S17,
|
||||
UC_ARM_REG_S18,
|
||||
UC_ARM_REG_S19,
|
||||
UC_ARM_REG_S20,
|
||||
UC_ARM_REG_S21,
|
||||
UC_ARM_REG_S22,
|
||||
UC_ARM_REG_S23,
|
||||
UC_ARM_REG_S24,
|
||||
UC_ARM_REG_S25,
|
||||
UC_ARM_REG_S26,
|
||||
UC_ARM_REG_S27,
|
||||
UC_ARM_REG_S28,
|
||||
UC_ARM_REG_S29,
|
||||
UC_ARM_REG_S30,
|
||||
UC_ARM_REG_S31,
|
||||
|
||||
UC_ARM_REG_ENDING, // <-- mark the end of the list or registers
|
||||
|
||||
//> alias registers
|
||||
UC_ARM_REG_R13 = UC_ARM_REG_SP,
|
||||
UC_ARM_REG_R14 = UC_ARM_REG_LR,
|
||||
UC_ARM_REG_R15 = UC_ARM_REG_PC,
|
||||
|
||||
UC_ARM_REG_SB = UC_ARM_REG_R9,
|
||||
UC_ARM_REG_SL = UC_ARM_REG_R10,
|
||||
UC_ARM_REG_FP = UC_ARM_REG_R11,
|
||||
UC_ARM_REG_IP = UC_ARM_REG_R12,
|
||||
} uc_arm_reg;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
#ifndef UNICORN_ARM64_H
|
||||
#define UNICORN_ARM64_H
|
||||
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <[email protected]>, 2015 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201)
|
||||
#endif
|
||||
|
||||
//> ARM64 registers
|
||||
typedef enum uc_arm64_reg
|
||||
{
|
||||
UC_ARM64_REG_INVALID = 0,
|
||||
|
||||
UC_ARM64_REG_X29,
|
||||
UC_ARM64_REG_X30,
|
||||
UC_ARM64_REG_NZCV,
|
||||
UC_ARM64_REG_SP,
|
||||
UC_ARM64_REG_WSP,
|
||||
UC_ARM64_REG_WZR,
|
||||
UC_ARM64_REG_XZR,
|
||||
UC_ARM64_REG_B0,
|
||||
UC_ARM64_REG_B1,
|
||||
UC_ARM64_REG_B2,
|
||||
UC_ARM64_REG_B3,
|
||||
UC_ARM64_REG_B4,
|
||||
UC_ARM64_REG_B5,
|
||||
UC_ARM64_REG_B6,
|
||||
UC_ARM64_REG_B7,
|
||||
UC_ARM64_REG_B8,
|
||||
UC_ARM64_REG_B9,
|
||||
UC_ARM64_REG_B10,
|
||||
UC_ARM64_REG_B11,
|
||||
UC_ARM64_REG_B12,
|
||||
UC_ARM64_REG_B13,
|
||||
UC_ARM64_REG_B14,
|
||||
UC_ARM64_REG_B15,
|
||||
UC_ARM64_REG_B16,
|
||||
UC_ARM64_REG_B17,
|
||||
UC_ARM64_REG_B18,
|
||||
UC_ARM64_REG_B19,
|
||||
UC_ARM64_REG_B20,
|
||||
UC_ARM64_REG_B21,
|
||||
UC_ARM64_REG_B22,
|
||||
UC_ARM64_REG_B23,
|
||||
UC_ARM64_REG_B24,
|
||||
UC_ARM64_REG_B25,
|
||||
UC_ARM64_REG_B26,
|
||||
UC_ARM64_REG_B27,
|
||||
UC_ARM64_REG_B28,
|
||||
UC_ARM64_REG_B29,
|
||||
UC_ARM64_REG_B30,
|
||||
UC_ARM64_REG_B31,
|
||||
UC_ARM64_REG_D0,
|
||||
UC_ARM64_REG_D1,
|
||||
UC_ARM64_REG_D2,
|
||||
UC_ARM64_REG_D3,
|
||||
UC_ARM64_REG_D4,
|
||||
UC_ARM64_REG_D5,
|
||||
UC_ARM64_REG_D6,
|
||||
UC_ARM64_REG_D7,
|
||||
UC_ARM64_REG_D8,
|
||||
UC_ARM64_REG_D9,
|
||||
UC_ARM64_REG_D10,
|
||||
UC_ARM64_REG_D11,
|
||||
UC_ARM64_REG_D12,
|
||||
UC_ARM64_REG_D13,
|
||||
UC_ARM64_REG_D14,
|
||||
UC_ARM64_REG_D15,
|
||||
UC_ARM64_REG_D16,
|
||||
UC_ARM64_REG_D17,
|
||||
UC_ARM64_REG_D18,
|
||||
UC_ARM64_REG_D19,
|
||||
UC_ARM64_REG_D20,
|
||||
UC_ARM64_REG_D21,
|
||||
UC_ARM64_REG_D22,
|
||||
UC_ARM64_REG_D23,
|
||||
UC_ARM64_REG_D24,
|
||||
UC_ARM64_REG_D25,
|
||||
UC_ARM64_REG_D26,
|
||||
UC_ARM64_REG_D27,
|
||||
UC_ARM64_REG_D28,
|
||||
UC_ARM64_REG_D29,
|
||||
UC_ARM64_REG_D30,
|
||||
UC_ARM64_REG_D31,
|
||||
UC_ARM64_REG_H0,
|
||||
UC_ARM64_REG_H1,
|
||||
UC_ARM64_REG_H2,
|
||||
UC_ARM64_REG_H3,
|
||||
UC_ARM64_REG_H4,
|
||||
UC_ARM64_REG_H5,
|
||||
UC_ARM64_REG_H6,
|
||||
UC_ARM64_REG_H7,
|
||||
UC_ARM64_REG_H8,
|
||||
UC_ARM64_REG_H9,
|
||||
UC_ARM64_REG_H10,
|
||||
UC_ARM64_REG_H11,
|
||||
UC_ARM64_REG_H12,
|
||||
UC_ARM64_REG_H13,
|
||||
UC_ARM64_REG_H14,
|
||||
UC_ARM64_REG_H15,
|
||||
UC_ARM64_REG_H16,
|
||||
UC_ARM64_REG_H17,
|
||||
UC_ARM64_REG_H18,
|
||||
UC_ARM64_REG_H19,
|
||||
UC_ARM64_REG_H20,
|
||||
UC_ARM64_REG_H21,
|
||||
UC_ARM64_REG_H22,
|
||||
UC_ARM64_REG_H23,
|
||||
UC_ARM64_REG_H24,
|
||||
UC_ARM64_REG_H25,
|
||||
UC_ARM64_REG_H26,
|
||||
UC_ARM64_REG_H27,
|
||||
UC_ARM64_REG_H28,
|
||||
UC_ARM64_REG_H29,
|
||||
UC_ARM64_REG_H30,
|
||||
UC_ARM64_REG_H31,
|
||||
UC_ARM64_REG_Q0,
|
||||
UC_ARM64_REG_Q1,
|
||||
UC_ARM64_REG_Q2,
|
||||
UC_ARM64_REG_Q3,
|
||||
UC_ARM64_REG_Q4,
|
||||
UC_ARM64_REG_Q5,
|
||||
UC_ARM64_REG_Q6,
|
||||
UC_ARM64_REG_Q7,
|
||||
UC_ARM64_REG_Q8,
|
||||
UC_ARM64_REG_Q9,
|
||||
UC_ARM64_REG_Q10,
|
||||
UC_ARM64_REG_Q11,
|
||||
UC_ARM64_REG_Q12,
|
||||
UC_ARM64_REG_Q13,
|
||||
UC_ARM64_REG_Q14,
|
||||
UC_ARM64_REG_Q15,
|
||||
UC_ARM64_REG_Q16,
|
||||
UC_ARM64_REG_Q17,
|
||||
UC_ARM64_REG_Q18,
|
||||
UC_ARM64_REG_Q19,
|
||||
UC_ARM64_REG_Q20,
|
||||
UC_ARM64_REG_Q21,
|
||||
UC_ARM64_REG_Q22,
|
||||
UC_ARM64_REG_Q23,
|
||||
UC_ARM64_REG_Q24,
|
||||
UC_ARM64_REG_Q25,
|
||||
UC_ARM64_REG_Q26,
|
||||
UC_ARM64_REG_Q27,
|
||||
UC_ARM64_REG_Q28,
|
||||
UC_ARM64_REG_Q29,
|
||||
UC_ARM64_REG_Q30,
|
||||
UC_ARM64_REG_Q31,
|
||||
UC_ARM64_REG_S0,
|
||||
UC_ARM64_REG_S1,
|
||||
UC_ARM64_REG_S2,
|
||||
UC_ARM64_REG_S3,
|
||||
UC_ARM64_REG_S4,
|
||||
UC_ARM64_REG_S5,
|
||||
UC_ARM64_REG_S6,
|
||||
UC_ARM64_REG_S7,
|
||||
UC_ARM64_REG_S8,
|
||||
UC_ARM64_REG_S9,
|
||||
UC_ARM64_REG_S10,
|
||||
UC_ARM64_REG_S11,
|
||||
UC_ARM64_REG_S12,
|
||||
UC_ARM64_REG_S13,
|
||||
UC_ARM64_REG_S14,
|
||||
UC_ARM64_REG_S15,
|
||||
UC_ARM64_REG_S16,
|
||||
UC_ARM64_REG_S17,
|
||||
UC_ARM64_REG_S18,
|
||||
UC_ARM64_REG_S19,
|
||||
UC_ARM64_REG_S20,
|
||||
UC_ARM64_REG_S21,
|
||||
UC_ARM64_REG_S22,
|
||||
UC_ARM64_REG_S23,
|
||||
UC_ARM64_REG_S24,
|
||||
UC_ARM64_REG_S25,
|
||||
UC_ARM64_REG_S26,
|
||||
UC_ARM64_REG_S27,
|
||||
UC_ARM64_REG_S28,
|
||||
UC_ARM64_REG_S29,
|
||||
UC_ARM64_REG_S30,
|
||||
UC_ARM64_REG_S31,
|
||||
UC_ARM64_REG_W0,
|
||||
UC_ARM64_REG_W1,
|
||||
UC_ARM64_REG_W2,
|
||||
UC_ARM64_REG_W3,
|
||||
UC_ARM64_REG_W4,
|
||||
UC_ARM64_REG_W5,
|
||||
UC_ARM64_REG_W6,
|
||||
UC_ARM64_REG_W7,
|
||||
UC_ARM64_REG_W8,
|
||||
UC_ARM64_REG_W9,
|
||||
UC_ARM64_REG_W10,
|
||||
UC_ARM64_REG_W11,
|
||||
UC_ARM64_REG_W12,
|
||||
UC_ARM64_REG_W13,
|
||||
UC_ARM64_REG_W14,
|
||||
UC_ARM64_REG_W15,
|
||||
UC_ARM64_REG_W16,
|
||||
UC_ARM64_REG_W17,
|
||||
UC_ARM64_REG_W18,
|
||||
UC_ARM64_REG_W19,
|
||||
UC_ARM64_REG_W20,
|
||||
UC_ARM64_REG_W21,
|
||||
UC_ARM64_REG_W22,
|
||||
UC_ARM64_REG_W23,
|
||||
UC_ARM64_REG_W24,
|
||||
UC_ARM64_REG_W25,
|
||||
UC_ARM64_REG_W26,
|
||||
UC_ARM64_REG_W27,
|
||||
UC_ARM64_REG_W28,
|
||||
UC_ARM64_REG_W29,
|
||||
UC_ARM64_REG_W30,
|
||||
UC_ARM64_REG_X0,
|
||||
UC_ARM64_REG_X1,
|
||||
UC_ARM64_REG_X2,
|
||||
UC_ARM64_REG_X3,
|
||||
UC_ARM64_REG_X4,
|
||||
UC_ARM64_REG_X5,
|
||||
UC_ARM64_REG_X6,
|
||||
UC_ARM64_REG_X7,
|
||||
UC_ARM64_REG_X8,
|
||||
UC_ARM64_REG_X9,
|
||||
UC_ARM64_REG_X10,
|
||||
UC_ARM64_REG_X11,
|
||||
UC_ARM64_REG_X12,
|
||||
UC_ARM64_REG_X13,
|
||||
UC_ARM64_REG_X14,
|
||||
UC_ARM64_REG_X15,
|
||||
UC_ARM64_REG_X16,
|
||||
UC_ARM64_REG_X17,
|
||||
UC_ARM64_REG_X18,
|
||||
UC_ARM64_REG_X19,
|
||||
UC_ARM64_REG_X20,
|
||||
UC_ARM64_REG_X21,
|
||||
UC_ARM64_REG_X22,
|
||||
UC_ARM64_REG_X23,
|
||||
UC_ARM64_REG_X24,
|
||||
UC_ARM64_REG_X25,
|
||||
UC_ARM64_REG_X26,
|
||||
UC_ARM64_REG_X27,
|
||||
UC_ARM64_REG_X28,
|
||||
|
||||
UC_ARM64_REG_V0,
|
||||
UC_ARM64_REG_V1,
|
||||
UC_ARM64_REG_V2,
|
||||
UC_ARM64_REG_V3,
|
||||
UC_ARM64_REG_V4,
|
||||
UC_ARM64_REG_V5,
|
||||
UC_ARM64_REG_V6,
|
||||
UC_ARM64_REG_V7,
|
||||
UC_ARM64_REG_V8,
|
||||
UC_ARM64_REG_V9,
|
||||
UC_ARM64_REG_V10,
|
||||
UC_ARM64_REG_V11,
|
||||
UC_ARM64_REG_V12,
|
||||
UC_ARM64_REG_V13,
|
||||
UC_ARM64_REG_V14,
|
||||
UC_ARM64_REG_V15,
|
||||
UC_ARM64_REG_V16,
|
||||
UC_ARM64_REG_V17,
|
||||
UC_ARM64_REG_V18,
|
||||
UC_ARM64_REG_V19,
|
||||
UC_ARM64_REG_V20,
|
||||
UC_ARM64_REG_V21,
|
||||
UC_ARM64_REG_V22,
|
||||
UC_ARM64_REG_V23,
|
||||
UC_ARM64_REG_V24,
|
||||
UC_ARM64_REG_V25,
|
||||
UC_ARM64_REG_V26,
|
||||
UC_ARM64_REG_V27,
|
||||
UC_ARM64_REG_V28,
|
||||
UC_ARM64_REG_V29,
|
||||
UC_ARM64_REG_V30,
|
||||
UC_ARM64_REG_V31,
|
||||
|
||||
//> pseudo registers
|
||||
UC_ARM64_REG_PC, // program counter register
|
||||
|
||||
UC_ARM64_REG_ENDING, // <-- mark the end of the list of registers
|
||||
|
||||
//> alias registers
|
||||
|
||||
UC_ARM64_REG_IP1 = UC_ARM64_REG_X16,
|
||||
UC_ARM64_REG_IP0 = UC_ARM64_REG_X17,
|
||||
UC_ARM64_REG_FP = UC_ARM64_REG_X29,
|
||||
UC_ARM64_REG_LR = UC_ARM64_REG_X30,
|
||||
} uc_arm64_reg;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,51 @@
|
||||
#ifndef UNICORN_M68K_H
|
||||
#define UNICORN_M68K_H
|
||||
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <[email protected]>, 2014-2015 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201)
|
||||
#endif
|
||||
|
||||
//> M68K registers
|
||||
typedef enum m68k_reg
|
||||
{
|
||||
UC_M68K_REG_INVALID = 0,
|
||||
|
||||
UC_M68K_REG_A0,
|
||||
UC_M68K_REG_A1,
|
||||
UC_M68K_REG_A2,
|
||||
UC_M68K_REG_A3,
|
||||
UC_M68K_REG_A4,
|
||||
UC_M68K_REG_A5,
|
||||
UC_M68K_REG_A6,
|
||||
UC_M68K_REG_A7,
|
||||
|
||||
UC_M68K_REG_D0,
|
||||
UC_M68K_REG_D1,
|
||||
UC_M68K_REG_D2,
|
||||
UC_M68K_REG_D3,
|
||||
UC_M68K_REG_D4,
|
||||
UC_M68K_REG_D5,
|
||||
UC_M68K_REG_D6,
|
||||
UC_M68K_REG_D7,
|
||||
|
||||
UC_M68K_REG_SR,
|
||||
UC_M68K_REG_PC,
|
||||
|
||||
UC_M68K_REG_ENDING, // <-- mark the end of the list of registers
|
||||
} m68k_reg;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
#ifndef UNICORN_MIPS_H
|
||||
#define UNICORN_MIPS_H
|
||||
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <[email protected]>, 2015 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// GCC MIPS toolchain has a default macro called "mips" which breaks
|
||||
// compilation
|
||||
#undef mips
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201)
|
||||
#endif
|
||||
|
||||
//> MIPS registers
|
||||
typedef enum UC_MIPS_REG
|
||||
{
|
||||
UC_MIPS_REG_INVALID = 0,
|
||||
//> General purpose registers
|
||||
UC_MIPS_REG_PC,
|
||||
|
||||
UC_MIPS_REG_0,
|
||||
UC_MIPS_REG_1,
|
||||
UC_MIPS_REG_2,
|
||||
UC_MIPS_REG_3,
|
||||
UC_MIPS_REG_4,
|
||||
UC_MIPS_REG_5,
|
||||
UC_MIPS_REG_6,
|
||||
UC_MIPS_REG_7,
|
||||
UC_MIPS_REG_8,
|
||||
UC_MIPS_REG_9,
|
||||
UC_MIPS_REG_10,
|
||||
UC_MIPS_REG_11,
|
||||
UC_MIPS_REG_12,
|
||||
UC_MIPS_REG_13,
|
||||
UC_MIPS_REG_14,
|
||||
UC_MIPS_REG_15,
|
||||
UC_MIPS_REG_16,
|
||||
UC_MIPS_REG_17,
|
||||
UC_MIPS_REG_18,
|
||||
UC_MIPS_REG_19,
|
||||
UC_MIPS_REG_20,
|
||||
UC_MIPS_REG_21,
|
||||
UC_MIPS_REG_22,
|
||||
UC_MIPS_REG_23,
|
||||
UC_MIPS_REG_24,
|
||||
UC_MIPS_REG_25,
|
||||
UC_MIPS_REG_26,
|
||||
UC_MIPS_REG_27,
|
||||
UC_MIPS_REG_28,
|
||||
UC_MIPS_REG_29,
|
||||
UC_MIPS_REG_30,
|
||||
UC_MIPS_REG_31,
|
||||
|
||||
//> DSP registers
|
||||
UC_MIPS_REG_DSPCCOND,
|
||||
UC_MIPS_REG_DSPCARRY,
|
||||
UC_MIPS_REG_DSPEFI,
|
||||
UC_MIPS_REG_DSPOUTFLAG,
|
||||
UC_MIPS_REG_DSPOUTFLAG16_19,
|
||||
UC_MIPS_REG_DSPOUTFLAG20,
|
||||
UC_MIPS_REG_DSPOUTFLAG21,
|
||||
UC_MIPS_REG_DSPOUTFLAG22,
|
||||
UC_MIPS_REG_DSPOUTFLAG23,
|
||||
UC_MIPS_REG_DSPPOS,
|
||||
UC_MIPS_REG_DSPSCOUNT,
|
||||
|
||||
//> ACC registers
|
||||
UC_MIPS_REG_AC0,
|
||||
UC_MIPS_REG_AC1,
|
||||
UC_MIPS_REG_AC2,
|
||||
UC_MIPS_REG_AC3,
|
||||
|
||||
//> COP registers
|
||||
UC_MIPS_REG_CC0,
|
||||
UC_MIPS_REG_CC1,
|
||||
UC_MIPS_REG_CC2,
|
||||
UC_MIPS_REG_CC3,
|
||||
UC_MIPS_REG_CC4,
|
||||
UC_MIPS_REG_CC5,
|
||||
UC_MIPS_REG_CC6,
|
||||
UC_MIPS_REG_CC7,
|
||||
|
||||
//> FPU registers
|
||||
UC_MIPS_REG_F0,
|
||||
UC_MIPS_REG_F1,
|
||||
UC_MIPS_REG_F2,
|
||||
UC_MIPS_REG_F3,
|
||||
UC_MIPS_REG_F4,
|
||||
UC_MIPS_REG_F5,
|
||||
UC_MIPS_REG_F6,
|
||||
UC_MIPS_REG_F7,
|
||||
UC_MIPS_REG_F8,
|
||||
UC_MIPS_REG_F9,
|
||||
UC_MIPS_REG_F10,
|
||||
UC_MIPS_REG_F11,
|
||||
UC_MIPS_REG_F12,
|
||||
UC_MIPS_REG_F13,
|
||||
UC_MIPS_REG_F14,
|
||||
UC_MIPS_REG_F15,
|
||||
UC_MIPS_REG_F16,
|
||||
UC_MIPS_REG_F17,
|
||||
UC_MIPS_REG_F18,
|
||||
UC_MIPS_REG_F19,
|
||||
UC_MIPS_REG_F20,
|
||||
UC_MIPS_REG_F21,
|
||||
UC_MIPS_REG_F22,
|
||||
UC_MIPS_REG_F23,
|
||||
UC_MIPS_REG_F24,
|
||||
UC_MIPS_REG_F25,
|
||||
UC_MIPS_REG_F26,
|
||||
UC_MIPS_REG_F27,
|
||||
UC_MIPS_REG_F28,
|
||||
UC_MIPS_REG_F29,
|
||||
UC_MIPS_REG_F30,
|
||||
UC_MIPS_REG_F31,
|
||||
|
||||
UC_MIPS_REG_FCC0,
|
||||
UC_MIPS_REG_FCC1,
|
||||
UC_MIPS_REG_FCC2,
|
||||
UC_MIPS_REG_FCC3,
|
||||
UC_MIPS_REG_FCC4,
|
||||
UC_MIPS_REG_FCC5,
|
||||
UC_MIPS_REG_FCC6,
|
||||
UC_MIPS_REG_FCC7,
|
||||
|
||||
//> AFPR128
|
||||
UC_MIPS_REG_W0,
|
||||
UC_MIPS_REG_W1,
|
||||
UC_MIPS_REG_W2,
|
||||
UC_MIPS_REG_W3,
|
||||
UC_MIPS_REG_W4,
|
||||
UC_MIPS_REG_W5,
|
||||
UC_MIPS_REG_W6,
|
||||
UC_MIPS_REG_W7,
|
||||
UC_MIPS_REG_W8,
|
||||
UC_MIPS_REG_W9,
|
||||
UC_MIPS_REG_W10,
|
||||
UC_MIPS_REG_W11,
|
||||
UC_MIPS_REG_W12,
|
||||
UC_MIPS_REG_W13,
|
||||
UC_MIPS_REG_W14,
|
||||
UC_MIPS_REG_W15,
|
||||
UC_MIPS_REG_W16,
|
||||
UC_MIPS_REG_W17,
|
||||
UC_MIPS_REG_W18,
|
||||
UC_MIPS_REG_W19,
|
||||
UC_MIPS_REG_W20,
|
||||
UC_MIPS_REG_W21,
|
||||
UC_MIPS_REG_W22,
|
||||
UC_MIPS_REG_W23,
|
||||
UC_MIPS_REG_W24,
|
||||
UC_MIPS_REG_W25,
|
||||
UC_MIPS_REG_W26,
|
||||
UC_MIPS_REG_W27,
|
||||
UC_MIPS_REG_W28,
|
||||
UC_MIPS_REG_W29,
|
||||
UC_MIPS_REG_W30,
|
||||
UC_MIPS_REG_W31,
|
||||
|
||||
UC_MIPS_REG_HI,
|
||||
UC_MIPS_REG_LO,
|
||||
|
||||
UC_MIPS_REG_P0,
|
||||
UC_MIPS_REG_P1,
|
||||
UC_MIPS_REG_P2,
|
||||
|
||||
UC_MIPS_REG_MPL0,
|
||||
UC_MIPS_REG_MPL1,
|
||||
UC_MIPS_REG_MPL2,
|
||||
|
||||
UC_MIPS_REG_ENDING, // <-- mark the end of the list or registers
|
||||
|
||||
// alias registers
|
||||
UC_MIPS_REG_ZERO = UC_MIPS_REG_0,
|
||||
UC_MIPS_REG_AT = UC_MIPS_REG_1,
|
||||
UC_MIPS_REG_V0 = UC_MIPS_REG_2,
|
||||
UC_MIPS_REG_V1 = UC_MIPS_REG_3,
|
||||
UC_MIPS_REG_A0 = UC_MIPS_REG_4,
|
||||
UC_MIPS_REG_A1 = UC_MIPS_REG_5,
|
||||
UC_MIPS_REG_A2 = UC_MIPS_REG_6,
|
||||
UC_MIPS_REG_A3 = UC_MIPS_REG_7,
|
||||
UC_MIPS_REG_T0 = UC_MIPS_REG_8,
|
||||
UC_MIPS_REG_T1 = UC_MIPS_REG_9,
|
||||
UC_MIPS_REG_T2 = UC_MIPS_REG_10,
|
||||
UC_MIPS_REG_T3 = UC_MIPS_REG_11,
|
||||
UC_MIPS_REG_T4 = UC_MIPS_REG_12,
|
||||
UC_MIPS_REG_T5 = UC_MIPS_REG_13,
|
||||
UC_MIPS_REG_T6 = UC_MIPS_REG_14,
|
||||
UC_MIPS_REG_T7 = UC_MIPS_REG_15,
|
||||
UC_MIPS_REG_S0 = UC_MIPS_REG_16,
|
||||
UC_MIPS_REG_S1 = UC_MIPS_REG_17,
|
||||
UC_MIPS_REG_S2 = UC_MIPS_REG_18,
|
||||
UC_MIPS_REG_S3 = UC_MIPS_REG_19,
|
||||
UC_MIPS_REG_S4 = UC_MIPS_REG_20,
|
||||
UC_MIPS_REG_S5 = UC_MIPS_REG_21,
|
||||
UC_MIPS_REG_S6 = UC_MIPS_REG_22,
|
||||
UC_MIPS_REG_S7 = UC_MIPS_REG_23,
|
||||
UC_MIPS_REG_T8 = UC_MIPS_REG_24,
|
||||
UC_MIPS_REG_T9 = UC_MIPS_REG_25,
|
||||
UC_MIPS_REG_K0 = UC_MIPS_REG_26,
|
||||
UC_MIPS_REG_K1 = UC_MIPS_REG_27,
|
||||
UC_MIPS_REG_GP = UC_MIPS_REG_28,
|
||||
UC_MIPS_REG_SP = UC_MIPS_REG_29,
|
||||
UC_MIPS_REG_FP = UC_MIPS_REG_30, UC_MIPS_REG_S8 = UC_MIPS_REG_30,
|
||||
UC_MIPS_REG_RA = UC_MIPS_REG_31,
|
||||
|
||||
UC_MIPS_REG_HI0 = UC_MIPS_REG_AC0,
|
||||
UC_MIPS_REG_HI1 = UC_MIPS_REG_AC1,
|
||||
UC_MIPS_REG_HI2 = UC_MIPS_REG_AC2,
|
||||
UC_MIPS_REG_HI3 = UC_MIPS_REG_AC3,
|
||||
|
||||
UC_MIPS_REG_LO0 = UC_MIPS_REG_HI0,
|
||||
UC_MIPS_REG_LO1 = UC_MIPS_REG_HI1,
|
||||
UC_MIPS_REG_LO2 = UC_MIPS_REG_HI2,
|
||||
UC_MIPS_REG_LO3 = UC_MIPS_REG_HI3,
|
||||
} UC_MIPS_REG;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,28 @@
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Axel Souchet & Nguyen Anh Quynh, 2014 */
|
||||
|
||||
// handle C99 issue (for pre-2013 VisualStudio)
|
||||
#ifndef UNICORN_PLATFORM_H
|
||||
#define UNICORN_PLATFORM_H
|
||||
|
||||
#if !defined(__MINGW32__) && !defined(__MINGW64__) && (defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64))
|
||||
// MSVC
|
||||
|
||||
// stdbool.h
|
||||
#if (_MSC_VER < 1800)
|
||||
#ifndef __cplusplus
|
||||
typedef unsigned char bool;
|
||||
#define false 0
|
||||
#define true 1
|
||||
#endif
|
||||
|
||||
#else
|
||||
// VisualStudio 2013+ -> C99 is supported
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#else // not MSVC -> C99 is supported
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
#ifndef UNICORN_SPARC_H
|
||||
#define UNICORN_SPARC_H
|
||||
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <[email protected]>, 2014-2015 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "platform.h"
|
||||
|
||||
// GCC SPARC toolchain has a default macro called "sparc" which breaks
|
||||
// compilation
|
||||
#undef sparc
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201)
|
||||
#endif
|
||||
|
||||
//> SPARC registers
|
||||
typedef enum uc_sparc_reg
|
||||
{
|
||||
UC_SPARC_REG_INVALID = 0,
|
||||
|
||||
UC_SPARC_REG_F0,
|
||||
UC_SPARC_REG_F1,
|
||||
UC_SPARC_REG_F2,
|
||||
UC_SPARC_REG_F3,
|
||||
UC_SPARC_REG_F4,
|
||||
UC_SPARC_REG_F5,
|
||||
UC_SPARC_REG_F6,
|
||||
UC_SPARC_REG_F7,
|
||||
UC_SPARC_REG_F8,
|
||||
UC_SPARC_REG_F9,
|
||||
UC_SPARC_REG_F10,
|
||||
UC_SPARC_REG_F11,
|
||||
UC_SPARC_REG_F12,
|
||||
UC_SPARC_REG_F13,
|
||||
UC_SPARC_REG_F14,
|
||||
UC_SPARC_REG_F15,
|
||||
UC_SPARC_REG_F16,
|
||||
UC_SPARC_REG_F17,
|
||||
UC_SPARC_REG_F18,
|
||||
UC_SPARC_REG_F19,
|
||||
UC_SPARC_REG_F20,
|
||||
UC_SPARC_REG_F21,
|
||||
UC_SPARC_REG_F22,
|
||||
UC_SPARC_REG_F23,
|
||||
UC_SPARC_REG_F24,
|
||||
UC_SPARC_REG_F25,
|
||||
UC_SPARC_REG_F26,
|
||||
UC_SPARC_REG_F27,
|
||||
UC_SPARC_REG_F28,
|
||||
UC_SPARC_REG_F29,
|
||||
UC_SPARC_REG_F30,
|
||||
UC_SPARC_REG_F31,
|
||||
UC_SPARC_REG_F32,
|
||||
UC_SPARC_REG_F34,
|
||||
UC_SPARC_REG_F36,
|
||||
UC_SPARC_REG_F38,
|
||||
UC_SPARC_REG_F40,
|
||||
UC_SPARC_REG_F42,
|
||||
UC_SPARC_REG_F44,
|
||||
UC_SPARC_REG_F46,
|
||||
UC_SPARC_REG_F48,
|
||||
UC_SPARC_REG_F50,
|
||||
UC_SPARC_REG_F52,
|
||||
UC_SPARC_REG_F54,
|
||||
UC_SPARC_REG_F56,
|
||||
UC_SPARC_REG_F58,
|
||||
UC_SPARC_REG_F60,
|
||||
UC_SPARC_REG_F62,
|
||||
UC_SPARC_REG_FCC0, // Floating condition codes
|
||||
UC_SPARC_REG_FCC1,
|
||||
UC_SPARC_REG_FCC2,
|
||||
UC_SPARC_REG_FCC3,
|
||||
UC_SPARC_REG_G0,
|
||||
UC_SPARC_REG_G1,
|
||||
UC_SPARC_REG_G2,
|
||||
UC_SPARC_REG_G3,
|
||||
UC_SPARC_REG_G4,
|
||||
UC_SPARC_REG_G5,
|
||||
UC_SPARC_REG_G6,
|
||||
UC_SPARC_REG_G7,
|
||||
UC_SPARC_REG_I0,
|
||||
UC_SPARC_REG_I1,
|
||||
UC_SPARC_REG_I2,
|
||||
UC_SPARC_REG_I3,
|
||||
UC_SPARC_REG_I4,
|
||||
UC_SPARC_REG_I5,
|
||||
UC_SPARC_REG_FP,
|
||||
UC_SPARC_REG_I7,
|
||||
UC_SPARC_REG_ICC, // Integer condition codes
|
||||
UC_SPARC_REG_L0,
|
||||
UC_SPARC_REG_L1,
|
||||
UC_SPARC_REG_L2,
|
||||
UC_SPARC_REG_L3,
|
||||
UC_SPARC_REG_L4,
|
||||
UC_SPARC_REG_L5,
|
||||
UC_SPARC_REG_L6,
|
||||
UC_SPARC_REG_L7,
|
||||
UC_SPARC_REG_O0,
|
||||
UC_SPARC_REG_O1,
|
||||
UC_SPARC_REG_O2,
|
||||
UC_SPARC_REG_O3,
|
||||
UC_SPARC_REG_O4,
|
||||
UC_SPARC_REG_O5,
|
||||
UC_SPARC_REG_SP,
|
||||
UC_SPARC_REG_O7,
|
||||
UC_SPARC_REG_Y,
|
||||
|
||||
// special register
|
||||
UC_SPARC_REG_XCC,
|
||||
|
||||
// pseudo register
|
||||
UC_SPARC_REG_PC, // program counter register
|
||||
|
||||
UC_SPARC_REG_ENDING, // <-- mark the end of the list of registers
|
||||
|
||||
// extras
|
||||
UC_SPARC_REG_O6 = UC_SPARC_REG_SP,
|
||||
UC_SPARC_REG_I6 = UC_SPARC_REG_FP,
|
||||
} uc_sparc_reg;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,493 @@
|
||||
/* Unicorn Emulator Engine */
|
||||
/* By Nguyen Anh Quynh <[email protected]>, 2015 */
|
||||
|
||||
#ifndef UNICORN_ENGINE_H
|
||||
#define UNICORN_ENGINE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
#if defined(UNICORN_HAS_OSXKERNEL)
|
||||
#include <libkern/libkern.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
struct uc_struct;
|
||||
typedef struct uc_struct uc_engine;
|
||||
|
||||
typedef size_t uc_hook;
|
||||
|
||||
#include "m68k.h"
|
||||
#include "x86.h"
|
||||
#include "arm.h"
|
||||
#include "arm64.h"
|
||||
#include "mips.h"
|
||||
#include "sparc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4201)
|
||||
#pragma warning(disable:4100)
|
||||
#ifdef UNICORN_SHARED
|
||||
#define UNICORN_EXPORT __declspec(dllexport)
|
||||
#else // defined(UNICORN_STATIC)
|
||||
#define UNICORN_EXPORT
|
||||
#endif
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#define UNICORN_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define UNICORN_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define UNICORN_DEPRECATED __attribute__((deprecated))
|
||||
#elif defined(_MSC_VER)
|
||||
#define UNICORN_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
#pragma message("WARNING: You need to implement UNICORN_DEPRECATED for this compiler")
|
||||
#define UNICORN_DEPRECATED
|
||||
#endif
|
||||
|
||||
// Unicorn API version
|
||||
#define UC_API_MAJOR 0
|
||||
#define UC_API_MINOR 9
|
||||
|
||||
// Macro to create combined version which can be compared to
|
||||
// result of uc_version() API.
|
||||
#define UC_MAKE_VERSION(major, minor) ((major << 8) + minor)
|
||||
|
||||
// Scales to calculate timeout on microsecond unit
|
||||
// 1 second = 1000,000 microseconds
|
||||
#define UC_SECOND_SCALE 1000000
|
||||
// 1 milisecond = 1000 nanoseconds
|
||||
#define UC_MILISECOND_SCALE 1000
|
||||
|
||||
// Architecture type
|
||||
typedef enum uc_arch
|
||||
{
|
||||
UC_ARCH_ARM = 1, // ARM architecture (including Thumb, Thumb-2)
|
||||
UC_ARCH_ARM64, // ARM-64, also called AArch64
|
||||
UC_ARCH_MIPS, // Mips architecture
|
||||
UC_ARCH_X86, // X86 architecture (including x86 & x86-64)
|
||||
UC_ARCH_PPC, // PowerPC architecture
|
||||
UC_ARCH_SPARC, // Sparc architecture
|
||||
UC_ARCH_M68K, // M68K architecture
|
||||
UC_ARCH_MAX,
|
||||
} uc_arch;
|
||||
|
||||
// Mode type
|
||||
typedef enum uc_mode
|
||||
{
|
||||
UC_MODE_LITTLE_ENDIAN = 0, // little-endian mode (default mode)
|
||||
UC_MODE_ARM = 0, // 32-bit ARM
|
||||
UC_MODE_16 = 1 << 1, // 16-bit mode (X86)
|
||||
UC_MODE_32 = 1 << 2, // 32-bit mode (X86)
|
||||
UC_MODE_64 = 1 << 3, // 64-bit mode (X86, PPC)
|
||||
UC_MODE_THUMB = 1 << 4, // ARM's Thumb mode, including Thumb-2
|
||||
UC_MODE_MCLASS = 1 << 5, // ARM's Cortex-M series
|
||||
UC_MODE_V8 = 1 << 6, // ARMv8 A32 encodings for ARM
|
||||
UC_MODE_MICRO = 1 << 4, // MicroMips mode (MIPS)
|
||||
UC_MODE_MIPS3 = 1 << 5, // Mips III ISA
|
||||
UC_MODE_MIPS32R6 = 1 << 6, // Mips32r6 ISA
|
||||
UC_MODE_V9 = 1 << 4, // SparcV9 mode (Sparc)
|
||||
UC_MODE_QPX = 1 << 4, // Quad Processing eXtensions mode (PPC)
|
||||
UC_MODE_BIG_ENDIAN = 1 << 30, // big-endian mode
|
||||
UC_MODE_MIPS32 = UC_MODE_32, // Mips32 ISA (Mips)
|
||||
UC_MODE_MIPS64 = UC_MODE_64, // Mips64 ISA (Mips)
|
||||
} uc_mode;
|
||||
|
||||
// All type of errors encountered by Unicorn API.
|
||||
// These are values returned by uc_errno()
|
||||
typedef enum uc_err
|
||||
{
|
||||
UC_ERR_OK = 0, // No error: everything was fine
|
||||
UC_ERR_NOMEM, // Out-Of-Memory error: uc_open(), uc_emulate()
|
||||
UC_ERR_ARCH, // Unsupported architecture: uc_open()
|
||||
UC_ERR_HANDLE, // Invalid handle
|
||||
UC_ERR_MODE, // Invalid/unsupported mode: uc_open()
|
||||
UC_ERR_VERSION, // Unsupported version (bindings)
|
||||
UC_ERR_READ_UNMAPPED, // Quit emulation due to READ on unmapped memory: uc_emu_start()
|
||||
UC_ERR_WRITE_UNMAPPED, // Quit emulation due to WRITE on unmapped memory: uc_emu_start()
|
||||
UC_ERR_FETCH_UNMAPPED, // Quit emulation due to FETCH on unmapped memory: uc_emu_start()
|
||||
UC_ERR_HOOK, // Invalid hook type: uc_hook_add()
|
||||
UC_ERR_INSN_INVALID, // Quit emulation due to invalid instruction: uc_emu_start()
|
||||
UC_ERR_MAP, // Invalid memory mapping: uc_mem_map()
|
||||
UC_ERR_WRITE_PROT, // Quit emulation due to UC_MEM_WRITE_PROT violation: uc_emu_start()
|
||||
UC_ERR_READ_PROT, // Quit emulation due to UC_MEM_READ_PROT violation: uc_emu_start()
|
||||
UC_ERR_FETCH_PROT, // Quit emulation due to UC_MEM_FETCH_PROT violation: uc_emu_start()
|
||||
UC_ERR_ARG, // Inavalid argument provided to uc_xxx function (See specific function API)
|
||||
UC_ERR_READ_UNALIGNED, // Unaligned read
|
||||
UC_ERR_WRITE_UNALIGNED, // Unaligned write
|
||||
UC_ERR_FETCH_UNALIGNED, // Unaligned fetch
|
||||
UC_ERR_HOOK_EXIST, // hook for this event already existed
|
||||
} uc_err;
|
||||
|
||||
|
||||
// Callback function for tracing code (UC_HOOK_CODE & UC_HOOK_BLOCK)
|
||||
// @address: address where the code is being executed
|
||||
// @size: size of machine instruction(s) being executed, or 0 when size is unknown
|
||||
// @user_data: user data passed to tracing APIs.
|
||||
typedef void (*uc_cb_hookcode_t)(uc_engine* uc, uint64_t address, uint32_t size, void* user_data);
|
||||
|
||||
// Callback function for tracing interrupts (for uc_hook_intr())
|
||||
// @intno: interrupt number
|
||||
// @user_data: user data passed to tracing APIs.
|
||||
typedef void (*uc_cb_hookintr_t)(uc_engine* uc, uint32_t intno, void* user_data);
|
||||
|
||||
// Callback function for tracing IN instruction of X86
|
||||
// @port: port number
|
||||
// @size: data size (1/2/4) to be read from this port
|
||||
// @user_data: user data passed to tracing APIs.
|
||||
typedef uint32_t (*uc_cb_insn_in_t)(uc_engine* uc, uint32_t port, int size, void* user_data);
|
||||
|
||||
// x86's handler for OUT
|
||||
// @port: port number
|
||||
// @size: data size (1/2/4) to be written to this port
|
||||
// @value: data value to be written to this port
|
||||
typedef void (*uc_cb_insn_out_t)(uc_engine* uc, uint32_t port, int size, uint32_t value, void* user_data);
|
||||
|
||||
// All type of memory accesses for UC_HOOK_MEM_*
|
||||
typedef enum uc_mem_type
|
||||
{
|
||||
UC_MEM_READ = 16, // Memory is read from
|
||||
UC_MEM_WRITE, // Memory is written to
|
||||
UC_MEM_FETCH, // Memory is fetched
|
||||
UC_MEM_READ_UNMAPPED, // Unmapped memory is read from
|
||||
UC_MEM_WRITE_UNMAPPED, // Unmapped memory is written to
|
||||
UC_MEM_FETCH_UNMAPPED, // Unmapped memory is fetched
|
||||
UC_MEM_WRITE_PROT, // Write to write protected, but mapped, memory
|
||||
UC_MEM_READ_PROT, // Read from read protected, but mapped, memory
|
||||
UC_MEM_FETCH_PROT, // Fetch from non-executable, but mapped, memory
|
||||
} uc_mem_type;
|
||||
|
||||
// All type of hooks for uc_hook_add() API.
|
||||
typedef enum uc_hook_type
|
||||
{
|
||||
UC_HOOK_INTR = 1 << 0, // Hook all interrupt/syscall events
|
||||
UC_HOOK_INSN = 1 << 1, // Hook a particular instruction
|
||||
UC_HOOK_CODE = 1 << 2, // Hook a range of code
|
||||
UC_HOOK_BLOCK = 1 << 3, // Hook basic blocks
|
||||
UC_HOOK_MEM_READ_UNMAPPED = 1 << 4, // Hook for memory read on unmapped memory
|
||||
UC_HOOK_MEM_WRITE_UNMAPPED = 1 << 5, // Hook for invalid memory write events
|
||||
UC_HOOK_MEM_FETCH_UNMAPPED = 1 << 6, // Hook for invalid memory fetch for execution events
|
||||
UC_HOOK_MEM_READ_PROT = 1 << 7, // Hook for memory read on read-protected memory
|
||||
UC_HOOK_MEM_WRITE_PROT = 1 << 8, // Hook for memory write on write-protected memory
|
||||
UC_HOOK_MEM_FETCH_PROT = 1 << 9, // Hook for memory fetch on non-executable memory
|
||||
UC_HOOK_MEM_READ = 1 << 10, // Hook memory read events.
|
||||
UC_HOOK_MEM_WRITE = 1 << 11, // Hook memory write events.
|
||||
UC_HOOK_MEM_FETCH = 1 << 12, // Hook memory fetch for execution events
|
||||
} uc_hook_type;
|
||||
|
||||
// hook type for all events of unmapped memory access
|
||||
#define UC_HOOK_MEM_UNMAPPED (UC_HOOK_MEM_READ_UNMAPPED + UC_HOOK_MEM_WRITE_UNMAPPED + UC_HOOK_MEM_FETCH_UNMAPPED)
|
||||
// hook type for all events of illegal protected memory access
|
||||
#define UC_HOOK_MEM_PROT (UC_HOOK_MEM_READ_PROT + UC_HOOK_MEM_WRITE_PROT + UC_HOOK_MEM_FETCH_PROT)
|
||||
// hook type for all events of illegal read memory access
|
||||
#define UC_HOOK_MEM_READ_INVALID (UC_HOOK_MEM_READ_PROT + UC_HOOK_MEM_READ_UNMAPPED)
|
||||
// hook type for all events of illegal write memory access
|
||||
#define UC_HOOK_MEM_WRITE_INVALID (UC_HOOK_MEM_WRITE_PROT + UC_HOOK_MEM_WRITE_UNMAPPED)
|
||||
// hook type for all events of illegal fetch memory access
|
||||
#define UC_HOOK_MEM_FETCH_INVALID (UC_HOOK_MEM_FETCH_PROT + UC_HOOK_MEM_FETCH_UNMAPPED)
|
||||
// hook type for all events of illegal memory access
|
||||
#define UC_HOOK_MEM_INVALID (UC_HOOK_MEM_UNMAPPED + UC_HOOK_MEM_PROT)
|
||||
|
||||
// Callback function for hooking memory (UC_MEM_READ, UC_MEM_WRITE & UC_MEM_FETCH)
|
||||
// @type: this memory is being READ, or WRITE
|
||||
// @address: address where the code is being executed
|
||||
// @size: size of data being read or written
|
||||
// @value: value of data being written to memory, or irrelevant if type = READ.
|
||||
// @user_data: user data passed to tracing APIs
|
||||
typedef void (*uc_cb_hookmem_t)(uc_engine* uc, uc_mem_type type,
|
||||
uint64_t address, int size, int64_t value, void* user_data);
|
||||
|
||||
// Callback function for handling invalid memory access events (UC_MEM_*_UNMAPPED and
|
||||
// UC_MEM_*PROT events)
|
||||
// @type: this memory is being READ, or WRITE
|
||||
// @address: address where the code is being executed
|
||||
// @size: size of data being read or written
|
||||
// @value: value of data being written to memory, or irrelevant if type = READ.
|
||||
// @user_data: user data passed to tracing APIs
|
||||
// @return: return true to continue, or false to stop program (due to invalid memory).
|
||||
typedef bool (*uc_cb_eventmem_t)(uc_engine* uc, uc_mem_type type,
|
||||
uint64_t address, int size, int64_t value, void* user_data);
|
||||
|
||||
|
||||
/*
|
||||
Return combined API version & major and minor version numbers.
|
||||
|
||||
@major: major number of API version
|
||||
@minor: minor number of API version
|
||||
|
||||
@return hexical number as (major << 8 | minor), which encodes both
|
||||
major & minor versions.
|
||||
NOTE: This returned value can be compared with version number made
|
||||
with macro UC_MAKE_VERSION
|
||||
|
||||
For example, second API version would return 1 in @major, and 1 in @minor
|
||||
The return value would be 0x0101
|
||||
|
||||
NOTE: if you only care about returned value, but not major and minor values,
|
||||
set both @major & @minor arguments to NULL.
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
unsigned int uc_version(unsigned int* major, unsigned int* minor);
|
||||
|
||||
|
||||
/*
|
||||
Determine if the given architecture is supported by this library.
|
||||
|
||||
@arch: architecture type (UC_ARCH_*)
|
||||
|
||||
@return True if this library supports the given arch.
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
bool uc_arch_supported(uc_arch arch);
|
||||
|
||||
|
||||
/*
|
||||
Create new instance of unicorn engine.
|
||||
|
||||
@arch: architecture type (UC_ARCH_*)
|
||||
@mode: hardware mode. This is combined of UC_MODE_*
|
||||
@uc: pointer to uc_engine, which will be updated at return time
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_open(uc_arch arch, uc_mode mode, uc_engine** uc);
|
||||
|
||||
/*
|
||||
Close UC instance: MUST do to release the handle when it is not used anymore.
|
||||
NOTE: this must be called only when there is no longer usage of Unicorn.
|
||||
The reason is the this API releases some cached memory, thus access to any
|
||||
Unicorn API after uc_close() might crash your application.
|
||||
After this, @uc is invalid, and nolonger usable.
|
||||
|
||||
@uc: pointer to a handle returned by uc_open()
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_close(uc_engine* uc);
|
||||
|
||||
/*
|
||||
Report the last error number when some API function fail.
|
||||
Like glibc's errno, uc_errno might not retain its old value once accessed.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
|
||||
@return: error code of uc_err enum type (UC_ERR_*, see above)
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_errno(uc_engine* uc);
|
||||
|
||||
/*
|
||||
Return a string describing given error code.
|
||||
|
||||
@code: error code (see UC_ERR_* above)
|
||||
|
||||
@return: returns a pointer to a string that describes the error code
|
||||
passed in the argument @code
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
const char* uc_strerror(uc_err code);
|
||||
|
||||
/*
|
||||
Write to register.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@regid: register ID that is to be modified.
|
||||
@value: pointer to the value that will set to register @regid
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_reg_write(uc_engine* uc, int regid, const void* value);
|
||||
|
||||
/*
|
||||
Read register value.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@regid: register ID that is to be retrieved.
|
||||
@value: pointer to a variable storing the register value.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_reg_read(uc_engine* uc, int regid, void* value);
|
||||
|
||||
/*
|
||||
Write to a range of bytes in memory.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@address: starting memory address of bytes to set.
|
||||
@bytes: pointer to a variable containing data to be written to memory.
|
||||
@size: size of memory to write to.
|
||||
|
||||
NOTE: @bytes must be big enough to contain @size bytes.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_mem_write(uc_engine* uc, uint64_t address, const void* bytes, size_t size);
|
||||
|
||||
/*
|
||||
Read a range of bytes in memory.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@address: starting memory address of bytes to get.
|
||||
@bytes: pointer to a variable containing data copied from memory.
|
||||
@size: size of memory to read.
|
||||
|
||||
NOTE: @bytes must be big enough to contain @size bytes.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_mem_read(uc_engine* uc, uint64_t address, void* bytes, size_t size);
|
||||
|
||||
/*
|
||||
Emulate machine code in a specific duration of time.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@begin: address where emulation starts
|
||||
@until: address where emulation stops (i.e when this address is hit)
|
||||
@timeout: duration to emulate the code (in microseconds). When this value is 0,
|
||||
we will emulate the code in infinite time, until the code is finished.
|
||||
@count: the number of instructions to be emulated. When this value is 0,
|
||||
we will emulate all the code available, until the code is finished.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_emu_start(uc_engine* uc, uint64_t begin, uint64_t until, uint64_t timeout, size_t count);
|
||||
|
||||
/*
|
||||
Stop emulation (which was started by uc_emu_start() API.
|
||||
This is typically called from callback functions registered via tracing APIs.
|
||||
NOTE: for now, this will stop the execution only after the current block.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_emu_stop(uc_engine* uc);
|
||||
|
||||
/*
|
||||
Register callback for a hook event.
|
||||
The callback will be run when the hook event is hit.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@hh: hook handle returned from this registration. To be used in uc_hook_del() API
|
||||
@type: hook type
|
||||
@callback: callback to be run when instruction is hit
|
||||
@user_data: user-defined data. This will be passed to callback function in its
|
||||
last argument @user_data
|
||||
@...: variable arguments (depending on @type)
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_hook_add(uc_engine* uc, uc_hook* hh, int type, void* callback, void* user_data, ...);
|
||||
|
||||
/*
|
||||
Unregister (remove) a hook callback.
|
||||
This API removes the hook callback registered by uc_hook_add().
|
||||
NOTE: this should be called only when you no longer want to trace.
|
||||
After this, @hh is invalid, and nolonger usable.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@hh: handle returned by uc_hook_add()
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_hook_del(uc_engine* uc, uc_hook hh);
|
||||
|
||||
typedef enum uc_prot
|
||||
{
|
||||
UC_PROT_NONE = 0,
|
||||
UC_PROT_READ = 1,
|
||||
UC_PROT_WRITE = 2,
|
||||
UC_PROT_EXEC = 4,
|
||||
UC_PROT_ALL = 7,
|
||||
} uc_prot;
|
||||
|
||||
/*
|
||||
Map memory in for emulation.
|
||||
This API adds a memory region that can be used by emulation.
|
||||
|
||||
@uc: handle returned by uc_open()
|
||||
@address: starting address of the new memory region to be mapped in.
|
||||
This address must be aligned to 4KB, or this will return with UC_ERR_ARG error.
|
||||
@size: size of the new memory region to be mapped in.
|
||||
This size must be multiple of 4KB, or this will return with UC_ERR_ARG error.
|
||||
@perms: Permissions for the newly mapped region.
|
||||
This must be some combination of UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC,
|
||||
or this will return with UC_ERR_ARG error.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_mem_map(uc_engine* uc, uint64_t address, size_t size, uint32_t perms);
|
||||
|
||||
/*
|
||||
Unmap a region of emulation memory.
|
||||
This API deletes a memory mapping from the emulation memory space.
|
||||
|
||||
@handle: handle returned by uc_open()
|
||||
@address: starting address of the memory region to be unmapped.
|
||||
This address must be aligned to 4KB, or this will return with UC_ERR_ARG error.
|
||||
@size: size of the memory region to be modified.
|
||||
This size must be multiple of 4KB, or this will return with UC_ERR_ARG error.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_mem_unmap(uc_engine* uc, uint64_t address, size_t size);
|
||||
|
||||
/*
|
||||
Set memory permissions for emulation memory.
|
||||
This API changes permissions on an existing memory region.
|
||||
|
||||
@handle: handle returned by uc_open()
|
||||
@address: starting address of the memory region to be modified.
|
||||
This address must be aligned to 4KB, or this will return with UC_ERR_ARG error.
|
||||
@size: size of the memory region to be modified.
|
||||
This size must be multiple of 4KB, or this will return with UC_ERR_ARG error.
|
||||
@perms: New permissions for the mapped region.
|
||||
This must be some combination of UC_PROT_READ | UC_PROT_WRITE | UC_PROT_EXEC,
|
||||
or this will return with UC_ERR_ARG error.
|
||||
|
||||
@return UC_ERR_OK on success, or other value on failure (refer to uc_err enum
|
||||
for detailed error).
|
||||
*/
|
||||
UNICORN_EXPORT
|
||||
uc_err uc_mem_protect(uc_engine* uc, uint64_t address, size_t size, uint32_t perms);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
+1422
File diff suppressed because it is too large.
Load diff
@@ -79,6 +79,14 @@
|
||||
<ClInclude Include="pluginsdk\_scriptapi.h" />
|
||||
<ClInclude Include="script.h" />
|
||||
<ClInclude Include="test.h" />
|
||||
<ClInclude Include="unicorn\arm.h" />
|
||||
<ClInclude Include="unicorn\arm64.h" />
|
||||
<ClInclude Include="unicorn\m68k.h" />
|
||||
<ClInclude Include="unicorn\mips.h" />
|
||||
<ClInclude Include="unicorn\platform.h" />
|
||||
<ClInclude Include="unicorn\sparc.h" />
|
||||
<ClInclude Include="unicorn\unicorn.h" />
|
||||
<ClInclude Include="unicorn\x86.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
@@ -129,7 +137,7 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>winmm.lib;angelscript\angelscript.lib;psapi.lib;pluginsdk\x32dbg.lib;pluginsdk\x32bridge.lib;pluginsdk\TitanEngine\TitanEngine_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;unicorn\unicorn_x32.lib;angelscript\angelscript.lib;psapi.lib;pluginsdk\x32dbg.lib;pluginsdk\x32bridge.lib;pluginsdk\TitanEngine\TitanEngine_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -144,7 +152,7 @@
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>winmm.lib;angelscript\angelscript64.lib;psapi.lib;pluginsdk\x64dbg.lib;pluginsdk\x64bridge.lib;pluginsdk\TitanEngine\TitanEngine_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;unicorn\unicorn_x64.lib;angelscript\angelscript64.lib;psapi.lib;pluginsdk\x64dbg.lib;pluginsdk\x64bridge.lib;pluginsdk\TitanEngine\TitanEngine_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
<Filter Include="Source Files\angelscript">
|
||||
<UniqueIdentifier>{1581c677-40a6-4e25-9f8c-f7f5f882507a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\unicorn">
|
||||
<UniqueIdentifier>{d7d5994b-4f24-4607-9490-c031748779ed}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pluginmain.cpp">
|
||||
@@ -251,5 +254,29 @@
|
||||
<ClInclude Include="pluginsdk\_scriptapi.h">
|
||||
<Filter>Header Files\pluginsdk</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\arm.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\arm64.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\m68k.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\mips.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\platform.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\sparc.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\unicorn.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="unicorn\x86.h">
|
||||
<Filter>Header Files\unicorn</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in new issue
Block a user