language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
C++
x64dbg-development/src/dbg/_scriptapi_register.cpp
#include "_scriptapi_register.h" #include "value.h" #include "debugger.h" #include "TraceRecord.h" static const char* regTable[] = { "DR0", "DR1", "DR2", "DR3", "DR6", "DR7", "EAX", "AX", "AH", "AL", "EBX", "BX", "BH", "BL", "ECX", "CX", "CH", "C...
C/C++
x64dbg-development/src/dbg/_scriptapi_register.h
#ifndef _SCRIPTAPI_REGISTER_H #define _SCRIPTAPI_REGISTER_H #include "_scriptapi.h" namespace Script { namespace Register { enum RegisterEnum { DR0, DR1, DR2, DR3, DR6, DR7, EAX, AX, AH...
C++
x64dbg-development/src/dbg/_scriptapi_stack.cpp
#include "_scriptapi_stack.h" #include "_scriptapi_memory.h" #include "_scriptapi_register.h" SCRIPT_EXPORT duint Script::Stack::Pop() { duint csp = Register::GetCSP(); duint top = Memory::ReadPtr(csp); Register::SetCSP(csp + sizeof(duint)); return top; } SCRIPT_EXPORT duint Script::Stack::Push(duint ...
C/C++
x64dbg-development/src/dbg/_scriptapi_stack.h
#ifndef _SCRIPTAPI_STACK_H #define _SCRIPTAPI_STACK_H #include "_scriptapi.h" namespace Script { namespace Stack { SCRIPT_EXPORT duint Pop(); SCRIPT_EXPORT duint Push(duint value); //returns the previous top, equal to Peek(1) SCRIPT_EXPORT duint Peek(int offset = 0); //offset is in mul...
C++
x64dbg-development/src/dbg/_scriptapi_symbol.cpp
#include "_scriptapi_symbol.h" #include "_scriptapi_label.h" #include "symbolinfo.h" using namespace Script::Symbol; struct cbSymbolEnumCtx { const SYMBOLMODULEINFO* module; std::vector<SymbolInfo>* symbols; }; static bool cbSymbolEnum(const SYMBOLPTR* ptr, void* user) { auto ctx = (cbSymbolEnumCtx*)user...
C/C++
x64dbg-development/src/dbg/_scriptapi_symbol.h
#ifndef _SCRIPTAPI_SYMBOL_H #define _SCRIPTAPI_SYMBOL_H #include "_scriptapi.h" namespace Script { namespace Symbol { enum SymbolType { Function, //user-defined function Import, //IAT entry Export //export }; struct SymbolInfo { ...
C++
x64dbg-development/src/dbg/analysis/advancedanalysis.cpp
#include "advancedanalysis.h" #include <queue> #include "console.h" #include "filehelper.h" #include "function.h" #include "xrefs.h" #include "encodemap.h" AdvancedAnalysis::AdvancedAnalysis(duint base, duint size, bool dump) : Analysis(base, size), mDump(dump) { mEncMap = new byte[size]; memset(mEnc...
C/C++
x64dbg-development/src/dbg/analysis/advancedanalysis.h
#pragma once #include "analysis.h" class AdvancedAnalysis : public Analysis { public: explicit AdvancedAnalysis(duint base, duint size, bool dump = false); ~AdvancedAnalysis(); void Analyse() override; void SetMarkers() override; using UintSet = std::unordered_set<duint>; template<class T> ...
C++
x64dbg-development/src/dbg/analysis/analysis.cpp
#include "analysis.h" #include "memory.h" #include "debugger.h" Analysis::Analysis(duint base, duint size) { mBase = base; mSize = size; mData = new unsigned char[mSize + MAX_DISASM_BUFFER]; memset(mData, 0xCC, mSize + MAX_DISASM_BUFFER); MemReadDumb(base, mData, size); } Analysis::~Analysis() { ...
C/C++
x64dbg-development/src/dbg/analysis/analysis.h
#ifndef _ANALYSIS_H #define _ANALYSIS_H #include "_global.h" #include <zydis_wrapper.h> class Analysis { public: explicit Analysis(duint base, duint size); Analysis(const Analysis & that) = delete; virtual ~Analysis(); virtual void Analyse() = 0; virtual void SetMarkers() = 0; protected: duin...
C++
x64dbg-development/src/dbg/analysis/AnalysisPass.cpp
#include <assert.h> #include <thread> #include "AnalysisPass.h" #include "memory.h" AnalysisPass::AnalysisPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks) : m_MainBlocks(MainBlocks) { assert(VirtualEnd > VirtualStart); // Internal class data m_VirtualStart = VirtualStart; m_Virtual...
C/C++
x64dbg-development/src/dbg/analysis/AnalysisPass.h
#pragma once #include "_global.h" #include "BasicBlock.h" class AnalysisPass { public: AnalysisPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks); virtual ~AnalysisPass(); virtual const char* GetName() = 0; virtual bool Analyse() = 0; protected: duint m_VirtualStart; duint ...
C++
x64dbg-development/src/dbg/analysis/analysis_nukem.cpp
#include "analysis_nukem.h" #include "BasicBlock.h" #include "LinearPass.h" #include "FunctionPass.h" #include "console.h" void Analyse_nukem(duint base, duint size) { dputs("Starting analysis (Nukem)..."); DWORD ticks = GetTickCount(); duint end = base + size; BBlockArray blocks; LinearPass pas...
C/C++
x64dbg-development/src/dbg/analysis/BasicBlock.h
#pragma once #include "_global.h" enum BasicBlockFlags : duint { BASIC_BLOCK_FLAG_NONE = 0, // No flag BASIC_BLOCK_FLAG_FUNCTION = (1 << 1), // Scanned; also part of a known function BASIC_BLOCK_FLAG_CUTOFF = (1 << 3), // Ends prematurely because of another JMP to location ...
C++
x64dbg-development/src/dbg/analysis/CodeFollowPass.cpp
#include "AnalysisPass.h" #include "CodeFollowPass.h" CodeFollowPass::CodeFollowPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks) : AnalysisPass(VirtualStart, VirtualEnd, MainBlocks) { } CodeFollowPass::~CodeFollowPass() { } const char* CodeFollowPass::GetName() { return "Code Follower"; ...
C/C++
x64dbg-development/src/dbg/analysis/CodeFollowPass.h
#pragma once #include "AnalysisPass.h" #include "BasicBlock.h" #include <zydis_wrapper.h> class CodeFollowPass : public AnalysisPass { public: CodeFollowPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks); virtual ~CodeFollowPass(); virtual const char* GetName() override; virtual boo...
C++
x64dbg-development/src/dbg/analysis/controlflowanalysis.cpp
#include "controlflowanalysis.h" #include "console.h" #include "module.h" #include "TitanEngine/TitanEngine.h" #include "memory.h" #include "function.h" ControlFlowAnalysis::ControlFlowAnalysis(duint base, duint size, bool exceptionDirectory) : Analysis(base, size), mFunctionInfoSize(0), mFunctionInfoD...
C/C++
x64dbg-development/src/dbg/analysis/controlflowanalysis.h
#ifndef _CONTROLFLOWANALYSIS_H #define _CONTROLFLOWANALYSIS_H #include "_global.h" #include "analysis.h" #include "addrinfo.h" #include <functional> class ControlFlowAnalysis : public Analysis { public: explicit ControlFlowAnalysis(duint base, duint size, bool exceptionDirectory); ~ControlFlowAnalysis(); ...
C++
x64dbg-development/src/dbg/analysis/exceptiondirectoryanalysis.cpp
#include "exceptiondirectoryanalysis.h" #include "module.h" #include "TitanEngine/TitanEngine.h" #include "memory.h" #include "console.h" #include "function.h" ExceptionDirectoryAnalysis::ExceptionDirectoryAnalysis(duint base, duint size) : Analysis(base, size), mFunctionInfoSize(0), mFunctionInfoData(...
C/C++
x64dbg-development/src/dbg/analysis/exceptiondirectoryanalysis.h
#ifndef _EXCEPTIONDIRECTORYANALYSIS_H #define _EXCEPTIONDIRECTORYANALYSIS_H #include "analysis.h" #include <functional> class ExceptionDirectoryAnalysis : public Analysis { public: explicit ExceptionDirectoryAnalysis(duint base, duint size); ~ExceptionDirectoryAnalysis(); void Analyse() override; void...
C++
x64dbg-development/src/dbg/analysis/FunctionPass.cpp
#include "FunctionPass.h" #include <ppl.h> #include "memory.h" #include "console.h" #include "debugger.h" #include "module.h" #include "function.h" FunctionPass::FunctionPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks) : AnalysisPass(VirtualStart, VirtualEnd, MainBlocks) { // Zero values ...
C/C++
x64dbg-development/src/dbg/analysis/FunctionPass.h
#pragma once #include <functional> #include "AnalysisPass.h" #include "BasicBlock.h" class FunctionPass : public AnalysisPass { public: FunctionPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks); virtual ~FunctionPass(); virtual const char* GetName() override; virtual bool Analyse()...
C++
x64dbg-development/src/dbg/analysis/linearanalysis.cpp
#include "linearanalysis.h" #include "console.h" #include "memory.h" #include "function.h" #include <algorithm> LinearAnalysis::LinearAnalysis(duint base, duint size) : Analysis(base, size) { } void LinearAnalysis::Analyse() { dputs("Starting analysis..."); auto ticks = GetTickCount(); populateReferences...
C/C++
x64dbg-development/src/dbg/analysis/linearanalysis.h
#ifndef _LINEARANALYSIS_H #define _LINEARANALYSIS_H #include "_global.h" #include "analysis.h" class LinearAnalysis : public Analysis { public: explicit LinearAnalysis(duint base, duint size); void Analyse() override; void SetMarkers() override; private: struct FunctionInfo { duint start;...
C++
x64dbg-development/src/dbg/analysis/LinearPass.cpp
#include <thread> #include <ppl.h> #include "AnalysisPass.h" #include "LinearPass.h" #include <zydis_wrapper.h> LinearPass::LinearPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks) : AnalysisPass(VirtualStart, VirtualEnd, MainBlocks) { // This is a fix for when the total data analysis size is...
C/C++
x64dbg-development/src/dbg/analysis/LinearPass.h
#pragma once #include "AnalysisPass.h" #include "BasicBlock.h" class LinearPass : public AnalysisPass { public: LinearPass(duint VirtualStart, duint VirtualEnd, BBlockArray & MainBlocks); virtual ~LinearPass(); virtual const char* GetName() override; virtual bool Analyse() override; void AnalyseO...
C++
x64dbg-development/src/dbg/analysis/recursiveanalysis.cpp
#include "recursiveanalysis.h" #include <queue> #include "console.h" #include "filehelper.h" #include "function.h" #include "label.h" #include "xrefs.h" #include "plugin_loader.h" #include "loop.h" #include <set> #include <map> RecursiveAnalysis::RecursiveAnalysis(duint base, duint size, duint entryPoint, bool usePlug...
C/C++
x64dbg-development/src/dbg/analysis/recursiveanalysis.h
#pragma once #include "analysis.h" class RecursiveAnalysis : public Analysis { public: explicit RecursiveAnalysis(duint base, duint size, duint entryPoint, bool usePlugins, bool dump = false); void Analyse() override; void SetMarkers() override; using UintSet = std::unordered_set<duint>; templat...
C++
x64dbg-development/src/dbg/analysis/xrefsanalysis.cpp
#include "xrefsanalysis.h" #include "xrefs.h" #include "console.h" #include <module.h> XrefsAnalysis::XrefsAnalysis(duint base, duint size) : Analysis(base, size) { modbase = ModBaseFromAddr(base); modsize = ModSizeFromAddr(modbase); } void XrefsAnalysis::Analyse() { dputs("Starting xref analysis...")...
C/C++
x64dbg-development/src/dbg/analysis/xrefsanalysis.h
#pragma once #include "analysis.h" class XrefsAnalysis : public Analysis { public: XrefsAnalysis(duint base, duint size); void Analyse() override; void SetMarkers() override; private: struct XREF { duint addr; duint from; }; std::vector<XREF> mXrefs; duint modbase =...
C/C++
x64dbg-development/src/dbg/commands/cmd-all.h
#pragma once #include "cmd-general-purpose.h" #include "cmd-debug-control.h" #include "cmd-breakpoint-control.h" #include "cmd-conditional-breakpoint-control.h" #include "cmd-tracing.h" #include "cmd-thread-control.h" #include "cmd-memory-operations.h" #include "cmd-operating-system-control.h" #include "cmd-watch-cont...
C++
x64dbg-development/src/dbg/commands/cmd-analysis.cpp
#include "cmd-analysis.h" #include "ntdll/ntdll.h" #include "linearanalysis.h" #include "memory.h" #include "exceptiondirectoryanalysis.h" #include "controlflowanalysis.h" #include "analysis_nukem.h" #include "xrefsanalysis.h" #include "recursiveanalysis.h" #include "value.h" #include "advancedanalysis.h" #include "deb...
C/C++
x64dbg-development/src/dbg/commands/cmd-analysis.h
#pragma once #include "command.h" bool cbInstrAnalyse(int argc, char* argv[]); bool cbInstrExanalyse(int argc, char* argv[]); bool cbInstrCfanalyse(int argc, char* argv[]); bool cbInstrAnalyseNukem(int argc, char* argv[]); bool cbInstrAnalxrefs(int argc, char* argv[]); bool cbInstrAnalrecur(int argc, char* argv[]); b...
C++
x64dbg-development/src/dbg/commands/cmd-breakpoint-control.cpp
#include "cmd-breakpoint-control.h" #include "console.h" #include "memory.h" #include "debugger.h" #include "exception.h" #include "value.h" // breakpoint enumeration callbacks static bool cbDeleteAllBreakpoints(const BREAKPOINT* bp) { if(bp->type != BPNORMAL) return true; if(!BpDelete(*bp)) { ...
C/C++
x64dbg-development/src/dbg/commands/cmd-breakpoint-control.h
#pragma once #include "command.h" bool cbDebugSetBPX(int argc, char* argv[]); bool cbDebugDeleteBPX(int argc, char* argv[]); bool cbDebugEnableBPX(int argc, char* argv[]); bool cbDebugDisableBPX(int argc, char* argv[]); bool cbDebugSetHardwareBreakpoint(int argc, char* argv[]); bool cbDebugDeleteHardwareBreakpoint(in...
C++
x64dbg-development/src/dbg/commands/cmd-conditional-breakpoint-control.cpp
#include "cmd-conditional-breakpoint-control.h" #include "breakpoint.h" #include "debugger.h" #include "console.h" #include "variable.h" #include "value.h" #include <functional> static bool cbDebugSetBPXTextCommon(BP_TYPE Type, int argc, char* argv[], const String & description, const std::function<bool(duint, BP_TYPE...
C/C++
x64dbg-development/src/dbg/commands/cmd-conditional-breakpoint-control.h
#pragma once #include "command.h" bool cbDebugSetBPXName(int argc, char* argv[]); bool cbDebugSetBPXCondition(int argc, char* argv[]); bool cbDebugSetBPXLog(int argc, char* argv[]); bool cbDebugSetBPXLogCondition(int argc, char* argv[]); bool cbDebugSetBPXCommand(int argc, char* argv[]); bool cbDebugSetBPXCommandCond...
C++
x64dbg-development/src/dbg/commands/cmd-debug-control.cpp
#include "cmd-debug-control.h" #include "ntdll/ntdll.h" #include "console.h" #include "debugger.h" #include "animate.h" #include "historycontext.h" #include "threading.h" #include "memory.h" #include "disasm_fast.h" #include "plugin_loader.h" #include "value.h" #include "TraceRecord.h" #include "handle.h" #include "thr...
C/C++
x64dbg-development/src/dbg/commands/cmd-debug-control.h
#pragma once #include "command.h" enum HistoryAction { history_clear, history_record, }; bool cbDebugRunInternal(int argc, char* argv[], HistoryAction history); bool cbDebugInit(int argc, char* argv[]); bool cbDebugStop(int argc, char* argv[]); bool cbDebugAttach(int argc, char* argv[]); bool cbDebugDetach(i...
C++
x64dbg-development/src/dbg/commands/cmd-general-purpose.cpp
#include "cmd-general-purpose.h" #include "value.h" #include "memory.h" #include "variable.h" #include "_scriptapi_stack.h" #include "debugger.h" #include <intrin.h> static bool ReadWriteVariable(const char* varname, const std::function<bool(duint*, int)> & callback) { duint set_value = 0; bool isvar; int ...
C/C++
x64dbg-development/src/dbg/commands/cmd-general-purpose.h
#pragma once #include "command.h" bool cbInstrInc(int argc, char* argv[]); bool cbInstrDec(int argc, char* argv[]); bool cbInstrAdd(int argc, char* argv[]); bool cbInstrSub(int argc, char* argv[]); bool cbInstrMul(int argc, char* argv[]); bool cbInstrDiv(int argc, char* argv[]); bool cbInstrAnd(int argc, char* argv[]...
C++
x64dbg-development/src/dbg/commands/cmd-gui.cpp
#include "cmd-gui.h" #include "debugger.h" #include "console.h" #include "memory.h" #include "recursiveanalysis.h" #include "function.h" #include "stringformat.h" #include "value.h" #include "variable.h" bool cbDebugDisasm(int argc, char* argv[]) { duint addr = 0; if(argc > 1) { if(!valfromstring(a...
C/C++
x64dbg-development/src/dbg/commands/cmd-gui.h
#pragma once #include "command.h" bool cbDebugDisasm(int argc, char* argv[]); bool cbDebugDump(int argc, char* argv[]); bool cbDebugStackDump(int argc, char* argv[]); bool cbDebugMemmapdump(int argc, char* argv[]); bool cbInstrGraph(int argc, char* argv[]); bool cbInstrEnableGuiUpdate(int argc, char* argv[]); bool cb...
C++
x64dbg-development/src/dbg/commands/cmd-memory-operations.cpp
#include "cmd-memory-operations.h" #include "console.h" #include "debugger.h" #include "memory.h" #include "variable.h" #include "filehelper.h" #include "value.h" #include "stringformat.h" #include "comment.h" bool cbDebugAlloc(int argc, char* argv[]) { duint size = 0x1000, addr = 0; if(argc > 1) if(!v...
C/C++
x64dbg-development/src/dbg/commands/cmd-memory-operations.h
#pragma once #include "command.h" bool cbDebugAlloc(int argc, char* argv[]); bool cbDebugFree(int argc, char* argv[]); bool cbDebugMemset(int argc, char* argv[]); bool cbDebugMemcpy(int argc, char* argv[]); bool cbDebugGetPageRights(int argc, char* argv[]); bool cbDebugSetPageRights(int argc, char* argv[]); bool cbIn...
C++
x64dbg-development/src/dbg/commands/cmd-misc.cpp
#include "cmd-misc.h" #include "exprfunc.h" #include "variable.h" #include "value.h" #include "debugger.h" #include "threading.h" #include "thread.h" #include "assemble.h" #include "memory.h" #include "plugin_loader.h" #include "jit.h" #include "mnemonichelp.h" #include "commandline.h" #include "stringformat.h" bool c...
C/C++
x64dbg-development/src/dbg/commands/cmd-misc.h
#pragma once #include "command.h" bool cbInstrChd(int argc, char* argv[]); bool cbInstrZzz(int argc, char* argv[]); bool cbDebugHide(int argc, char* argv[]); bool cbDebugLoadLib(int argc, char* argv[]); bool cbDebugFreeLib(int argc, char* argv[]); bool cbInstrAssemble(int argc, char* argv[]); bool cbInstrGpa(int arg...
C++
x64dbg-development/src/dbg/commands/cmd-operating-system-control.cpp
#include "cmd-operating-system-control.h" #include "variable.h" #include "debugger.h" #include "exception.h" #include "value.h" #include "stringformat.h" bool cbGetPrivilegeState(int argc, char* argv[]) { if(IsArgumentsLessThan(argc, 2)) return false; DWORD returnLength; LUID luid; if(LookupPri...
C/C++
x64dbg-development/src/dbg/commands/cmd-operating-system-control.h
#pragma once #include "command.h" bool cbGetPrivilegeState(int argc, char* argv[]); bool cbEnablePrivilege(int argc, char* argv[]); bool cbDisablePrivilege(int argc, char* argv[]); bool cbHandleClose(int argc, char* argv[]); bool cbEnableWindow(int argc, char* argv[]); bool cbDisableWindow(int argc, char* argv[]);
C++
x64dbg-development/src/dbg/commands/cmd-plugins.cpp
#include "cmd-plugins.h" #include "console.h" #include "debugger.h" #include "module.h" #include "plugin_loader.h" static bool bScyllaLoaded = false; static DWORD WINAPI scyllaThread(void* lpParam) { typedef INT(WINAPI * SCYLLASTARTGUI)(DWORD pid, HINSTANCE mod, DWORD_PTR entrypoint); SCYLLASTARTGUI ScyllaSta...
C/C++
x64dbg-development/src/dbg/commands/cmd-plugins.h
#pragma once #include "command.h" bool cbDebugStartScylla(int argc, char* argv[]); bool cbInstrPluginLoad(int argc, char* argv[]); bool cbInstrPluginUnload(int argc, char* argv[]); bool cbInstrPluginReload(int argc, char* argv[]);
C++
x64dbg-development/src/dbg/commands/cmd-script.cpp
#include "cmd-script.h" #include "stringformat.h" #include "console.h" #include "variable.h" #include "stackinfo.h" #include "debugger.h" #include "simplescript.h" bool cbScriptLoad(int argc, char* argv[]) { if(argc < 2) return false; scriptload(argv[1]); return true; } bool cbScriptMsg(int argc, ...
C/C++
x64dbg-development/src/dbg/commands/cmd-script.h
#pragma once #include "command.h" bool cbScriptLoad(int argc, char* argv[]); bool cbScriptMsg(int argc, char* argv[]); bool cbScriptMsgyn(int argc, char* argv[]); bool cbScriptCmd(int argc, char* argv[]); bool cbInstrLog(int argc, char* argv[]); bool cbInstrHtmlLog(int argc, char* argv[]); bool cbInstrPrintStack(int ...
C++
x64dbg-development/src/dbg/commands/cmd-searching.cpp
#include "cmd-searching.h" #include "memory.h" #include "value.h" #include "variable.h" #include "reference.h" #include "assemble.h" #include "debugger.h" #include "filehelper.h" #include "label.h" #include "stringformat.h" #include "disasm_helper.h" #include "symbolinfo.h" static int maxFindResults = 5000; static bo...
C/C++
x64dbg-development/src/dbg/commands/cmd-searching.h
#pragma once #include "command.h" bool cbInstrFind(int argc, char* argv[]); bool cbInstrFindAll(int argc, char* argv[]); bool cbInstrFindAllMem(int argc, char* argv[]); bool cbInstrFindAsm(int argc, char* argv[]); bool cbInstrRefFind(int argc, char* argv[]); bool cbInstrRefFindRange(int argc, char* argv[]); bool cbIn...
C++
x64dbg-development/src/dbg/commands/cmd-thread-control.cpp
#include "cmd-thread-control.h" #include "variable.h" #include "memory.h" #include "value.h" #include "debugger.h" #include "console.h" #include "label.h" #include "historycontext.h" #include "thread.h" bool cbDebugCreatethread(int argc, char* argv[]) { if(argc < 2) return false; duint Entry = 0; d...
C/C++
x64dbg-development/src/dbg/commands/cmd-thread-control.h
#pragma once #include "command.h" bool cbDebugCreatethread(int argc, char* argv[]); bool cbDebugSwitchthread(int argc, char* argv[]); bool cbDebugSuspendthread(int argc, char* argv[]); bool cbDebugResumethread(int argc, char* argv[]); bool cbDebugKillthread(int argc, char* argv[]); bool cbDebugSuspendAllThreads(int a...
C++
x64dbg-development/src/dbg/commands/cmd-tracing.cpp
#include "cmd-tracing.h" #include "debugger.h" #include "threading.h" #include "module.h" #include "console.h" #include "cmd-debug-control.h" #include "value.h" #include "variable.h" #include "TraceRecord.h" extern std::vector<std::pair<duint, duint>> RunToUserCodeBreakpoints; static bool genericConditionalTraceComma...
C/C++
x64dbg-development/src/dbg/commands/cmd-tracing.h
#pragma once #include "command.h" bool cbDebugTraceIntoConditional(int argc, char* argv[]); bool cbDebugTraceOverConditional(int argc, char* argv[]); bool cbDebugTraceIntoBeyondTraceRecord(int argc, char* argv[]); bool cbDebugTraceOverBeyondTraceRecord(int argc, char* argv[]); bool cbDebugTraceIntoIntoTraceRecord(int...
C++
x64dbg-development/src/dbg/commands/cmd-types.cpp
#include "cmd-types.h" #include "console.h" #include "encodemap.h" #include "value.h" #include "types.h" #include "memory.h" #include "variable.h" #include "filehelper.h" #include "label.h" using namespace Types; static bool cbInstrDataGeneric(ENCODETYPE type, int argc, char* argv[]) { if(IsArgumentsLessThan(argc...
C/C++
x64dbg-development/src/dbg/commands/cmd-types.h
#pragma once #include "command.h" bool cbInstrDataUnknown(int argc, char* argv[]); bool cbInstrDataByte(int argc, char* argv[]); bool cbInstrDataWord(int argc, char* argv[]); bool cbInstrDataDword(int argc, char* argv[]); bool cbInstrDataFword(int argc, char* argv[]); bool cbInstrDataQword(int argc, char* argv[]); bo...
C++
x64dbg-development/src/dbg/commands/cmd-undocumented.cpp
#include "cmd-undocumented.h" #include "console.h" #include "function.h" #include "bookmark.h" #include "label.h" #include "comment.h" #include "debugger.h" #include "variable.h" #include "loop.h" #include "zydis_wrapper.h" #include "mnemonichelp.h" #include "value.h" #include "symbolinfo.h" #include "argument.h" #incl...
C/C++
x64dbg-development/src/dbg/commands/cmd-undocumented.h
#pragma once #include "command.h" bool cbBadCmd(int argc, char* argv[]); bool cbDebugBenchmark(int argc, char* argv[]); bool cbInstrSetstr(int argc, char* argv[]); bool cbInstrGetstr(int argc, char* argv[]); bool cbInstrCopystr(int argc, char* argv[]); bool cbInstrZydis(int argc, char* argv[]); bool cbInstrVisualize(...
C++
x64dbg-development/src/dbg/commands/cmd-user-database.cpp
#include "cmd-user-database.h" #include "database.h" #include "console.h" #include "comment.h" #include "value.h" #include "variable.h" #include "label.h" #include "bookmark.h" #include "function.h" #include "argument.h" #include "loop.h" #include "debugger.h" #include "stringformat.h" #include "_exports.h" bool cbIns...
C/C++
x64dbg-development/src/dbg/commands/cmd-user-database.h
#pragma once #include "command.h" bool cbInstrDbsave(int argc, char* argv[]); bool cbInstrDbload(int argc, char* argv[]); bool cbInstrDbclear(int argc, char* argv[]); bool cbInstrCommentSet(int argc, char* argv[]); bool cbInstrCommentDel(int argc, char* argv[]); bool cbInstrCommentList(int argc, char* argv[]); bool ...
C++
x64dbg-development/src/dbg/commands/cmd-variables.cpp
#include "cmd-variables.h" #include "console.h" #include "variable.h" #include "value.h" bool cbInstrVar(int argc, char* argv[]) { if(IsArgumentsLessThan(argc, 2)) return false; char arg2[deflen] = ""; //var value (optional) if(argc > 2) strcpy_s(arg2, argv[2]); duint value = 0; int...
C/C++
x64dbg-development/src/dbg/commands/cmd-variables.h
#pragma once #include "command.h" bool cbInstrVar(int argc, char* argv[]); bool cbInstrVarDel(int argc, char* argv[]); bool cbInstrVarList(int argc, char* argv[]);
C++
x64dbg-development/src/dbg/commands/cmd-watch-control.cpp
#include "cmd-watch-control.h" #include "variable.h" #include "watch.h" #include "console.h" #include "threading.h" bool cbAddWatch(int argc, char* argv[]) { if(argc < 2) { dputs(QT_TRANSLATE_NOOP("DBG", "No enough arguments for addwatch\n")); return false; } WATCHVARTYPE newtype = WATC...
C/C++
x64dbg-development/src/dbg/commands/cmd-watch-control.h
#pragma once #include "command.h" bool cbAddWatch(int argc, char* argv[]); bool cbDelWatch(int argc, char* argv[]); bool cbSetWatchdog(int argc, char* argv[]); bool cbSetWatchExpression(int argc, char* argv[]); bool cbSetWatchName(int argc, char* argv[]); bool cbSetWatchType(int argc, char* argv[]); bool cbCheckWatch...
C/C++
x64dbg-development/src/dbg/dbghelp/dbghelp.h
#ifndef _DBGHELP_ #define _DBGHELP_ // As a general principal always call the 64 bit version // of every API, if a choice exists. The 64 bit version // works great on 32 bit platforms, and is forward // compatible to 64 bit platforms. #ifdef _WIN64 #ifndef _IMAGEHLP64 #define _IMAGEHLP64 #endif #endif #pragma pack...
C/C++
x64dbg-development/src/dbg/DeviceNameResolver/DeviceNameResolver.h
#ifndef _DEVICENAMERESOLVER_H #define _DEVICENAMERESOLVER_H #include <windows.h> #ifdef __cplusplus extern "C" { #endif __declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSizeInChars); __declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath,...
C/C++
x64dbg-development/src/dbg/jansson/jansson.h
/* * Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org> * * Jansson is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. */ #ifndef JANSSON_H #define JANSSON_H #include <stdio.h> #include <stdlib.h> /* for size_t */ #include <stdarg.h> ...
C/C++
x64dbg-development/src/dbg/jansson/jansson_config.h
/* * Copyright (c) 2010-2016 Petri Lehtinen <petri@digip.org> * * Jansson is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. * * * This file specifies a part of the site-specific configuration for * Jansson, namely those things that affect t...
C/C++
x64dbg-development/src/dbg/jansson/jansson_x64dbg.h
#pragma once #include "jansson.h" typedef json_t* JSON; static JSON_INLINE json_t* json_hex(unsigned json_int_t value) { char hexvalue[20]; sprintf_s(hexvalue, "0x%llX", value); return json_string(hexvalue); } static JSON_INLINE unsigned json_int_t json_hex_value(const json_t* hex) { unsigned json_i...
x64dbg-development/src/dbg/jansson/jansson_x86.lib
!<arch> / 1403015379 0 3412 ` ‰2\’% % &N&N%æ%æ%z%z0–0–*z*z)ª)ª**)>)>(Î(Î5Ô5Ô;ä;ä4(4(3À3À<P<P;x;x;;+º+º1ð1ð--,”,”,$,$-p-p-Þ-Þ.Â.Â.P.P/¬/¬/6/60 0 &¶...
C/C++
x64dbg-development/src/dbg/LLVMDemangle/LLVMDemangle.h
#pragma once #ifdef __cplusplus extern "C" { #endif __declspec(dllexport) char* LLVMDemangle(const char* MangledName); __declspec(dllexport) void LLVMDemangleFree(char* DemangledName); #ifdef __cplusplus } #endif
x64dbg-development/src/dbg/LLVMDemangle/LLVMDemangle_x64.lib
!<arch> / 1652535369 0 192 ` X–Ò66¤¤__IMPORT_DESCRIPTOR_LLVMDemangle__NULL_IMPORT_DESCRIPTORLLVMDemangle_NULL_THUNK_DATALLVMDemangle__imp_LLVMDemangleLLVMDemangleFree__imp_LLVMDemangleFree/ 1652535369 0 202 ` ...
x64dbg-development/src/dbg/LLVMDemangle/LLVMDemangle_x86.lib
!<arch> / 1652535421 0 196 ` `žÚ66¦¦__IMPORT_DESCRIPTOR_LLVMDemangle__NULL_IMPORT_DESCRIPTORLLVMDemangle_NULL_THUNK_DATA_LLVMDemangle__imp__LLVMDemangle_LLVMDemangleFree__imp__LLVMDemangleFree/ 1652535421 0 206 ...
C/C++
x64dbg-development/src/dbg/lz4/lz4.h
/* LZ4 - Fast LZ compression algorithm Header File Copyright (C) 2011-2014, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are ...
C/C++
x64dbg-development/src/dbg/lz4/lz4file.h
#ifndef _LZ4FILE_H #define _LZ4FILE_H typedef enum _LZ4_STATUS { LZ4_SUCCESS, LZ4_FAILED_OPEN_INPUT, LZ4_FAILED_OPEN_OUTPUT, LZ4_NOT_ENOUGH_MEMORY, LZ4_INVALID_ARCHIVE, LZ4_CORRUPTED_ARCHIVE } LZ4_STATUS; #if defined (__cplusplus) extern "C" { #endif __declspec(dllimport) LZ4_STATUS LZ4_compr...
C/C++
x64dbg-development/src/dbg/lz4/lz4hc.h
/* LZ4 HC - High Compression Mode of LZ4 Header File Copyright (C) 2011-2014, Yann Collet. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ar...
C/C++
x64dbg-development/src/dbg/msdia/cvConst.h
// cvconst.h - codeview constant definitions //----------------------------------------------------------------- // // Copyright Microsoft Corporation. All Rights Reserved. // //--------------------------------------------------------------- #ifndef _CVCONST_H_ #define _CVCONST_H_ // Enumeration for function c...
C/C++
x64dbg-development/src/dbg/msdia/dia2.h
/* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 8.01.0622 */ /* @@MIDL_FILE_HEADING( ) */ #pragma warning( disable: 4049 ) /* more than 64k source lines */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __R...
C++
x64dbg-development/src/dbg/msdia/diacreate.cpp
#include <windows.h> #include "diacreate.h" typedef HRESULT(__stdcall* pDllGetClassObject)( _In_ REFCLSID rclsid, _In_ REFIID riid, _Out_ LPVOID* ppv ); HRESULT STDMETHODCALLTYPE NoRegCoCreate(const __wchar_t* dllName, REFCLSID rclsid, ...
C/C++
x64dbg-development/src/dbg/msdia/diaCreate.h
// diacreate.h - creation helper functions for DIA initialization //----------------------------------------------------------------- // // Copyright Microsoft Corporation. All Rights Reserved. // //--------------------------------------------------------------- #ifndef _DIACREATE_H_ #define _DIACREATE_H_ // // Creat...
C/C++
x64dbg-development/src/dbg/ntdll/ntdll.h
#ifndef NTDLL_H #define NTDLL_H #pragma once #ifdef __cplusplus extern "C" { #endif #ifndef NOMINMAX #define NOMINMAX #endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef WIN32_NO_STATUS #define WIN32_NO_STATUS #endif #include <Windows.h> #undef WIN32_NO_STATUS #include <ntstatus.h> #include...
C++
x64dbg-development/src/dbg/test/general/dll/main.cpp
#include "main.h" char global[10] = "0"; // a sample exported function void DLL_EXPORT SomeFunction(const LPCSTR sometext) { MessageBoxA(0, sometext, "DLL Message", MB_OK | MB_ICONINFORMATION); } extern "C" DLL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch(fdw...
C/C++
x64dbg-development/src/dbg/test/general/dll/main.h
#ifndef __MAIN_H__ #define __MAIN_H__ #include <windows.h> /* To use this exported function of dll, include this header * in your project. */ #ifdef BUILD_DLL #define DLL_EXPORT __declspec(dllexport) #else #define DLL_EXPORT __declspec(dllimport) #endif #ifdef __cplusplus extern "C" { #endif void DLL_EXPORT S...
x64dbg-development/src/dbg/test/general/dll/test_dll.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> <FileVersion major="1" minor="6" /> <Project> <Option title="test_dll" /> <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="x32"> <Option output="bin/x32/test" prefix_auto="1" extension_auto="1" />...
C++
x64dbg-development/src/dbg/test/general/exe/main.cpp
#include <windows.h> char global[10] = "0"; int main() { GetTickCount(); char* a = 0; GetCurrentProcessId(); GetCurrentProcess(); DWORD old = 0; VirtualProtect(global, 0x1000, PAGE_READWRITE | PAGE_GUARD, &old); /*throw exceptions*/ global[0] = 0; //PAGE_GUARD *a = 0; //ACCESS_VI...
x64dbg-development/src/dbg/test/general/exe/test_exe.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> <FileVersion major="1" minor="6" /> <Project> <Option title="test_exe" /> <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="x32"> <Option output="bin/x32/test" prefix_auto="1" extension_auto="1" />...
x64dbg-development/src/dbg/test/guard_page/guard_page_test.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> <FileVersion major="1" minor="6" /> <Project> <Option title="guard_page_test" /> <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> <Target title="x32"> <Option output="bin/x32/guardpage" prefix_auto="1" extension...
C++
x64dbg-development/src/dbg/test/guard_page/main.cpp
#include <windows.h> #include <stdio.h> typedef bool (*CBRET)(); unsigned int globalvar = 0; int main() { unsigned int lol; unsigned char* page = (unsigned char*)VirtualAlloc(0, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE); if(!page) { puts("error: VirtualAlloc"); return ...
Assembly Language
x64dbg-development/src/dbg/test/highlighting/x32/highlighting.asm
global _start section .data @real: db 0 section .text _start: MOV EAX,DWORD [@real] MOV EAX,DWORD [EAX*4+@real] MOV EAX,DWORD [EAX+@real] MOV EAX,@real MOV EBX,DWORD [EAX] MOV EBX,4 XOR EDX,EDX DIV EBX MOV EAX,DWORD [EAX*4] JMP SHORT @next @next: RET
Assembly Language
x64dbg-development/src/dbg/test/mmx_sse_fpu/x32/fpu/fpu.asm
global _start section .data a: dq 1.1 b: dq 2.2 c: dq 3.3 d: dq 4.4 e: dq 5.5 f: dq 6.6 g: dq 7.7 h: dq 8.8 section .text _start: fld qword [a] fld qword [b] fld qword [c] fld qword [d] fld qword [e] fld qword [f] fld qword [g] fld qword [h] ret
x64dbg-development/src/dbg/test/mmx_sse_fpu/x32/fpu/fpu_build.bat
@echo off nasm -f win32 fpu.asm golink fpu.obj /entry _start del /Q *.obj move fpu.exe ..\fpu.exe > nul pause
Assembly Language
x64dbg-development/src/dbg/test/mmx_sse_fpu/x32/mmx/mmx.asm
global _start section .data a: dq 1111111122222222h b: dq 2222222233333333h c: dq 3333333344444444h d: dq 4444444455555555h e: dq 5555555566666666h f: dq 6666666677777777h g: dq 7777777788888888h h: dq 8888888811111111h section .text _start: movq mm0,[a] movq mm1,[b] movq mm2,[c] movq mm3,[d] movq mm4...
x64dbg-development/src/dbg/test/mmx_sse_fpu/x32/mmx/mmx_build.bat
@echo off nasm -fwin32 mmx.asm golink mmx.obj /entry _start del /Q *.obj move mmx.exe ..\mmx.exe > nul pause
Assembly Language
x64dbg-development/src/dbg/test/mmx_sse_fpu/x32/sse/sse.asm
global _start section .data align 16 v1: dd 1.1, 2.2, 3.3, 4.4 v2: dd 5.5, 6.6, 7.7, 8.8 v3: dd 9.9, 10.10, 11.11, 12.12 v4: dd 13.13, 14.14, 15.15, 16.16 v5: dd 17.17, 18.18, 19.19, 20.20 v6: dd 21.21, 22.22, 23.23, 24.24 v7: ...
x64dbg-development/src/dbg/test/mmx_sse_fpu/x32/sse/sse_build.bat
@echo off nasm -fwin32 sse.asm golink sse.obj /entry _start del /Q *.obj move sse.exe ..\sse.exe > nul pause