Skip to content

Commit

Permalink
[x64dbg] SDK update to snapshot 2018-07-01_19-55
Browse files Browse the repository at this point in the history
[x64dbg] fixed issue #39
[x64dbg] SWIG SDK-wrapper updated
[version] bumped up
  • Loading branch information
a1ext committed Jul 2, 2018
1 parent 9a2be9c commit be7586c
Show file tree
Hide file tree
Showing 209 changed files with 31,536 additions and 20,158 deletions.
2 changes: 1 addition & 1 deletion common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 1
#define VERSION_REVISION 2
#define VERSION_BUILD 48
#define VERSION_BUILD 65


#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
Expand Down
2 changes: 1 addition & 1 deletion deploy/labeless/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.2.48
1.1.2.65
776 changes: 732 additions & 44 deletions deploy/labeless/backend/x64dbg/x64dbgapi.py

Large diffs are not rendered by default.

776 changes: 732 additions & 44 deletions deploy/labeless/backend/x64dbg/x64dbgapi64.py

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions labeless_ida/labeless_ida.vcxproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,40 @@
<QTDIR>E:\Qt\4.8.4_msvc2010</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(QTDIR)\bin%3b"$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA69X_x64|x64'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA69X|x64'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA7_x64|x64'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA68_vc120|x64'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA7|x64'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA68_vc120_x64|x64'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA69X|Win32'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA69X_x64|Win32'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA7_x64|Win32'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA68_vc120|Win32'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA7|Win32'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='IDA68_vc120_x64|Win32'">
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions labeless_x64dbg/pluginsdk/TitanEngine/TitanEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ __declspec(dllexport) long TITCALL GetActiveProcessId(const char* szImageName);
__declspec(dllexport) long TITCALL GetActiveProcessIdW(const wchar_t* szImageName);
__declspec(dllexport) void TITCALL EnumProcessesWithLibrary(const char* szLibraryName, void* EnumFunction);
__declspec(dllexport) HANDLE TITCALL TitanOpenProcess(DWORD dwDesiredAccess, bool bInheritHandle, DWORD dwProcessId);
__declspec(dllexport) HANDLE TITCALL TitanOpenThread(DWORD dwDesiredAccess, bool bInheritHandle, DWORD dwThreadId);
// TitanEngine.TLSFixer.functions:
__declspec(dllexport) bool TITCALL TLSBreakOnCallBack(LPVOID ArrayOfCallBacks, DWORD NumberOfCallBacks, LPVOID bpxCallBack);
__declspec(dllexport) bool TITCALL TLSGrabCallBackData(const char* szFileName, LPVOID ArrayOfCallBacks, LPDWORD NumberOfCallBacks);
Expand Down
Binary file modified labeless_x64dbg/pluginsdk/TitanEngine/TitanEngine_x64.a
Binary file not shown.
Binary file modified labeless_x64dbg/pluginsdk/TitanEngine/TitanEngine_x64.lib
Binary file not shown.
Binary file modified labeless_x64dbg/pluginsdk/TitanEngine/TitanEngine_x86.a
Binary file not shown.
Binary file modified labeless_x64dbg/pluginsdk/TitanEngine/TitanEngine_x86.lib
Binary file not shown.
69 changes: 69 additions & 0 deletions labeless_x64dbg/pluginsdk/_dbgfunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,17 @@ typedef struct
{
DWORD dwProcessId;
char szExeFile[MAX_PATH];
char szExeMainWindowTitle[MAX_PATH];
char szExeArgs[MAX_COMMAND_LINE_SIZE];
} DBGPROCESSINFO;

typedef struct
{
DWORD rva;
BYTE type;
WORD size;
} DBGRELOCATIONINFO;

typedef enum
{
InstructionBody = 0,
Expand Down Expand Up @@ -94,6 +102,33 @@ typedef struct
unsigned int State;
} TCPCONNECTIONINFO;

typedef struct
{
duint handle;
duint parent;
DWORD threadId;
DWORD style;
DWORD styleEx;
duint wndProc;
bool enabled;
RECT position;
char windowTitle[MAX_COMMENT_SIZE];
char windowClass[MAX_COMMENT_SIZE];
} WINDOW_INFO;

typedef struct
{
duint addr;
duint size;
duint flags;
} HEAPINFO;

