1
0
Fork 0

DBG: added function 'disasmtext'

DBG: added BeaEngine import libraries
This commit is contained in:
mr.exodia 2013-12-21 14:58:20 +01:00
parent df3c3df6bc
commit 09f622e3e1
4 changed files with 23 additions and 2 deletions

View File

@ -1,2 +1,18 @@
#include "disasm_helper.h" #include "disasm_helper.h"
#include "BeaEngine\BeaEngine.h" #include "BeaEngine\BeaEngine.h"
const char* disasmtext(uint addr)
{
unsigned char buffer[16]="";
DbgMemRead(addr, buffer, 16);
DISASM disasm;
disasm.VirtualAddr=addr;
disasm.EIP=(UIntPtr)buffer;
int len=Disasm(&disasm);
static char instruction[INSTRUCT_LENGTH]="";
if(len==UNKNOWN_OPCODE)
strcpy(instruction, "???");
else
strcpy(instruction, disasm.CompleteInstr);
return instruction;
}

View File

@ -3,4 +3,7 @@
#include "_global.h" #include "_global.h"
//functions
const char* disasmtext(uint addr);
#endif // _DISASM_HELPER_H #endif // _DISASM_HELPER_H

View File

@ -26,6 +26,7 @@
<Add library=".\libdbg_x32.a" /> <Add library=".\libdbg_x32.a" />
<Add library=".\dbghelp\dbghelp_x86.a" /> <Add library=".\dbghelp\dbghelp_x86.a" />
<Add library=".\sqlite\libsqlite32.a" /> <Add library=".\sqlite\libsqlite32.a" />
<Add library=".\BeaEngine\libBeaEngine.a" />
</Linker> </Linker>
</Target> </Target>
<Target title="x64"> <Target title="x64">
@ -47,6 +48,7 @@
<Add library=".\libdbg_x64.a" /> <Add library=".\libdbg_x64.a" />
<Add library=".\dbghelp\dbghelp_x64.a" /> <Add library=".\dbghelp\dbghelp_x64.a" />
<Add library=".\sqlite\libsqlite64.a" /> <Add library=".\sqlite\libsqlite64.a" />
<Add library=".\BeaEngine\libBeaEngine_64.a" />
</Linker> </Linker>
</Target> </Target>
</Build> </Build>

View File

@ -108,7 +108,7 @@
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)bin\x32\x32_bridge.lib;dbghelp\dbghelp_x86.lib;TitanEngine\TitanEngine_x86.lib;sqlite\sqlite32.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>$(SolutionDir)bin\x32\x32_bridge.lib;dbghelp\dbghelp_x86.lib;TitanEngine\TitanEngine_x86.lib;sqlite\sqlite32.lib;BeaEngine\BeaEngine.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -123,7 +123,7 @@
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>$(SolutionDir)bin\x64\x64_bridge.lib;dbghelp\dbghelp_x64.lib;TitanEngine\TitanEngine_x64.lib;sqlite\sqlite64.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>$(SolutionDir)bin\x64\x64_bridge.lib;dbghelp\dbghelp_x64.lib;TitanEngine\TitanEngine_x64.lib;sqlite\sqlite64.lib;BeaEngine\BeaEngine_64.lib;psapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />