This is page 1 of 21. Use http://codebase.md/wasdubya/x64dbgmcp?lines=true&page={x} to view the full context. # Directory Structure ``` ├── build │ ├── MCPx64dbg.dp32 │ └── MCPx64dbg.dp64 ├── CMakeLists.txt ├── deps │ ├── pluginsdk │ │ ├── _dbgfunctions.h │ │ ├── _plugin_types.h │ │ ├── _plugins.h │ │ ├── _scriptapi_argument.h │ │ ├── _scriptapi_assembler.h │ │ ├── _scriptapi_bookmark.h │ │ ├── _scriptapi_comment.h │ │ ├── _scriptapi_debug.h │ │ ├── _scriptapi_flag.h │ │ ├── _scriptapi_function.h │ │ ├── _scriptapi_gui.h │ │ ├── _scriptapi_label.h │ │ ├── _scriptapi_memory.h │ │ ├── _scriptapi_misc.h │ │ ├── _scriptapi_module.h │ │ ├── _scriptapi_pattern.h │ │ ├── _scriptapi_register.h │ │ ├── _scriptapi_stack.h │ │ ├── _scriptapi_symbol.h │ │ ├── _scriptapi.h │ │ ├── bridgegraph.h │ │ ├── bridgelist.h │ │ ├── bridgemain.h │ │ ├── dbghelp │ │ │ ├── dbghelp_x64.a │ │ │ ├── dbghelp_x64.lib │ │ │ ├── dbghelp_x86.a │ │ │ ├── dbghelp_x86.lib │ │ │ └── dbghelp.h │ │ ├── DeviceNameResolver │ │ │ ├── DeviceNameResolver_x64.a │ │ │ ├── DeviceNameResolver_x64.lib │ │ │ ├── DeviceNameResolver_x86.a │ │ │ ├── DeviceNameResolver_x86.lib │ │ │ └── DeviceNameResolver.h │ │ ├── jansson │ │ │ ├── jansson_config.h │ │ │ ├── jansson_x64.a │ │ │ ├── jansson_x64.lib │ │ │ ├── jansson_x64dbg.h │ │ │ ├── jansson_x86.a │ │ │ ├── jansson_x86.lib │ │ │ └── jansson.h │ │ ├── lz4 │ │ │ ├── lz4_x64.a │ │ │ ├── lz4_x64.lib │ │ │ ├── lz4_x86.a │ │ │ ├── lz4_x86.lib │ │ │ ├── lz4.h │ │ │ ├── lz4file.h │ │ │ └── lz4hc.h │ │ ├── nlohmann │ │ │ ├── adl_serializer.hpp │ │ │ ├── byte_container_with_subtype.hpp │ │ │ ├── detail │ │ │ │ ├── abi_macros.hpp │ │ │ │ ├── conversions │ │ │ │ │ ├── from_json.hpp │ │ │ │ │ ├── to_chars.hpp │ │ │ │ │ └── to_json.hpp │ │ │ │ ├── exceptions.hpp │ │ │ │ ├── hash.hpp │ │ │ │ ├── input │ │ │ │ │ ├── binary_reader.hpp │ │ │ │ │ ├── input_adapters.hpp │ │ │ │ │ ├── json_sax.hpp │ │ │ │ │ ├── lexer.hpp │ │ │ │ │ ├── parser.hpp │ │ │ │ │ └── position_t.hpp │ │ │ │ ├── iterators │ │ │ │ │ ├── internal_iterator.hpp │ │ │ │ │ ├── iter_impl.hpp │ │ │ │ │ ├── iteration_proxy.hpp │ │ │ │ │ ├── iterator_traits.hpp │ │ │ │ │ ├── json_reverse_iterator.hpp │ │ │ │ │ └── primitive_iterator.hpp │ │ │ │ ├── json_custom_base_class.hpp │ │ │ │ ├── json_pointer.hpp │ │ │ │ ├── json_ref.hpp │ │ │ │ ├── macro_scope.hpp │ │ │ │ ├── macro_unscope.hpp │ │ │ │ ├── meta │ │ │ │ │ ├── call_std │ │ │ │ │ │ ├── begin.hpp │ │ │ │ │ │ └── end.hpp │ │ │ │ │ ├── cpp_future.hpp │ │ │ │ │ ├── detected.hpp │ │ │ │ │ ├── identity_tag.hpp │ │ │ │ │ ├── is_sax.hpp │ │ │ │ │ ├── std_fs.hpp │ │ │ │ │ ├── type_traits.hpp │ │ │ │ │ └── void_t.hpp │ │ │ │ ├── output │ │ │ │ │ ├── binary_writer.hpp │ │ │ │ │ ├── output_adapters.hpp │ │ │ │ │ └── serializer.hpp │ │ │ │ ├── string_concat.hpp │ │ │ │ ├── string_escape.hpp │ │ │ │ └── value_t.hpp │ │ │ ├── json_fwd.hpp │ │ │ ├── json.hpp │ │ │ ├── ordered_map.hpp │ │ │ └── thirdparty │ │ │ └── hedley │ │ │ ├── hedley_undef.hpp │ │ │ └── hedley.hpp │ │ ├── TitanEngine │ │ │ ├── TitanEngine_x64.a │ │ │ ├── TitanEngine_x64.lib │ │ │ ├── TitanEngine_x86.a │ │ │ ├── TitanEngine_x86.lib │ │ │ └── TitanEngine.h │ │ ├── x32bridge.lib │ │ ├── x32dbg.lib │ │ ├── x64bridge.lib │ │ ├── x64dbg.lib │ │ └── XEDParse │ │ ├── XEDParse_x64.a │ │ ├── XEDParse_x64.lib │ │ ├── XEDParse_x86.a │ │ ├── XEDParse_x86.lib │ │ └── XEDParse.h │ └── x64dbg_sdk │ └── pluginsdk │ ├── _dbgfunctions.h │ ├── _plugin_types.h │ ├── _plugins.h │ ├── _scriptapi_argument.h │ ├── _scriptapi_assembler.h │ ├── _scriptapi_bookmark.h │ ├── _scriptapi_comment.h │ ├── _scriptapi_debug.h │ ├── _scriptapi_flag.h │ ├── _scriptapi_function.h │ ├── _scriptapi_gui.h │ ├── _scriptapi_label.h │ ├── _scriptapi_memory.h │ ├── _scriptapi_misc.h │ ├── _scriptapi_module.h │ ├── _scriptapi_pattern.h │ ├── _scriptapi_register.h │ ├── _scriptapi_stack.h │ ├── _scriptapi_symbol.h │ ├── _scriptapi.h │ ├── bridgegraph.h │ ├── bridgelist.h │ ├── bridgemain.h │ ├── dbghelp │ │ ├── dbghelp_x64.a │ │ ├── dbghelp_x64.lib │ │ ├── dbghelp_x86.a │ │ ├── dbghelp_x86.lib │ │ └── dbghelp.h │ ├── DeviceNameResolver │ │ ├── DeviceNameResolver_x64.a │ │ ├── DeviceNameResolver_x64.lib │ │ ├── DeviceNameResolver_x86.a │ │ ├── DeviceNameResolver_x86.lib │ │ └── DeviceNameResolver.h │ ├── jansson │ │ ├── jansson_config.h │ │ ├── jansson_x64.a │ │ ├── jansson_x64.lib │ │ ├── jansson_x64dbg.h │ │ ├── jansson_x86.a │ │ ├── jansson_x86.lib │ │ └── jansson.h │ ├── lz4 │ │ ├── lz4_x64.a │ │ ├── lz4_x64.lib │ │ ├── lz4_x86.a │ │ ├── lz4_x86.lib │ │ ├── lz4.h │ │ ├── lz4file.h │ │ └── lz4hc.h │ ├── TitanEngine │ │ ├── TitanEngine_x64.a │ │ ├── TitanEngine_x64.lib │ │ ├── TitanEngine_x86.a │ │ ├── TitanEngine_x86.lib │ │ └── TitanEngine.h │ ├── TitanEngine_x64.a │ ├── TitanEngine_x64.lib │ ├── TitanEngine_x86.a │ ├── TitanEngine_x86.lib │ ├── TitanEngine.h │ ├── x32bridge.lib │ ├── x32dbg.lib │ ├── x64bridge.lib │ ├── x64dbg.lib │ └── XEDParse │ ├── XEDParse_x64.a │ ├── XEDParse_x64.lib │ ├── XEDParse_x86.a │ ├── XEDParse_x86.lib │ └── XEDParse.h ├── include │ └── nlohmann │ ├── adl_serializer.hpp │ ├── byte_container_with_subtype.hpp │ ├── detail │ │ ├── abi_macros.hpp │ │ ├── conversions │ │ │ ├── from_json.hpp │ │ │ ├── to_chars.hpp │ │ │ └── to_json.hpp │ │ ├── exceptions.hpp │ │ ├── hash.hpp │ │ ├── input │ │ │ ├── binary_reader.hpp │ │ │ ├── input_adapters.hpp │ │ │ ├── json_sax.hpp │ │ │ ├── lexer.hpp │ │ │ ├── parser.hpp │ │ │ └── position_t.hpp │ │ ├── iterators │ │ │ ├── internal_iterator.hpp │ │ │ ├── iter_impl.hpp │ │ │ ├── iteration_proxy.hpp │ │ │ ├── iterator_traits.hpp │ │ │ ├── json_reverse_iterator.hpp │ │ │ └── primitive_iterator.hpp │ │ ├── json_custom_base_class.hpp │ │ ├── json_pointer.hpp │ │ ├── json_ref.hpp │ │ ├── macro_scope.hpp │ │ ├── macro_unscope.hpp │ │ ├── meta │ │ │ ├── call_std │ │ │ │ ├── begin.hpp │ │ │ │ └── end.hpp │ │ │ ├── cpp_future.hpp │ │ │ ├── detected.hpp │ │ │ ├── identity_tag.hpp │ │ │ ├── is_sax.hpp │ │ │ ├── std_fs.hpp │ │ │ ├── type_traits.hpp │ │ │ └── void_t.hpp │ │ ├── output │ │ │ ├── binary_writer.hpp │ │ │ ├── output_adapters.hpp │ │ │ └── serializer.hpp │ │ ├── string_concat.hpp │ │ ├── string_escape.hpp │ │ └── value_t.hpp │ ├── json_fwd.hpp │ ├── json.hpp │ ├── ordered_map.hpp │ └── thirdparty │ └── hedley │ ├── hedley_undef.hpp │ └── hedley.hpp ├── README.md ├── Showcase.gif ├── side profile of a voxel spider walking.jpg └── src ├── MCPx64dbg.cpp └── x64dbg.py ``` # Files -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- ```markdown 1 | <h1 align="center"><b> x64dbg MCP </b> </h1> 2 | 3 | <img src="https://raw.githubusercontent.com/Wasdubya/x64dbgMCP/main/side%20profile%20of%20a%20voxel%20spider%20walking.jpg" width="100%" height="300px" /> 4 | 5 | 6 | <h2 align="center"> <b>Model Context Protocol for x64dbg</b> </h2> 7 | 8 | <div align="center"> An MCP server that can bridge various LLMS with the x64dbg debugger, providing direct access to debugging functionality through prompts! </div> 9 | 10 | <h2 align="center"> <b>Features</b> </h2> 11 | 12 | - **40+ x64dbg SDK Tools** - Provides access to almost every single debugging feature given by the SDK for smart debugging. 13 | - **Cross-Architecture Support** - Works with both x64dbg and x86dbg. 14 | - **API Compatibility** - Provides API access to Claude from CMD for even faster debugging and longer consecutive tool chain calls. 15 | 16 | ### Quick Setup 17 | 18 | 1. **Download Plugin** 19 | - Grab .dp64 or .dp32 from this repo's build/release directory 20 | - Copy to your local: [x64dbg_dir]/release/x64/plugins/ 21 | 22 | 2. **Configure Claude Desktop** 23 | - Copy x64dbgmcp.py from this repos src directory 24 | - Update local claude_desktop_config.json with path to x64dbgmcp.py 25 | 26 | ```json 27 | { 28 | "mcpServers": { 29 | "x64dbg": { 30 | "command": "Path\\To\\Python", 31 | "args": [ 32 | "Path\\to\\x64dbg.py" 33 | ] 34 | } 35 | } 36 | } 37 | ``` 38 | 39 | 4. **Start Debugging** 40 | - Launch x64dbg 41 | - Start Claude Desktop 42 | - Check plugin loaded successfully (ALT+L in x64dbg for logs) 43 | 44 | ### Build from Source 45 | 46 | 47 | - git clone [repository-url] 48 | - cd x64dbgmcp 49 | - cmake -S . -B build 50 | - cmake --build build --target all_plugins --config Release 51 | 52 | 🟨**---TIPS---**🟨 53 | 54 | 1. Use the --target all_plugins argument to specify both x32 and x64, otherwise use -A flag to distinguish between either x64 or Win32 build. For example 32 bit build would be: 55 | - cmake -S . -B build32 -A Win32 -DBUILD_BOTH_ARCHES=OFF 56 | - cmake --build build32 --config Release 57 | 58 | 2. If you do not provide the model you are working with with context of where your exe is, it wont have the capabiltiy to restart the binary if it crashes or hangs. So, provide it with the full path of the binary so it can call the CMDEXEC function like "init C:\Absolute\Path\to\EXE" 59 | 60 | </b> This will allow for even more automated analysis. </b> 61 | 62 | ## Usage Examples 63 | 64 | **Set a breakpoint and analyze:** 65 | ``` 66 | "Set a breakpoint at the main function and step through the first few instructions" 67 | ``` 68 | 69 | **Memory analysis:** 70 | ``` 71 | "Read 100 bytes from address 0x401000 and show me what's there" 72 | ``` 73 | 74 | **Register inspection:** 75 | ``` 76 | "What's the current value of RAX and RIP registers?" 77 | ``` 78 | 79 | **Pattern searching:** 80 | ``` 81 | "Find the pattern '48 8B 05' in the current module" 82 | ``` 83 | 84 | 85 | ## Demo 86 |  87 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPT_API_H 2 | #define _SCRIPT_API_H 3 | 4 | #include "_plugins.h" 5 | 6 | #define SCRIPT_EXPORT PLUG_IMPEXP 7 | 8 | #endif //_SCRIPT_API_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPT_API_H 2 | #define _SCRIPT_API_H 3 | 4 | #include "_plugins.h" 5 | 6 | #define SCRIPT_EXPORT PLUG_IMPEXP 7 | 8 | #endif //_SCRIPT_API_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_stack.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_STACK_H 2 | #define _SCRIPTAPI_STACK_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Stack 9 | { 10 | SCRIPT_EXPORT duint Pop(); 11 | SCRIPT_EXPORT duint Push(duint value); //returns the previous top, equal to Peek(1) 12 | SCRIPT_EXPORT duint Peek(int offset = 0); //offset is in multiples of Register::Size(), for easy x32/x64 portability 13 | }; //Stack 14 | }; //Script 15 | 16 | #endif //_SCRIPTAPI_STACK_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_stack.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_STACK_H 2 | #define _SCRIPTAPI_STACK_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Stack 9 | { 10 | SCRIPT_EXPORT duint Pop(); 11 | SCRIPT_EXPORT duint Push(duint value); //returns the previous top, equal to Peek(1) 12 | SCRIPT_EXPORT duint Peek(int offset = 0); //offset is in multiples of Register::Size(), for easy x32/x64 portability 13 | }; //Stack 14 | }; //Script 15 | 16 | #endif //_SCRIPTAPI_STACK_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/meta/call_std/end.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/macro_scope.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | 15 | NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); 16 | 17 | NLOHMANN_JSON_NAMESPACE_END 18 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/meta/call_std/end.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/macro_scope.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | 15 | NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); 16 | 17 | NLOHMANN_JSON_NAMESPACE_END 18 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/meta/call_std/begin.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/macro_scope.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | 15 | NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); 16 | 17 | NLOHMANN_JSON_NAMESPACE_END 18 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/meta/call_std/begin.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/macro_scope.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | 15 | NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); 16 | 17 | NLOHMANN_JSON_NAMESPACE_END 18 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/meta/identity_tag.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | namespace detail 15 | { 16 | 17 | // dispatching helper struct 18 | template <class T> struct identity_tag {}; 19 | 20 | } // namespace detail 21 | NLOHMANN_JSON_NAMESPACE_END 22 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/meta/identity_tag.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | namespace detail 15 | { 16 | 17 | // dispatching helper struct 18 | template <class T> struct identity_tag {}; 19 | 20 | } // namespace detail 21 | NLOHMANN_JSON_NAMESPACE_END 22 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_plugin_types.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _PLUGIN_DATA_H 2 | #define _PLUGIN_DATA_H 3 | 4 | #ifdef BUILD_DBG 5 | 6 | #include "_global.h" 7 | #include "jansson/jansson.h" 8 | #pragma warning(push) 9 | #pragma warning(disable:4091) 10 | #include <dbghelp.h> 11 | #pragma warning(pop) 12 | 13 | #else 14 | 15 | #include <Windows.h> 16 | 17 | #ifdef __GNUC__ 18 | #include "dbghelp/dbghelp.h" 19 | #else 20 | #pragma warning(push) 21 | #pragma warning(disable:4091) 22 | #include <DbgHelp.h> 23 | #pragma warning(pop) 24 | #endif // __GNUC__ 25 | 26 | #ifndef deflen 27 | #define deflen 1024 28 | #endif // deflen 29 | 30 | #include "bridgemain.h" 31 | #include "_dbgfunctions.h" 32 | #include "jansson/jansson.h" 33 | 34 | #endif // BUILD_DBG 35 | 36 | #endif // _PLUGIN_DATA_H 37 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_plugin_types.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _PLUGIN_DATA_H 2 | #define _PLUGIN_DATA_H 3 | 4 | #ifdef BUILD_DBG 5 | 6 | #include "_global.h" 7 | #include "jansson/jansson.h" 8 | #pragma warning(push) 9 | #pragma warning(disable:4091) 10 | #include <dbghelp.h> 11 | #pragma warning(pop) 12 | 13 | #else 14 | 15 | #include <Windows.h> 16 | 17 | #ifdef __GNUC__ 18 | #include "dbghelp/dbghelp.h" 19 | #else 20 | #pragma warning(push) 21 | #pragma warning(disable:4091) 22 | #include <DbgHelp.h> 23 | #pragma warning(pop) 24 | #endif // __GNUC__ 25 | 26 | #ifndef deflen 27 | #define deflen 1024 28 | #endif // deflen 29 | 30 | #include "bridgemain.h" 31 | #include "_dbgfunctions.h" 32 | #include "jansson/jansson.h" 33 | 34 | #endif // BUILD_DBG 35 | 36 | #endif // _PLUGIN_DATA_H 37 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/meta/void_t.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | namespace detail 15 | { 16 | 17 | template<typename ...Ts> struct make_void 18 | { 19 | using type = void; 20 | }; 21 | template<typename ...Ts> using void_t = typename make_void<Ts...>::type; 22 | 23 | } // namespace detail 24 | NLOHMANN_JSON_NAMESPACE_END 25 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/meta/void_t.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | namespace detail 15 | { 16 | 17 | template<typename ...Ts> struct make_void 18 | { 19 | using type = void; 20 | }; 21 | template<typename ...Ts> using void_t = typename make_void<Ts...>::type; 22 | 23 | } // namespace detail 24 | NLOHMANN_JSON_NAMESPACE_END 25 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/jansson/jansson_x64dbg.h: -------------------------------------------------------------------------------- ``` 1 | #pragma once 2 | 3 | #include "jansson.h" 4 | 5 | typedef json_t* JSON; 6 | 7 | static JSON_INLINE 8 | json_t* json_hex(unsigned json_int_t value) 9 | { 10 | char hexvalue[20]; 11 | sprintf_s(hexvalue, "0x%llX", value); 12 | return json_string(hexvalue); 13 | } 14 | 15 | static JSON_INLINE 16 | unsigned json_int_t json_hex_value(const json_t* hex) 17 | { 18 | unsigned json_int_t ret = 0; 19 | const char* hexvalue; 20 | hexvalue = json_string_value(hex); 21 | if(!hexvalue) 22 | return 0; 23 | sscanf_s(hexvalue, "0x%llX", &ret); 24 | return ret; 25 | } 26 | 27 | static JSON_INLINE 28 | json_t* json_string(const std::string & str) 29 | { 30 | return json_stringn(str.c_str(), str.length()); 31 | } 32 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/jansson/jansson_x64dbg.h: -------------------------------------------------------------------------------- ``` 1 | #pragma once 2 | 3 | #include "jansson.h" 4 | 5 | typedef json_t* JSON; 6 | 7 | static JSON_INLINE 8 | json_t* json_hex(unsigned json_int_t value) 9 | { 10 | char hexvalue[20]; 11 | sprintf_s(hexvalue, "0x%llX", value); 12 | return json_string(hexvalue); 13 | } 14 | 15 | static JSON_INLINE 16 | unsigned json_int_t json_hex_value(const json_t* hex) 17 | { 18 | unsigned json_int_t ret = 0; 19 | const char* hexvalue; 20 | hexvalue = json_string_value(hex); 21 | if(!hexvalue) 22 | return 0; 23 | sscanf_s(hexvalue, "0x%llX", &ret); 24 | return ret; 25 | } 26 | 27 | static JSON_INLINE 28 | json_t* json_string(const std::string & str) 29 | { 30 | return json_stringn(str.c_str(), str.length()); 31 | } 32 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_symbol.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_SYMBOL_H 2 | #define _SCRIPTAPI_SYMBOL_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Symbol 9 | { 10 | enum SymbolType 11 | { 12 | Function, //user-defined function 13 | Import, //IAT entry 14 | Export //export 15 | }; 16 | 17 | struct SymbolInfo 18 | { 19 | char mod[MAX_MODULE_SIZE]; 20 | duint rva; 21 | char name[MAX_LABEL_SIZE]; 22 | bool manual; 23 | SymbolType type; 24 | }; 25 | 26 | SCRIPT_EXPORT bool GetList(ListOf(SymbolInfo) list); //caller has the responsibility to free the list 27 | }; //Symbol 28 | }; //Script 29 | 30 | #endif //_SCRIPTAPI_SYMBOL_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_symbol.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_SYMBOL_H 2 | #define _SCRIPTAPI_SYMBOL_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Symbol 9 | { 10 | enum SymbolType 11 | { 12 | Function, //user-defined function 13 | Import, //IAT entry 14 | Export //export 15 | }; 16 | 17 | struct SymbolInfo 18 | { 19 | char mod[MAX_MODULE_SIZE]; 20 | duint rva; 21 | char name[MAX_LABEL_SIZE]; 22 | bool manual; 23 | SymbolType type; 24 | }; 25 | 26 | SCRIPT_EXPORT bool GetList(ListOf(SymbolInfo) list); //caller has the responsibility to free the list 27 | }; //Symbol 28 | }; //Script 29 | 30 | #endif //_SCRIPTAPI_SYMBOL_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_assembler.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_ASSEMBLER_H 2 | #define _SCRIPTAPI_ASSEMBLER_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Assembler 9 | { 10 | SCRIPT_EXPORT bool Assemble(duint addr, unsigned char* dest, int* size, const char* instruction); //dest[16] 11 | SCRIPT_EXPORT bool AssembleEx(duint addr, unsigned char* dest, int* size, const char* instruction, char* error); //dest[16], error[MAX_ERROR_SIZE] 12 | SCRIPT_EXPORT bool AssembleMem(duint addr, const char* instruction); 13 | SCRIPT_EXPORT bool AssembleMemEx(duint addr, const char* instruction, int* size, char* error, bool fillnop); //error[MAX_ERROR_SIZE] 14 | }; //Assembler 15 | }; //Script 16 | 17 | #endif //_SCRIPTAPI_ASSEMBLER_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_assembler.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_ASSEMBLER_H 2 | #define _SCRIPTAPI_ASSEMBLER_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Assembler 9 | { 10 | SCRIPT_EXPORT bool Assemble(duint addr, unsigned char* dest, int* size, const char* instruction); //dest[16] 11 | SCRIPT_EXPORT bool AssembleEx(duint addr, unsigned char* dest, int* size, const char* instruction, char* error); //dest[16], error[MAX_ERROR_SIZE] 12 | SCRIPT_EXPORT bool AssembleMem(duint addr, const char* instruction); 13 | SCRIPT_EXPORT bool AssembleMemEx(duint addr, const char* instruction, int* size, char* error, bool fillnop); //error[MAX_ERROR_SIZE] 14 | }; //Assembler 15 | }; //Script 16 | 17 | #endif //_SCRIPTAPI_ASSEMBLER_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/meta/std_fs.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/macro_scope.hpp> 12 | 13 | #if JSON_HAS_EXPERIMENTAL_FILESYSTEM 14 | #include <experimental/filesystem> 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | namespace std_fs = std::experimental::filesystem; 19 | } // namespace detail 20 | NLOHMANN_JSON_NAMESPACE_END 21 | #elif JSON_HAS_FILESYSTEM 22 | #include <filesystem> 23 | NLOHMANN_JSON_NAMESPACE_BEGIN 24 | namespace detail 25 | { 26 | namespace std_fs = std::filesystem; 27 | } // namespace detail 28 | NLOHMANN_JSON_NAMESPACE_END 29 | #endif 30 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/meta/std_fs.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/macro_scope.hpp> 12 | 13 | #if JSON_HAS_EXPERIMENTAL_FILESYSTEM 14 | #include <experimental/filesystem> 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | namespace std_fs = std::experimental::filesystem; 19 | } // namespace detail 20 | NLOHMANN_JSON_NAMESPACE_END 21 | #elif JSON_HAS_FILESYSTEM 22 | #include <filesystem> 23 | NLOHMANN_JSON_NAMESPACE_BEGIN 24 | namespace detail 25 | { 26 | namespace std_fs = std::filesystem; 27 | } // namespace detail 28 | NLOHMANN_JSON_NAMESPACE_END 29 | #endif 30 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_pattern.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_PATTERN_H 2 | #define _SCRIPTAPI_PATTERN_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Pattern 9 | { 10 | SCRIPT_EXPORT duint Find(unsigned char* data, duint datasize, const char* pattern); 11 | SCRIPT_EXPORT duint FindMem(duint start, duint size, const char* pattern); 12 | SCRIPT_EXPORT void Write(unsigned char* data, duint datasize, const char* pattern); 13 | SCRIPT_EXPORT void WriteMem(duint start, duint size, const char* pattern); 14 | SCRIPT_EXPORT bool SearchAndReplace(unsigned char* data, duint datasize, const char* searchpattern, const char* replacepattern); 15 | SCRIPT_EXPORT bool SearchAndReplaceMem(duint start, duint size, const char* searchpattern, const char* replacepattern); 16 | }; 17 | }; 18 | 19 | #endif //_SCRIPTAPI_FIND_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_pattern.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_PATTERN_H 2 | #define _SCRIPTAPI_PATTERN_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Pattern 9 | { 10 | SCRIPT_EXPORT duint Find(unsigned char* data, duint datasize, const char* pattern); 11 | SCRIPT_EXPORT duint FindMem(duint start, duint size, const char* pattern); 12 | SCRIPT_EXPORT void Write(unsigned char* data, duint datasize, const char* pattern); 13 | SCRIPT_EXPORT void WriteMem(duint start, duint size, const char* pattern); 14 | SCRIPT_EXPORT bool SearchAndReplace(unsigned char* data, duint datasize, const char* searchpattern, const char* replacepattern); 15 | SCRIPT_EXPORT bool SearchAndReplaceMem(duint start, duint size, const char* searchpattern, const char* replacepattern); 16 | }; 17 | }; 18 | 19 | #endif //_SCRIPTAPI_FIND_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/lz4/lz4file.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _LZ4FILE_H 2 | #define _LZ4FILE_H 3 | 4 | typedef enum _LZ4_STATUS 5 | { 6 | LZ4_SUCCESS, 7 | LZ4_FAILED_OPEN_INPUT, 8 | LZ4_FAILED_OPEN_OUTPUT, 9 | LZ4_NOT_ENOUGH_MEMORY, 10 | LZ4_INVALID_ARCHIVE, 11 | LZ4_CORRUPTED_ARCHIVE 12 | } LZ4_STATUS; 13 | 14 | #if defined (__cplusplus) 15 | extern "C" 16 | { 17 | #endif 18 | 19 | __declspec(dllimport) LZ4_STATUS LZ4_compress_file(const char* input_filename, const char* output_filename); 20 | __declspec(dllimport) LZ4_STATUS LZ4_compress_fileW(const wchar_t* input_filename, const wchar_t* output_filename); 21 | __declspec(dllimport) LZ4_STATUS LZ4_decompress_file(const char* input_filename, const char* output_filename); 22 | __declspec(dllimport) LZ4_STATUS LZ4_decompress_fileW(const wchar_t* input_filename, const wchar_t* output_filename); 23 | 24 | #if defined (__cplusplus) 25 | } 26 | #endif 27 | 28 | #endif //_LZ4FILE_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/lz4/lz4file.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _LZ4FILE_H 2 | #define _LZ4FILE_H 3 | 4 | typedef enum _LZ4_STATUS 5 | { 6 | LZ4_SUCCESS, 7 | LZ4_FAILED_OPEN_INPUT, 8 | LZ4_FAILED_OPEN_OUTPUT, 9 | LZ4_NOT_ENOUGH_MEMORY, 10 | LZ4_INVALID_ARCHIVE, 11 | LZ4_CORRUPTED_ARCHIVE 12 | } LZ4_STATUS; 13 | 14 | #if defined (__cplusplus) 15 | extern "C" 16 | { 17 | #endif 18 | 19 | __declspec(dllimport) LZ4_STATUS LZ4_compress_file(const char* input_filename, const char* output_filename); 20 | __declspec(dllimport) LZ4_STATUS LZ4_compress_fileW(const wchar_t* input_filename, const wchar_t* output_filename); 21 | __declspec(dllimport) LZ4_STATUS LZ4_decompress_file(const char* input_filename, const char* output_filename); 22 | __declspec(dllimport) LZ4_STATUS LZ4_decompress_fileW(const wchar_t* input_filename, const wchar_t* output_filename); 23 | 24 | #if defined (__cplusplus) 25 | } 26 | #endif 27 | 28 | #endif //_LZ4FILE_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/DeviceNameResolver/DeviceNameResolver.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _DEVICENAMERESOLVER_H 2 | #define _DEVICENAMERESOLVER_H 3 | 4 | #include <windows.h> 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSizeInChars); 12 | __declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath, size_t nSizeInChars); 13 | __declspec(dllexport) bool DevicePathFromFileHandleW(HANDLE hFile, wchar_t* szDevicePath, size_t nSizeInChars); 14 | __declspec(dllexport) bool DevicePathFromFileHandleA(HANDLE hFile, char* szDevicePath, size_t nSizeInChars); 15 | __declspec(dllexport) bool PathFromFileHandleW(HANDLE hFile, wchar_t* szPath, size_t nSizeInChars); 16 | __declspec(dllexport) bool PathFromFileHandleA(HANDLE hFile, char* szPath, size_t nSizeInChars); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // _DEVICENAMERESOLVER_H 23 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/DeviceNameResolver/DeviceNameResolver.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _DEVICENAMERESOLVER_H 2 | #define _DEVICENAMERESOLVER_H 3 | 4 | #include <windows.h> 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __declspec(dllexport) bool DevicePathToPathW(const wchar_t* szDevicePath, wchar_t* szPath, size_t nSizeInChars); 12 | __declspec(dllexport) bool DevicePathToPathA(const char* szDevicePath, char* szPath, size_t nSizeInChars); 13 | __declspec(dllexport) bool DevicePathFromFileHandleW(HANDLE hFile, wchar_t* szDevicePath, size_t nSizeInChars); 14 | __declspec(dllexport) bool DevicePathFromFileHandleA(HANDLE hFile, char* szDevicePath, size_t nSizeInChars); 15 | __declspec(dllexport) bool PathFromFileHandleW(HANDLE hFile, wchar_t* szPath, size_t nSizeInChars); 16 | __declspec(dllexport) bool PathFromFileHandleA(HANDLE hFile, char* szPath, size_t nSizeInChars); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // _DEVICENAMERESOLVER_H 23 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_bookmark.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_BOOKMARK_H 2 | #define _SCRIPTAPI_BOOKMARK_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Bookmark 9 | { 10 | struct BookmarkInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rva; 14 | bool manual; 15 | }; 16 | 17 | SCRIPT_EXPORT bool Set(duint addr, bool manual = false); 18 | SCRIPT_EXPORT bool Set(const BookmarkInfo* info); 19 | SCRIPT_EXPORT bool Get(duint addr); 20 | SCRIPT_EXPORT bool GetInfo(duint addr, BookmarkInfo* info); 21 | SCRIPT_EXPORT bool Delete(duint addr); 22 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 23 | SCRIPT_EXPORT void Clear(); 24 | SCRIPT_EXPORT bool GetList(ListOf(BookmarkInfo) list); //caller has the responsibility to free the list 25 | }; //Bookmark 26 | }; //Script 27 | 28 | #endif //_SCRIPTAPI_BOOKMARK_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_bookmark.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_BOOKMARK_H 2 | #define _SCRIPTAPI_BOOKMARK_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Bookmark 9 | { 10 | struct BookmarkInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rva; 14 | bool manual; 15 | }; 16 | 17 | SCRIPT_EXPORT bool Set(duint addr, bool manual = false); 18 | SCRIPT_EXPORT bool Set(const BookmarkInfo* info); 19 | SCRIPT_EXPORT bool Get(duint addr); 20 | SCRIPT_EXPORT bool GetInfo(duint addr, BookmarkInfo* info); 21 | SCRIPT_EXPORT bool Delete(duint addr); 22 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 23 | SCRIPT_EXPORT void Clear(); 24 | SCRIPT_EXPORT bool GetList(ListOf(BookmarkInfo) list); //caller has the responsibility to free the list 25 | }; //Bookmark 26 | }; //Script 27 | 28 | #endif //_SCRIPTAPI_BOOKMARK_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_comment.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_COMMENT_H 2 | #define _SCRIPTAPI_COMMENT_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Comment 9 | { 10 | struct CommentInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rva; 14 | char text[MAX_LABEL_SIZE]; 15 | bool manual; 16 | }; 17 | 18 | SCRIPT_EXPORT bool Set(duint addr, const char* text, bool manual = false); 19 | SCRIPT_EXPORT bool Set(const CommentInfo* info); 20 | SCRIPT_EXPORT bool Get(duint addr, char* text); //text[MAX_COMMENT_SIZE] 21 | SCRIPT_EXPORT bool GetInfo(duint addr, CommentInfo* info); 22 | SCRIPT_EXPORT bool Delete(duint addr); 23 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 24 | SCRIPT_EXPORT void Clear(); 25 | SCRIPT_EXPORT bool GetList(ListOf(CommentInfo) list); //caller has the responsibility to free the list 26 | }; //Comment 27 | }; //Script 28 | 29 | #endif //_SCRIPTAPI_COMMENT_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_comment.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_COMMENT_H 2 | #define _SCRIPTAPI_COMMENT_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Comment 9 | { 10 | struct CommentInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rva; 14 | char text[MAX_LABEL_SIZE]; 15 | bool manual; 16 | }; 17 | 18 | SCRIPT_EXPORT bool Set(duint addr, const char* text, bool manual = false); 19 | SCRIPT_EXPORT bool Set(const CommentInfo* info); 20 | SCRIPT_EXPORT bool Get(duint addr, char* text); //text[MAX_COMMENT_SIZE] 21 | SCRIPT_EXPORT bool GetInfo(duint addr, CommentInfo* info); 22 | SCRIPT_EXPORT bool Delete(duint addr); 23 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 24 | SCRIPT_EXPORT void Clear(); 25 | SCRIPT_EXPORT bool GetList(ListOf(CommentInfo) list); //caller has the responsibility to free the list 26 | }; //Comment 27 | }; //Script 28 | 29 | #endif //_SCRIPTAPI_COMMENT_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_debug.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_DEBUG_H 2 | #define _SCRIPTAPI_DEBUG_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Debug 9 | { 10 | enum HardwareType 11 | { 12 | HardwareAccess, 13 | HardwareWrite, 14 | HardwareExecute 15 | }; 16 | 17 | SCRIPT_EXPORT void Wait(); 18 | SCRIPT_EXPORT void Run(); 19 | SCRIPT_EXPORT void Pause(); 20 | SCRIPT_EXPORT void Stop(); 21 | SCRIPT_EXPORT void StepIn(); 22 | SCRIPT_EXPORT void StepOver(); 23 | SCRIPT_EXPORT void StepOut(); 24 | SCRIPT_EXPORT bool SetBreakpoint(duint address); 25 | SCRIPT_EXPORT bool DeleteBreakpoint(duint address); 26 | SCRIPT_EXPORT bool DisableBreakpoint(duint address); 27 | SCRIPT_EXPORT bool SetHardwareBreakpoint(duint address, HardwareType type = HardwareExecute); 28 | SCRIPT_EXPORT bool DeleteHardwareBreakpoint(duint address); 29 | }; //Debug 30 | }; //Script 31 | 32 | #endif //_SCRIPTAPI_DEBUG_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_debug.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_DEBUG_H 2 | #define _SCRIPTAPI_DEBUG_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Debug 9 | { 10 | enum HardwareType 11 | { 12 | HardwareAccess, 13 | HardwareWrite, 14 | HardwareExecute 15 | }; 16 | 17 | SCRIPT_EXPORT void Wait(); 18 | SCRIPT_EXPORT void Run(); 19 | SCRIPT_EXPORT void Pause(); 20 | SCRIPT_EXPORT void Stop(); 21 | SCRIPT_EXPORT void StepIn(); 22 | SCRIPT_EXPORT void StepOver(); 23 | SCRIPT_EXPORT void StepOut(); 24 | SCRIPT_EXPORT bool SetBreakpoint(duint address); 25 | SCRIPT_EXPORT bool DeleteBreakpoint(duint address); 26 | SCRIPT_EXPORT bool DisableBreakpoint(duint address); 27 | SCRIPT_EXPORT bool SetHardwareBreakpoint(duint address, HardwareType type = HardwareExecute); 28 | SCRIPT_EXPORT bool DeleteHardwareBreakpoint(duint address); 29 | }; //Debug 30 | }; //Script 31 | 32 | #endif //_SCRIPTAPI_DEBUG_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/input/position_t.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstddef> // size_t 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | 19 | /// struct to capture the start position of the current token 20 | struct position_t 21 | { 22 | /// the total number of characters read 23 | std::size_t chars_read_total = 0; 24 | /// the number of characters read in the current line 25 | std::size_t chars_read_current_line = 0; 26 | /// the number of lines read 27 | std::size_t lines_read = 0; 28 | 29 | /// conversion to size_t to preserve SAX interface 30 | constexpr operator size_t() const 31 | { 32 | return chars_read_total; 33 | } 34 | }; 35 | 36 | } // namespace detail 37 | NLOHMANN_JSON_NAMESPACE_END 38 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/input/position_t.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstddef> // size_t 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | 19 | /// struct to capture the start position of the current token 20 | struct position_t 21 | { 22 | /// the total number of characters read 23 | std::size_t chars_read_total = 0; 24 | /// the number of characters read in the current line 25 | std::size_t chars_read_current_line = 0; 26 | /// the number of lines read 27 | std::size_t lines_read = 0; 28 | 29 | /// conversion to size_t to preserve SAX interface 30 | constexpr operator size_t() const 31 | { 32 | return chars_read_total; 33 | } 34 | }; 35 | 36 | } // namespace detail 37 | NLOHMANN_JSON_NAMESPACE_END 38 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/iterators/internal_iterator.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | #include <nlohmann/detail/iterators/primitive_iterator.hpp> 13 | 14 | NLOHMANN_JSON_NAMESPACE_BEGIN 15 | namespace detail 16 | { 17 | 18 | /*! 19 | @brief an iterator value 20 | 21 | @note This structure could easily be a union, but MSVC currently does not allow 22 | unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. 23 | */ 24 | template<typename BasicJsonType> struct internal_iterator 25 | { 26 | /// iterator for JSON objects 27 | typename BasicJsonType::object_t::iterator object_iterator {}; 28 | /// iterator for JSON arrays 29 | typename BasicJsonType::array_t::iterator array_iterator {}; 30 | /// generic iterator for all other types 31 | primitive_iterator_t primitive_iterator {}; 32 | }; 33 | 34 | } // namespace detail 35 | NLOHMANN_JSON_NAMESPACE_END 36 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/iterators/internal_iterator.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | #include <nlohmann/detail/iterators/primitive_iterator.hpp> 13 | 14 | NLOHMANN_JSON_NAMESPACE_BEGIN 15 | namespace detail 16 | { 17 | 18 | /*! 19 | @brief an iterator value 20 | 21 | @note This structure could easily be a union, but MSVC currently does not allow 22 | unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. 23 | */ 24 | template<typename BasicJsonType> struct internal_iterator 25 | { 26 | /// iterator for JSON objects 27 | typename BasicJsonType::object_t::iterator object_iterator {}; 28 | /// iterator for JSON arrays 29 | typename BasicJsonType::array_t::iterator array_iterator {}; 30 | /// generic iterator for all other types 31 | primitive_iterator_t primitive_iterator {}; 32 | }; 33 | 34 | } // namespace detail 35 | NLOHMANN_JSON_NAMESPACE_END 36 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_argument.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_ARGUMENT_H 2 | #define _SCRIPTAPI_ARGUMENT_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Argument 9 | { 10 | struct ArgumentInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rvaStart; 14 | duint rvaEnd; 15 | bool manual; 16 | duint instructioncount; 17 | }; 18 | 19 | SCRIPT_EXPORT bool Add(duint start, duint end, bool manual, duint instructionCount = 0); 20 | SCRIPT_EXPORT bool Add(const ArgumentInfo* info); 21 | SCRIPT_EXPORT bool Get(duint addr, duint* start = nullptr, duint* end = nullptr, duint* instructionCount = nullptr); 22 | SCRIPT_EXPORT bool GetInfo(duint addr, ArgumentInfo* info); 23 | SCRIPT_EXPORT bool Overlaps(duint start, duint end); 24 | SCRIPT_EXPORT bool Delete(duint address); 25 | SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual = false); 26 | SCRIPT_EXPORT void Clear(); 27 | SCRIPT_EXPORT bool GetList(ListOf(ArgumentInfo) list); //caller has the responsibility to free the list 28 | }; //Argument 29 | }; //Script 30 | 31 | #endif //_SCRIPTAPI_ARGUMENT_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_argument.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_ARGUMENT_H 2 | #define _SCRIPTAPI_ARGUMENT_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Argument 9 | { 10 | struct ArgumentInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rvaStart; 14 | duint rvaEnd; 15 | bool manual; 16 | duint instructioncount; 17 | }; 18 | 19 | SCRIPT_EXPORT bool Add(duint start, duint end, bool manual, duint instructionCount = 0); 20 | SCRIPT_EXPORT bool Add(const ArgumentInfo* info); 21 | SCRIPT_EXPORT bool Get(duint addr, duint* start = nullptr, duint* end = nullptr, duint* instructionCount = nullptr); 22 | SCRIPT_EXPORT bool GetInfo(duint addr, ArgumentInfo* info); 23 | SCRIPT_EXPORT bool Overlaps(duint start, duint end); 24 | SCRIPT_EXPORT bool Delete(duint address); 25 | SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual = false); 26 | SCRIPT_EXPORT void Clear(); 27 | SCRIPT_EXPORT bool GetList(ListOf(ArgumentInfo) list); //caller has the responsibility to free the list 28 | }; //Argument 29 | }; //Script 30 | 31 | #endif //_SCRIPTAPI_ARGUMENT_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_label.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_LABEL_H 2 | #define _SCRIPTAPI_LABEL_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Label 9 | { 10 | struct LabelInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rva; 14 | char text[MAX_LABEL_SIZE]; 15 | bool manual; 16 | }; 17 | 18 | SCRIPT_EXPORT bool Set(duint addr, const char* text, bool manual = false); 19 | SCRIPT_EXPORT bool Set(duint addr, const char* text, bool manual = false, bool temporary = false); 20 | SCRIPT_EXPORT bool Set(const LabelInfo* info); 21 | SCRIPT_EXPORT bool FromString(const char* label, duint* addr); 22 | SCRIPT_EXPORT bool Get(duint addr, char* text); //text[MAX_LABEL_SIZE] 23 | SCRIPT_EXPORT bool IsTemporary(duint addr); 24 | SCRIPT_EXPORT bool GetInfo(duint addr, LabelInfo* info); 25 | SCRIPT_EXPORT bool Delete(duint addr); 26 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 27 | SCRIPT_EXPORT void Clear(); 28 | SCRIPT_EXPORT bool GetList(ListOf(LabelInfo) list); //caller has the responsibility to free the list 29 | }; //Label 30 | }; //Script 31 | 32 | #endif //_SCRIPTAPI_LABEL_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_label.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_LABEL_H 2 | #define _SCRIPTAPI_LABEL_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Label 9 | { 10 | struct LabelInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rva; 14 | char text[MAX_LABEL_SIZE]; 15 | bool manual; 16 | }; 17 | 18 | SCRIPT_EXPORT bool Set(duint addr, const char* text, bool manual = false); 19 | SCRIPT_EXPORT bool Set(duint addr, const char* text, bool manual = false, bool temporary = false); 20 | SCRIPT_EXPORT bool Set(const LabelInfo* info); 21 | SCRIPT_EXPORT bool FromString(const char* label, duint* addr); 22 | SCRIPT_EXPORT bool Get(duint addr, char* text); //text[MAX_LABEL_SIZE] 23 | SCRIPT_EXPORT bool IsTemporary(duint addr); 24 | SCRIPT_EXPORT bool GetInfo(duint addr, LabelInfo* info); 25 | SCRIPT_EXPORT bool Delete(duint addr); 26 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 27 | SCRIPT_EXPORT void Clear(); 28 | SCRIPT_EXPORT bool GetList(ListOf(LabelInfo) list); //caller has the responsibility to free the list 29 | }; //Label 30 | }; //Script 31 | 32 | #endif //_SCRIPTAPI_LABEL_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_function.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_FUNCTION_H 2 | #define _SCRIPTAPI_FUNCTION_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Function 9 | { 10 | struct FunctionInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rvaStart; 14 | duint rvaEnd; 15 | bool manual; 16 | duint instructioncount; 17 | }; 18 | 19 | SCRIPT_EXPORT bool Add(duint start, duint end, bool manual, duint instructionCount = 0); 20 | SCRIPT_EXPORT bool Add(const FunctionInfo* info); 21 | SCRIPT_EXPORT bool Get(duint addr, duint* start = nullptr, duint* end = nullptr, duint* instructionCount = nullptr); 22 | SCRIPT_EXPORT bool GetInfo(duint addr, FunctionInfo* info); 23 | SCRIPT_EXPORT bool Overlaps(duint start, duint end); 24 | SCRIPT_EXPORT bool Delete(duint address); 25 | SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual); 26 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 27 | SCRIPT_EXPORT void Clear(); 28 | SCRIPT_EXPORT bool GetList(ListOf(FunctionInfo) list); //caller has the responsibility to free the list 29 | }; //Function 30 | }; //Script 31 | 32 | #endif //_SCRIPTAPI_FUNCTION_H 33 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_function.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_FUNCTION_H 2 | #define _SCRIPTAPI_FUNCTION_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Function 9 | { 10 | struct FunctionInfo 11 | { 12 | char mod[MAX_MODULE_SIZE]; 13 | duint rvaStart; 14 | duint rvaEnd; 15 | bool manual; 16 | duint instructioncount; 17 | }; 18 | 19 | SCRIPT_EXPORT bool Add(duint start, duint end, bool manual, duint instructionCount = 0); 20 | SCRIPT_EXPORT bool Add(const FunctionInfo* info); 21 | SCRIPT_EXPORT bool Get(duint addr, duint* start = nullptr, duint* end = nullptr, duint* instructionCount = nullptr); 22 | SCRIPT_EXPORT bool GetInfo(duint addr, FunctionInfo* info); 23 | SCRIPT_EXPORT bool Overlaps(duint start, duint end); 24 | SCRIPT_EXPORT bool Delete(duint address); 25 | SCRIPT_EXPORT void DeleteRange(duint start, duint end, bool deleteManual); 26 | SCRIPT_EXPORT void DeleteRange(duint start, duint end); 27 | SCRIPT_EXPORT void Clear(); 28 | SCRIPT_EXPORT bool GetList(ListOf(FunctionInfo) list); //caller has the responsibility to free the list 29 | }; //Function 30 | }; //Script 31 | 32 | #endif //_SCRIPTAPI_FUNCTION_H 33 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/json_custom_base_class.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <type_traits> // conditional, is_same 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | 19 | /*! 20 | @brief Default base class of the @ref basic_json class. 21 | 22 | So that the correct implementations of the copy / move ctors / assign operators 23 | of @ref basic_json do not require complex case distinctions 24 | (no base class / custom base class used as customization point), 25 | @ref basic_json always has a base class. 26 | By default, this class is used because it is empty and thus has no effect 27 | on the behavior of @ref basic_json. 28 | */ 29 | struct json_default_base {}; 30 | 31 | template<class T> 32 | using json_base_class = typename std::conditional < 33 | std::is_same<T, void>::value, 34 | json_default_base, 35 | T 36 | >::type; 37 | 38 | } // namespace detail 39 | NLOHMANN_JSON_NAMESPACE_END 40 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/json_custom_base_class.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <type_traits> // conditional, is_same 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | 19 | /*! 20 | @brief Default base class of the @ref basic_json class. 21 | 22 | So that the correct implementations of the copy / move ctors / assign operators 23 | of @ref basic_json do not require complex case distinctions 24 | (no base class / custom base class used as customization point), 25 | @ref basic_json always has a base class. 26 | By default, this class is used because it is empty and thus has no effect 27 | on the behavior of @ref basic_json. 28 | */ 29 | struct json_default_base {}; 30 | 31 | template<class T> 32 | using json_base_class = typename std::conditional < 33 | std::is_same<T, void>::value, 34 | json_default_base, 35 | T 36 | >::type; 37 | 38 | } // namespace detail 39 | NLOHMANN_JSON_NAMESPACE_END 40 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_flag.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_FLAG_H 2 | #define _SCRIPTAPI_FLAG_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Flag 9 | { 10 | enum FlagEnum 11 | { 12 | ZF, 13 | OF, 14 | CF, 15 | PF, 16 | SF, 17 | TF, 18 | AF, 19 | DF, 20 | IF 21 | }; 22 | 23 | SCRIPT_EXPORT bool Get(FlagEnum flag); 24 | SCRIPT_EXPORT bool Set(FlagEnum flag, bool value); 25 | 26 | SCRIPT_EXPORT bool GetZF(); 27 | SCRIPT_EXPORT bool SetZF(bool value); 28 | SCRIPT_EXPORT bool GetOF(); 29 | SCRIPT_EXPORT bool SetOF(bool value); 30 | SCRIPT_EXPORT bool GetCF(); 31 | SCRIPT_EXPORT bool SetCF(bool value); 32 | SCRIPT_EXPORT bool GetPF(); 33 | SCRIPT_EXPORT bool SetPF(bool value); 34 | SCRIPT_EXPORT bool GetSF(); 35 | SCRIPT_EXPORT bool SetSF(bool value); 36 | SCRIPT_EXPORT bool GetTF(); 37 | SCRIPT_EXPORT bool SetTF(bool value); 38 | SCRIPT_EXPORT bool GetAF(); 39 | SCRIPT_EXPORT bool SetAF(bool value); 40 | SCRIPT_EXPORT bool GetDF(); 41 | SCRIPT_EXPORT bool SetDF(bool value); 42 | SCRIPT_EXPORT bool GetIF(); 43 | SCRIPT_EXPORT bool SetIF(bool value); 44 | }; 45 | }; 46 | 47 | #endif //_SCRIPTAPI_FLAG_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_flag.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_FLAG_H 2 | #define _SCRIPTAPI_FLAG_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Flag 9 | { 10 | enum FlagEnum 11 | { 12 | ZF, 13 | OF, 14 | CF, 15 | PF, 16 | SF, 17 | TF, 18 | AF, 19 | DF, 20 | IF 21 | }; 22 | 23 | SCRIPT_EXPORT bool Get(FlagEnum flag); 24 | SCRIPT_EXPORT bool Set(FlagEnum flag, bool value); 25 | 26 | SCRIPT_EXPORT bool GetZF(); 27 | SCRIPT_EXPORT bool SetZF(bool value); 28 | SCRIPT_EXPORT bool GetOF(); 29 | SCRIPT_EXPORT bool SetOF(bool value); 30 | SCRIPT_EXPORT bool GetCF(); 31 | SCRIPT_EXPORT bool SetCF(bool value); 32 | SCRIPT_EXPORT bool GetPF(); 33 | SCRIPT_EXPORT bool SetPF(bool value); 34 | SCRIPT_EXPORT bool GetSF(); 35 | SCRIPT_EXPORT bool SetSF(bool value); 36 | SCRIPT_EXPORT bool GetTF(); 37 | SCRIPT_EXPORT bool SetTF(bool value); 38 | SCRIPT_EXPORT bool GetAF(); 39 | SCRIPT_EXPORT bool SetAF(bool value); 40 | SCRIPT_EXPORT bool GetDF(); 41 | SCRIPT_EXPORT bool SetDF(bool value); 42 | SCRIPT_EXPORT bool GetIF(); 43 | SCRIPT_EXPORT bool SetIF(bool value); 44 | }; 45 | }; 46 | 47 | #endif //_SCRIPTAPI_FLAG_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/XEDParse/XEDParse.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _XEDPARSE_H 2 | #define _XEDPARSE_H 3 | 4 | #include <windows.h> 5 | 6 | //XEDParse defines 7 | #ifdef XEDPARSE_BUILD 8 | #define XEDPARSE_EXPORT __declspec(dllexport) 9 | #else 10 | #define XEDPARSE_EXPORT __declspec(dllimport) 11 | #endif //XEDPARSE_BUILD 12 | 13 | #define XEDPARSE_CALL //calling convention 14 | 15 | #define XEDPARSE_MAXBUFSIZE 256 16 | #define XEDPARSE_MAXASMSIZE 16 17 | 18 | //typedefs 19 | typedef bool (XEDPARSE_CALL* CBXEDPARSE_UNKNOWN)(const char* text, ULONGLONG* value); 20 | 21 | //XEDParse enums 22 | enum XEDPARSE_STATUS 23 | { 24 | XEDPARSE_ERROR = 0, 25 | XEDPARSE_OK = 1 26 | }; 27 | 28 | //XEDParse structs 29 | #pragma pack(push,8) 30 | struct XEDPARSE 31 | { 32 | bool x64; // use 64-bit instructions 33 | ULONGLONG cip; //instruction pointer (for relative addressing) 34 | unsigned int dest_size; //destination size (returned by XEDParse) 35 | CBXEDPARSE_UNKNOWN cbUnknown; //unknown operand callback 36 | unsigned char dest[XEDPARSE_MAXASMSIZE]; //destination buffer 37 | char instr[XEDPARSE_MAXBUFSIZE]; //instruction text 38 | char error[XEDPARSE_MAXBUFSIZE]; //error text (in case of an error) 39 | }; 40 | #pragma pack(pop) 41 | 42 | #ifdef __cplusplus 43 | extern "C" 44 | { 45 | #endif 46 | 47 | XEDPARSE_EXPORT XEDPARSE_STATUS XEDPARSE_CALL XEDParseAssemble(XEDPARSE* XEDParse); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif // _XEDPARSE_H 54 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/XEDParse/XEDParse.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _XEDPARSE_H 2 | #define _XEDPARSE_H 3 | 4 | #include <windows.h> 5 | 6 | //XEDParse defines 7 | #ifdef XEDPARSE_BUILD 8 | #define XEDPARSE_EXPORT __declspec(dllexport) 9 | #else 10 | #define XEDPARSE_EXPORT __declspec(dllimport) 11 | #endif //XEDPARSE_BUILD 12 | 13 | #define XEDPARSE_CALL //calling convention 14 | 15 | #define XEDPARSE_MAXBUFSIZE 256 16 | #define XEDPARSE_MAXASMSIZE 16 17 | 18 | //typedefs 19 | typedef bool (XEDPARSE_CALL* CBXEDPARSE_UNKNOWN)(const char* text, ULONGLONG* value); 20 | 21 | //XEDParse enums 22 | enum XEDPARSE_STATUS 23 | { 24 | XEDPARSE_ERROR = 0, 25 | XEDPARSE_OK = 1 26 | }; 27 | 28 | //XEDParse structs 29 | #pragma pack(push,8) 30 | struct XEDPARSE 31 | { 32 | bool x64; // use 64-bit instructions 33 | ULONGLONG cip; //instruction pointer (for relative addressing) 34 | unsigned int dest_size; //destination size (returned by XEDParse) 35 | CBXEDPARSE_UNKNOWN cbUnknown; //unknown operand callback 36 | unsigned char dest[XEDPARSE_MAXASMSIZE]; //destination buffer 37 | char instr[XEDPARSE_MAXBUFSIZE]; //instruction text 38 | char error[XEDPARSE_MAXBUFSIZE]; //error text (in case of an error) 39 | }; 40 | #pragma pack(pop) 41 | 42 | #ifdef __cplusplus 43 | extern "C" 44 | { 45 | #endif 46 | 47 | XEDPARSE_EXPORT XEDPARSE_STATUS XEDPARSE_CALL XEDParseAssemble(XEDPARSE* XEDParse); 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #endif // _XEDPARSE_H 54 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/macro_unscope.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | // restore clang diagnostic settings 12 | #if defined(__clang__) 13 | #pragma clang diagnostic pop 14 | #endif 15 | 16 | // clean up 17 | #undef JSON_ASSERT 18 | #undef JSON_INTERNAL_CATCH 19 | #undef JSON_THROW 20 | #undef JSON_PRIVATE_UNLESS_TESTED 21 | #undef NLOHMANN_BASIC_JSON_TPL_DECLARATION 22 | #undef NLOHMANN_BASIC_JSON_TPL 23 | #undef JSON_EXPLICIT 24 | #undef NLOHMANN_CAN_CALL_STD_FUNC_IMPL 25 | #undef JSON_INLINE_VARIABLE 26 | #undef JSON_NO_UNIQUE_ADDRESS 27 | #undef JSON_DISABLE_ENUM_SERIALIZATION 28 | #undef JSON_USE_GLOBAL_UDLS 29 | 30 | #ifndef JSON_TEST_KEEP_MACROS 31 | #undef JSON_CATCH 32 | #undef JSON_TRY 33 | #undef JSON_HAS_CPP_11 34 | #undef JSON_HAS_CPP_14 35 | #undef JSON_HAS_CPP_17 36 | #undef JSON_HAS_CPP_20 37 | #undef JSON_HAS_FILESYSTEM 38 | #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM 39 | #undef JSON_HAS_THREE_WAY_COMPARISON 40 | #undef JSON_HAS_RANGES 41 | #undef JSON_HAS_STATIC_RTTI 42 | #undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 43 | #endif 44 | 45 | #include <nlohmann/thirdparty/hedley/hedley_undef.hpp> 46 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/macro_unscope.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | // restore clang diagnostic settings 12 | #if defined(__clang__) 13 | #pragma clang diagnostic pop 14 | #endif 15 | 16 | // clean up 17 | #undef JSON_ASSERT 18 | #undef JSON_INTERNAL_CATCH 19 | #undef JSON_THROW 20 | #undef JSON_PRIVATE_UNLESS_TESTED 21 | #undef NLOHMANN_BASIC_JSON_TPL_DECLARATION 22 | #undef NLOHMANN_BASIC_JSON_TPL 23 | #undef JSON_EXPLICIT 24 | #undef NLOHMANN_CAN_CALL_STD_FUNC_IMPL 25 | #undef JSON_INLINE_VARIABLE 26 | #undef JSON_NO_UNIQUE_ADDRESS 27 | #undef JSON_DISABLE_ENUM_SERIALIZATION 28 | #undef JSON_USE_GLOBAL_UDLS 29 | 30 | #ifndef JSON_TEST_KEEP_MACROS 31 | #undef JSON_CATCH 32 | #undef JSON_TRY 33 | #undef JSON_HAS_CPP_11 34 | #undef JSON_HAS_CPP_14 35 | #undef JSON_HAS_CPP_17 36 | #undef JSON_HAS_CPP_20 37 | #undef JSON_HAS_FILESYSTEM 38 | #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM 39 | #undef JSON_HAS_THREE_WAY_COMPARISON 40 | #undef JSON_HAS_RANGES 41 | #undef JSON_HAS_STATIC_RTTI 42 | #undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 43 | #endif 44 | 45 | #include <nlohmann/thirdparty/hedley/hedley_undef.hpp> 46 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_memory.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_MEMORY_H 2 | #define _SCRIPTAPI_MEMORY_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Memory 9 | { 10 | SCRIPT_EXPORT bool Read(duint addr, void* data, duint size, duint* sizeRead); 11 | SCRIPT_EXPORT bool Write(duint addr, const void* data, duint size, duint* sizeWritten); 12 | SCRIPT_EXPORT bool IsValidPtr(duint addr); 13 | SCRIPT_EXPORT duint RemoteAlloc(duint addr, duint size); 14 | SCRIPT_EXPORT bool RemoteFree(duint addr); 15 | SCRIPT_EXPORT unsigned int GetProtect(duint addr, bool reserved = false, bool cache = true); 16 | SCRIPT_EXPORT bool SetProtect(duint addr, unsigned int protect, duint size); 17 | SCRIPT_EXPORT duint GetBase(duint addr, bool reserved = false, bool cache = true); 18 | SCRIPT_EXPORT duint GetSize(duint addr, bool reserved = false, bool cache = true); 19 | 20 | SCRIPT_EXPORT unsigned char ReadByte(duint addr); 21 | SCRIPT_EXPORT bool WriteByte(duint addr, unsigned char data); 22 | SCRIPT_EXPORT unsigned short ReadWord(duint addr); 23 | SCRIPT_EXPORT bool WriteWord(duint addr, unsigned short data); 24 | SCRIPT_EXPORT unsigned int ReadDword(duint addr); 25 | SCRIPT_EXPORT bool WriteDword(duint addr, unsigned int data); 26 | SCRIPT_EXPORT unsigned long long ReadQword(duint addr); 27 | SCRIPT_EXPORT bool WriteQword(duint addr, unsigned long long data); 28 | SCRIPT_EXPORT duint ReadPtr(duint addr); 29 | SCRIPT_EXPORT bool WritePtr(duint addr, duint data); 30 | }; //Memory 31 | }; //Script 32 | 33 | #endif //_SCRIPTAPI_MEMORY_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_memory.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_MEMORY_H 2 | #define _SCRIPTAPI_MEMORY_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Memory 9 | { 10 | SCRIPT_EXPORT bool Read(duint addr, void* data, duint size, duint* sizeRead); 11 | SCRIPT_EXPORT bool Write(duint addr, const void* data, duint size, duint* sizeWritten); 12 | SCRIPT_EXPORT bool IsValidPtr(duint addr); 13 | SCRIPT_EXPORT duint RemoteAlloc(duint addr, duint size); 14 | SCRIPT_EXPORT bool RemoteFree(duint addr); 15 | SCRIPT_EXPORT unsigned int GetProtect(duint addr, bool reserved = false, bool cache = true); 16 | SCRIPT_EXPORT bool SetProtect(duint addr, unsigned int protect, duint size); 17 | SCRIPT_EXPORT duint GetBase(duint addr, bool reserved = false, bool cache = true); 18 | SCRIPT_EXPORT duint GetSize(duint addr, bool reserved = false, bool cache = true); 19 | 20 | SCRIPT_EXPORT unsigned char ReadByte(duint addr); 21 | SCRIPT_EXPORT bool WriteByte(duint addr, unsigned char data); 22 | SCRIPT_EXPORT unsigned short ReadWord(duint addr); 23 | SCRIPT_EXPORT bool WriteWord(duint addr, unsigned short data); 24 | SCRIPT_EXPORT unsigned int ReadDword(duint addr); 25 | SCRIPT_EXPORT bool WriteDword(duint addr, unsigned int data); 26 | SCRIPT_EXPORT unsigned long long ReadQword(duint addr); 27 | SCRIPT_EXPORT bool WriteQword(duint addr, unsigned long long data); 28 | SCRIPT_EXPORT duint ReadPtr(duint addr); 29 | SCRIPT_EXPORT bool WritePtr(duint addr, duint data); 30 | }; //Memory 31 | }; //Script 32 | 33 | #endif //_SCRIPTAPI_MEMORY_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/iterators/iterator_traits.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <iterator> // random_access_iterator_tag 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | #include <nlohmann/detail/meta/void_t.hpp> 15 | #include <nlohmann/detail/meta/cpp_future.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | namespace detail 19 | { 20 | 21 | template<typename It, typename = void> 22 | struct iterator_types {}; 23 | 24 | template<typename It> 25 | struct iterator_types < 26 | It, 27 | void_t<typename It::difference_type, typename It::value_type, typename It::pointer, 28 | typename It::reference, typename It::iterator_category >> 29 | { 30 | using difference_type = typename It::difference_type; 31 | using value_type = typename It::value_type; 32 | using pointer = typename It::pointer; 33 | using reference = typename It::reference; 34 | using iterator_category = typename It::iterator_category; 35 | }; 36 | 37 | // This is required as some compilers implement std::iterator_traits in a way that 38 | // doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. 39 | template<typename T, typename = void> 40 | struct iterator_traits 41 | { 42 | }; 43 | 44 | template<typename T> 45 | struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >> 46 | : iterator_types<T> 47 | { 48 | }; 49 | 50 | template<typename T> 51 | struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>> 52 | { 53 | using iterator_category = std::random_access_iterator_tag; 54 | using value_type = T; 55 | using difference_type = ptrdiff_t; 56 | using pointer = T*; 57 | using reference = T&; 58 | }; 59 | 60 | } // namespace detail 61 | NLOHMANN_JSON_NAMESPACE_END 62 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/iterators/iterator_traits.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <iterator> // random_access_iterator_tag 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | #include <nlohmann/detail/meta/void_t.hpp> 15 | #include <nlohmann/detail/meta/cpp_future.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | namespace detail 19 | { 20 | 21 | template<typename It, typename = void> 22 | struct iterator_types {}; 23 | 24 | template<typename It> 25 | struct iterator_types < 26 | It, 27 | void_t<typename It::difference_type, typename It::value_type, typename It::pointer, 28 | typename It::reference, typename It::iterator_category >> 29 | { 30 | using difference_type = typename It::difference_type; 31 | using value_type = typename It::value_type; 32 | using pointer = typename It::pointer; 33 | using reference = typename It::reference; 34 | using iterator_category = typename It::iterator_category; 35 | }; 36 | 37 | // This is required as some compilers implement std::iterator_traits in a way that 38 | // doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. 39 | template<typename T, typename = void> 40 | struct iterator_traits 41 | { 42 | }; 43 | 44 | template<typename T> 45 | struct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >> 46 | : iterator_types<T> 47 | { 48 | }; 49 | 50 | template<typename T> 51 | struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>> 52 | { 53 | using iterator_category = std::random_access_iterator_tag; 54 | using value_type = T; 55 | using difference_type = ptrdiff_t; 56 | using pointer = T*; 57 | using reference = T&; 58 | }; 59 | 60 | } // namespace detail 61 | NLOHMANN_JSON_NAMESPACE_END 62 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/json_ref.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <initializer_list> 12 | #include <utility> 13 | 14 | #include <nlohmann/detail/abi_macros.hpp> 15 | #include <nlohmann/detail/meta/type_traits.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | namespace detail 19 | { 20 | 21 | template<typename BasicJsonType> 22 | class json_ref 23 | { 24 | public: 25 | using value_type = BasicJsonType; 26 | 27 | json_ref(value_type&& value) 28 | : owned_value(std::move(value)) 29 | {} 30 | 31 | json_ref(const value_type& value) 32 | : value_ref(&value) 33 | {} 34 | 35 | json_ref(std::initializer_list<json_ref> init) 36 | : owned_value(init) 37 | {} 38 | 39 | template < 40 | class... Args, 41 | enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 > 42 | json_ref(Args && ... args) 43 | : owned_value(std::forward<Args>(args)...) 44 | {} 45 | 46 | // class should be movable only 47 | json_ref(json_ref&&) noexcept = default; 48 | json_ref(const json_ref&) = delete; 49 | json_ref& operator=(const json_ref&) = delete; 50 | json_ref& operator=(json_ref&&) = delete; 51 | ~json_ref() = default; 52 | 53 | value_type moved_or_copied() const 54 | { 55 | if (value_ref == nullptr) 56 | { 57 | return std::move(owned_value); 58 | } 59 | return *value_ref; 60 | } 61 | 62 | value_type const& operator*() const 63 | { 64 | return value_ref ? *value_ref : owned_value; 65 | } 66 | 67 | value_type const* operator->() const 68 | { 69 | return &** this; 70 | } 71 | 72 | private: 73 | mutable value_type owned_value = nullptr; 74 | value_type const* value_ref = nullptr; 75 | }; 76 | 77 | } // namespace detail 78 | NLOHMANN_JSON_NAMESPACE_END 79 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/json_ref.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <initializer_list> 12 | #include <utility> 13 | 14 | #include <nlohmann/detail/abi_macros.hpp> 15 | #include <nlohmann/detail/meta/type_traits.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | namespace detail 19 | { 20 | 21 | template<typename BasicJsonType> 22 | class json_ref 23 | { 24 | public: 25 | using value_type = BasicJsonType; 26 | 27 | json_ref(value_type&& value) 28 | : owned_value(std::move(value)) 29 | {} 30 | 31 | json_ref(const value_type& value) 32 | : value_ref(&value) 33 | {} 34 | 35 | json_ref(std::initializer_list<json_ref> init) 36 | : owned_value(init) 37 | {} 38 | 39 | template < 40 | class... Args, 41 | enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 > 42 | json_ref(Args && ... args) 43 | : owned_value(std::forward<Args>(args)...) 44 | {} 45 | 46 | // class should be movable only 47 | json_ref(json_ref&&) noexcept = default; 48 | json_ref(const json_ref&) = delete; 49 | json_ref& operator=(const json_ref&) = delete; 50 | json_ref& operator=(json_ref&&) = delete; 51 | ~json_ref() = default; 52 | 53 | value_type moved_or_copied() const 54 | { 55 | if (value_ref == nullptr) 56 | { 57 | return std::move(owned_value); 58 | } 59 | return *value_ref; 60 | } 61 | 62 | value_type const& operator*() const 63 | { 64 | return value_ref ? *value_ref : owned_value; 65 | } 66 | 67 | value_type const* operator->() const 68 | { 69 | return &** this; 70 | } 71 | 72 | private: 73 | mutable value_type owned_value = nullptr; 74 | value_type const* value_ref = nullptr; 75 | }; 76 | 77 | } // namespace detail 78 | NLOHMANN_JSON_NAMESPACE_END 79 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/jansson/jansson_config.h: -------------------------------------------------------------------------------- ``` 1 | /* 2 | * Copyright (c) 2010-2016 Petri Lehtinen <[email protected]> 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The CMake system will generate the jansson_config.h file and 13 | * copy it to the build and install directories. 14 | */ 15 | 16 | #ifndef JANSSON_CONFIG_H 17 | #define JANSSON_CONFIG_H 18 | 19 | /* Define this so that we can disable scattered automake configuration in source files */ 20 | #ifndef JANSSON_USING_CMAKE 21 | #define JANSSON_USING_CMAKE 22 | #endif 23 | 24 | /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, 25 | * as we will also check for __int64 etc types. 26 | * (the definition was used in the automake system) */ 27 | 28 | /* Bring in the cmake-detected defines */ 29 | #define HAVE_STDINT_H 1 30 | /* #undef HAVE_INTTYPES_H */ 31 | /* #undef HAVE_SYS_TYPES_H */ 32 | 33 | /* Include our standard type header for the integer typedef */ 34 | 35 | #if defined(HAVE_STDINT_H) 36 | # include <stdint.h> 37 | #elif defined(HAVE_INTTYPES_H) 38 | # include <inttypes.h> 39 | #elif defined(HAVE_SYS_TYPES_H) 40 | # include <sys/types.h> 41 | #endif 42 | 43 | 44 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 45 | defined to `inline', otherwise empty. In C++, the inline is always 46 | supported. */ 47 | #ifdef __cplusplus 48 | #define JSON_INLINE inline 49 | #else 50 | #define JSON_INLINE __inline 51 | #endif 52 | 53 | 54 | #define json_int_t long long 55 | #define json_strtoint strtoll 56 | #define JSON_INTEGER_FORMAT "I64d" 57 | 58 | 59 | /* If locale.h and localeconv() are available, define to 1, otherwise to 0. */ 60 | #define JSON_HAVE_LOCALECONV 1 61 | 62 | 63 | /* Maximum recursion depth for parsing JSON input. 64 | This limits the depth of e.g. array-within-array constructions. */ 65 | #define JSON_PARSER_MAX_DEPTH 2048 66 | 67 | 68 | #endif 69 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/jansson/jansson_config.h: -------------------------------------------------------------------------------- ``` 1 | /* 2 | * Copyright (c) 2010-2016 Petri Lehtinen <[email protected]> 3 | * 4 | * Jansson is free software; you can redistribute it and/or modify 5 | * it under the terms of the MIT license. See LICENSE for details. 6 | * 7 | * 8 | * This file specifies a part of the site-specific configuration for 9 | * Jansson, namely those things that affect the public API in 10 | * jansson.h. 11 | * 12 | * The CMake system will generate the jansson_config.h file and 13 | * copy it to the build and install directories. 14 | */ 15 | 16 | #ifndef JANSSON_CONFIG_H 17 | #define JANSSON_CONFIG_H 18 | 19 | /* Define this so that we can disable scattered automake configuration in source files */ 20 | #ifndef JANSSON_USING_CMAKE 21 | #define JANSSON_USING_CMAKE 22 | #endif 23 | 24 | /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, 25 | * as we will also check for __int64 etc types. 26 | * (the definition was used in the automake system) */ 27 | 28 | /* Bring in the cmake-detected defines */ 29 | #define HAVE_STDINT_H 1 30 | /* #undef HAVE_INTTYPES_H */ 31 | /* #undef HAVE_SYS_TYPES_H */ 32 | 33 | /* Include our standard type header for the integer typedef */ 34 | 35 | #if defined(HAVE_STDINT_H) 36 | # include <stdint.h> 37 | #elif defined(HAVE_INTTYPES_H) 38 | # include <inttypes.h> 39 | #elif defined(HAVE_SYS_TYPES_H) 40 | # include <sys/types.h> 41 | #endif 42 | 43 | 44 | /* If your compiler supports the inline keyword in C, JSON_INLINE is 45 | defined to `inline', otherwise empty. In C++, the inline is always 46 | supported. */ 47 | #ifdef __cplusplus 48 | #define JSON_INLINE inline 49 | #else 50 | #define JSON_INLINE __inline 51 | #endif 52 | 53 | 54 | #define json_int_t long long 55 | #define json_strtoint strtoll 56 | #define JSON_INTEGER_FORMAT "I64d" 57 | 58 | 59 | /* If locale.h and localeconv() are available, define to 1, otherwise to 0. */ 60 | #define JSON_HAVE_LOCALECONV 1 61 | 62 | 63 | /* Maximum recursion depth for parsing JSON input. 64 | This limits the depth of e.g. array-within-array constructions. */ 65 | #define JSON_PARSER_MAX_DEPTH 2048 66 | 67 | 68 | #endif 69 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/meta/detected.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <type_traits> 12 | 13 | #include <nlohmann/detail/meta/void_t.hpp> 14 | 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | 19 | // https://en.cppreference.com/w/cpp/experimental/is_detected 20 | struct nonesuch 21 | { 22 | nonesuch() = delete; 23 | ~nonesuch() = delete; 24 | nonesuch(nonesuch const&) = delete; 25 | nonesuch(nonesuch const&&) = delete; 26 | void operator=(nonesuch const&) = delete; 27 | void operator=(nonesuch&&) = delete; 28 | }; 29 | 30 | template<class Default, 31 | class AlwaysVoid, 32 | template<class...> class Op, 33 | class... Args> 34 | struct detector 35 | { 36 | using value_t = std::false_type; 37 | using type = Default; 38 | }; 39 | 40 | template<class Default, template<class...> class Op, class... Args> 41 | struct detector<Default, void_t<Op<Args...>>, Op, Args...> 42 | { 43 | using value_t = std::true_type; 44 | using type = Op<Args...>; 45 | }; 46 | 47 | template<template<class...> class Op, class... Args> 48 | using is_detected = typename detector<nonesuch, void, Op, Args...>::value_t; 49 | 50 | template<template<class...> class Op, class... Args> 51 | struct is_detected_lazy : is_detected<Op, Args...> { }; 52 | 53 | template<template<class...> class Op, class... Args> 54 | using detected_t = typename detector<nonesuch, void, Op, Args...>::type; 55 | 56 | template<class Default, template<class...> class Op, class... Args> 57 | using detected_or = detector<Default, void, Op, Args...>; 58 | 59 | template<class Default, template<class...> class Op, class... Args> 60 | using detected_or_t = typename detected_or<Default, Op, Args...>::type; 61 | 62 | template<class Expected, template<class...> class Op, class... Args> 63 | using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>; 64 | 65 | template<class To, template<class...> class Op, class... Args> 66 | using is_detected_convertible = 67 | std::is_convertible<detected_t<Op, Args...>, To>; 68 | 69 | } // namespace detail 70 | NLOHMANN_JSON_NAMESPACE_END 71 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/meta/detected.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <type_traits> 12 | 13 | #include <nlohmann/detail/meta/void_t.hpp> 14 | 15 | NLOHMANN_JSON_NAMESPACE_BEGIN 16 | namespace detail 17 | { 18 | 19 | // https://en.cppreference.com/w/cpp/experimental/is_detected 20 | struct nonesuch 21 | { 22 | nonesuch() = delete; 23 | ~nonesuch() = delete; 24 | nonesuch(nonesuch const&) = delete; 25 | nonesuch(nonesuch const&&) = delete; 26 | void operator=(nonesuch const&) = delete; 27 | void operator=(nonesuch&&) = delete; 28 | }; 29 | 30 | template<class Default, 31 | class AlwaysVoid, 32 | template<class...> class Op, 33 | class... Args> 34 | struct detector 35 | { 36 | using value_t = std::false_type; 37 | using type = Default; 38 | }; 39 | 40 | template<class Default, template<class...> class Op, class... Args> 41 | struct detector<Default, void_t<Op<Args...>>, Op, Args...> 42 | { 43 | using value_t = std::true_type; 44 | using type = Op<Args...>; 45 | }; 46 | 47 | template<template<class...> class Op, class... Args> 48 | using is_detected = typename detector<nonesuch, void, Op, Args...>::value_t; 49 | 50 | template<template<class...> class Op, class... Args> 51 | struct is_detected_lazy : is_detected<Op, Args...> { }; 52 | 53 | template<template<class...> class Op, class... Args> 54 | using detected_t = typename detector<nonesuch, void, Op, Args...>::type; 55 | 56 | template<class Default, template<class...> class Op, class... Args> 57 | using detected_or = detector<Default, void, Op, Args...>; 58 | 59 | template<class Default, template<class...> class Op, class... Args> 60 | using detected_or_t = typename detected_or<Default, Op, Args...>::type; 61 | 62 | template<class Expected, template<class...> class Op, class... Args> 63 | using is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>; 64 | 65 | template<class To, template<class...> class Op, class... Args> 66 | using is_detected_convertible = 67 | std::is_convertible<detected_t<Op, Args...>, To>; 68 | 69 | } // namespace detail 70 | NLOHMANN_JSON_NAMESPACE_END 71 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/string_escape.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | namespace detail 15 | { 16 | 17 | /*! 18 | @brief replace all occurrences of a substring by another string 19 | 20 | @param[in,out] s the string to manipulate; changed so that all 21 | occurrences of @a f are replaced with @a t 22 | @param[in] f the substring to replace with @a t 23 | @param[in] t the string to replace @a f 24 | 25 | @pre The search string @a f must not be empty. **This precondition is 26 | enforced with an assertion.** 27 | 28 | @since version 2.0.0 29 | */ 30 | template<typename StringType> 31 | inline void replace_substring(StringType& s, const StringType& f, 32 | const StringType& t) 33 | { 34 | JSON_ASSERT(!f.empty()); 35 | for (auto pos = s.find(f); // find first occurrence of f 36 | pos != StringType::npos; // make sure f was found 37 | s.replace(pos, f.size(), t), // replace with t, and 38 | pos = s.find(f, pos + t.size())) // find next occurrence of f 39 | {} 40 | } 41 | 42 | /*! 43 | * @brief string escaping as described in RFC 6901 (Sect. 4) 44 | * @param[in] s string to escape 45 | * @return escaped string 46 | * 47 | * Note the order of escaping "~" to "~0" and "/" to "~1" is important. 48 | */ 49 | template<typename StringType> 50 | inline StringType escape(StringType s) 51 | { 52 | replace_substring(s, StringType{"~"}, StringType{"~0"}); 53 | replace_substring(s, StringType{"/"}, StringType{"~1"}); 54 | return s; 55 | } 56 | 57 | /*! 58 | * @brief string unescaping as described in RFC 6901 (Sect. 4) 59 | * @param[in] s string to unescape 60 | * @return unescaped string 61 | * 62 | * Note the order of escaping "~1" to "/" and "~0" to "~" is important. 63 | */ 64 | template<typename StringType> 65 | static void unescape(StringType& s) 66 | { 67 | replace_substring(s, StringType{"~1"}, StringType{"/"}); 68 | replace_substring(s, StringType{"~0"}, StringType{"~"}); 69 | } 70 | 71 | } // namespace detail 72 | NLOHMANN_JSON_NAMESPACE_END 73 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/string_escape.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <nlohmann/detail/abi_macros.hpp> 12 | 13 | NLOHMANN_JSON_NAMESPACE_BEGIN 14 | namespace detail 15 | { 16 | 17 | /*! 18 | @brief replace all occurrences of a substring by another string 19 | 20 | @param[in,out] s the string to manipulate; changed so that all 21 | occurrences of @a f are replaced with @a t 22 | @param[in] f the substring to replace with @a t 23 | @param[in] t the string to replace @a f 24 | 25 | @pre The search string @a f must not be empty. **This precondition is 26 | enforced with an assertion.** 27 | 28 | @since version 2.0.0 29 | */ 30 | template<typename StringType> 31 | inline void replace_substring(StringType& s, const StringType& f, 32 | const StringType& t) 33 | { 34 | JSON_ASSERT(!f.empty()); 35 | for (auto pos = s.find(f); // find first occurrence of f 36 | pos != StringType::npos; // make sure f was found 37 | s.replace(pos, f.size(), t), // replace with t, and 38 | pos = s.find(f, pos + t.size())) // find next occurrence of f 39 | {} 40 | } 41 | 42 | /*! 43 | * @brief string escaping as described in RFC 6901 (Sect. 4) 44 | * @param[in] s string to escape 45 | * @return escaped string 46 | * 47 | * Note the order of escaping "~" to "~0" and "/" to "~1" is important. 48 | */ 49 | template<typename StringType> 50 | inline StringType escape(StringType s) 51 | { 52 | replace_substring(s, StringType{"~"}, StringType{"~0"}); 53 | replace_substring(s, StringType{"/"}, StringType{"~1"}); 54 | return s; 55 | } 56 | 57 | /*! 58 | * @brief string unescaping as described in RFC 6901 (Sect. 4) 59 | * @param[in] s string to unescape 60 | * @return unescaped string 61 | * 62 | * Note the order of escaping "~1" to "/" and "~0" to "~" is important. 63 | */ 64 | template<typename StringType> 65 | static void unescape(StringType& s) 66 | { 67 | replace_substring(s, StringType{"~1"}, StringType{"/"}); 68 | replace_substring(s, StringType{"~0"}, StringType{"~"}); 69 | } 70 | 71 | } // namespace detail 72 | NLOHMANN_JSON_NAMESPACE_END 73 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/adl_serializer.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <utility> 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | #include <nlohmann/detail/conversions/from_json.hpp> 15 | #include <nlohmann/detail/conversions/to_json.hpp> 16 | #include <nlohmann/detail/meta/identity_tag.hpp> 17 | 18 | NLOHMANN_JSON_NAMESPACE_BEGIN 19 | 20 | /// @sa https://json.nlohmann.me/api/adl_serializer/ 21 | template<typename ValueType, typename> 22 | struct adl_serializer 23 | { 24 | /// @brief convert a JSON value to any value type 25 | /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ 26 | template<typename BasicJsonType, typename TargetType = ValueType> 27 | static auto from_json(BasicJsonType && j, TargetType& val) noexcept( 28 | noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) 29 | -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void()) 30 | { 31 | ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); 32 | } 33 | 34 | /// @brief convert a JSON value to any value type 35 | /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ 36 | template<typename BasicJsonType, typename TargetType = ValueType> 37 | static auto from_json(BasicJsonType && j) noexcept( 38 | noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))) 39 | -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})) 40 | { 41 | return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}); 42 | } 43 | 44 | /// @brief convert any value type to a JSON value 45 | /// @sa https://json.nlohmann.me/api/adl_serializer/to_json/ 46 | template<typename BasicJsonType, typename TargetType = ValueType> 47 | static auto to_json(BasicJsonType& j, TargetType && val) noexcept( 48 | noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))) 49 | -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) 50 | { 51 | ::nlohmann::to_json(j, std::forward<TargetType>(val)); 52 | } 53 | }; 54 | 55 | NLOHMANN_JSON_NAMESPACE_END 56 | ``` -------------------------------------------------------------------------------- /include/nlohmann/adl_serializer.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <utility> 12 | 13 | #include <nlohmann/detail/abi_macros.hpp> 14 | #include <nlohmann/detail/conversions/from_json.hpp> 15 | #include <nlohmann/detail/conversions/to_json.hpp> 16 | #include <nlohmann/detail/meta/identity_tag.hpp> 17 | 18 | NLOHMANN_JSON_NAMESPACE_BEGIN 19 | 20 | /// @sa https://json.nlohmann.me/api/adl_serializer/ 21 | template<typename ValueType, typename> 22 | struct adl_serializer 23 | { 24 | /// @brief convert a JSON value to any value type 25 | /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ 26 | template<typename BasicJsonType, typename TargetType = ValueType> 27 | static auto from_json(BasicJsonType && j, TargetType& val) noexcept( 28 | noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) 29 | -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void()) 30 | { 31 | ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); 32 | } 33 | 34 | /// @brief convert a JSON value to any value type 35 | /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ 36 | template<typename BasicJsonType, typename TargetType = ValueType> 37 | static auto from_json(BasicJsonType && j) noexcept( 38 | noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))) 39 | -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {})) 40 | { 41 | return ::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}); 42 | } 43 | 44 | /// @brief convert any value type to a JSON value 45 | /// @sa https://json.nlohmann.me/api/adl_serializer/to_json/ 46 | template<typename BasicJsonType, typename TargetType = ValueType> 47 | static auto to_json(BasicJsonType& j, TargetType && val) noexcept( 48 | noexcept(::nlohmann::to_json(j, std::forward<TargetType>(val)))) 49 | -> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void()) 50 | { 51 | ::nlohmann::to_json(j, std::forward<TargetType>(val)); 52 | } 53 | }; 54 | 55 | NLOHMANN_JSON_NAMESPACE_END 56 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_gui.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_GUI_H 2 | #define _SCRIPTAPI_GUI_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Gui 9 | { 10 | namespace Disassembly 11 | { 12 | SCRIPT_EXPORT bool SelectionGet(duint* start, duint* end); 13 | SCRIPT_EXPORT bool SelectionSet(duint start, duint end); 14 | SCRIPT_EXPORT duint SelectionGetStart(); 15 | SCRIPT_EXPORT duint SelectionGetEnd(); 16 | }; //Disassembly 17 | 18 | namespace Dump 19 | { 20 | SCRIPT_EXPORT bool SelectionGet(duint* start, duint* end); 21 | SCRIPT_EXPORT bool SelectionSet(duint start, duint end); 22 | SCRIPT_EXPORT duint SelectionGetStart(); 23 | SCRIPT_EXPORT duint SelectionGetEnd(); 24 | }; //Dump 25 | 26 | namespace Stack 27 | { 28 | SCRIPT_EXPORT bool SelectionGet(duint* start, duint* end); 29 | SCRIPT_EXPORT bool SelectionSet(duint start, duint end); 30 | SCRIPT_EXPORT duint SelectionGetStart(); 31 | SCRIPT_EXPORT duint SelectionGetEnd(); 32 | }; //Stack 33 | 34 | namespace Graph 35 | { 36 | SCRIPT_EXPORT duint SelectionGetStart(); 37 | }; //Graph 38 | 39 | namespace MemMap 40 | { 41 | SCRIPT_EXPORT duint SelectionGetStart(); 42 | }; //MemoryMap 43 | 44 | namespace SymMod 45 | { 46 | SCRIPT_EXPORT duint SelectionGetStart(); 47 | }; //SymMod 48 | }; //Gui 49 | 50 | namespace Gui 51 | { 52 | enum Window 53 | { 54 | DisassemblyWindow, 55 | DumpWindow, 56 | StackWindow, 57 | GraphWindow, 58 | MemMapWindow, 59 | SymModWindow 60 | }; 61 | 62 | SCRIPT_EXPORT bool SelectionGet(Window window, duint* start, duint* end); 63 | SCRIPT_EXPORT bool SelectionSet(Window window, duint start, duint end); 64 | SCRIPT_EXPORT duint SelectionGetStart(Window window); 65 | SCRIPT_EXPORT duint SelectionGetEnd(Window window); 66 | SCRIPT_EXPORT void Message(const char* message); 67 | SCRIPT_EXPORT bool MessageYesNo(const char* message); 68 | SCRIPT_EXPORT bool InputLine(const char* title, char* text); //text[GUI_MAX_LINE_SIZE] 69 | SCRIPT_EXPORT bool InputValue(const char* title, duint* value); 70 | SCRIPT_EXPORT void Refresh(); 71 | SCRIPT_EXPORT void AddQWidgetTab(void* qWidget); 72 | SCRIPT_EXPORT void ShowQWidgetTab(void* qWidget); 73 | SCRIPT_EXPORT void CloseQWidgetTab(void* qWidget); 74 | 75 | }; //Gui 76 | }; //Script 77 | 78 | #endif //_SCRIPTAPI_GUI_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_gui.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_GUI_H 2 | #define _SCRIPTAPI_GUI_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Gui 9 | { 10 | namespace Disassembly 11 | { 12 | SCRIPT_EXPORT bool SelectionGet(duint* start, duint* end); 13 | SCRIPT_EXPORT bool SelectionSet(duint start, duint end); 14 | SCRIPT_EXPORT duint SelectionGetStart(); 15 | SCRIPT_EXPORT duint SelectionGetEnd(); 16 | }; //Disassembly 17 | 18 | namespace Dump 19 | { 20 | SCRIPT_EXPORT bool SelectionGet(duint* start, duint* end); 21 | SCRIPT_EXPORT bool SelectionSet(duint start, duint end); 22 | SCRIPT_EXPORT duint SelectionGetStart(); 23 | SCRIPT_EXPORT duint SelectionGetEnd(); 24 | }; //Dump 25 | 26 | namespace Stack 27 | { 28 | SCRIPT_EXPORT bool SelectionGet(duint* start, duint* end); 29 | SCRIPT_EXPORT bool SelectionSet(duint start, duint end); 30 | SCRIPT_EXPORT duint SelectionGetStart(); 31 | SCRIPT_EXPORT duint SelectionGetEnd(); 32 | }; //Stack 33 | 34 | namespace Graph 35 | { 36 | SCRIPT_EXPORT duint SelectionGetStart(); 37 | }; //Graph 38 | 39 | namespace MemMap 40 | { 41 | SCRIPT_EXPORT duint SelectionGetStart(); 42 | }; //MemoryMap 43 | 44 | namespace SymMod 45 | { 46 | SCRIPT_EXPORT duint SelectionGetStart(); 47 | }; //SymMod 48 | }; //Gui 49 | 50 | namespace Gui 51 | { 52 | enum Window 53 | { 54 | DisassemblyWindow, 55 | DumpWindow, 56 | StackWindow, 57 | GraphWindow, 58 | MemMapWindow, 59 | SymModWindow 60 | }; 61 | 62 | SCRIPT_EXPORT bool SelectionGet(Window window, duint* start, duint* end); 63 | SCRIPT_EXPORT bool SelectionSet(Window window, duint start, duint end); 64 | SCRIPT_EXPORT duint SelectionGetStart(Window window); 65 | SCRIPT_EXPORT duint SelectionGetEnd(Window window); 66 | SCRIPT_EXPORT void Message(const char* message); 67 | SCRIPT_EXPORT bool MessageYesNo(const char* message); 68 | SCRIPT_EXPORT bool InputLine(const char* title, char* text); //text[GUI_MAX_LINE_SIZE] 69 | SCRIPT_EXPORT bool InputValue(const char* title, duint* value); 70 | SCRIPT_EXPORT void Refresh(); 71 | SCRIPT_EXPORT void AddQWidgetTab(void* qWidget); 72 | SCRIPT_EXPORT void ShowQWidgetTab(void* qWidget); 73 | SCRIPT_EXPORT void CloseQWidgetTab(void* qWidget); 74 | 75 | }; //Gui 76 | }; //Script 77 | 78 | #endif //_SCRIPTAPI_GUI_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/json_fwd.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ 10 | #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ 11 | 12 | #include <cstdint> // int64_t, uint64_t 13 | #include <map> // map 14 | #include <memory> // allocator 15 | #include <string> // string 16 | #include <vector> // vector 17 | 18 | #include <nlohmann/detail/abi_macros.hpp> 19 | 20 | /*! 21 | @brief namespace for Niels Lohmann 22 | @see https://github.com/nlohmann 23 | @since version 1.0.0 24 | */ 25 | NLOHMANN_JSON_NAMESPACE_BEGIN 26 | 27 | /*! 28 | @brief default JSONSerializer template argument 29 | 30 | This serializer ignores the template arguments and uses ADL 31 | ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) 32 | for serialization. 33 | */ 34 | template<typename T = void, typename SFINAE = void> 35 | struct adl_serializer; 36 | 37 | /// a class to store JSON values 38 | /// @sa https://json.nlohmann.me/api/basic_json/ 39 | template<template<typename U, typename V, typename... Args> class ObjectType = 40 | std::map, 41 | template<typename U, typename... Args> class ArrayType = std::vector, 42 | class StringType = std::string, class BooleanType = bool, 43 | class NumberIntegerType = std::int64_t, 44 | class NumberUnsignedType = std::uint64_t, 45 | class NumberFloatType = double, 46 | template<typename U> class AllocatorType = std::allocator, 47 | template<typename T, typename SFINAE = void> class JSONSerializer = 48 | adl_serializer, 49 | class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError 50 | class CustomBaseClass = void> 51 | class basic_json; 52 | 53 | /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document 54 | /// @sa https://json.nlohmann.me/api/json_pointer/ 55 | template<typename RefStringType> 56 | class json_pointer; 57 | 58 | /*! 59 | @brief default specialization 60 | @sa https://json.nlohmann.me/api/json/ 61 | */ 62 | using json = basic_json<>; 63 | 64 | /// @brief a minimal map-like container that preserves insertion order 65 | /// @sa https://json.nlohmann.me/api/ordered_map/ 66 | template<class Key, class T, class IgnoredLess, class Allocator> 67 | struct ordered_map; 68 | 69 | /// @brief specialization that maintains the insertion order of object keys 70 | /// @sa https://json.nlohmann.me/api/ordered_json/ 71 | using ordered_json = basic_json<nlohmann::ordered_map>; 72 | 73 | NLOHMANN_JSON_NAMESPACE_END 74 | 75 | #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ 76 | ``` -------------------------------------------------------------------------------- /include/nlohmann/json_fwd.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ 10 | #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ 11 | 12 | #include <cstdint> // int64_t, uint64_t 13 | #include <map> // map 14 | #include <memory> // allocator 15 | #include <string> // string 16 | #include <vector> // vector 17 | 18 | #include <nlohmann/detail/abi_macros.hpp> 19 | 20 | /*! 21 | @brief namespace for Niels Lohmann 22 | @see https://github.com/nlohmann 23 | @since version 1.0.0 24 | */ 25 | NLOHMANN_JSON_NAMESPACE_BEGIN 26 | 27 | /*! 28 | @brief default JSONSerializer template argument 29 | 30 | This serializer ignores the template arguments and uses ADL 31 | ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) 32 | for serialization. 33 | */ 34 | template<typename T = void, typename SFINAE = void> 35 | struct adl_serializer; 36 | 37 | /// a class to store JSON values 38 | /// @sa https://json.nlohmann.me/api/basic_json/ 39 | template<template<typename U, typename V, typename... Args> class ObjectType = 40 | std::map, 41 | template<typename U, typename... Args> class ArrayType = std::vector, 42 | class StringType = std::string, class BooleanType = bool, 43 | class NumberIntegerType = std::int64_t, 44 | class NumberUnsignedType = std::uint64_t, 45 | class NumberFloatType = double, 46 | template<typename U> class AllocatorType = std::allocator, 47 | template<typename T, typename SFINAE = void> class JSONSerializer = 48 | adl_serializer, 49 | class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError 50 | class CustomBaseClass = void> 51 | class basic_json; 52 | 53 | /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document 54 | /// @sa https://json.nlohmann.me/api/json_pointer/ 55 | template<typename RefStringType> 56 | class json_pointer; 57 | 58 | /*! 59 | @brief default specialization 60 | @sa https://json.nlohmann.me/api/json/ 61 | */ 62 | using json = basic_json<>; 63 | 64 | /// @brief a minimal map-like container that preserves insertion order 65 | /// @sa https://json.nlohmann.me/api/ordered_map/ 66 | template<class Key, class T, class IgnoredLess, class Allocator> 67 | struct ordered_map; 68 | 69 | /// @brief specialization that maintains the insertion order of object keys 70 | /// @sa https://json.nlohmann.me/api/ordered_json/ 71 | using ordered_json = basic_json<nlohmann::ordered_map>; 72 | 73 | NLOHMANN_JSON_NAMESPACE_END 74 | 75 | #endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ 76 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_misc.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_MISC_H 2 | #define _SCRIPTAPI_MISC_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Misc 9 | { 10 | /// <summary> 11 | /// Evaluates an expression and returns the result. Analagous to using the Command field in x64dbg. 12 | /// 13 | /// Expressions can consist of memory locations, registers, flags, API names, labels, symbols, variables etc. 14 | /// <example> 15 | /// Shows how to read from stack at esp+8 16 | /// <code> 17 | /// bool success = ParseExpression("[esp+8]", &val) 18 | /// </code> 19 | /// </example> 20 | /// </summary> 21 | /// <param name="expression">The expression to evaluate.</param> 22 | /// <param name="value">The result of the expression.</param> 23 | /// <returns>True on success, False on failure.</returns> 24 | SCRIPT_EXPORT bool ParseExpression(const char* expression, duint* value); 25 | 26 | /// <summary> 27 | /// Returns the address of a function in the debuggee's memory space. 28 | /// </summary> 29 | /// <example> 30 | /// <code> 31 | /// duint addr = RemoteGetProcAddress("kernel32.dll", "GetProcAddress") 32 | /// </code> 33 | /// </example> 34 | /// <param name="module">The name of the module.</param> 35 | /// <param name="api">The name of the function.</param> 36 | /// <returns>The address of the function in the debuggee.</returns> 37 | SCRIPT_EXPORT duint RemoteGetProcAddress(const char* module, const char* api); 38 | 39 | /// <summary> 40 | /// Returns the address for a label created in the disassembly window. 41 | /// </summary> 42 | /// <example> 43 | /// <code> 44 | /// duint addr = ResolveLabel("sneaky_crypto") 45 | /// </code> 46 | /// </example> 47 | /// <param name="label">The name of the label to resolve.</param> 48 | /// <returns>The memory address for the label.</returns> 49 | SCRIPT_EXPORT duint ResolveLabel(const char* label); 50 | 51 | /// <summary> 52 | /// Allocates the requested number of bytes from x64dbg's default process heap. 53 | /// 54 | /// Note: this allocation is in the debugger, not the debuggee. 55 | /// 56 | /// Memory allocated using this function should be Free'd after use. 57 | /// </summary> 58 | /// <example> 59 | /// <code> 60 | /// void* addr = Alloc(0x100000) 61 | /// </code> 62 | /// </example> 63 | /// <param name="size">Number of bytes to allocate.</param> 64 | /// <returns>A pointer to the newly allocated memory.</returns> 65 | SCRIPT_EXPORT void* Alloc(duint size); 66 | 67 | /// <summary> 68 | /// Frees memory previously allocated by Alloc. 69 | /// </summary> 70 | /// <example> 71 | /// <code> 72 | /// Free(addr) 73 | /// </code> 74 | /// </example> 75 | /// <param name="ptr">Pointer returned by Alloc.</param> 76 | /// <returns>Nothing.</returns> 77 | SCRIPT_EXPORT void Free(void* ptr); 78 | }; //Misc 79 | }; //Script 80 | 81 | #endif //_SCRIPTAPI_MISC_H ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_misc.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_MISC_H 2 | #define _SCRIPTAPI_MISC_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Misc 9 | { 10 | /// <summary> 11 | /// Evaluates an expression and returns the result. Analagous to using the Command field in x64dbg. 12 | /// 13 | /// Expressions can consist of memory locations, registers, flags, API names, labels, symbols, variables etc. 14 | /// <example> 15 | /// Shows how to read from stack at esp+8 16 | /// <code> 17 | /// bool success = ParseExpression("[esp+8]", &val) 18 | /// </code> 19 | /// </example> 20 | /// </summary> 21 | /// <param name="expression">The expression to evaluate.</param> 22 | /// <param name="value">The result of the expression.</param> 23 | /// <returns>True on success, False on failure.</returns> 24 | SCRIPT_EXPORT bool ParseExpression(const char* expression, duint* value); 25 | 26 | /// <summary> 27 | /// Returns the address of a function in the debuggee's memory space. 28 | /// </summary> 29 | /// <example> 30 | /// <code> 31 | /// duint addr = RemoteGetProcAddress("kernel32.dll", "GetProcAddress") 32 | /// </code> 33 | /// </example> 34 | /// <param name="module">The name of the module.</param> 35 | /// <param name="api">The name of the function.</param> 36 | /// <returns>The address of the function in the debuggee.</returns> 37 | SCRIPT_EXPORT duint RemoteGetProcAddress(const char* module, const char* api); 38 | 39 | /// <summary> 40 | /// Returns the address for a label created in the disassembly window. 41 | /// </summary> 42 | /// <example> 43 | /// <code> 44 | /// duint addr = ResolveLabel("sneaky_crypto") 45 | /// </code> 46 | /// </example> 47 | /// <param name="label">The name of the label to resolve.</param> 48 | /// <returns>The memory address for the label.</returns> 49 | SCRIPT_EXPORT duint ResolveLabel(const char* label); 50 | 51 | /// <summary> 52 | /// Allocates the requested number of bytes from x64dbg's default process heap. 53 | /// 54 | /// Note: this allocation is in the debugger, not the debuggee. 55 | /// 56 | /// Memory allocated using this function should be Free'd after use. 57 | /// </summary> 58 | /// <example> 59 | /// <code> 60 | /// void* addr = Alloc(0x100000) 61 | /// </code> 62 | /// </example> 63 | /// <param name="size">Number of bytes to allocate.</param> 64 | /// <returns>A pointer to the newly allocated memory.</returns> 65 | SCRIPT_EXPORT void* Alloc(duint size); 66 | 67 | /// <summary> 68 | /// Frees memory previously allocated by Alloc. 69 | /// </summary> 70 | /// <example> 71 | /// <code> 72 | /// Free(addr) 73 | /// </code> 74 | /// </example> 75 | /// <param name="ptr">Pointer returned by Alloc.</param> 76 | /// <returns>Nothing.</returns> 77 | SCRIPT_EXPORT void Free(void* ptr); 78 | }; //Misc 79 | }; //Script 80 | 81 | #endif //_SCRIPTAPI_MISC_H ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/iterators/primitive_iterator.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstddef> // ptrdiff_t 12 | #include <limits> // numeric_limits 13 | 14 | #include <nlohmann/detail/macro_scope.hpp> 15 | 16 | NLOHMANN_JSON_NAMESPACE_BEGIN 17 | namespace detail 18 | { 19 | 20 | /* 21 | @brief an iterator for primitive JSON types 22 | 23 | This class models an iterator for primitive JSON types (boolean, number, 24 | string). It's only purpose is to allow the iterator/const_iterator classes 25 | to "iterate" over primitive values. Internally, the iterator is modeled by 26 | a `difference_type` variable. Value begin_value (`0`) models the begin, 27 | end_value (`1`) models past the end. 28 | */ 29 | class primitive_iterator_t 30 | { 31 | private: 32 | using difference_type = std::ptrdiff_t; 33 | static constexpr difference_type begin_value = 0; 34 | static constexpr difference_type end_value = begin_value + 1; 35 | 36 | JSON_PRIVATE_UNLESS_TESTED: 37 | /// iterator as signed integer type 38 | difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); 39 | 40 | public: 41 | constexpr difference_type get_value() const noexcept 42 | { 43 | return m_it; 44 | } 45 | 46 | /// set iterator to a defined beginning 47 | void set_begin() noexcept 48 | { 49 | m_it = begin_value; 50 | } 51 | 52 | /// set iterator to a defined past the end 53 | void set_end() noexcept 54 | { 55 | m_it = end_value; 56 | } 57 | 58 | /// return whether the iterator can be dereferenced 59 | constexpr bool is_begin() const noexcept 60 | { 61 | return m_it == begin_value; 62 | } 63 | 64 | /// return whether the iterator is at end 65 | constexpr bool is_end() const noexcept 66 | { 67 | return m_it == end_value; 68 | } 69 | 70 | friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept 71 | { 72 | return lhs.m_it == rhs.m_it; 73 | } 74 | 75 | friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept 76 | { 77 | return lhs.m_it < rhs.m_it; 78 | } 79 | 80 | primitive_iterator_t operator+(difference_type n) noexcept 81 | { 82 | auto result = *this; 83 | result += n; 84 | return result; 85 | } 86 | 87 | friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept 88 | { 89 | return lhs.m_it - rhs.m_it; 90 | } 91 | 92 | primitive_iterator_t& operator++() noexcept 93 | { 94 | ++m_it; 95 | return *this; 96 | } 97 | 98 | primitive_iterator_t operator++(int)& noexcept // NOLINT(cert-dcl21-cpp) 99 | { 100 | auto result = *this; 101 | ++m_it; 102 | return result; 103 | } 104 | 105 | primitive_iterator_t& operator--() noexcept 106 | { 107 | --m_it; 108 | return *this; 109 | } 110 | 111 | primitive_iterator_t operator--(int)& noexcept // NOLINT(cert-dcl21-cpp) 112 | { 113 | auto result = *this; 114 | --m_it; 115 | return result; 116 | } 117 | 118 | primitive_iterator_t& operator+=(difference_type n) noexcept 119 | { 120 | m_it += n; 121 | return *this; 122 | } 123 | 124 | primitive_iterator_t& operator-=(difference_type n) noexcept 125 | { 126 | m_it -= n; 127 | return *this; 128 | } 129 | }; 130 | 131 | } // namespace detail 132 | NLOHMANN_JSON_NAMESPACE_END 133 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/iterators/primitive_iterator.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstddef> // ptrdiff_t 12 | #include <limits> // numeric_limits 13 | 14 | #include <nlohmann/detail/macro_scope.hpp> 15 | 16 | NLOHMANN_JSON_NAMESPACE_BEGIN 17 | namespace detail 18 | { 19 | 20 | /* 21 | @brief an iterator for primitive JSON types 22 | 23 | This class models an iterator for primitive JSON types (boolean, number, 24 | string). It's only purpose is to allow the iterator/const_iterator classes 25 | to "iterate" over primitive values. Internally, the iterator is modeled by 26 | a `difference_type` variable. Value begin_value (`0`) models the begin, 27 | end_value (`1`) models past the end. 28 | */ 29 | class primitive_iterator_t 30 | { 31 | private: 32 | using difference_type = std::ptrdiff_t; 33 | static constexpr difference_type begin_value = 0; 34 | static constexpr difference_type end_value = begin_value + 1; 35 | 36 | JSON_PRIVATE_UNLESS_TESTED: 37 | /// iterator as signed integer type 38 | difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); 39 | 40 | public: 41 | constexpr difference_type get_value() const noexcept 42 | { 43 | return m_it; 44 | } 45 | 46 | /// set iterator to a defined beginning 47 | void set_begin() noexcept 48 | { 49 | m_it = begin_value; 50 | } 51 | 52 | /// set iterator to a defined past the end 53 | void set_end() noexcept 54 | { 55 | m_it = end_value; 56 | } 57 | 58 | /// return whether the iterator can be dereferenced 59 | constexpr bool is_begin() const noexcept 60 | { 61 | return m_it == begin_value; 62 | } 63 | 64 | /// return whether the iterator is at end 65 | constexpr bool is_end() const noexcept 66 | { 67 | return m_it == end_value; 68 | } 69 | 70 | friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept 71 | { 72 | return lhs.m_it == rhs.m_it; 73 | } 74 | 75 | friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept 76 | { 77 | return lhs.m_it < rhs.m_it; 78 | } 79 | 80 | primitive_iterator_t operator+(difference_type n) noexcept 81 | { 82 | auto result = *this; 83 | result += n; 84 | return result; 85 | } 86 | 87 | friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept 88 | { 89 | return lhs.m_it - rhs.m_it; 90 | } 91 | 92 | primitive_iterator_t& operator++() noexcept 93 | { 94 | ++m_it; 95 | return *this; 96 | } 97 | 98 | primitive_iterator_t operator++(int)& noexcept // NOLINT(cert-dcl21-cpp) 99 | { 100 | auto result = *this; 101 | ++m_it; 102 | return result; 103 | } 104 | 105 | primitive_iterator_t& operator--() noexcept 106 | { 107 | --m_it; 108 | return *this; 109 | } 110 | 111 | primitive_iterator_t operator--(int)& noexcept // NOLINT(cert-dcl21-cpp) 112 | { 113 | auto result = *this; 114 | --m_it; 115 | return result; 116 | } 117 | 118 | primitive_iterator_t& operator+=(difference_type n) noexcept 119 | { 120 | m_it += n; 121 | return *this; 122 | } 123 | 124 | primitive_iterator_t& operator-=(difference_type n) noexcept 125 | { 126 | m_it -= n; 127 | return *this; 128 | } 129 | }; 130 | 131 | } // namespace detail 132 | NLOHMANN_JSON_NAMESPACE_END 133 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/_scriptapi_module.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_MODULE_H 2 | #define _SCRIPTAPI_MODULE_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Module 9 | { 10 | struct ModuleInfo 11 | { 12 | duint base; 13 | duint size; 14 | duint entry; 15 | int sectionCount; 16 | char name[MAX_MODULE_SIZE]; 17 | char path[MAX_PATH]; 18 | }; 19 | 20 | struct ModuleSectionInfo 21 | { 22 | duint addr; 23 | duint size; 24 | char name[MAX_SECTION_SIZE * 5]; 25 | }; 26 | 27 | struct ModuleExport 28 | { 29 | duint ordinal; 30 | duint rva; 31 | duint va; 32 | bool forwarded; 33 | char forwardName[MAX_STRING_SIZE]; 34 | char name[MAX_STRING_SIZE]; 35 | char undecoratedName[MAX_STRING_SIZE]; 36 | }; 37 | 38 | struct ModuleImport 39 | { 40 | duint iatRva; 41 | duint iatVa; 42 | duint ordinal; //equal to -1 if imported by name 43 | char name[MAX_STRING_SIZE]; 44 | char undecoratedName[MAX_STRING_SIZE]; 45 | }; 46 | 47 | SCRIPT_EXPORT bool InfoFromAddr(duint addr, ModuleInfo* info); 48 | SCRIPT_EXPORT bool InfoFromName(const char* name, ModuleInfo* info); 49 | SCRIPT_EXPORT duint BaseFromAddr(duint addr); 50 | SCRIPT_EXPORT duint BaseFromName(const char* name); 51 | SCRIPT_EXPORT duint SizeFromAddr(duint addr); 52 | SCRIPT_EXPORT duint SizeFromName(const char* name); 53 | SCRIPT_EXPORT bool NameFromAddr(duint addr, char* name); //name[MAX_MODULE_SIZE] 54 | SCRIPT_EXPORT bool PathFromAddr(duint addr, char* path); //path[MAX_PATH] 55 | SCRIPT_EXPORT bool PathFromName(const char* name, char* path); //path[MAX_PATH] 56 | SCRIPT_EXPORT duint EntryFromAddr(duint addr); 57 | SCRIPT_EXPORT duint EntryFromName(const char* name); 58 | SCRIPT_EXPORT int SectionCountFromAddr(duint addr); 59 | SCRIPT_EXPORT int SectionCountFromName(const char* name); 60 | SCRIPT_EXPORT bool SectionFromAddr(duint addr, int number, ModuleSectionInfo* section); 61 | SCRIPT_EXPORT bool SectionFromName(const char* name, int number, ModuleSectionInfo* section); 62 | SCRIPT_EXPORT bool SectionListFromAddr(duint addr, ListOf(ModuleSectionInfo) list); 63 | SCRIPT_EXPORT bool SectionListFromName(const char* name, ListOf(ModuleSectionInfo) list); 64 | SCRIPT_EXPORT bool GetMainModuleInfo(ModuleInfo* info); 65 | SCRIPT_EXPORT duint GetMainModuleBase(); 66 | SCRIPT_EXPORT duint GetMainModuleSize(); 67 | SCRIPT_EXPORT duint GetMainModuleEntry(); 68 | SCRIPT_EXPORT int GetMainModuleSectionCount(); 69 | SCRIPT_EXPORT bool GetMainModuleName(char* name); //name[MAX_MODULE_SIZE] 70 | SCRIPT_EXPORT bool GetMainModulePath(char* path); //path[MAX_PATH] 71 | SCRIPT_EXPORT bool GetMainModuleSectionList(ListOf(ModuleSectionInfo) list); //caller has the responsibility to free the list 72 | SCRIPT_EXPORT bool GetList(ListOf(ModuleInfo) list); //caller has the responsibility to free the list 73 | SCRIPT_EXPORT bool GetExports(const ModuleInfo* mod, ListOf(ModuleExport) list); //caller has the responsibility to free the list 74 | SCRIPT_EXPORT bool GetImports(const ModuleInfo* mod, ListOf(ModuleImport) list); //caller has the responsibility to free the list 75 | }; //Module 76 | }; //Script 77 | 78 | #endif //_SCRIPTAPI_MODULE_H 79 | ``` -------------------------------------------------------------------------------- /deps/x64dbg_sdk/pluginsdk/_scriptapi_module.h: -------------------------------------------------------------------------------- ``` 1 | #ifndef _SCRIPTAPI_MODULE_H 2 | #define _SCRIPTAPI_MODULE_H 3 | 4 | #include "_scriptapi.h" 5 | 6 | namespace Script 7 | { 8 | namespace Module 9 | { 10 | struct ModuleInfo 11 | { 12 | duint base; 13 | duint size; 14 | duint entry; 15 | int sectionCount; 16 | char name[MAX_MODULE_SIZE]; 17 | char path[MAX_PATH]; 18 | }; 19 | 20 | struct ModuleSectionInfo 21 | { 22 | duint addr; 23 | duint size; 24 | char name[MAX_SECTION_SIZE * 5]; 25 | }; 26 | 27 | struct ModuleExport 28 | { 29 | duint ordinal; 30 | duint rva; 31 | duint va; 32 | bool forwarded; 33 | char forwardName[MAX_STRING_SIZE]; 34 | char name[MAX_STRING_SIZE]; 35 | char undecoratedName[MAX_STRING_SIZE]; 36 | }; 37 | 38 | struct ModuleImport 39 | { 40 | duint iatRva; 41 | duint iatVa; 42 | duint ordinal; //equal to -1 if imported by name 43 | char name[MAX_STRING_SIZE]; 44 | char undecoratedName[MAX_STRING_SIZE]; 45 | }; 46 | 47 | SCRIPT_EXPORT bool InfoFromAddr(duint addr, ModuleInfo* info); 48 | SCRIPT_EXPORT bool InfoFromName(const char* name, ModuleInfo* info); 49 | SCRIPT_EXPORT duint BaseFromAddr(duint addr); 50 | SCRIPT_EXPORT duint BaseFromName(const char* name); 51 | SCRIPT_EXPORT duint SizeFromAddr(duint addr); 52 | SCRIPT_EXPORT duint SizeFromName(const char* name); 53 | SCRIPT_EXPORT bool NameFromAddr(duint addr, char* name); //name[MAX_MODULE_SIZE] 54 | SCRIPT_EXPORT bool PathFromAddr(duint addr, char* path); //path[MAX_PATH] 55 | SCRIPT_EXPORT bool PathFromName(const char* name, char* path); //path[MAX_PATH] 56 | SCRIPT_EXPORT duint EntryFromAddr(duint addr); 57 | SCRIPT_EXPORT duint EntryFromName(const char* name); 58 | SCRIPT_EXPORT int SectionCountFromAddr(duint addr); 59 | SCRIPT_EXPORT int SectionCountFromName(const char* name); 60 | SCRIPT_EXPORT bool SectionFromAddr(duint addr, int number, ModuleSectionInfo* section); 61 | SCRIPT_EXPORT bool SectionFromName(const char* name, int number, ModuleSectionInfo* section); 62 | SCRIPT_EXPORT bool SectionListFromAddr(duint addr, ListOf(ModuleSectionInfo) list); 63 | SCRIPT_EXPORT bool SectionListFromName(const char* name, ListOf(ModuleSectionInfo) list); 64 | SCRIPT_EXPORT bool GetMainModuleInfo(ModuleInfo* info); 65 | SCRIPT_EXPORT duint GetMainModuleBase(); 66 | SCRIPT_EXPORT duint GetMainModuleSize(); 67 | SCRIPT_EXPORT duint GetMainModuleEntry(); 68 | SCRIPT_EXPORT int GetMainModuleSectionCount(); 69 | SCRIPT_EXPORT bool GetMainModuleName(char* name); //name[MAX_MODULE_SIZE] 70 | SCRIPT_EXPORT bool GetMainModulePath(char* path); //path[MAX_PATH] 71 | SCRIPT_EXPORT bool GetMainModuleSectionList(ListOf(ModuleSectionInfo) list); //caller has the responsibility to free the list 72 | SCRIPT_EXPORT bool GetList(ListOf(ModuleInfo) list); //caller has the responsibility to free the list 73 | SCRIPT_EXPORT bool GetExports(const ModuleInfo* mod, ListOf(ModuleExport) list); //caller has the responsibility to free the list 74 | SCRIPT_EXPORT bool GetImports(const ModuleInfo* mod, ListOf(ModuleImport) list); //caller has the responsibility to free the list 75 | }; //Module 76 | }; //Script 77 | 78 | #endif //_SCRIPTAPI_MODULE_H 79 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/byte_container_with_subtype.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstdint> // uint8_t, uint64_t 12 | #include <tuple> // tie 13 | #include <utility> // move 14 | 15 | #include <nlohmann/detail/abi_macros.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | 19 | /// @brief an internal type for a backed binary type 20 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/ 21 | template<typename BinaryType> 22 | class byte_container_with_subtype : public BinaryType 23 | { 24 | public: 25 | using container_type = BinaryType; 26 | using subtype_type = std::uint64_t; 27 | 28 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 29 | byte_container_with_subtype() noexcept(noexcept(container_type())) 30 | : container_type() 31 | {} 32 | 33 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 34 | byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b))) 35 | : container_type(b) 36 | {} 37 | 38 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 39 | byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b)))) 40 | : container_type(std::move(b)) 41 | {} 42 | 43 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 44 | byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b))) 45 | : container_type(b) 46 | , m_subtype(subtype_) 47 | , m_has_subtype(true) 48 | {} 49 | 50 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 51 | byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b)))) 52 | : container_type(std::move(b)) 53 | , m_subtype(subtype_) 54 | , m_has_subtype(true) 55 | {} 56 | 57 | bool operator==(const byte_container_with_subtype& rhs) const 58 | { 59 | return std::tie(static_cast<const BinaryType&>(*this), m_subtype, m_has_subtype) == 60 | std::tie(static_cast<const BinaryType&>(rhs), rhs.m_subtype, rhs.m_has_subtype); 61 | } 62 | 63 | bool operator!=(const byte_container_with_subtype& rhs) const 64 | { 65 | return !(rhs == *this); 66 | } 67 | 68 | /// @brief sets the binary subtype 69 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/ 70 | void set_subtype(subtype_type subtype_) noexcept 71 | { 72 | m_subtype = subtype_; 73 | m_has_subtype = true; 74 | } 75 | 76 | /// @brief return the binary subtype 77 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/ 78 | constexpr subtype_type subtype() const noexcept 79 | { 80 | return m_has_subtype ? m_subtype : static_cast<subtype_type>(-1); 81 | } 82 | 83 | /// @brief return whether the value has a subtype 84 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/ 85 | constexpr bool has_subtype() const noexcept 86 | { 87 | return m_has_subtype; 88 | } 89 | 90 | /// @brief clears the binary subtype 91 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/ 92 | void clear_subtype() noexcept 93 | { 94 | m_subtype = 0; 95 | m_has_subtype = false; 96 | } 97 | 98 | private: 99 | subtype_type m_subtype = 0; 100 | bool m_has_subtype = false; 101 | }; 102 | 103 | NLOHMANN_JSON_NAMESPACE_END 104 | ``` -------------------------------------------------------------------------------- /include/nlohmann/byte_container_with_subtype.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstdint> // uint8_t, uint64_t 12 | #include <tuple> // tie 13 | #include <utility> // move 14 | 15 | #include <nlohmann/detail/abi_macros.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | 19 | /// @brief an internal type for a backed binary type 20 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/ 21 | template<typename BinaryType> 22 | class byte_container_with_subtype : public BinaryType 23 | { 24 | public: 25 | using container_type = BinaryType; 26 | using subtype_type = std::uint64_t; 27 | 28 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 29 | byte_container_with_subtype() noexcept(noexcept(container_type())) 30 | : container_type() 31 | {} 32 | 33 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 34 | byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b))) 35 | : container_type(b) 36 | {} 37 | 38 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 39 | byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b)))) 40 | : container_type(std::move(b)) 41 | {} 42 | 43 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 44 | byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b))) 45 | : container_type(b) 46 | , m_subtype(subtype_) 47 | , m_has_subtype(true) 48 | {} 49 | 50 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ 51 | byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b)))) 52 | : container_type(std::move(b)) 53 | , m_subtype(subtype_) 54 | , m_has_subtype(true) 55 | {} 56 | 57 | bool operator==(const byte_container_with_subtype& rhs) const 58 | { 59 | return std::tie(static_cast<const BinaryType&>(*this), m_subtype, m_has_subtype) == 60 | std::tie(static_cast<const BinaryType&>(rhs), rhs.m_subtype, rhs.m_has_subtype); 61 | } 62 | 63 | bool operator!=(const byte_container_with_subtype& rhs) const 64 | { 65 | return !(rhs == *this); 66 | } 67 | 68 | /// @brief sets the binary subtype 69 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/ 70 | void set_subtype(subtype_type subtype_) noexcept 71 | { 72 | m_subtype = subtype_; 73 | m_has_subtype = true; 74 | } 75 | 76 | /// @brief return the binary subtype 77 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/ 78 | constexpr subtype_type subtype() const noexcept 79 | { 80 | return m_has_subtype ? m_subtype : static_cast<subtype_type>(-1); 81 | } 82 | 83 | /// @brief return whether the value has a subtype 84 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/ 85 | constexpr bool has_subtype() const noexcept 86 | { 87 | return m_has_subtype; 88 | } 89 | 90 | /// @brief clears the binary subtype 91 | /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/ 92 | void clear_subtype() noexcept 93 | { 94 | m_subtype = 0; 95 | m_has_subtype = false; 96 | } 97 | 98 | private: 99 | subtype_type m_subtype = 0; 100 | bool m_has_subtype = false; 101 | }; 102 | 103 | NLOHMANN_JSON_NAMESPACE_END 104 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/abi_macros.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | // This file contains all macro definitions affecting or depending on the ABI 12 | 13 | #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK 14 | #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) 15 | #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3 16 | #warning "Already included a different version of the library!" 17 | #endif 18 | #endif 19 | #endif 20 | 21 | #define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) 22 | #define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) 23 | #define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum) 24 | 25 | #ifndef JSON_DIAGNOSTICS 26 | #define JSON_DIAGNOSTICS 0 27 | #endif 28 | 29 | #ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 30 | #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 31 | #endif 32 | 33 | #if JSON_DIAGNOSTICS 34 | #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag 35 | #else 36 | #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS 37 | #endif 38 | 39 | #if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 40 | #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp 41 | #else 42 | #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON 43 | #endif 44 | 45 | #ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION 46 | #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 47 | #endif 48 | 49 | // Construct the namespace ABI tags component 50 | #define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b 51 | #define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ 52 | NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) 53 | 54 | #define NLOHMANN_JSON_ABI_TAGS \ 55 | NLOHMANN_JSON_ABI_TAGS_CONCAT( \ 56 | NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ 57 | NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) 58 | 59 | // Construct the namespace version component 60 | #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ 61 | _v ## major ## _ ## minor ## _ ## patch 62 | #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ 63 | NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) 64 | 65 | #if NLOHMANN_JSON_NAMESPACE_NO_VERSION 66 | #define NLOHMANN_JSON_NAMESPACE_VERSION 67 | #else 68 | #define NLOHMANN_JSON_NAMESPACE_VERSION \ 69 | NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ 70 | NLOHMANN_JSON_VERSION_MINOR, \ 71 | NLOHMANN_JSON_VERSION_PATCH) 72 | #endif 73 | 74 | // Combine namespace components 75 | #define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b 76 | #define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ 77 | NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) 78 | 79 | #ifndef NLOHMANN_JSON_NAMESPACE 80 | #define NLOHMANN_JSON_NAMESPACE \ 81 | nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ 82 | NLOHMANN_JSON_ABI_TAGS, \ 83 | NLOHMANN_JSON_NAMESPACE_VERSION) 84 | #endif 85 | 86 | #ifndef NLOHMANN_JSON_NAMESPACE_BEGIN 87 | #define NLOHMANN_JSON_NAMESPACE_BEGIN \ 88 | namespace nlohmann \ 89 | { \ 90 | inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ 91 | NLOHMANN_JSON_ABI_TAGS, \ 92 | NLOHMANN_JSON_NAMESPACE_VERSION) \ 93 | { 94 | #endif 95 | 96 | #ifndef NLOHMANN_JSON_NAMESPACE_END 97 | #define NLOHMANN_JSON_NAMESPACE_END \ 98 | } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ 99 | } // namespace nlohmann 100 | #endif 101 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/abi_macros.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | // This file contains all macro definitions affecting or depending on the ABI 12 | 13 | #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK 14 | #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) 15 | #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3 16 | #warning "Already included a different version of the library!" 17 | #endif 18 | #endif 19 | #endif 20 | 21 | #define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) 22 | #define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) 23 | #define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum) 24 | 25 | #ifndef JSON_DIAGNOSTICS 26 | #define JSON_DIAGNOSTICS 0 27 | #endif 28 | 29 | #ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 30 | #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 31 | #endif 32 | 33 | #if JSON_DIAGNOSTICS 34 | #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag 35 | #else 36 | #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS 37 | #endif 38 | 39 | #if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 40 | #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp 41 | #else 42 | #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON 43 | #endif 44 | 45 | #ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION 46 | #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 47 | #endif 48 | 49 | // Construct the namespace ABI tags component 50 | #define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b 51 | #define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ 52 | NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) 53 | 54 | #define NLOHMANN_JSON_ABI_TAGS \ 55 | NLOHMANN_JSON_ABI_TAGS_CONCAT( \ 56 | NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ 57 | NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) 58 | 59 | // Construct the namespace version component 60 | #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ 61 | _v ## major ## _ ## minor ## _ ## patch 62 | #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ 63 | NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) 64 | 65 | #if NLOHMANN_JSON_NAMESPACE_NO_VERSION 66 | #define NLOHMANN_JSON_NAMESPACE_VERSION 67 | #else 68 | #define NLOHMANN_JSON_NAMESPACE_VERSION \ 69 | NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ 70 | NLOHMANN_JSON_VERSION_MINOR, \ 71 | NLOHMANN_JSON_VERSION_PATCH) 72 | #endif 73 | 74 | // Combine namespace components 75 | #define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b 76 | #define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ 77 | NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) 78 | 79 | #ifndef NLOHMANN_JSON_NAMESPACE 80 | #define NLOHMANN_JSON_NAMESPACE \ 81 | nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ 82 | NLOHMANN_JSON_ABI_TAGS, \ 83 | NLOHMANN_JSON_NAMESPACE_VERSION) 84 | #endif 85 | 86 | #ifndef NLOHMANN_JSON_NAMESPACE_BEGIN 87 | #define NLOHMANN_JSON_NAMESPACE_BEGIN \ 88 | namespace nlohmann \ 89 | { \ 90 | inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ 91 | NLOHMANN_JSON_ABI_TAGS, \ 92 | NLOHMANN_JSON_NAMESPACE_VERSION) \ 93 | { 94 | #endif 95 | 96 | #ifndef NLOHMANN_JSON_NAMESPACE_END 97 | #define NLOHMANN_JSON_NAMESPACE_END \ 98 | } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ 99 | } // namespace nlohmann 100 | #endif 101 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/iterators/json_reverse_iterator.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstddef> // ptrdiff_t 12 | #include <iterator> // reverse_iterator 13 | #include <utility> // declval 14 | 15 | #include <nlohmann/detail/abi_macros.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | namespace detail 19 | { 20 | 21 | ////////////////////// 22 | // reverse_iterator // 23 | ////////////////////// 24 | 25 | /*! 26 | @brief a template for a reverse iterator class 27 | 28 | @tparam Base the base iterator type to reverse. Valid types are @ref 29 | iterator (to create @ref reverse_iterator) and @ref const_iterator (to 30 | create @ref const_reverse_iterator). 31 | 32 | @requirement The class satisfies the following concept requirements: 33 | - 34 | [BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): 35 | The iterator that can be moved can be moved in both directions (i.e. 36 | incremented and decremented). 37 | - [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator): 38 | It is possible to write to the pointed-to element (only if @a Base is 39 | @ref iterator). 40 | 41 | @since version 1.0.0 42 | */ 43 | template<typename Base> 44 | class json_reverse_iterator : public std::reverse_iterator<Base> 45 | { 46 | public: 47 | using difference_type = std::ptrdiff_t; 48 | /// shortcut to the reverse iterator adapter 49 | using base_iterator = std::reverse_iterator<Base>; 50 | /// the reference type for the pointed-to element 51 | using reference = typename Base::reference; 52 | 53 | /// create reverse iterator from iterator 54 | explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept 55 | : base_iterator(it) {} 56 | 57 | /// create reverse iterator from base class 58 | explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} 59 | 60 | /// post-increment (it++) 61 | json_reverse_iterator operator++(int)& // NOLINT(cert-dcl21-cpp) 62 | { 63 | return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); 64 | } 65 | 66 | /// pre-increment (++it) 67 | json_reverse_iterator& operator++() 68 | { 69 | return static_cast<json_reverse_iterator&>(base_iterator::operator++()); 70 | } 71 | 72 | /// post-decrement (it--) 73 | json_reverse_iterator operator--(int)& // NOLINT(cert-dcl21-cpp) 74 | { 75 | return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); 76 | } 77 | 78 | /// pre-decrement (--it) 79 | json_reverse_iterator& operator--() 80 | { 81 | return static_cast<json_reverse_iterator&>(base_iterator::operator--()); 82 | } 83 | 84 | /// add to iterator 85 | json_reverse_iterator& operator+=(difference_type i) 86 | { 87 | return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); 88 | } 89 | 90 | /// add to iterator 91 | json_reverse_iterator operator+(difference_type i) const 92 | { 93 | return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); 94 | } 95 | 96 | /// subtract from iterator 97 | json_reverse_iterator operator-(difference_type i) const 98 | { 99 | return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); 100 | } 101 | 102 | /// return difference 103 | difference_type operator-(const json_reverse_iterator& other) const 104 | { 105 | return base_iterator(*this) - base_iterator(other); 106 | } 107 | 108 | /// access to successor 109 | reference operator[](difference_type n) const 110 | { 111 | return *(this->operator+(n)); 112 | } 113 | 114 | /// return the key of an object iterator 115 | auto key() const -> decltype(std::declval<Base>().key()) 116 | { 117 | auto it = --this->base(); 118 | return it.key(); 119 | } 120 | 121 | /// return the value of an iterator 122 | reference value() const 123 | { 124 | auto it = --this->base(); 125 | return it.operator * (); 126 | } 127 | }; 128 | 129 | } // namespace detail 130 | NLOHMANN_JSON_NAMESPACE_END 131 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/iterators/json_reverse_iterator.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstddef> // ptrdiff_t 12 | #include <iterator> // reverse_iterator 13 | #include <utility> // declval 14 | 15 | #include <nlohmann/detail/abi_macros.hpp> 16 | 17 | NLOHMANN_JSON_NAMESPACE_BEGIN 18 | namespace detail 19 | { 20 | 21 | ////////////////////// 22 | // reverse_iterator // 23 | ////////////////////// 24 | 25 | /*! 26 | @brief a template for a reverse iterator class 27 | 28 | @tparam Base the base iterator type to reverse. Valid types are @ref 29 | iterator (to create @ref reverse_iterator) and @ref const_iterator (to 30 | create @ref const_reverse_iterator). 31 | 32 | @requirement The class satisfies the following concept requirements: 33 | - 34 | [BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): 35 | The iterator that can be moved can be moved in both directions (i.e. 36 | incremented and decremented). 37 | - [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator): 38 | It is possible to write to the pointed-to element (only if @a Base is 39 | @ref iterator). 40 | 41 | @since version 1.0.0 42 | */ 43 | template<typename Base> 44 | class json_reverse_iterator : public std::reverse_iterator<Base> 45 | { 46 | public: 47 | using difference_type = std::ptrdiff_t; 48 | /// shortcut to the reverse iterator adapter 49 | using base_iterator = std::reverse_iterator<Base>; 50 | /// the reference type for the pointed-to element 51 | using reference = typename Base::reference; 52 | 53 | /// create reverse iterator from iterator 54 | explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept 55 | : base_iterator(it) {} 56 | 57 | /// create reverse iterator from base class 58 | explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} 59 | 60 | /// post-increment (it++) 61 | json_reverse_iterator operator++(int)& // NOLINT(cert-dcl21-cpp) 62 | { 63 | return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); 64 | } 65 | 66 | /// pre-increment (++it) 67 | json_reverse_iterator& operator++() 68 | { 69 | return static_cast<json_reverse_iterator&>(base_iterator::operator++()); 70 | } 71 | 72 | /// post-decrement (it--) 73 | json_reverse_iterator operator--(int)& // NOLINT(cert-dcl21-cpp) 74 | { 75 | return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); 76 | } 77 | 78 | /// pre-decrement (--it) 79 | json_reverse_iterator& operator--() 80 | { 81 | return static_cast<json_reverse_iterator&>(base_iterator::operator--()); 82 | } 83 | 84 | /// add to iterator 85 | json_reverse_iterator& operator+=(difference_type i) 86 | { 87 | return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); 88 | } 89 | 90 | /// add to iterator 91 | json_reverse_iterator operator+(difference_type i) const 92 | { 93 | return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); 94 | } 95 | 96 | /// subtract from iterator 97 | json_reverse_iterator operator-(difference_type i) const 98 | { 99 | return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); 100 | } 101 | 102 | /// return difference 103 | difference_type operator-(const json_reverse_iterator& other) const 104 | { 105 | return base_iterator(*this) - base_iterator(other); 106 | } 107 | 108 | /// access to successor 109 | reference operator[](difference_type n) const 110 | { 111 | return *(this->operator+(n)); 112 | } 113 | 114 | /// return the key of an object iterator 115 | auto key() const -> decltype(std::declval<Base>().key()) 116 | { 117 | auto it = --this->base(); 118 | return it.key(); 119 | } 120 | 121 | /// return the value of an iterator 122 | reference value() const 123 | { 124 | auto it = --this->base(); 125 | return it.operator * (); 126 | } 127 | }; 128 | 129 | } // namespace detail 130 | NLOHMANN_JSON_NAMESPACE_END 131 | ``` -------------------------------------------------------------------------------- /deps/pluginsdk/nlohmann/detail/hash.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstdint> // uint8_t 12 | #include <cstddef> // size_t 13 | #include <functional> // hash 14 | 15 | #include <nlohmann/detail/abi_macros.hpp> 16 | #include <nlohmann/detail/value_t.hpp> 17 | 18 | NLOHMANN_JSON_NAMESPACE_BEGIN 19 | namespace detail 20 | { 21 | 22 | // boost::hash_combine 23 | inline std::size_t combine(std::size_t seed, std::size_t h) noexcept 24 | { 25 | seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); 26 | return seed; 27 | } 28 | 29 | /*! 30 | @brief hash a JSON value 31 | 32 | The hash function tries to rely on std::hash where possible. Furthermore, the 33 | type of the JSON value is taken into account to have different hash values for 34 | null, 0, 0U, and false, etc. 35 | 36 | @tparam BasicJsonType basic_json specialization 37 | @param j JSON value to hash 38 | @return hash value of j 39 | */ 40 | template<typename BasicJsonType> 41 | std::size_t hash(const BasicJsonType& j) 42 | { 43 | using string_t = typename BasicJsonType::string_t; 44 | using number_integer_t = typename BasicJsonType::number_integer_t; 45 | using number_unsigned_t = typename BasicJsonType::number_unsigned_t; 46 | using number_float_t = typename BasicJsonType::number_float_t; 47 | 48 | const auto type = static_cast<std::size_t>(j.type()); 49 | switch (j.type()) 50 | { 51 | case BasicJsonType::value_t::null: 52 | case BasicJsonType::value_t::discarded: 53 | { 54 | return combine(type, 0); 55 | } 56 | 57 | case BasicJsonType::value_t::object: 58 | { 59 | auto seed = combine(type, j.size()); 60 | for (const auto& element : j.items()) 61 | { 62 | const auto h = std::hash<string_t> {}(element.key()); 63 | seed = combine(seed, h); 64 | seed = combine(seed, hash(element.value())); 65 | } 66 | return seed; 67 | } 68 | 69 | case BasicJsonType::value_t::array: 70 | { 71 | auto seed = combine(type, j.size()); 72 | for (const auto& element : j) 73 | { 74 | seed = combine(seed, hash(element)); 75 | } 76 | return seed; 77 | } 78 | 79 | case BasicJsonType::value_t::string: 80 | { 81 | const auto h = std::hash<string_t> {}(j.template get_ref<const string_t&>()); 82 | return combine(type, h); 83 | } 84 | 85 | case BasicJsonType::value_t::boolean: 86 | { 87 | const auto h = std::hash<bool> {}(j.template get<bool>()); 88 | return combine(type, h); 89 | } 90 | 91 | case BasicJsonType::value_t::number_integer: 92 | { 93 | const auto h = std::hash<number_integer_t> {}(j.template get<number_integer_t>()); 94 | return combine(type, h); 95 | } 96 | 97 | case BasicJsonType::value_t::number_unsigned: 98 | { 99 | const auto h = std::hash<number_unsigned_t> {}(j.template get<number_unsigned_t>()); 100 | return combine(type, h); 101 | } 102 | 103 | case BasicJsonType::value_t::number_float: 104 | { 105 | const auto h = std::hash<number_float_t> {}(j.template get<number_float_t>()); 106 | return combine(type, h); 107 | } 108 | 109 | case BasicJsonType::value_t::binary: 110 | { 111 | auto seed = combine(type, j.get_binary().size()); 112 | const auto h = std::hash<bool> {}(j.get_binary().has_subtype()); 113 | seed = combine(seed, h); 114 | seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype())); 115 | for (const auto byte : j.get_binary()) 116 | { 117 | seed = combine(seed, std::hash<std::uint8_t> {}(byte)); 118 | } 119 | return seed; 120 | } 121 | 122 | default: // LCOV_EXCL_LINE 123 | JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE 124 | return 0; // LCOV_EXCL_LINE 125 | } 126 | } 127 | 128 | } // namespace detail 129 | NLOHMANN_JSON_NAMESPACE_END 130 | ``` -------------------------------------------------------------------------------- /include/nlohmann/detail/hash.hpp: -------------------------------------------------------------------------------- ``` 1 | // __ _____ _____ _____ 2 | // __| | __| | | | JSON for Modern C++ 3 | // | | |__ | | | | | | version 3.11.3 4 | // |_____|_____|_____|_|___| https://github.com/nlohmann/json 5 | // 6 | // SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me> 7 | // SPDX-License-Identifier: MIT 8 | 9 | #pragma once 10 | 11 | #include <cstdint> // uint8_t 12 | #include <cstddef> // size_t 13 | #include <functional> // hash 14 | 15 | #include <nlohmann/detail/abi_macros.hpp> 16 | #include <nlohmann/detail/value_t.hpp> 17 | 18 | NLOHMANN_JSON_NAMESPACE_BEGIN 19 | namespace detail 20 | { 21 | 22 | // boost::hash_combine 23 | inline std::size_t combine(std::size_t seed, std::size_t h) noexcept 24 | { 25 | seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); 26 | return seed; 27 | } 28 | 29 | /*! 30 | @brief hash a JSON value 31 | 32 | The hash function tries to rely on std::hash where possible. Furthermore, the 33 | type of the JSON value is taken into account to have different hash values for 34 | null, 0, 0U, and false, etc. 35 | 36 | @tparam BasicJsonType basic_json specialization 37 | @param j JSON value to hash 38 | @return hash value of j 39 | */ 40 | template<typename BasicJsonType> 41 | std::size_t hash(const BasicJsonType& j) 42 | { 43 | using string_t = typename BasicJsonType::string_t; 44 | using number_integer_t = typename BasicJsonType::number_integer_t; 45 | using number_unsigned_t = typename BasicJsonType::number_unsigned_t; 46 | using number_float_t = typename BasicJsonType::number_float_t; 47 | 48 | const auto type = static_cast<std::size_t>(j.type()); 49 | switch (j.type()) 50 | { 51 | case BasicJsonType::value_t::null: 52 | case BasicJsonType::value_t::discarded: 53 | { 54 | return combine(type, 0); 55 | } 56 | 57 | case BasicJsonType::value_t::object: 58 | { 59 | auto seed = combine(type, j.size()); 60 | for (const auto& element : j.items()) 61 | { 62 | const auto h = std::hash<string_t> {}(element.key()); 63 | seed = combine(seed, h); 64 | seed = combine(seed, hash(element.value())); 65 | } 66 | return seed; 67 | } 68 | 69 | case BasicJsonType::value_t::array: 70 | { 71 | auto seed = combine(type, j.size()); 72 | for (const auto& element : j) 73 | { 74 | seed = combine(seed, hash(element)); 75 | } 76 | return seed; 77 | } 78 | 79 | case BasicJsonType::value_t::string: 80 | { 81 | const auto h = std::hash<string_t> {}(j.template get_ref<const string_t&>()); 82 | return combine(type, h); 83 | } 84 | 85 | case BasicJsonType::value_t::boolean: 86 | { 87 | const auto h = std::hash<bool> {}(j.template get<bool>()); 88 | return combine(type, h); 89 | } 90 | 91 | case BasicJsonType::value_t::number_integer: 92 | { 93 | const auto h = std::hash<number_integer_t> {}(j.template get<number_integer_t>()); 94 | return combine(type, h); 95 | } 96 | 97 | case BasicJsonType::value_t::number_unsigned: 98 | { 99 | const auto h = std::hash<number_unsigned_t> {}(j.template get<number_unsigned_t>()); 100 | return combine(type, h); 101 | } 102 | 103 | case BasicJsonType::value_t::number_float: 104 | { 105 | const auto h = std::hash<number_float_t> {}(j.template get<number_float_t>()); 106 | return combine(type, h); 107 | } 108 | 109 | case BasicJsonType::value_t::binary: 110 | { 111 | auto seed = combine(type, j.get_binary().size()); 112 | const auto h = std::hash<bool> {}(j.get_binary().has_subtype()); 113 | seed = combine(seed, h); 114 | seed = combine(seed, static_cast<std::size_t>(j.get_binary().subtype())); 115 | for (const auto byte : j.get_binary()) 116 | { 117 | seed = combine(seed, std::hash<std::uint8_t> {}(byte)); 118 | } 119 | return seed; 120 | } 121 | 122 | default: // LCOV_EXCL_LINE 123 | JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE 124 | return 0; // LCOV_EXCL_LINE 125 | } 126 | } 127 | 128 | } // namespace detail 129 | NLOHMANN_JSON_NAMESPACE_END 130 | ```