typedef struct
{
const char* name;
duint value;
} CONSTANTINFO;

typedef bool (*ASSEMBLEATEX)(duint addr, const char* instruction, char* error, bool fillnop);
typedef bool (*SECTIONFROMADDR)(duint addr, char* section);
typedef bool (*MODNAMEFROMADDR)(duint addr, char* modname, bool extension);
Expand Down Expand Up @@ -149,7 +184,24 @@ typedef bool(*MEMISCODEPAGE)(duint addr, bool refresh);
typedef bool(*ANIMATECOMMAND)(const char* command);
typedef void(*DBGSETDEBUGGEEINITSCRIPT)(const char* fileName);
typedef const char* (*DBGGETDEBUGGEEINITSCRIPT)();
typedef bool(*HANDLESENUMWINDOWS)(ListOf(WINDOW_INFO) windows);
typedef bool(*HANDLESENUMHEAPS)(ListOf(HEAPINFO) heaps);
typedef bool(*THREADGETNAME)(DWORD tid, char* name);
typedef bool(*ISDEPENABLED)();
typedef void(*GETCALLSTACKEX)(DBGCALLSTACK* callstack, bool cache);
typedef bool(*GETUSERCOMMENT)(duint addr, char* comment);
typedef void(*ENUMCONSTANTS)(ListOf(CONSTANTINFO) constants);
typedef duint(*MEMBPSIZE)(duint addr);
typedef bool(*MODRELOCATIONSFROMADDR)(duint addr, ListOf(DBGRELOCATIONINFO) relocations);
typedef bool(*MODRELOCATIONATADDR)(duint addr, DBGRELOCATIONINFO* relocation);
typedef bool(*MODRELOCATIONSINRANGE)(duint addr, duint size, ListOf(DBGRELOCATIONINFO) relocations);
typedef duint(*DBGETHASH)();
typedef int(*SYMAUTOCOMPLETE)(const char* Search, char** Buffer, int MaxSymbols);
typedef void(*REFRESHMODULELIST)();
typedef duint(*GETADDRFROMLINEEX)(duint mod, const char* szSourceFile, int line);

//The list of all the DbgFunctions() return value.
//WARNING: This list is append only. Do not insert things in the middle or plugins would break.
typedef struct DBGFUNCTIONS_
{
ASSEMBLEATEX AssembleAtEx;
Expand Down Expand Up @@ -207,6 +259,23 @@ typedef struct DBGFUNCTIONS_
ANIMATECOMMAND AnimateCommand;
DBGSETDEBUGGEEINITSCRIPT DbgSetDebuggeeInitScript;
DBGGETDEBUGGEEINITSCRIPT DbgGetDebuggeeInitScript;
HANDLESENUMWINDOWS EnumWindows;
HANDLESENUMHEAPS EnumHeaps;
THREADGETNAME ThreadGetName;
ISDEPENABLED IsDepEnabled;
GETCALLSTACKEX GetCallStackEx;
GETUSERCOMMENT GetUserComment;
ENUMCONSTANTS EnumConstants;
ENUMCONSTANTS EnumErrorCodes;
ENUMCONSTANTS EnumExceptions;
MEMBPSIZE MemBpSize;
MODRELOCATIONSFROMADDR ModRelocationsFromAddr;
MODRELOCATIONATADDR ModRelocationAtAddr;
MODRELOCATIONSINRANGE ModRelocationsInRange;
DBGETHASH DbGetHash;
SYMAUTOCOMPLETE SymAutoComplete;
REFRESHMODULELIST RefreshModuleList;
GETADDRFROMLINEEX GetAddrFromLineEx;
} DBGFUNCTIONS;

#ifdef BUILD_DBG
Expand Down
2 changes: 2 additions & 0 deletions labeless_x64dbg/pluginsdk/_plugin_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#ifdef BUILD_DBG

#include "_global.h"
#include "jansson/jansson.h"
#include <dbghelp.h>

#else

Expand Down
87 changes: 86 additions & 1 deletion labeless_x64dbg/pluginsdk/_plugins.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,58 @@ typedef struct
int loadSaveType;
} PLUG_CB_LOADSAVEDB;

typedef struct
{
const char* symbol;
bool retval;
} PLUG_CB_FILTERSYMBOL;

