DBG+GUI+PROJECT: added asmjit assembler engine
This commit is contained in:
parent
f490c5ab03
commit
b1d55acb9e
|
@ -47,7 +47,7 @@ Releases of *x64dbg* can be found [here](http://releases.x64dbg.com).
|
||||||
- Multi-datatype memory dump
|
- Multi-datatype memory dump
|
||||||
- Basic debug symbol (PDB) support
|
- Basic debug symbol (PDB) support
|
||||||
- Dynamic stack view
|
- Dynamic stack view
|
||||||
- Built-in assembler (XEDParse/Keystone)
|
- Built-in assembler (XEDParse/Keystone/asmjit)
|
||||||
- Executable patching
|
- Executable patching
|
||||||
- Yara Pattern Matching
|
- Yara Pattern Matching
|
||||||
- Decompiler (Snowman)
|
- Decompiler (Snowman)
|
||||||
|
@ -61,10 +61,12 @@ Releases of *x64dbg* can be found [here](http://releases.x64dbg.com).
|
||||||
|
|
||||||
- Debugger core by [TitanEngine Community Edition](https://bitbucket.org/titanengineupdate/titanengine-update)
|
- Debugger core by [TitanEngine Community Edition](https://bitbucket.org/titanengineupdate/titanengine-update)
|
||||||
- Disassembly powered by [Capstone](http://capstone-engine.org)
|
- Disassembly powered by [Capstone](http://capstone-engine.org)
|
||||||
- Assembly powered by [XEDParse](https://bitbucket.org/mrexodia/xedparse)
|
- Assembly powered by [XEDParse](https://github.com/x64dbg/XEDParse), [Keystone](http://keystone-engine.org) and [asmjit](https://github.com/asmjit)
|
||||||
- Import reconstruction powered by [Scylla](https://github.com/NtQuery/Scylla)
|
- Import reconstruction powered by [Scylla](https://github.com/NtQuery/Scylla)
|
||||||
- JSON powered by [Jansson](http://www.digip.org/jansson)
|
- JSON powered by [Jansson](http://www.digip.org/jansson)
|
||||||
- Database compression powered by [lz4](https://bitbucket.org/mrexodia/lz4)
|
- Database compression powered by [lz4](https://bitbucket.org/mrexodia/lz4)
|
||||||
|
- Advanced pattern matching powered by [yara](http://virustotal.github.io/yara)
|
||||||
|
- Decompilation powered by [snowman](https://derevenets.com)
|
||||||
- Bug icon by [VisualPharm](http://www.visualpharm.com)
|
- Bug icon by [VisualPharm](http://www.visualpharm.com)
|
||||||
- Interface icons by [Fugue](http://p.yusukekamiyamane.com)
|
- Interface icons by [Fugue](http://p.yusukekamiyamane.com)
|
||||||
- Website by [tr4ceflow](http://tr4ceflow.com)
|
- Website by [tr4ceflow](http://tr4ceflow.com)
|
||||||
|
@ -88,8 +90,9 @@ Releases of *x64dbg* can be found [here](http://releases.x64dbg.com).
|
||||||
- ahmadmansoor
|
- ahmadmansoor
|
||||||
- \_pusher\_
|
- \_pusher\_
|
||||||
- firelegend
|
- firelegend
|
||||||
- kao
|
- [kao](http://lifeinhex.com)
|
||||||
- sstrato
|
- sstrato
|
||||||
|
- [kobalicek](https://github.com/kobalicek)
|
||||||
|
|
||||||
## Developers
|
## Developers
|
||||||
|
|
||||||
|
|
11
release.bat
11
release.bat
|
@ -39,6 +39,7 @@ copy bin\x32\jansson.dll %RELEASEDIR%\bin_base\x32\
|
||||||
copy bin\x32\lz4.dll %RELEASEDIR%\bin_base\x32\
|
copy bin\x32\lz4.dll %RELEASEDIR%\bin_base\x32\
|
||||||
copy bin\x32\TitanEngine.dll %RELEASEDIR%\bin_base\x32\
|
copy bin\x32\TitanEngine.dll %RELEASEDIR%\bin_base\x32\
|
||||||
copy bin\x32\XEDParse.dll %RELEASEDIR%\bin_base\x32\
|
copy bin\x32\XEDParse.dll %RELEASEDIR%\bin_base\x32\
|
||||||
|
copy bin\x32\asmjit.dll %RELEASEDIR%\bin_base\x32\
|
||||||
copy bin\x32\yara.dll %RELEASEDIR%\bin_base\x32\
|
copy bin\x32\yara.dll %RELEASEDIR%\bin_base\x32\
|
||||||
copy bin\x32\snowman.dll %RELEASEDIR%\bin_base\x32\
|
copy bin\x32\snowman.dll %RELEASEDIR%\bin_base\x32\
|
||||||
copy bin\x32\keystone.dll %RELEASEDIR%\bin_base\x32\
|
copy bin\x32\keystone.dll %RELEASEDIR%\bin_base\x32\
|
||||||
|
@ -53,6 +54,7 @@ copy bin\x64\jansson.dll %RELEASEDIR%\bin_base\x64\
|
||||||
copy bin\x64\lz4.dll %RELEASEDIR%\bin_base\x64\
|
copy bin\x64\lz4.dll %RELEASEDIR%\bin_base\x64\
|
||||||
copy bin\x64\TitanEngine.dll %RELEASEDIR%\bin_base\x64\
|
copy bin\x64\TitanEngine.dll %RELEASEDIR%\bin_base\x64\
|
||||||
copy bin\x64\XEDParse.dll %RELEASEDIR%\bin_base\x64\
|
copy bin\x64\XEDParse.dll %RELEASEDIR%\bin_base\x64\
|
||||||
|
copy bin\x64\asmjit.dll %RELEASEDIR%\bin_base\x64\
|
||||||
copy bin\x64\yara.dll %RELEASEDIR%\bin_base\x64\
|
copy bin\x64\yara.dll %RELEASEDIR%\bin_base\x64\
|
||||||
copy bin\x64\snowman.dll %RELEASEDIR%\bin_base\x64\
|
copy bin\x64\snowman.dll %RELEASEDIR%\bin_base\x64\
|
||||||
copy bin\x64\keystone.dll %RELEASEDIR%\bin_base\x64\
|
copy bin\x64\keystone.dll %RELEASEDIR%\bin_base\x64\
|
||||||
|
@ -126,23 +128,16 @@ copy bin\x96dbg.exe %RELEASEDIR%\release\
|
||||||
copy bin\mnemdb.json %RELEASEDIR%\release\
|
copy bin\mnemdb.json %RELEASEDIR%\release\
|
||||||
copy bin\errordb.txt %RELEASEDIR%\release\
|
copy bin\errordb.txt %RELEASEDIR%\release\
|
||||||
copy bin\exceptiondb.txt %RELEASEDIR%\release\
|
copy bin\exceptiondb.txt %RELEASEDIR%\release\
|
||||||
|
copy bin\ntstatusdb.txt %RELEASEDIR%\release\
|
||||||
xcopy src\gui\Translations\*.qm %RELEASEDIR%\release\translations /S /Y
|
xcopy src\gui\Translations\*.qm %RELEASEDIR%\release\translations /S /Y
|
||||||
copy bin\x32\x32bridge.dll %RELEASEDIR%\release\x32\
|
copy bin\x32\x32bridge.dll %RELEASEDIR%\release\x32\
|
||||||
copy bin\x32\x32bridge.pdb %RELEASEDIR%\release\x32\
|
|
||||||
copy bin\x32\x32dbg.dll %RELEASEDIR%\release\x32\
|
copy bin\x32\x32dbg.dll %RELEASEDIR%\release\x32\
|
||||||
copy bin\x32\x32dbg.pdb %RELEASEDIR%\release\x32\
|
|
||||||
copy bin\x32\x32dbg.exe %RELEASEDIR%\release\x32\
|
copy bin\x32\x32dbg.exe %RELEASEDIR%\release\x32\
|
||||||
copy bin\x32\x32dbg_exe.pdb %RELEASEDIR%\release\x32\
|
|
||||||
copy bin\x32\x32gui.dll %RELEASEDIR%\release\x32\
|
copy bin\x32\x32gui.dll %RELEASEDIR%\release\x32\
|
||||||
copy bin\x32\x32gui.pdb %RELEASEDIR%\release\x32\
|
|
||||||
copy bin\x64\x64bridge.dll %RELEASEDIR%\release\x64\
|
copy bin\x64\x64bridge.dll %RELEASEDIR%\release\x64\
|
||||||
copy bin\x64\x64bridge.pdb %RELEASEDIR%\release\x64\
|
|
||||||
copy bin\x64\x64dbg.dll %RELEASEDIR%\release\x64\
|
copy bin\x64\x64dbg.dll %RELEASEDIR%\release\x64\
|
||||||
copy bin\x64\x64dbg.pdb %RELEASEDIR%\release\x64\
|
|
||||||
copy bin\x64\x64dbg.exe %RELEASEDIR%\release\x64\
|
copy bin\x64\x64dbg.exe %RELEASEDIR%\release\x64\
|
||||||
copy bin\x64\x64dbg_exe.pdb %RELEASEDIR%\release\x64\
|
|
||||||
copy bin\x64\x64gui.dll %RELEASEDIR%\release\x64\
|
copy bin\x64\x64gui.dll %RELEASEDIR%\release\x64\
|
||||||
copy bin\x64\x64gui.pdb %RELEASEDIR%\release\x64\
|
|
||||||
|
|
||||||
xcopy %RELEASEDIR%\qt_base %RELEASEDIR%\release /S /Y
|
xcopy %RELEASEDIR%\qt_base %RELEASEDIR%\release /S /Y
|
||||||
xcopy %RELEASEDIR%\bin_base %RELEASEDIR%\release /S /Y
|
xcopy %RELEASEDIR%\bin_base %RELEASEDIR%\release /S /Y
|
||||||
|
|
|
@ -100,6 +100,18 @@ namespace Keystone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace asmjit
|
||||||
|
{
|
||||||
|
static XEDPARSE_STATUS XEDParseAssemble(XEDPARSE* XEDParse)
|
||||||
|
{
|
||||||
|
static auto asmjitAssemble = (XEDPARSE_STATUS(*)(XEDPARSE*))GetProcAddress(LoadLibraryW(L"asmjit.dll"), "XEDParseAssemble");
|
||||||
|
if(asmjitAssemble)
|
||||||
|
return asmjitAssemble(XEDParse);
|
||||||
|
strcpy_s(XEDParse->error, "asmjit not found!");
|
||||||
|
return XEDPARSE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool cbUnknown(const char* text, ULONGLONG* value)
|
static bool cbUnknown(const char* text, ULONGLONG* value)
|
||||||
{
|
{
|
||||||
if(!text || !value)
|
if(!text || !value)
|
||||||
|
@ -132,6 +144,8 @@ bool assemble(duint addr, unsigned char* dest, int destsize, int* size, const ch
|
||||||
auto DoAssemble = XEDParseAssemble;
|
auto DoAssemble = XEDParseAssemble;
|
||||||
if(assemblerEngine == AssemblerEngine::Keystone)
|
if(assemblerEngine == AssemblerEngine::Keystone)
|
||||||
DoAssemble = Keystone::XEDParseAssemble;
|
DoAssemble = Keystone::XEDParseAssemble;
|
||||||
|
else if(assemblerEngine == AssemblerEngine::asmjit)
|
||||||
|
DoAssemble = asmjit::XEDParseAssemble;
|
||||||
if(DoAssemble(&parse) == XEDPARSE_ERROR)
|
if(DoAssemble(&parse) == XEDPARSE_ERROR)
|
||||||
{
|
{
|
||||||
if(error)
|
if(error)
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
enum class AssemblerEngine
|
enum class AssemblerEngine
|
||||||
{
|
{
|
||||||
XEDParse = 0,
|
XEDParse = 0,
|
||||||
Keystone = 1
|
Keystone = 1,
|
||||||
|
asmjit = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
extern AssemblerEngine assemblerEngine;
|
extern AssemblerEngine assemblerEngine;
|
||||||
|
|
|
@ -115,7 +115,7 @@ void AssembleDialog::instructionChangedSlot(dsint sizeDifference, QString error)
|
||||||
// If there was an error
|
// If there was an error
|
||||||
if(error.length())
|
if(error.length())
|
||||||
{
|
{
|
||||||
setKeepSizeLabel(tr("<font color='orange'><b>Instruction encoding error : %1</b></font>").arg(error));
|
setKeepSizeLabel(tr("<font color='orange'><b>Instruction encoding error: %1</b></font>").arg(error));
|
||||||
setOkButtonEnabled(false);
|
setOkButtonEnabled(false);
|
||||||
}
|
}
|
||||||
else if(ui->checkBoxKeepSize->isChecked())
|
else if(ui->checkBoxKeepSize->isChecked())
|
||||||
|
@ -187,3 +187,10 @@ void AssembleDialog::on_radioKeystone_clicked()
|
||||||
DbgSettingsUpdated();
|
DbgSettingsUpdated();
|
||||||
validateInstruction(ui->lineEdit->text());
|
validateInstruction(ui->lineEdit->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AssembleDialog::on_radioAsmjit_clicked()
|
||||||
|
{
|
||||||
|
BridgeSettingSetUint("Engine", "Assembler", 2);
|
||||||
|
DbgSettingsUpdated();
|
||||||
|
validateInstruction(ui->lineEdit->text());
|
||||||
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ private slots:
|
||||||
void on_checkBoxFillWithNops_clicked(bool checked);
|
void on_checkBoxFillWithNops_clicked(bool checked);
|
||||||
void on_radioXEDParse_clicked();
|
void on_radioXEDParse_clicked();
|
||||||
void on_radioKeystone_clicked();
|
void on_radioKeystone_clicked();
|
||||||
|
void on_radioAsmjit_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AssembleDialog* ui;
|
Ui::AssembleDialog* ui;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>501</width>
|
<width>558</width>
|
||||||
<height>85</height>
|
<height>85</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -79,6 +79,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioAsmjit">
|
||||||
|
<property name="text">
|
||||||
|
<string>&asmjit</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
Loading…
Reference in New Issue