├── README.md ├── xdecompiler.cmake ├── xdecompiler.pri ├── LICENSE ├── xdecompiler.cpp └── xdecompiler.h /README.md: -------------------------------------------------------------------------------- 1 | # XDecompiler 2 | -------------------------------------------------------------------------------- /xdecompiler.cmake: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_CURRENT_LIST_DIR}) 2 | 3 | set(XDECOMPILER_SOURCES 4 | ${XDECOMPILER_SOURCES} 5 | ${CMAKE_CURRENT_LIST_DIR}/xdecompiler.cpp 6 | ${CMAKE_CURRENT_LIST_DIR}/xdecompiler.h 7 | ) 8 | -------------------------------------------------------------------------------- /xdecompiler.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD 2 | DEPENDPATH += $$PWD 3 | 4 | HEADERS += \ 5 | $$PWD/xdecompiler.h 6 | 7 | SOURCES += \ 8 | $$PWD/xdecompiler.cpp 9 | 10 | DISTFILES += \ 11 | $$PWD/xdecompiler.cmake 12 | 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023-2025 hors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /xdecompiler.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2025 hors 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | #include "xdecompiler.h" 22 | 23 | XDecompiler::XDecompiler(QObject *pParent) 24 | : QObject(pParent) 25 | { 26 | 27 | } 28 | 29 | void XDecompiler::setData(XInfoDB *pXInfoDB, const QString &sProfile) 30 | { 31 | m_pXInfoDB = pXInfoDB; 32 | m_sProfile = sProfile; 33 | } 34 | 35 | QString XDecompiler::decompileFunction(XADDR nAddress) 36 | { 37 | Q_UNUSED(nAddress) 38 | 39 | return ""; 40 | } 41 | -------------------------------------------------------------------------------- /xdecompiler.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2025 hors 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | #ifndef XDECOMPILER_H 22 | #define XDECOMPILER_H 23 | 24 | #include "xinfodb.h" 25 | 26 | class XDecompiler : public QObject 27 | { 28 | Q_OBJECT 29 | public: 30 | enum MODE { 31 | MODE_UNKNOWN = 0, 32 | MODE_ASMC_PSEUDOCODE, 33 | }; 34 | 35 | explicit XDecompiler(QObject *pParent = nullptr); 36 | void setData(XInfoDB *pXInfoDB, const QString &sProfile); 37 | QString decompileFunction(XADDR nAddress); 38 | 39 | private: 40 | XInfoDB *m_pXInfoDB; 41 | QString m_sProfile; 42 | }; 43 | 44 | #endif // XDECOMPILER_H 45 | --------------------------------------------------------------------------------