typedef struct
{
duint cip;
bool stop;
} PLUG_CB_TRACEEXECUTE;

typedef struct
{
int hWindow;
duint VA;
} PLUG_CB_SELCHANGED;

typedef struct
{
BridgeCFGraphList graph;
} PLUG_CB_ANALYZE;

typedef struct
{
duint addr;
BRIDGE_ADDRINFO* addrinfo;
bool retval;
} PLUG_CB_ADDRINFO;

typedef struct
{
const char* string;
duint value;
int* value_size;
bool* isvar;
bool* hexonly;
bool retval;
} PLUG_CB_VALFROMSTRING;

typedef struct
{
const char* string;
duint value;
bool retval;
} PLUG_CB_VALTOSTRING;

typedef struct
{
int hMenu;
} PLUG_CB_MENUPREPARE;

//enums
typedef enum
{
Expand All @@ -201,14 +253,33 @@ typedef enum
CB_WINEVENT, //PLUG_CB_WINEVENT
CB_WINEVENTGLOBAL, //PLUG_CB_WINEVENTGLOBAL
CB_LOADDB, //PLUG_CB_LOADSAVEDB
CB_SAVEDB //PLUG_CB_LOADSAVEDB
CB_SAVEDB, //PLUG_CB_LOADSAVEDB
CB_FILTERSYMBOL, //PLUG_CB_FILTERSYMBOL
CB_TRACEEXECUTE, //PLUG_CB_TRACEEXECUTE
CB_SELCHANGED, //PLUG_CB_SELCHANGED
CB_ANALYZE, //PLUG_CB_ANALYZE
CB_ADDRINFO, //PLUG_CB_ADDRINFO
CB_VALFROMSTRING, //PLUG_CB_VALFROMSTRING
CB_VALTOSTRING, //PLUG_CB_VALTOSTRING
CB_MENUPREPARE, //PLUG_CB_MENUPREPARE
CB_LAST
} CBTYPE;

typedef enum
{
FORMAT_ERROR, //generic failure (no message)
FORMAT_SUCCESS, //success
FORMAT_ERROR_MESSAGE, //formatting failed but an error was put in the buffer (there are always at least 511 characters available).
FORMAT_BUFFER_TOO_SMALL //buffer too small (x64dbg will retry until the buffer is big enough)
} FORMATRESULT;

//typedefs
typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
typedef bool (*CBPLUGINCOMMAND)(int argc, char** argv);
typedef void (*CBPLUGINSCRIPT)();
typedef duint(*CBPLUGINEXPRFUNCTION)(int argc, duint* argv, void* userdata);
typedef FORMATRESULT(*CBPLUGINFORMATFUNCTION)(char* dest, size_t destCount, int argc, char* argv[], duint value, void* userdata);
typedef bool (*CBPLUGINPREDICATE)(void* userdata);

//exports
#ifdef __cplusplus
Expand All @@ -222,6 +293,7 @@ PLUG_IMPEXP bool _plugin_registercommand(int pluginHandle, const char* command,
PLUG_IMPEXP bool _plugin_unregistercommand(int pluginHandle, const char* command);
PLUG_IMPEXP void _plugin_logprintf(const char* format, ...);
PLUG_IMPEXP void _plugin_logputs(const char* text);
PLUG_IMPEXP void _plugin_logprint(const char* text);
PLUG_IMPEXP void _plugin_debugpause();
PLUG_IMPEXP void _plugin_debugskipexceptions(bool skip);
PLUG_IMPEXP int _plugin_menuadd(int hMenu, const char* title);
Expand All @@ -230,10 +302,23 @@ PLUG_IMPEXP bool _plugin_menuaddseparator(int hMenu);
PLUG_IMPEXP bool _plugin_menuclear(int hMenu);
PLUG_IMPEXP void _plugin_menuseticon(int hMenu, const ICONDATA* icon);
PLUG_IMPEXP void _plugin_menuentryseticon(int pluginHandle, int hEntry, const ICONDATA* icon);
PLUG_IMPEXP void _plugin_menuentrysetchecked(int pluginHandle, int hEntry, bool checked);
PLUG_IMPEXP void _plugin_menusetvisible(int pluginHandle, int hMenu, bool visible);
PLUG_IMPEXP void _plugin_menuentrysetvisible(int pluginHandle, int hEntry, bool visible);
PLUG_IMPEXP void _plugin_menusetname(int pluginHandle, int hMenu, const char* name);
PLUG_IMPEXP void _plugin_menuentrysetname(int pluginHandle, int hEntry, const char* name);
PLUG_IMPEXP void _plugin_menuentrysethotkey(int pluginHandle, int hEntry, const char* hotkey);
PLUG_IMPEXP bool _plugin_menuremove(int hMenu);
PLUG_IMPEXP bool _plugin_menuentryremove(int pluginHandle, int hEntry);
PLUG_IMPEXP void _plugin_startscript(CBPLUGINSCRIPT cbScript);
PLUG_IMPEXP bool _plugin_waituntilpaused();
PLUG_IMPEXP bool _plugin_registerexprfunction(int pluginHandle, const char* name, int argc, CBPLUGINEXPRFUNCTION cbFunction, void* userdata);
PLUG_IMPEXP bool _plugin_unregisterexprfunction(int pluginHandle, const char* name);
PLUG_IMPEXP bool _plugin_unload(const char* pluginName);
PLUG_IMPEXP bool _plugin_load(const char* pluginName);
PLUG_IMPEXP duint _plugin_hash(const void* data, duint size);
PLUG_IMPEXP bool _plugin_registerformatfunction(int pluginHandle, const char* type, CBPLUGINFORMATFUNCTION cbFunction, void* userdata);
PLUG_IMPEXP bool _plugin_unregisterformatfunction(int pluginHandle, const char* type);

#ifdef __cplusplus
}
Expand Down
5 changes: 3 additions & 2 deletions labeless_x64dbg/pluginsdk/_scriptapi_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ namespace Script
SCRIPT_EXPORT bool GetInfo(duint addr, FunctionInfo* info);
SCRIPT_EXPORT bool Overlaps(duint start, duint end);
SCRIPT_EXPORT bool Delete(duint address);
SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual = false);
SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual);
SCRIPT_EXPORT void DeleteRange(duint start, duint end);
SCRIPT_EXPORT void Clear();
SCRIPT_EXPORT bool GetList(ListOf(FunctionInfo) list); //caller has the responsibility to free the list
}; //Function
}; //Script

#endif //_SCRIPTAPI_FUNCTION_H
#endif //_SCRIPTAPI_FUNCTION_H
20 changes: 19 additions & 1 deletion labeless_x64dbg/pluginsdk/_scriptapi_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ namespace Script
SCRIPT_EXPORT duint SelectionGetStart();
SCRIPT_EXPORT duint SelectionGetEnd();
}; //Stack

namespace Graph
{
SCRIPT_EXPORT duint SelectionGetStart();
}; //Graph

namespace MemMap
{
SCRIPT_EXPORT duint SelectionGetStart();
}; //MemoryMap

namespace SymMod
{
SCRIPT_EXPORT duint SelectionGetStart();
}; //SymMod
}; //Gui

namespace Gui
Expand All @@ -38,7 +53,10 @@ namespace Script
{
DisassemblyWindow,
DumpWindow,
StackWindow
StackWindow,
GraphWindow,
MemMapWindow,
SymModWindow
};

SCRIPT_EXPORT bool SelectionGet(Window window, duint* start, duint* end);
Expand Down
3 changes: 3 additions & 0 deletions labeless_x64dbg/pluginsdk/_scriptapi_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace Script
SCRIPT_EXPORT bool IsValidPtr(duint addr);
SCRIPT_EXPORT duint RemoteAlloc(duint addr, duint size);
SCRIPT_EXPORT bool RemoteFree(duint addr);
SCRIPT_EXPORT unsigned int GetProtect(duint addr, bool reserved = false, bool cache = true);
SCRIPT_EXPORT duint GetBase(duint addr, bool reserved = false, bool cache = true);
SCRIPT_EXPORT duint GetSize(duint addr, bool reserved = false, bool cache = true);

SCRIPT_EXPORT unsigned char ReadByte(duint addr);
SCRIPT_EXPORT bool WriteByte(duint addr, unsigned char data);
Expand Down
Loading

0 comments on commit be7586c

Please sign in to comment.