├── .gitattributes ├── .gitignore ├── Doxyfile ├── LICENSE ├── README.md ├── cbcfileview ├── ChaosVmByteCodeFileView.c └── cbcfileview.vcproj ├── cerberus - vs2003.sln ├── cerberus - vs2008.sln ├── cerberus ├── GeneratedFiles │ ├── Debug │ │ └── moc_cerberus.cpp │ ├── Release │ │ └── moc_cerberus.cpp │ ├── qrc_cerberus.cpp │ └── ui_cerberus.h ├── cerberus.cpp ├── cerberus.h ├── cerberus.ico ├── cerberus.qrc ├── cerberus.rc ├── cerberus.ui ├── cerberus.vcproj ├── cerberus.vcproj.logic-PC.logic.user └── main.cpp ├── chaosvm ├── ChaosVm.c ├── ChaosVm.def ├── ChaosVm.h ├── ChaosVmCpu.h ├── ChaosVmCpuArgsAnalyse.c ├── ChaosVmCpuCalculateFinalAddress.c ├── ChaosVmCpuCalculateFinalAddress.h ├── ChaosVmCpuDataTypeConversion.c ├── ChaosVmCpuDataTypeConversion.h ├── ChaosVmCpuDisasm.c ├── ChaosVmCpuDisasm.h ├── ChaosVmCpuEFlagContion.c ├── ChaosVmCpuGlobalExportVariable.c ├── ChaosVmCpuGlobalExportVariable.h ├── ChaosVmCpuInstructionType.h ├── ChaosVmCpuInstructionsOneByteBitwise.c ├── ChaosVmCpuInstructionsOneByteBitwise.h ├── ChaosVmCpuInstructionsOneByteExtension.c ├── ChaosVmCpuInstructionsOneByteExtension.h ├── ChaosVmCpuInstructionsOneByteGeneral.c ├── ChaosVmCpuInstructionsOneByteGeneral.h ├── ChaosVmCpuInstructionsOneByteMath.c ├── ChaosVmCpuInstructionsOneByteMath.h ├── ChaosVmCpuInstructionsOneByteMov.c ├── ChaosVmCpuInstructionsOneByteMov.h ├── ChaosVmCpuInstructionsOneByteSegment.c ├── ChaosVmCpuInstructionsOneByteSegment.h ├── ChaosVmCpuInstructionsOneByteString.c ├── ChaosVmCpuInstructionsOneByteString.h ├── ChaosVmCpuInstructionsShift.c ├── ChaosVmCpuInstructionsShift.h ├── ChaosVmCpuInstructionsTwoByteExtension.c ├── ChaosVmCpuInstructionsTwoByteExtension.h ├── ChaosVmCpuInstructionsTwoByteGeneral.c ├── ChaosVmCpuInstructionsTwoByteGeneral.h ├── ChaosVmCpuInternalFunction.c ├── ChaosVmCpuInternalFunction.h ├── ChaosVmCpuInternalHeader.h ├── ChaosVmCpuInternalStructs.h ├── ChaosVmCpuMemoryAccess.c ├── ChaosVmCpuMemoryAccess.h ├── ChaosVmCpuOneByteOpcodeTable.c ├── ChaosVmCpuReadDataPart.c ├── ChaosVmCpuReadDataPart.h ├── ChaosVmCpuReadDispPart.c ├── ChaosVmCpuReadDispPart.h ├── ChaosVmCpuReadImm.c ├── ChaosVmCpuReadImm.h ├── ChaosVmCpuStatus.h ├── ChaosVmCpuTwoByteOpcodeTable.c ├── ChaosVmCpuX86.h ├── ChaosVmDISSteps.c ├── ChaosVmDebuger.c ├── ChaosVmEmulation.def ├── ChaosVmExport.h ├── ChaosVmJmpTargetDataBase.c ├── ChaosVmJmpTargetDataBase.h ├── ChaosVmKernel.c ├── ChaosVmKernel.h ├── chaosvm.vcproj ├── chaosvm.vcproj.logic-PC.logic.user ├── dllmain.c └── efiler.h ├── chaosvmldr ├── ChaosVmLdr.c ├── ChaosVmLdr.def ├── ChaosVmLdr.h ├── chaosvmldr.aps ├── chaosvmldr.rc ├── chaosvmldr.vcproj ├── dllmain.c ├── efiler.h └── resource.h ├── chaosvmp ├── CDK.h ├── ChaosVmKey.h ├── ChaosVmLdrKey.h ├── ChaosVmpConsole.cpp ├── ChaosVmpNotificationProc.cpp ├── ChaosVmpSDK.cpp ├── ChaosVmpSDK.h ├── SignDefined.h ├── chaosvmp.aps ├── chaosvmp.rc ├── chaosvmp.vcproj └── resource.h ├── crc32er ├── Crc32er.c └── crc32er.vcproj ├── efiler ├── EFiler.c └── efiler.vcproj ├── fuckme ├── fuckme.cpp └── fuckme.vcproj ├── fuckyou ├── dllmain.c ├── fuckyou.def └── fuckyou.vcproj ├── libanalyzer ├── AnalyzeBin.c ├── AnalyzeBin.h ├── AnalyzeDataFromInstructionDispatcher.c ├── AnalyzeInstruction.c ├── AnalyzeInstructionPass1Dispatcher.c ├── AnalyzeProcedure.c ├── AnalyzerDebug.c ├── CheckValidAddress.c ├── CpuContext.h ├── FeedbackAnalyzeInstruction.c ├── ImportTableReference.c ├── ImportTableReference.h ├── InstructionDispatcher.c ├── Proecdure.h ├── ValidAddress.h ├── libanalyzer.vcproj └── x86Instruction.h ├── libassembler ├── Assembler.c ├── Assembler.h ├── Assembler.l ├── Assembler.y ├── AssemblerCommon.c ├── AssemblerCommon.h ├── AssemblerEncoder.c ├── AssemblerEncoder.h ├── AssemblerHook.h ├── AssemblerImmediateMemory.c ├── AssemblerImmediateMemory.h ├── AssemblerParse.c ├── AssemblerParse.h ├── AssemblerRelocation.c ├── AssemblerRelocation.h ├── AssemblerSymbolTable.c ├── AssemblerSymbolTable.h ├── Makefile.Debug ├── libassembler.vcproj ├── libassembler.vcxproj ├── libassembler.vcxproj.filters ├── old │ ├── Assembler.cpp │ ├── Assembler.h │ ├── AssemblerCompiling.cpp │ ├── AssemblerFillModrmSib.cpp │ ├── AssemblerLinking.cpp │ ├── AssemblerSymbolTable.cpp │ ├── Encoder.c │ ├── Encoder.h │ ├── FPU.c │ ├── MMX.c │ ├── MacroSupport.h │ ├── OptForm.c │ ├── SIMD.c │ ├── SIMD~1.INS │ ├── X86~1.INS │ ├── X87~1.INS │ ├── liblogic │ │ ├── hashtree.c │ │ ├── hashtree.h │ │ ├── headfile.h │ │ ├── linkedlist.c │ │ ├── linkedlist.h │ │ ├── logic.h │ │ ├── logicdbg.c │ │ ├── logicdbg.h │ │ ├── map.c │ │ ├── map.h │ │ ├── pattern_matcher.c │ │ ├── pattern_matcher.h │ │ └── types.h │ ├── main.cpp │ ├── x64Encoder.c │ ├── x64Encoder.h │ └── x86.c ├── y.tab.c └── y.tab.h ├── libchaosvmath ├── ChaosVmAth.c ├── ChaosVmAth.h ├── ChaosVmAthDISAthSteps.c └── libchaosvmath.vcproj ├── libchaosvmbcfile ├── ChaosVmByteCodeFile.c ├── ChaosVmByteCodeFile.h └── libchaosvmbcfile.vcproj ├── libchaosvmp ├── ChaosVmp.c ├── ChaosVmp.h ├── VmpThisInstruction.c └── libchaosvmp.vcproj ├── libcommon ├── Common.h ├── Configure.h ├── Endian.c ├── Endian.h ├── LogicCrt.c ├── LogicCrt.h ├── LogicCrtQsort.c ├── LogicExcept.h ├── MemoryOperate.c ├── MemoryOperate.h ├── PrintDbgInfo.c ├── PrintDbgInfo.h ├── PrintError.c ├── PrintError.h ├── TypeDef.h └── libcommon.vcproj ├── libcrypto ├── crc.c ├── crc.h ├── lcrypto.c ├── lcrypto.h ├── libcrypto.vcproj ├── xor.c └── xor.h ├── libdetours ├── creatwth.cpp ├── detoured.cpp ├── detoured.h ├── detours.cpp ├── detours.h ├── disasm.cpp ├── image.cpp ├── libdetours.vcproj └── modules.cpp ├── libdis ├── DISDNA.h ├── DISEntry.c ├── DISEntryInDll.c ├── DISError.h ├── DISExFunctions.c ├── DISKernel.c ├── DISKernel.h ├── DISSteps.h └── libdis.vcproj ├── libdisath ├── DISAth.c ├── DISAth.h ├── DISAthError.h ├── DISAthSteps.h └── libdisath.vcproj ├── liblogic ├── array.c ├── array.h ├── hashtree.c ├── hashtree.h ├── headfile.h ├── liblogic.vcproj ├── linkedlist.c ├── linkedlist.h ├── logic.h ├── logicdbg.c ├── logicdbg.h ├── map.c ├── map.h ├── mp.c ├── mp.h ├── pattern_matcher.c ├── pattern_matcher.h ├── stack.c ├── stack.h └── util.c ├── libpowerprotecter ├── PowerProtecter.c ├── PowerProtecter.h ├── PowerProtecterTestEFlag.c ├── PowerProtecterThunkCoder.c └── libpowerprotecter.vcproj ├── libpowerprotecterath ├── PowerProtecterAth.c ├── PowerProtecterAth.h ├── PowerProtecterThunkCoder.c └── libpowerprotecterath.vcproj ├── libprototype ├── CipherExpGen.c ├── MathExpGen.c ├── MathExpGen.h ├── ProtoType.c ├── ProtoType.h ├── ProtoTypeConfigure.h ├── libprototype.vcproj ├── libprototype.vcxproj └── libprototype.vcxproj.filters ├── libsupport ├── DllLoaderPrivate.c ├── IconEx.h ├── ImpTblProtecter.c ├── ImpTblProtecter.h ├── Misc.c ├── Misc.h ├── OptResource.c ├── OptResource.h ├── PeDiy.c ├── PeDiy.h ├── ProcedureRelocation.c ├── ProcedureRelocation.h ├── RandRoll.c ├── RandRoll.h ├── RefixTlsPrivate.c ├── Support.h ├── VolumeInfo.c ├── VolumeInfo.h ├── XFileFormat.c ├── XFileFormat.h ├── hde32 │ ├── hde32.c │ ├── hde32.h │ └── table32.h ├── libsupport.vcproj ├── winternl.h ├── xRand.c └── xRand.h ├── libthunkcoder ├── FlowCodeGen.c ├── FlowCodeGen.h ├── JunkCodeGen.c ├── JunkCodeGen.h ├── Makefile ├── ThunkCoder.c ├── ThunkCoder.h ├── ThunkCoderConfigure.h ├── ThunkCoderRuntime.c ├── ThunkCoderRuntime.h ├── libthunkcoder.vcproj ├── libthunkcoder.vcxproj └── libthunkcoder.vcxproj.filters ├── libtinyxml ├── CTinyXml.cpp ├── CTinyXml.h ├── LString.cpp ├── LString.h ├── TinyStr.h ├── TinyXml.h ├── libtinyxml.vcproj ├── libtinyxml.vcproj.logic-PC.logic.user ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── tinystr.cpp ├── tinyxml.cpp ├── tinyxmlerror.cpp ├── tinyxmlparser.cpp └── xmltest.cpp ├── libudis86 ├── decode.c ├── decode.h ├── extern.h ├── input.c ├── input.h ├── itab.c ├── itab.h ├── libudis86.vcproj ├── syn-att.c ├── syn-intel.c ├── syn.c ├── syn.h ├── types.h ├── udcli │ └── udcli.c ├── udis86.c └── udis86.h ├── pefix ├── PeFix.c └── pefix.vcproj ├── statisticsfile ├── statisticsfile.c └── statisticsfile.vcproj ├── test_assembler ├── main.cpp ├── test_assembler.vcxproj └── test_assembler.vcxproj.filters ├── xanalyzer ├── Analyze.c ├── Analyze.h ├── Disasm.c ├── Disasm.h ├── Dump.c ├── Dump.h ├── IATRef.c ├── IATRef.h ├── Monitor.c ├── Monitor.h ├── PeView.c ├── PeView.h ├── xAnalyzerConsole.c └── xanalyzer.vcproj ├── xdetours ├── dllmain.cpp ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── xdetours.cpp └── xdetours.h ├── xfileview ├── XFileView.c └── xfileview.vcproj ├── xhooker ├── stdafx.cpp ├── stdafx.h ├── targetver.h └── xHookerConsole.cpp ├── ximptbl ├── YImpTblKey.h ├── resource.h ├── xImportTable.c ├── ximptbl.rc └── ximptbl.vcproj ├── xsign ├── xSign.c └── xsign.vcproj ├── yimptbl ├── dllmain.c ├── efiler.h ├── yImportTable.c ├── yImportTable.def ├── yImportTable.h └── yimptbl.vcproj └── 带有代码分析器的混乱虚拟机保护引擎.doc /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.com 4 | *.class 5 | *.dll 6 | *.exe 7 | *.obj 8 | *.o 9 | *.so 10 | *.a 11 | 12 | # Temp source # 13 | ################### 14 | *.*~ 15 | 16 | # Packages # 17 | ############ 18 | # it's better to unpack these files and commit the raw source 19 | # git has its own built in compression methods 20 | *.7z 21 | *.dmg 22 | *.gz 23 | *.iso 24 | *.jar 25 | *.rar 26 | *.tar 27 | *.zip 28 | 29 | # Logs and databases # 30 | ###################### 31 | *.log 32 | *.sql 33 | *.sqlite 34 | 35 | # OS generated files # 36 | ###################### 37 | .DS_Store 38 | .DS_Store? 39 | ._* 40 | .Spotlight-V100 41 | .Trashes 42 | ehthumbs.db 43 | Thumbs.db 44 | 45 | # Customs files # 46 | ###################### 47 | bk*/ 48 | xlinker 49 | *.org 50 | try make/ 51 | test/ 52 | bak/ 53 | *.0* 54 | *.out 55 | *.bin 56 | *.bindump 57 | *.disasm 58 | *.dump 59 | *.tdog 60 | *.~ 61 | .depend 62 | *.dbg 63 | *.xml 64 | <<<<<<< HEAD 65 | *.txt 66 | ======= 67 | >>>>>>> dev 68 | *.bk -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 gA4ss 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | cerberus 2 | ======== 3 | 4 | 2009-2010年为了学习**Windows虚拟机保护壳**而编写的程序。 5 | 6 | 其中_doc_文档详细阐述了其工作原理。由于_doc_文档太大,实在没办法转换成**Markdown**的文档。 7 | 8 | -------------------------------------------------------------------------------- /cbcfileview/ChaosVmByteCodeFileView.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "lcrypto.h" 4 | #include "Support.h" 5 | #include "ChaosVmByteCodeFile.h" 6 | 7 | __void __INTERNAL_FUNC__ Usage() { 8 | printf("version:1.0 alpha\r\n"); 9 | printf("email:logic.yan@gmail.com\r\n"); 10 | printf("usage:cbcfileview [option] \r\n"); 11 | printf("[option]\r\n"); 12 | printf("/print bytecode file header(pbfh)\r\n"); 13 | printf("/print procedure crc32(ppc)\r\n"); 14 | } 15 | 16 | __integer _tmain(__integer iArgc, __tchar *pArgv[]) { 17 | __memory pMem = NULL; 18 | __integer iMemSize = 0; 19 | PCHAOSVM_EMULATION_BYTECODE_FILE pByteCodeFile = NULL; 20 | __tchar *pTargetFile = NULL; 21 | 22 | if (iArgc != 3) { 23 | Usage(); 24 | return -1; 25 | } 26 | 27 | pTargetFile = pArgv[2]; 28 | 29 | pMem = MappingFile(pTargetFile, &iMemSize, FALSE, 0, 0); 30 | if (!pMem) { 31 | printf("Mapping target file failed\r\n"); 32 | return -1; 33 | } 34 | 35 | pByteCodeFile = (PCHAOSVM_EMULATION_BYTECODE_FILE)pMem; 36 | 37 | if (_tcsicmp(pArgv[1], _T("/pbfh")) == 0) { 38 | printf("pByteCodeFile->dwSign = 0x%4X\r\n", pByteCodeFile->dwSign); 39 | printf("pByteCodeFile->dwProcedureCount = %d\r\n", pByteCodeFile->dwProcedureCount); 40 | printf("pByteCodeFile->dwSize = %d bytes\r\n", pByteCodeFile->dwSize); 41 | printf("pByteCodeFile->dwCrc32 = 0x%4X\r\n", pByteCodeFile->dwCrc32); 42 | } else if (_tcsicmp(pArgv[1], _T("/ppc")) == 0) { 43 | __integer i = 0; 44 | PCHAOSVM_EMULATION_BYTECODE_PROCEDURE pProcedure = NULL; 45 | __memory pProcedureCode = NULL; 46 | __integer iProcedureSize = 0; 47 | __dword dwCrc32 = 0; 48 | 49 | pProcedure = (PCHAOSVM_EMULATION_BYTECODE_PROCEDURE)((__memory)pByteCodeFile + sizeof(CHAOSVM_EMULATION_BYTECODE_FILE)); 50 | for (i = 0; i < pByteCodeFile->dwProcedureCount; i++) { 51 | pProcedureCode = (__memory)pProcedure + sizeof(CHAOSVM_EMULATION_BYTECODE_PROCEDURE); 52 | iProcedureSize = pProcedure->dwSize - sizeof(CHAOSVM_EMULATION_BYTECODE_PROCEDURE); 53 | dwCrc32 = crc32(pProcedureCode, iProcedureSize); 54 | printf("Procedure[%d] size = %d bytes, attribute = %d, crc32 = 0x%4X\r\n", i, iProcedureSize, pProcedure->dwAttribute, dwCrc32); 55 | pProcedure = (PCHAOSVM_EMULATION_BYTECODE_PROCEDURE)((__memory)pProcedure + pProcedure->dwSize); 56 | } 57 | } else { 58 | Usage(); 59 | return -1; 60 | } 61 | 62 | 63 | UnMappingFile(pMem); 64 | 65 | return 0; 66 | } -------------------------------------------------------------------------------- /cbcfileview/cbcfileview.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/cbcfileview/cbcfileview.vcproj -------------------------------------------------------------------------------- /cerberus - vs2008.sln: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/cerberus - vs2008.sln -------------------------------------------------------------------------------- /cerberus/GeneratedFiles/Debug/moc_cerberus.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'cerberus.h' 3 | ** 4 | ** Created: Mon Feb 13 11:53:47 2012 5 | ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.0) 6 | ** 7 | ** WARNING! All changes made in this file will be lost! 8 | *****************************************************************************/ 9 | 10 | #include "../../cerberus.h" 11 | #if !defined(Q_MOC_OUTPUT_REVISION) 12 | #error "The header file 'cerberus.h' doesn't include ." 13 | #elif Q_MOC_OUTPUT_REVISION != 62 14 | #error "This file was generated using the moc from 4.7.0. It" 15 | #error "cannot be used with the include files from this version of Qt." 16 | #error "(The moc has changed too much.)" 17 | #endif 18 | 19 | QT_BEGIN_MOC_NAMESPACE 20 | static const uint qt_meta_data_cerberus[] = { 21 | 22 | // content: 23 | 5, // revision 24 | 0, // classname 25 | 0, 0, // classinfo 26 | 0, 0, // methods 27 | 0, 0, // properties 28 | 0, 0, // enums/sets 29 | 0, 0, // constructors 30 | 0, // flags 31 | 0, // signalCount 32 | 33 | 0 // eod 34 | }; 35 | 36 | static const char qt_meta_stringdata_cerberus[] = { 37 | "cerberus\0" 38 | }; 39 | 40 | const QMetaObject cerberus::staticMetaObject = { 41 | { &QMainWindow::staticMetaObject, qt_meta_stringdata_cerberus, 42 | qt_meta_data_cerberus, 0 } 43 | }; 44 | 45 | #ifdef Q_NO_DATA_RELOCATION 46 | const QMetaObject &cerberus::getStaticMetaObject() { return staticMetaObject; } 47 | #endif //Q_NO_DATA_RELOCATION 48 | 49 | const QMetaObject *cerberus::metaObject() const 50 | { 51 | return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; 52 | } 53 | 54 | void *cerberus::qt_metacast(const char *_clname) 55 | { 56 | if (!_clname) return 0; 57 | if (!strcmp(_clname, qt_meta_stringdata_cerberus)) 58 | return static_cast(const_cast< cerberus*>(this)); 59 | return QMainWindow::qt_metacast(_clname); 60 | } 61 | 62 | int cerberus::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 63 | { 64 | _id = QMainWindow::qt_metacall(_c, _id, _a); 65 | if (_id < 0) 66 | return _id; 67 | return _id; 68 | } 69 | QT_END_MOC_NAMESPACE 70 | -------------------------------------------------------------------------------- /cerberus/GeneratedFiles/Release/moc_cerberus.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Meta object code from reading C++ file 'cerberus.h' 3 | ** 4 | ** Created: Mon Feb 13 11:52:57 2012 5 | ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.0) 6 | ** 7 | ** WARNING! All changes made in this file will be lost! 8 | *****************************************************************************/ 9 | 10 | #include "../../cerberus.h" 11 | #if !defined(Q_MOC_OUTPUT_REVISION) 12 | #error "The header file 'cerberus.h' doesn't include ." 13 | #elif Q_MOC_OUTPUT_REVISION != 62 14 | #error "This file was generated using the moc from 4.7.0. It" 15 | #error "cannot be used with the include files from this version of Qt." 16 | #error "(The moc has changed too much.)" 17 | #endif 18 | 19 | QT_BEGIN_MOC_NAMESPACE 20 | static const uint qt_meta_data_cerberus[] = { 21 | 22 | // content: 23 | 5, // revision 24 | 0, // classname 25 | 0, 0, // classinfo 26 | 0, 0, // methods 27 | 0, 0, // properties 28 | 0, 0, // enums/sets 29 | 0, 0, // constructors 30 | 0, // flags 31 | 0, // signalCount 32 | 33 | 0 // eod 34 | }; 35 | 36 | static const char qt_meta_stringdata_cerberus[] = { 37 | "cerberus\0" 38 | }; 39 | 40 | const QMetaObject cerberus::staticMetaObject = { 41 | { &QMainWindow::staticMetaObject, qt_meta_stringdata_cerberus, 42 | qt_meta_data_cerberus, 0 } 43 | }; 44 | 45 | #ifdef Q_NO_DATA_RELOCATION 46 | const QMetaObject &cerberus::getStaticMetaObject() { return staticMetaObject; } 47 | #endif //Q_NO_DATA_RELOCATION 48 | 49 | const QMetaObject *cerberus::metaObject() const 50 | { 51 | return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; 52 | } 53 | 54 | void *cerberus::qt_metacast(const char *_clname) 55 | { 56 | if (!_clname) return 0; 57 | if (!strcmp(_clname, qt_meta_stringdata_cerberus)) 58 | return static_cast(const_cast< cerberus*>(this)); 59 | return QMainWindow::qt_metacast(_clname); 60 | } 61 | 62 | int cerberus::qt_metacall(QMetaObject::Call _c, int _id, void **_a) 63 | { 64 | _id = QMainWindow::qt_metacall(_c, _id, _a); 65 | if (_id < 0) 66 | return _id; 67 | return _id; 68 | } 69 | QT_END_MOC_NAMESPACE 70 | -------------------------------------------------------------------------------- /cerberus/GeneratedFiles/qrc_cerberus.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** Resource object code 3 | ** 4 | ** Created: Mon Feb 13 11:53:47 2012 5 | ** by: The Resource Compiler for Qt version 4.7.0 6 | ** 7 | ** WARNING! All changes made in this file will be lost! 8 | *****************************************************************************/ 9 | 10 | #include 11 | 12 | QT_BEGIN_NAMESPACE 13 | 14 | QT_END_NAMESPACE 15 | 16 | 17 | int QT_MANGLE_NAMESPACE(qInitResources_cerberus)() 18 | { 19 | return 1; 20 | } 21 | 22 | Q_CONSTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qInitResources_cerberus)) 23 | 24 | int QT_MANGLE_NAMESPACE(qCleanupResources_cerberus)() 25 | { 26 | return 1; 27 | } 28 | 29 | Q_DESTRUCTOR_FUNCTION(QT_MANGLE_NAMESPACE(qCleanupResources_cerberus)) 30 | 31 | -------------------------------------------------------------------------------- /cerberus/GeneratedFiles/ui_cerberus.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Form generated from reading UI file 'cerberus.ui' 3 | ** 4 | ** Created: Mon Feb 13 11:53:47 2012 5 | ** by: Qt User Interface Compiler version 4.7.0 6 | ** 7 | ** WARNING! All changes made in this file will be lost when recompiling UI file! 8 | ********************************************************************************/ 9 | 10 | #ifndef UI_CERBERUS_H 11 | #define UI_CERBERUS_H 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | QT_BEGIN_NAMESPACE 25 | 26 | class Ui_cerberusClass 27 | { 28 | public: 29 | QMenuBar *menuBar; 30 | QToolBar *mainToolBar; 31 | QWidget *centralWidget; 32 | QStatusBar *statusBar; 33 | 34 | void setupUi(QMainWindow *cerberusClass) 35 | { 36 | if (cerberusClass->objectName().isEmpty()) 37 | cerberusClass->setObjectName(QString::fromUtf8("cerberusClass")); 38 | cerberusClass->resize(600, 400); 39 | menuBar = new QMenuBar(cerberusClass); 40 | menuBar->setObjectName(QString::fromUtf8("menuBar")); 41 | cerberusClass->setMenuBar(menuBar); 42 | mainToolBar = new QToolBar(cerberusClass); 43 | mainToolBar->setObjectName(QString::fromUtf8("mainToolBar")); 44 | cerberusClass->addToolBar(mainToolBar); 45 | centralWidget = new QWidget(cerberusClass); 46 | centralWidget->setObjectName(QString::fromUtf8("centralWidget")); 47 | cerberusClass->setCentralWidget(centralWidget); 48 | statusBar = new QStatusBar(cerberusClass); 49 | statusBar->setObjectName(QString::fromUtf8("statusBar")); 50 | cerberusClass->setStatusBar(statusBar); 51 | 52 | retranslateUi(cerberusClass); 53 | 54 | QMetaObject::connectSlotsByName(cerberusClass); 55 | } // setupUi 56 | 57 | void retranslateUi(QMainWindow *cerberusClass) 58 | { 59 | cerberusClass->setWindowTitle(QApplication::translate("cerberusClass", "cerberus", 0, QApplication::UnicodeUTF8)); 60 | } // retranslateUi 61 | 62 | }; 63 | 64 | namespace Ui { 65 | class cerberusClass: public Ui_cerberusClass {}; 66 | } // namespace Ui 67 | 68 | QT_END_NAMESPACE 69 | 70 | #endif // UI_CERBERUS_H 71 | -------------------------------------------------------------------------------- /cerberus/cerberus.cpp: -------------------------------------------------------------------------------- 1 | #include "cerberus.h" 2 | 3 | cerberus::cerberus(QWidget *parent, Qt::WFlags flags) 4 | : QMainWindow(parent, flags) 5 | { 6 | ui.setupUi(this); 7 | } 8 | 9 | cerberus::~cerberus() 10 | { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /cerberus/cerberus.h: -------------------------------------------------------------------------------- 1 | #ifndef CERBERUS_H 2 | #define CERBERUS_H 3 | 4 | #include 5 | #include "ui_cerberus.h" 6 | 7 | class cerberus : public QMainWindow 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | cerberus(QWidget *parent = 0, Qt::WFlags flags = 0); 13 | ~cerberus(); 14 | 15 | private: 16 | Ui::cerberusClass ui; 17 | }; 18 | 19 | #endif // CERBERUS_H 20 | -------------------------------------------------------------------------------- /cerberus/cerberus.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/cerberus/cerberus.ico -------------------------------------------------------------------------------- /cerberus/cerberus.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /cerberus/cerberus.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "cerberus.ico" 2 | 3 | -------------------------------------------------------------------------------- /cerberus/cerberus.ui: -------------------------------------------------------------------------------- 1 | 2 | cerberusClass 3 | 4 | 5 | cerberusClass 6 | 7 | 8 | 9 | 0 10 | 0 11 | 600 12 | 400 13 | 14 | 15 | 16 | cerberus 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /cerberus/cerberus.vcproj.logic-PC.logic.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /cerberus/main.cpp: -------------------------------------------------------------------------------- 1 | #include "cerberus.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | cerberus w; 8 | w.show(); 9 | return a.exec(); 10 | } 11 | -------------------------------------------------------------------------------- /chaosvm/ChaosVm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVm.c -------------------------------------------------------------------------------- /chaosvm/ChaosVm.def: -------------------------------------------------------------------------------- 1 | LIBRARY "chaosvm" 2 | EXPORTS 3 | 4 | ChaosVmEntry 5 | ChaosVmInit 6 | 7 | g_pChaosVmRuntimeList 8 | g_ChaosVmConfigure 9 | g_iVmpProcedureCount 10 | 11 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_FF 12 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_FE 13 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_C6 14 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_C7 15 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_F6 16 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_F7 17 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_80 18 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_81 19 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_83 20 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_8F 21 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_C0 22 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_C1 23 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_D0 24 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_D1 25 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_D2 26 | g_ChaosVmCpuDefOpcodeExtensionTableForOne_D3 27 | g_ChaosVmCpuDefOpcodeExtensionTableForTwo_0FBA 28 | g_ChaosVmCpuDefOneByteOpcodeTable 29 | g_ChaosVmCpuDefTwoByteOpcodeTable 30 | g_ChaosVmCpuDefEFlagContionTable 31 | g_ChaosVmCpuDefModRMAnalyseRoutineTable 32 | 33 | g_iPowerProtecterEncryptProcedures 34 | g_pPowerProtecterEncryptProcedures 35 | 36 | g_DISConfigure 37 | 38 | DISEntry 39 | DISEntryInDll -------------------------------------------------------------------------------- /chaosvm/ChaosVm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVm.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpu.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuArgsAnalyse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuArgsAnalyse.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuCalculateFinalAddress.c: -------------------------------------------------------------------------------- 1 | __INLINE__ __address __INTERNAL_FUNC__ CalculateFinalAddress(__address addrCurrAddress, __dword dwDisplacement, __integer iSize) { 2 | __dword dwChangeDisplacement = 0; 3 | 4 | if (iSize == sizeof(__byte)) { 5 | if (__IsNegative8__(dwDisplacement)) { 6 | (__byte)dwChangeDisplacement = (__byte)__ToNegative__(dwDisplacement); 7 | addrCurrAddress -= dwChangeDisplacement; 8 | } else { 9 | addrCurrAddress += dwDisplacement; 10 | } 11 | } else if (iSize == sizeof(__word)) { 12 | if (__IsNegative16__(dwDisplacement)) { 13 | (__word)dwChangeDisplacement = (__word)__ToNegative__(dwDisplacement); 14 | addrCurrAddress -= dwChangeDisplacement; 15 | } else { 16 | addrCurrAddress += dwDisplacement; 17 | } 18 | } else if (iSize == sizeof(__dword)) { 19 | if (__IsNegative32__(dwDisplacement)) { 20 | (__dword)dwChangeDisplacement = (__dword)__ToNegative__(dwDisplacement); 21 | addrCurrAddress -= dwChangeDisplacement; 22 | } else { 23 | addrCurrAddress += dwDisplacement; 24 | } 25 | } 26 | return addrCurrAddress; 27 | } 28 | 29 | #define __JmpUpOffset__(Offset, InstLen) ((~(Offset) + 1) - (InstLen)) 30 | #define __JmpDownOffset__(Offset, InstLen) ((Offset) + (InstLen)) 31 | 32 | #define __JmpBit8Up__()\ 33 | bOffset = __JmpUpOffset__(bOffset, bInstLength);\ 34 | addrTargetAddress = addrTargetAddress - bOffset; 35 | 36 | #define __JmpBit8Down__()\ 37 | bOffset = __JmpDownOffset__(bOffset, bInstLength);\ 38 | addrTargetAddress = addrTargetAddress + bOffset; 39 | 40 | #define __JmpBit16Up__()\ 41 | wOffset = __JmpUpOffset__(wOffset, bInstLength);\ 42 | addrTargetAddress = addrTargetAddress - wOffset; 43 | 44 | #define __JmpBit16Down__()\ 45 | wOffset = __JmpDownOffset__(wOffset, bInstLength);\ 46 | addrTargetAddress = addrTargetAddress + wOffset; 47 | 48 | #define __JmpBit32Up__()\ 49 | dwOffset = __JmpUpOffset__(dwOffset, bInstLength);\ 50 | addrTargetAddress = addrTargetAddress - dwOffset; 51 | 52 | #define __JmpBit32Down__()\ 53 | dwOffset = __JmpDownOffset__(dwOffset, bInstLength);\ 54 | addrTargetAddress = addrTargetAddress + dwOffset; 55 | 56 | __INLINE__ __address __INTERNAL_FUNC__ CalculateJmpAddress(__address addrCurrAddress, __dword dwInstLength, __dword dwOffsetValue, __integer iSize) { 57 | __byte bInstLength = (__byte)dwInstLength; 58 | __address addrTargetAddress = addrCurrAddress; 59 | 60 | if (iSize == sizeof(__byte)) { 61 | __byte bOffset = (__byte)dwOffsetValue; 62 | if (__IsNegative8__(bOffset)) { 63 | __JmpBit8Up__(); 64 | } else { 65 | __JmpBit8Down__(); 66 | } 67 | } else if (iSize == sizeof(__word)) { 68 | __word wOffset = (__word)dwOffsetValue; 69 | if (__IsNegative16__(wOffset)) { 70 | __JmpBit16Up__(); 71 | } else { 72 | __JmpBit16Down__(); 73 | } 74 | } else if (iSize == sizeof(__dword)) { 75 | __dword dwOffset = (__dword)dwOffsetValue; 76 | if (__IsNegative32__(dwOffset)) { 77 | __JmpBit32Up__(); 78 | } else { 79 | __JmpBit32Down__(); 80 | } 81 | } 82 | return addrTargetAddress; 83 | } 84 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuCalculateFinalAddress.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVMCPUCALCULATEFINALADDRESS_H__) 2 | #define __CHAOSVMCPUCALCULATEFINALADDRESS_H__ 3 | 4 | __INLINE__ __address __INTERNAL_FUNC__ CalculateFinalAddress(__address addrCurrAddress, __dword dwDisplacement, __integer iSize); 5 | __INLINE__ __address __INTERNAL_FUNC__ CalculateJmpAddress(__address addrCurrAddress, __dword dwInstLength, __dword dwOffset, __integer iSize); 6 | 7 | #define __CalculateFinalAddress_Offset_8Bits__(addrCurrAddress, dwDisplacement)\ 8 | CalculateFinalAddress((__address)(addrCurrAddress), (__dword)(dwDisplacement), sizeof(__byte)) 9 | 10 | #define __CalculateFinalAddress_Offset_16Bits__(addrCurrAddress, dwDisplacement)\ 11 | CalculateFinalAddress((__address)(addrCurrAddress), (__dword)(dwDisplacement), sizeof(__word)) 12 | 13 | #define __CalculateFinalAddress_Offset_32Bits__(addrCurrAddress, dwDisplacement)\ 14 | CalculateFinalAddress((__address)(addrCurrAddress), (__dword)(dwDisplacement), sizeof(__dword)) 15 | 16 | #define __CalculateJmpAddress_Offset_8Bits__(addrCurrAddress, dwInstLength, dwOffset)\ 17 | CalculateJmpAddress((__address)addrCurrAddress, (__dword)dwInstLength, (__dword)dwOffset, sizeof(__byte)) 18 | 19 | #define __CalculateJmpAddress_Offset_16Bits__(addrCurrAddress, dwInstLength, dwOffset)\ 20 | CalculateJmpAddress((__address)addrCurrAddress, (__dword)dwInstLength, (__dword)dwOffset, sizeof(__word)) 21 | 22 | #define __CalculateJmpAddress_Offset_32Bits__(addrCurrAddress, dwInstLength, dwOffset)\ 23 | CalculateJmpAddress((__address)addrCurrAddress, (__dword)dwInstLength, (__dword)dwOffset, sizeof(__dword)) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuDataTypeConversion.c: -------------------------------------------------------------------------------- 1 | __INLINE__ __byte __INTERNAL_FUNC__ INT8_TO_UINT8(__char Int8Value) { 2 | return (__byte)(Int8Value); 3 | } 4 | 5 | __INLINE__ __char __INTERNAL_FUNC__ UINT8_TO_INT8(__byte uInt8Value) { 6 | return (__char)(uInt8Value); 7 | } 8 | 9 | __INLINE__ __word __INTERNAL_FUNC__ INT16_TO_UINT16(__sword Int16Value) { 10 | return (__word)(Int16Value); 11 | } 12 | 13 | __INLINE__ __sword __INTERNAL_FUNC__ UINT16_TO_INT16(__word uInt16Value) { 14 | return (__sword)(uInt16Value); 15 | } 16 | 17 | __INLINE__ __dword __INTERNAL_FUNC__ INT32_TO_UINT32(__sdword Int32Value) { 18 | return (__dword)(Int32Value); 19 | } 20 | 21 | __INLINE__ __sdword __INTERNAL_FUNC__ UINT32_TO_INT32(__dword uInt32Value) { 22 | return (__sdword)(uInt32Value); 23 | } 24 | 25 | __INLINE__ __qword __INTERNAL_FUNC__ INT64_TO_UINT64(__sqword Int64Value) { 26 | return (__qword)(Int64Value); 27 | } 28 | 29 | __INLINE__ __sqword __INTERNAL_FUNC__ UINT64_TO_INT64(__qword uInt64Value) { 30 | return (__sqword)(uInt64Value); 31 | } 32 | 33 | __INLINE__ __sword __INTERNAL_FUNC__ INT8_TO_INT16(__char Int8Value) { 34 | return (__sword)(Int8Value); 35 | } 36 | 37 | __INLINE__ __sdword __INTERNAL_FUNC__ INT8_TO_INT32(__char Int8Value) { 38 | return (__sdword)(Int8Value); 39 | } 40 | 41 | __INLINE__ __sqword __INTERNAL_FUNC__ INT8_TO_INT64(__char Int8Value) { 42 | return (__sqword)(Int8Value); 43 | } 44 | 45 | __INLINE__ __char __INTERNAL_FUNC__ INT16_TO_INT8(__sword Int16Value) { 46 | return (__char)(Int16Value); 47 | } 48 | 49 | __INLINE__ __sdword __INTERNAL_FUNC__ INT16_TO_INT32(__sword Int16Value) { 50 | return (__sdword)(Int16Value); 51 | } 52 | __INLINE__ __sqword __INTERNAL_FUNC__ INT16_TO_INT64(__sword Int16Value) { 53 | return (__sqword)(Int16Value); 54 | } 55 | 56 | __INLINE__ __char __INTERNAL_FUNC__ INT32_TO_INT8(__sdword Int32Value) { 57 | return (__char)(Int32Value); 58 | } 59 | 60 | __INLINE__ __sword __INTERNAL_FUNC__ INT32_TO_INT16(__sdword Int32Value) { 61 | return (__sword)(Int32Value); 62 | } 63 | 64 | __INLINE__ __sqword __INTERNAL_FUNC__ INT32_TO_INT64(__sdword Int32Value) { 65 | return (__sqword)(Int32Value); 66 | } 67 | 68 | __INLINE__ __char __INTERNAL_FUNC__ INT64_TO_INT8(__sqword Int64Value) { 69 | return (__char)(Int64Value); 70 | } 71 | 72 | __INLINE__ __sword __INTERNAL_FUNC__ INT64_TO_INT16(__sqword Int64Value) { 73 | return (__sword)(Int64Value); 74 | } 75 | 76 | __INLINE__ __sdword __INTERNAL_FUNC__ INT64_TO_INT32(__sqword Int64Value) { 77 | return (__sdword)(Int64Value); 78 | } 79 | 80 | __INLINE__ __word __INTERNAL_FUNC__ UINT8_TO_UINT16(__byte uInt8Value) { 81 | return (__word)(uInt8Value); 82 | } 83 | 84 | __INLINE__ __dword __INTERNAL_FUNC__ UINT8_TO_UINT32(__byte uInt8Value) { 85 | return (__dword)(uInt8Value); 86 | } 87 | 88 | __INLINE__ __qword __INTERNAL_FUNC__ UINT8_TO_UINT64(__byte uInt8Value) { 89 | return (__qword)(uInt8Value); 90 | } 91 | 92 | __INLINE__ __byte __INTERNAL_FUNC__ UINT16_TO_UINT8(__word uInt16Value) { 93 | return (__byte)(uInt16Value); 94 | } 95 | 96 | __INLINE__ __dword __INTERNAL_FUNC__ UINT16_TO_UINT32(__word uInt16Value) { 97 | return (__dword)(uInt16Value); 98 | } 99 | __INLINE__ __qword __INTERNAL_FUNC__ UINT16_TO_UINT64(__word uInt16Value) { 100 | return (__qword)(uInt16Value); 101 | } 102 | 103 | __INLINE__ __byte __INTERNAL_FUNC__ UINT32_TO_UINT8(__dword uInt32Value) { 104 | return (__byte)(uInt32Value); 105 | } 106 | 107 | __INLINE__ __word __INTERNAL_FUNC__ UINT32_TO_UINT16(__dword uInt32Value) { 108 | return (__word)(uInt32Value); 109 | } 110 | 111 | __INLINE__ __qword __INTERNAL_FUNC__ UINT32_TO_UINT64(__dword uInt32Value) { 112 | return (__qword)(uInt32Value); 113 | } 114 | 115 | __INLINE__ __byte __INTERNAL_FUNC__ UINT64_TO_UINT8(__qword uInt64Value) { 116 | return (__byte)(uInt64Value); 117 | } 118 | 119 | __INLINE__ __word __INTERNAL_FUNC__ UINT64_TO_UINT16(__qword uInt64Value) { 120 | return (__word)(uInt64Value); 121 | } 122 | 123 | __INLINE__ __dword __INTERNAL_FUNC__ UINT64_TO_UINT32(__qword uInt64Value) { 124 | return (__dword)(uInt64Value); 125 | } 126 | 127 | 128 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuDataTypeConversion.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVM_CPU_DATA_TYPE_CONVERSION_H__) 2 | #define __CHAOSVM_CPU_DATA_TYPE_CONVERSION_H__ 3 | 4 | __INLINE__ __byte __INTERNAL_FUNC__ INT8_TO_UINT8(__char Int8Value); 5 | __INLINE__ __char __INTERNAL_FUNC__ UINT8_TO_INT8(__byte uInt8Value); 6 | __INLINE__ __word __INTERNAL_FUNC__ INT16_TO_UINT16(__sword Int16Value); 7 | __INLINE__ __sword __INTERNAL_FUNC__ UINT16_TO_INT16(__word uInt16Value); 8 | __INLINE__ __dword __INTERNAL_FUNC__ INT32_TO_UINT32(__sdword Int32Value); 9 | __INLINE__ __sdword __INTERNAL_FUNC__ UINT32_TO_INT32(__dword uInt32Value); 10 | __INLINE__ __qword __INTERNAL_FUNC__ INT64_TO_UINT64(__sqword Int64Value); 11 | __INLINE__ __sqword __INTERNAL_FUNC__ UINT64_TO_INT64(__qword uInt64Value); 12 | __INLINE__ __sword __INTERNAL_FUNC__ INT8_TO_INT16(__char Int8Value); 13 | __INLINE__ __sdword __INTERNAL_FUNC__ INT8_TO_INT32(__char Int8Value); 14 | __INLINE__ __sqword __INTERNAL_FUNC__ INT8_TO_INT64(__char Int8Value); 15 | __INLINE__ __char __INTERNAL_FUNC__ INT16_TO_INT8(__sword Int16Value); 16 | __INLINE__ __sdword __INTERNAL_FUNC__ INT16_TO_INT32(__sword Int16Value); 17 | __INLINE__ __sqword __INTERNAL_FUNC__ INT16_TO_INT64(__sword Int16Value); 18 | __INLINE__ __char __INTERNAL_FUNC__ INT32_TO_INT8(__sdword Int32Value); 19 | __INLINE__ __sword __INTERNAL_FUNC__ INT32_TO_INT16(__sdword Int32Value); 20 | __INLINE__ __sqword __INTERNAL_FUNC__ INT32_TO_INT64(__sdword Int32Value); 21 | __INLINE__ __char __INTERNAL_FUNC__ INT64_TO_INT8(__sqword Int64Value); 22 | __INLINE__ __sword __INTERNAL_FUNC__ INT64_TO_INT16(__sqword Int64Value); 23 | __INLINE__ __sdword __INTERNAL_FUNC__ INT64_TO_INT32(__sqword Int64Value); 24 | __INLINE__ __word __INTERNAL_FUNC__ UINT8_TO_UINT16(__byte uInt8Value); 25 | __INLINE__ __dword __INTERNAL_FUNC__ UINT8_TO_UINT32(__byte uInt8Value); 26 | __INLINE__ __qword __INTERNAL_FUNC__ UINT8_TO_UINT64(__byte uInt8Value); 27 | __INLINE__ __byte __INTERNAL_FUNC__ UINT16_TO_UINT8(__word uInt16Value); 28 | __INLINE__ __dword __INTERNAL_FUNC__ UINT16_TO_UINT32(__word uInt16Value); 29 | __INLINE__ __qword __INTERNAL_FUNC__ UINT16_TO_UINT64(__word uInt16Value); 30 | __INLINE__ __byte __INTERNAL_FUNC__ UINT32_TO_UINT8(__dword uInt32Value); 31 | __INLINE__ __word __INTERNAL_FUNC__ UINT32_TO_UINT16(__dword uInt32Value); 32 | __INLINE__ __qword __INTERNAL_FUNC__ UINT32_TO_UINT64(__dword uInt32Value); 33 | __INLINE__ __byte __INTERNAL_FUNC__ UINT64_TO_UINT8(__qword uInt64Value); 34 | __INLINE__ __word __INTERNAL_FUNC__ UINT64_TO_UINT16(__qword uInt64Value); 35 | __INLINE__ __dword __INTERNAL_FUNC__ UINT64_TO_UINT32(__qword uInt64Value); 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuDisasm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuDisasm.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuDisasm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuDisasm.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuGlobalExportVariable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuGlobalExportVariable.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuGlobalExportVariable.h: -------------------------------------------------------------------------------- 1 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_FF[0x08]; 2 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_FE[0x08]; 3 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_C6[0x08]; 4 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_C7[0x02][0x08]; 5 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_F6[0x08]; 6 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_F7[0x08]; 7 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_80[0x08]; 8 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_81[0x08]; 9 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_83[0x08]; 10 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_8F[0x08]; 11 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_C0[0x08]; 12 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_C1[0x08]; 13 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_D0[0x08]; 14 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_D1[0x08]; 15 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_D2[0x08]; 16 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForOne_D3[0x08]; 17 | __EXTERN__ PARGS_DISPATCH_TABLE_ENTRY g_ChaosVmCpuDefOpcodeExtensionTableForTwo_0FBA[0x08]; 18 | __EXTERN__ MODRM_BYTE_ANALYSE_ROUTINE_TABLE_ENTRY g_ChaosVmCpuDefModRMAnalyseRoutineTable[0x02]; 19 | __EXTERN__ EFLAG_CONDITION_TABLE_ENTRY g_ChaosVmCpuDefEFlagContionTable[0x10]; 20 | __EXTERN__ ONE_OPCODE_TABLE_ENTRY g_ChaosVmCpuDefOneByteOpcodeTable[0x100]; 21 | __EXTERN__ TWO_BYTE_OPCODE_TABLE_ENTRY g_ChaosVmCpuDefTwoByteOpcodeTable[0x100]; 22 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionType.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteBitwise.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteBitwise.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteBitwise.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XOR_30(PCHAOSVM_CPU pCPU);//[30] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XOR_31(PCHAOSVM_CPU pCPU);//[31] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XOR_32(PCHAOSVM_CPU pCPU);//[32] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XOR_33(PCHAOSVM_CPU pCPU);//[33] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XOR_34(PCHAOSVM_CPU pCPU);//[34] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XOR_35(PCHAOSVM_CPU pCPU);//[35] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OR_08(PCHAOSVM_CPU pCPU);//[08] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OR_09(PCHAOSVM_CPU pCPU);//[09] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OR_0A(PCHAOSVM_CPU pCPU);//[0A] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OR_0B(PCHAOSVM_CPU pCPU);//[0B] 11 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OR_0C(PCHAOSVM_CPU pCPU);//[0C] 12 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OR_0D(PCHAOSVM_CPU pCPU);//[0D] 13 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AND_20(PCHAOSVM_CPU pCPU);//[20] 14 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AND_21(PCHAOSVM_CPU pCPU);//[21] 15 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AND_22(PCHAOSVM_CPU pCPU);//[22] 16 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AND_23(PCHAOSVM_CPU pCPU);//[23] 17 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AND_24(PCHAOSVM_CPU pCPU);//[24] 18 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AND_25(PCHAOSVM_CPU pCPU);//[25] 19 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_TEST_A8(PCHAOSVM_CPU pCPU);//[A8] 20 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_TEST_A9(PCHAOSVM_CPU pCPU);//[A9] 21 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_TEST_84(PCHAOSVM_CPU pCPU);//[84] 22 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_TEST_85(PCHAOSVM_CPU pCPU);//[85] 23 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteExtension.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteExtension.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteExtension.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_FF(PCHAOSVM_CPU pCPU);//[FF] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_FE(PCHAOSVM_CPU pCPU);//[FE] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_C6(PCHAOSVM_CPU pCPU);//[C6] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_C7(PCHAOSVM_CPU pCPU);//[C7] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_F6(PCHAOSVM_CPU pCPU);//[F6] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_F7(PCHAOSVM_CPU pCPU);//[F7] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_80(PCHAOSVM_CPU pCPU);//[80] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_81(PCHAOSVM_CPU pCPU);//[81] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_83(PCHAOSVM_CPU pCPU);//[83] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_8F(PCHAOSVM_CPU pCPU);//[8F] 11 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteGeneral.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteGeneral.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteGeneral.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_UnImplement(PCHAOSVM_CPU pCPU); 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_InvalidOpcode(PCHAOSVM_CPU pCPU);//[F1] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Prefix_66(PCHAOSVM_CPU pCPU);//[66] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Prefix_67(PCHAOSVM_CPU pCPU);//[67] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Prefix_F2(PCHAOSVM_CPU pCPU);//[F2] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Prefix_F3(PCHAOSVM_CPU pCPU);//[F3] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Prefix_SegOverride(PCHAOSVM_CPU pCPU);//[2E,36,3E,26,64,65] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Prefix_F0(PCHAOSVM_CPU pCPU);//[F0] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_68(PCHAOSVM_CPU pCPU);//[68] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_6A(PCHAOSVM_CPU pCPU);//[6A] 11 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_50_57(PCHAOSVM_CPU pCPU);//[50,51,52,53,54,55,56,57] 12 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_ES(PCHAOSVM_CPU pCPU);//[06] 13 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_CS(PCHAOSVM_CPU pCPU);//[0E] 14 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_SS(PCHAOSVM_CPU pCPU);//[16] 15 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSH_DS(PCHAOSVM_CPU pCPU);//[1E] 16 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_POP_58_5F(PCHAOSVM_CPU pCPU);//[58,59,5A,5B,5C,5D,5E,5F] 17 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_POP_ES(PCHAOSVM_CPU pCPU);//[07] 18 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_POP_SS(PCHAOSVM_CPU pCPU);//[17] 19 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_POP_DS(PCHAOSVM_CPU pCPU);//[1F] 20 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSHAD_60(PCHAOSVM_CPU pCPU);//[60] 21 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_POPAD_61(PCHAOSVM_CPU pCPU);//[61] 22 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_NOP_90(PCHAOSVM_CPU pCPU);//[90] 23 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Jcc(PCHAOSVM_CPU pCPU);//[70,71,72,73,74,75,76,77,78,79,7A,7B,7C,7D,7E,7F] 24 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_JMP_E9(PCHAOSVM_CPU pCPU);//[E9] 25 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_JMP_EB(PCHAOSVM_CPU pCPU);//[EB] 26 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CALL_E8(PCHAOSVM_CPU pCPU);//[E8] 27 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_RET_C3(PCHAOSVM_CPU pCPU);//[C3] 28 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_RETN_C2(PCHAOSVM_CPU pCPU);//[C2] 29 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LOOPE_E0(PCHAOSVM_CPU pCPU);//[E0] 30 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LOOPNE_E1(PCHAOSVM_CPU pCPU);//[E1] 31 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LOOP_E2(PCHAOSVM_CPU pCPU);//[E2] 32 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_JRCXZ_E3(PCHAOSVM_CPU pCPU);//[E3] 33 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CLC_F8(PCHAOSVM_CPU pCPU);//[F8] 34 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_STC_F9(PCHAOSVM_CPU pCPU);//[F9] 35 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CLI_FA(PCHAOSVM_CPU pCPU);//[FA] 36 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_STI_FB(PCHAOSVM_CPU pCPU);//[FB] 37 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CLD_FC(PCHAOSVM_CPU pCPU);//[FC] 38 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_STD_FD(PCHAOSVM_CPU pCPU);//[FD] 39 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CWDE_98(PCHAOSVM_CPU pCPU);//[98] 40 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CDQ_99(PCHAOSVM_CPU pCPU);//[99] 41 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_PUSHFD_9C(PCHAOSVM_CPU pCPU);//[9C] 42 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_POPFD_9D(PCHAOSVM_CPU pCPU);//[9D] 43 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ENTER_C8(PCHAOSVM_CPU pCPU);//[C8] 44 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LEAVE_C9(PCHAOSVM_CPU pCPU);//[C9] 45 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_INT3_CC(PCHAOSVM_CPU pCPU);//[CC] 46 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_INT_CD(PCHAOSVM_CPU pCPU);//[CD] 47 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_INTO_CE(PCHAOSVM_CPU pCPU);//[CE] 48 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LEA_8D(PCHAOSVM_CPU pCPU);//[8D] 49 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XCHG_86(PCHAOSVM_CPU pCPU);//[86] 50 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XCHG_87(PCHAOSVM_CPU pCPU);//[87] 51 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XCHG_RAX_RNX(PCHAOSVM_CPU pCPU);//[91,92,93,94,95,96,97] 52 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LAHF_9F(PCHAOSVM_CPU pCPU);//[9F] 53 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SAHF_9E(PCHAOSVM_CPU pCPU);//[9E] 54 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_XLAT_D7(PCHAOSVM_CPU pCPU);//[D7] 55 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SALC_D6(PCHAOSVM_CPU pCPU);//[D6] 56 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMC_F5(PCHAOSVM_CPU pCPU);//[F5] 57 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_Two_MainDispatch(PCHAOSVM_CPU pCPU);//[0F] 58 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteMath.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteMath.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteMath.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADD_00(PCHAOSVM_CPU pCPU);//[00] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADD_01(PCHAOSVM_CPU pCPU);//[01] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADD_02(PCHAOSVM_CPU pCPU);//[02] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADD_03(PCHAOSVM_CPU pCPU);//[03] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADD_04(PCHAOSVM_CPU pCPU);//[04] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADD_05(PCHAOSVM_CPU pCPU);//[05] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADC_10(PCHAOSVM_CPU pCPU);//[10] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADC_11(PCHAOSVM_CPU pCPU);//[11] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADC_12(PCHAOSVM_CPU pCPU);//[12] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADC_13(PCHAOSVM_CPU pCPU);//[13] 11 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADC_14(PCHAOSVM_CPU pCPU);//[14] 12 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_ADC_15(PCHAOSVM_CPU pCPU);//[15] 13 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_INC_40_47(PCHAOSVM_CPU pCPU);//[40,41,42,43,44,45,46,47] 14 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SUB_28(PCHAOSVM_CPU pCPU);//[28] 15 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SUB_29(PCHAOSVM_CPU pCPU);//[29] 16 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SUB_2A(PCHAOSVM_CPU pCPU);//[2A] 17 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SUB_2B(PCHAOSVM_CPU pCPU);//[2B] 18 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SUB_2C(PCHAOSVM_CPU pCPU);//[2C] 19 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SUB_2D(PCHAOSVM_CPU pCPU);//[2D] 20 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SBB_18(PCHAOSVM_CPU pCPU);//[18] 21 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SBB_19(PCHAOSVM_CPU pCPU);//[19] 22 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SBB_1A(PCHAOSVM_CPU pCPU);//[1A] 23 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SBB_1B(PCHAOSVM_CPU pCPU);//[1B] 24 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SBB_1C(PCHAOSVM_CPU pCPU);//[1C] 25 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SBB_1D(PCHAOSVM_CPU pCPU);//[1D] 26 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMP_38(PCHAOSVM_CPU pCPU);//[38] 27 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMP_39(PCHAOSVM_CPU pCPU);//[39] 28 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMP_3A(PCHAOSVM_CPU pCPU);//[3A] 29 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMP_3B(PCHAOSVM_CPU pCPU);//[3B] 30 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMP_3C(PCHAOSVM_CPU pCPU);//[3C] 31 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMP_3D(PCHAOSVM_CPU pCPU);//[3D] 32 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_DEC_48_4F(PCHAOSVM_CPU pCPU);//[48,49,4A,4B,4C,4D,4E,4F] 33 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_IMUL_6B(PCHAOSVM_CPU pCPU);//[6B] 34 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_IMUL_69(PCHAOSVM_CPU pCPU);//[69] 35 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_DAA_27(PCHAOSVM_CPU pCPU);//[27] 36 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_DAS_2F(PCHAOSVM_CPU pCPU);//[2F] 37 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AAA_37(PCHAOSVM_CPU pCPU);//[37] 38 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AAS_3F(PCHAOSVM_CPU pCPU);//[3F] 39 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AAD_D5(PCHAOSVM_CPU pCPU);//[D5] 40 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_AAM_D4(PCHAOSVM_CPU pCPU);//[D4] 41 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteMov.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteMov.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteMov.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_B0_B3(PCHAOSVM_CPU pCPU);//[B0,B1,B2,B3,B4,B5,B6,B7] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_B8_BF(PCHAOSVM_CPU pCPU);//[B8,B9,BA,BB,BC,BD,BE,BF] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_A0(PCHAOSVM_CPU pCPU);//[A0] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_A1(PCHAOSVM_CPU pCPU);//[A1] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_A2(PCHAOSVM_CPU pCPU);//[A2] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_A3(PCHAOSVM_CPU pCPU);//[A3] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_88(PCHAOSVM_CPU pCPU);//[88] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_89(PCHAOSVM_CPU pCPU);//[89] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_8A(PCHAOSVM_CPU pCPU);//[8A] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_8B(PCHAOSVM_CPU pCPU);//[8B] 11 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_8C(PCHAOSVM_CPU pCPU);//[8C] 12 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOV_8E(PCHAOSVM_CPU pCPU);//[8E] 13 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteSegment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteSegment.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteSegment.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_FuncOne_Prefix_Segment_ES(PCHAOSVM_CPU pCPU);//[26] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_FuncOne_Prefix_Segment_CS(PCHAOSVM_CPU pCPU);//[2E] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_FuncOne_Prefix_Segment_SS(PCHAOSVM_CPU pCPU);//[36] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_FuncOne_Prefix_Segment_DS(PCHAOSVM_CPU pCPU);//[3E] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_FuncOne_Prefix_Segment_FS(PCHAOSVM_CPU pCPU);//[64] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_FuncOne_Prefix_Segment_GS(PCHAOSVM_CPU pCPU);//[65] -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteString.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsOneByteString.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsOneByteString.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOVSB_A4(PCHAOSVM_CPU pCPU);//[A4] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_MOVSD_A5(PCHAOSVM_CPU pCPU);//[A5] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SCASB_AE(PCHAOSVM_CPU pCPU);//[AE] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_SCASD_AF(PCHAOSVM_CPU pCPU);//[AF] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_STOSB_AA(PCHAOSVM_CPU pCPU);//[AA] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_STOS_AB(PCHAOSVM_CPU pCPU);//[AB] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LODSB_AC(PCHAOSVM_CPU pCPU);//[AC] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_LODS_AD(PCHAOSVM_CPU pCPU);//[AD] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMPSB_A6(PCHAOSVM_CPU pCPU);//[A6] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_CMPSD_A7(PCHAOSVM_CPU pCPU);//[A7] 11 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsShift.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsShift.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsShift.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_C0(PCHAOSVM_CPU pCPU);//[C0] 2 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_C1(PCHAOSVM_CPU pCPU);//[C1] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_D0(PCHAOSVM_CPU pCPU);//[D0] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_D1(PCHAOSVM_CPU pCPU);//[D1] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_D2(PCHAOSVM_CPU pCPU);//[D2] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncOne_OpcodeExtDispatch_D3(PCHAOSVM_CPU pCPU);//[D3] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SHLD_0FA4(PCHAOSVM_CPU pCPU);//[A4] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SHLD_0FA5(PCHAOSVM_CPU pCPU);//[A5] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SHRD_0FAC(PCHAOSVM_CPU pCPU);//[AC] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SHRD_0FAD(PCHAOSVM_CPU pCPU);//[AD] 11 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsTwoByteExtension.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsTwoByteExtension.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsTwoByteExtension.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_OpcodeExtDispatch_0FBA(PCHAOSVM_CPU pCPU);//[BA] 2 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsTwoByteGeneral.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInstructionsTwoByteGeneral.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInstructionsTwoByteGeneral.h: -------------------------------------------------------------------------------- 1 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_UnImplement(PCHAOSVM_CPU pCPU); 2 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_IncorrectOpcode007F(PCHAOSVM_CPU pCPU);//[04,24,25,26,27,36,37,0A,0C,0E,0F,19,1A,1B,1C,1D,1E,39,3B,3C,3D,3E,3F,7A,7B,A6,A7,B8,FF] 3 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F20(PCHAOSVM_CPU pCPU);//[20] 4 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F22(PCHAOSVM_CPU pCPU);//[22] 5 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F21(PCHAOSVM_CPU pCPU);//[21] 6 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F23(PCHAOSVM_CPU pCPU);//[23] 7 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_Jcc_Long(PCHAOSVM_CPU pCPU);//[80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8D,8E,8F] 8 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SETcc(PCHAOSVM_CPU pCPU);//[90,91,92,93,94,95,96,97,98,99,9A,9B,9C,9D,9E,9F] 9 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_PUSH_FS_0FA0(PCHAOSVM_CPU pCPU);//[A0] 10 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_POP_FS_0FA1(PCHAOSVM_CPU pCPU);//[A1] 11 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_PUSH_GS_0FA8(PCHAOSVM_CPU pCPU);//[A8] 12 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_POP_GS_0FA9(PCHAOSVM_CPU pCPU);//[A9] 13 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOVZX_0FB6(PCHAOSVM_CPU pCPU);//[B6] 14 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOVZX_0FB7(PCHAOSVM_CPU pCPU);//[B7] 15 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOVSX_0FBE(PCHAOSVM_CPU pCPU);//[BE] 16 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOVSX_0FBF(PCHAOSVM_CPU pCPU);//[BF] 17 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_BT_0FA3(PCHAOSVM_CPU pCPU);//[A3] 18 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_BTR_0FB3(PCHAOSVM_CPU pCPU);//[B3] 19 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_BTS_0FAB(PCHAOSVM_CPU pCPU);//[AB] 20 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_BTC_0FBB(PCHAOSVM_CPU pCPU);//[BB] 21 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_IMUL_0FAF(PCHAOSVM_CPU pCPU);//[AF] 22 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_XADD_0FC0(PCHAOSVM_CPU pCPU);//[C0] 23 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_XADD_0FC1(PCHAOSVM_CPU pCPU);//[C1] 24 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_CMPXCHG_0FB0(PCHAOSVM_CPU pCPU);//[B0] 25 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_CMPXCHG_0FB1(PCHAOSVM_CPU pCPU);//[B1] 26 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_BSWAP_0FCX(PCHAOSVM_CPU pCPU);//[C8,C9,CA,CB,CC,CD,CE,CF] 27 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F30(PCHAOSVM_CPU pCPU);//[30] 28 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F32(PCHAOSVM_CPU pCPU);//[32] 29 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_MOV_0F31(PCHAOSVM_CPU pCPU);//[31] 30 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SYSENTER_0F34(PCHAOSVM_CPU pCPU);//[34] 31 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_SYSEXIT_0F35(PCHAOSVM_CPU pCPU);//[35] 32 | CPU_STATUS __INTERNAL_FUNC__ FuncTwo_CPUID_0FA2(PCHAOSVM_CPU pCPU);//[A2] 33 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInternalFunction.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInternalFunction.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInternalFunction.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInternalFunction.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInternalHeader.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInternalHeader.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuInternalStructs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuInternalStructs.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuMemoryAccess.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuMemoryAccess.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuOneByteOpcodeTable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuOneByteOpcodeTable.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuReadDataPart.c: -------------------------------------------------------------------------------- 1 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadDataPart(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __byte bSizeToReadByte, __memory pData) { 2 | __dword dwData = 0; 3 | if (pCPU->bOpcodeLength + bSizeToReadByte >= pCPU->bOpcodeMaxLength) { 4 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 5 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 6 | } 7 | 8 | dwData = pCPU->pMmReadDataPart(pCPU, pCPU->pUserContext, bImmIndexInOpcodeBuffer, bSizeToReadByte); 9 | 10 | switch (bSizeToReadByte) { 11 | case 1: 12 | *(__byte *)pData = *(__dword *)(&dwData); 13 | break; 14 | case 2: 15 | *(__word *)pData = *(__dword *)(&dwData); 16 | break; 17 | case 4: 18 | *(__dword *)pData = *(__dword *)(&dwData); 19 | break; 20 | default: 21 | *(__dword *)pData = *(__dword *)(&dwData); 22 | } 23 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 24 | return __CPU_STATUS_EXECUTE_SUCCESS__; 25 | } 26 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuReadDataPart.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVM_CPU_READDATAPART__H__) 2 | #define __CHAOSVM_CPU_READDATAPART__H__ 3 | 4 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadDataPart(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __byte bSizeToReadByte, __memory pData); 5 | 6 | #define __READ_DATA_UINT8_SAFE__(pCPU, ImmIndexInOpcodeBuffer, UINT8_Var) \ 7 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDataPart(pCPU, ImmIndexInOpcodeBuffer, sizeof(__byte), &(UINT8_Var)))){ \ 8 | return __GET_LAST_STATUS__(pCPU);} 9 | 10 | #define __READ_DATA_UINT16_SAFE__(pCPU, ImmIndexInOpcodeBuffer, UINT16_Var) \ 11 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDataPart(pCPU, ImmIndexInOpcodeBuffer, sizeof(__word), &(UINT16_Var)))){ \ 12 | return __GET_LAST_STATUS__(pCPU);} 13 | 14 | #define __READ_DATA_UINT32_SAFE__(pCPU, ImmIndexInOpcodeBuffer, UINT32_Var) \ 15 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDataPart(pCPU, ImmIndexInOpcodeBuffer, sizeof(__dword), &(UINT32_Var)))){ \ 16 | return __GET_LAST_STATUS__(pCPU);} 17 | 18 | #define __READ_DATA_INT8_SAFE__(pCPU, ImmIndexInOpcodeBuffer, INT8_Var) \ 19 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDataPart(pCPU, ImmIndexInOpcodeBuffer, sizeof(__char), &(INT8_Var)))){ \ 20 | return __GET_LAST_STATUS__(pCPU);} 21 | 22 | #define __READ_DATA_INT16_SAFE__(pCPU, ImmIndexInOpcodeBuffer, INT16_Var) \ 23 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDataPart(pCPU, ImmIndexInOpcodeBuffer, sizeof(__sword), &(INT16_Var)))){ \ 24 | return __GET_LAST_STATUS__(pCPU);} 25 | 26 | #define __READ_DATA_INT32_SAFE__(pCPU, ImmIndexInOpcodeBuffer, INT32_Var) \ 27 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDataPart(pCPU, ImmIndexInOpcodeBuffer, sizeof(__sdword), &(INT32_Var)))){ \ 28 | return __GET_LAST_STATUS__(pCPU);} 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuReadDispPart.c: -------------------------------------------------------------------------------- 1 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadDispPart(PCHAOSVM_CPU pCPU, __memory pDispStart, __byte bSizeToReadByte, __memory pData) { 2 | __dword dwData = 0; 3 | if ((__dword)pDispStart >= (__dword)(pCPU->OpcodeBuffer + pCPU->bOpcodeMaxLength)) { 4 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 5 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 6 | } 7 | 8 | dwData = pCPU->pMmReadDispPart(pCPU, pCPU->pUserContext, pDispStart, bSizeToReadByte); 9 | 10 | switch (bSizeToReadByte) { 11 | case 1: 12 | *(__byte *)pData = *(__dword *)(&dwData); 13 | break; 14 | case 2: 15 | *(__word *)pData = *(__dword *)(&dwData); 16 | break; 17 | case 4: 18 | *(__dword *)pData = *(__dword *)(&dwData); 19 | break; 20 | default: 21 | *(__dword *)pData = *(__dword *)(&dwData); 22 | } 23 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 24 | return __CPU_STATUS_EXECUTE_SUCCESS__; 25 | } 26 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuReadDispPart.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVM_CPU_READDISPPART__H__) 2 | #define __CHAOSVM_CPU_READDISPPART__H__ 3 | 4 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadDispPart(PCHAOSVM_CPU pCPU, __memory pDispStart, __byte bSizeToReadByte, __memory pData); 5 | 6 | #define __READ_DISP_INT8_SAFE__(pCPU, pDispStart, INT8_Var) \ 7 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDispPart(pCPU, pDispStart, sizeof(__char), &(INT8_Var)))){ \ 8 | return __GET_LAST_STATUS__(pCPU);} 9 | 10 | #define __READ_DISP_INT16_SAFE__(pCPU, pDispStart, INT16_Var) \ 11 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDispPart(pCPU, pDispStart, sizeof(__sword), &(INT16_Var)))){ \ 12 | return __GET_LAST_STATUS__(pCPU);} 13 | 14 | #define __READ_DISP_INT32_SAFE__(pCPU, pDispStart, INT32_Var) \ 15 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadDispPart(pCPU, pDispStart, sizeof(__sdword), &(INT32_Var)))){ \ 16 | return __GET_LAST_STATUS__(pCPU);} 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuReadImm.c: -------------------------------------------------------------------------------- 1 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_uByte(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __byte *puInt8) { 2 | if (pCPU->bOpcodeLength + 1 >= pCPU->bOpcodeMaxLength) { 3 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 4 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 5 | } 6 | 7 | *puInt8 = *(__byte *)(&pCPU->OpcodeBuffer[bImmIndexInOpcodeBuffer]); 8 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 9 | return __CPU_STATUS_EXECUTE_SUCCESS__; 10 | } 11 | 12 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_uWord(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __word *puInt16) { 13 | if (pCPU->bOpcodeLength + 2 >= pCPU->bOpcodeMaxLength) { 14 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 15 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 16 | } 17 | 18 | *puInt16 = *(__word *)(&pCPU->OpcodeBuffer[bImmIndexInOpcodeBuffer]); 19 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 20 | return __CPU_STATUS_EXECUTE_SUCCESS__; 21 | } 22 | 23 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_uDword(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __dword *puInt32) { 24 | if (pCPU->bOpcodeLength + 4 >= pCPU->bOpcodeMaxLength) { 25 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 26 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 27 | } 28 | 29 | *puInt32 = *(__dword *)(&pCPU->OpcodeBuffer[bImmIndexInOpcodeBuffer] ); 30 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 31 | return __CPU_STATUS_EXECUTE_SUCCESS__; 32 | } 33 | 34 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_sByte(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __char *pInt8) { 35 | if (pCPU->bOpcodeLength + 1 >= pCPU->bOpcodeMaxLength) { 36 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 37 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 38 | } 39 | 40 | *pInt8 = *(__char *)(&pCPU->OpcodeBuffer[bImmIndexInOpcodeBuffer]); 41 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 42 | return __CPU_STATUS_EXECUTE_SUCCESS__; 43 | } 44 | 45 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_sWord(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __word *pInt16) { 46 | if (pCPU->bOpcodeLength + 2 >= pCPU->bOpcodeMaxLength) { 47 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 48 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 49 | } 50 | 51 | *pInt16 = *(__sword *)(&pCPU->OpcodeBuffer[bImmIndexInOpcodeBuffer]); 52 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 53 | return __CPU_STATUS_EXECUTE_SUCCESS__; 54 | } 55 | 56 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_sDword(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __dword *pInt32) { 57 | if (pCPU->bOpcodeLength + 4 >= pCPU->bOpcodeMaxLength) { 58 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_INCOMPLETE_OPCODE__); 59 | return __CPU_STATUS_INCOMPLETE_OPCODE__; 60 | } 61 | 62 | *pInt32 = *(__sdword *)(&pCPU->OpcodeBuffer[bImmIndexInOpcodeBuffer]); 63 | __SET_LAST_STATUS__(pCPU, __CPU_STATUS_EXECUTE_SUCCESS__); 64 | return __CPU_STATUS_EXECUTE_SUCCESS__; 65 | } 66 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuReadImm.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVM_CPU_READIMM__H__) 2 | #define __CHAOSVM_CPU_READIMM__H__ 3 | 4 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_uByte(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __byte *puInt8); 5 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_uWord(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __word *puInt16); 6 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_uDword(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __dword *puInt32); 7 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_sByte(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __char *pInt8); 8 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_sWord(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __word *pInt16); 9 | __INLINE__ CPU_STATUS __INTERNAL_FUNC__ ChaosVmReadImm_sDword(PCHAOSVM_CPU pCPU, __byte bImmIndexInOpcodeBuffer, __dword *pInt32); 10 | 11 | #define __READ_IMM_UINT8_SAFE__(pCPU, ImmIndexInOpcodeBuffer, UINT8_Var) \ 12 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadImm_uByte(pCPU, ImmIndexInOpcodeBuffer, &(UINT8_Var)))){ \ 13 | return __GET_LAST_STATUS__(pCPU);} 14 | 15 | #define __READ_IMM_UINT16_SAFE__(pCPU, ImmIndexInOpcodeBuffer, UINT16_Var) \ 16 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadImm_uWord(pCPU, ImmIndexInOpcodeBuffer, &(UINT16_Var)))){ \ 17 | return __GET_LAST_STATUS__(pCPU);} 18 | 19 | #define __READ_IMM_UINT32_SAFE__(pCPU, ImmIndexInOpcodeBuffer, UINT32_Var) \ 20 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadImm_uDword(pCPU, ImmIndexInOpcodeBuffer, &(UINT32_Var)))){ \ 21 | return __GET_LAST_STATUS__(pCPU);} 22 | 23 | #define __READ_IMM_INT8_SAFE__(pCPU, ImmIndexInOpcodeBuffer, INT8_Var) \ 24 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadImm_sByte(pCPU, ImmIndexInOpcodeBuffer, &(INT8_Var)))){ \ 25 | return __GET_LAST_STATUS__(pCPU);} 26 | 27 | #define __READ_IMM_INT16_SAFE__(pCPU, ImmIndexInOpcodeBuffer, INT16_Var) \ 28 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadImm_sWord(pCPU, ImmIndexInOpcodeBuffer, &(INT16_Var)))){ \ 29 | return __GET_LAST_STATUS__(pCPU);} 30 | 31 | #define __READ_IMM_INT32_SAFE__(pCPU, ImmIndexInOpcodeBuffer, INT32_Var) \ 32 | if (!__CPU_STATUS_SUCCESS__(ChaosVmReadImm_sDword(pCPU, ImmIndexInOpcodeBuffer, &(INT32_Var)))){ \ 33 | return __GET_LAST_STATUS__(pCPU);} 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuStatus.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuStatus.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuTwoByteOpcodeTable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuTwoByteOpcodeTable.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmCpuX86.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmCpuX86.h -------------------------------------------------------------------------------- /chaosvm/ChaosVmDISSteps.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmDISSteps.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmDebuger.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmDebuger.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmEmulation.def: -------------------------------------------------------------------------------- 1 | LIBRARY "chaosvm_emulation" 2 | EXPORTS 3 | 4 | ChaosVmEntry 5 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmExport.h: -------------------------------------------------------------------------------- 1 | #ifdef CHAOSVM_EXPORTS 2 | #define __CHAOSVM_API__ __declspec(dllexport) 3 | #else 4 | #define __CHAOSVM_API__ //__declspec(dllimport) 5 | #endif 6 | 7 | 8 | #define __CHAOSVM_EXP__ extern "C" __CHAOSVM_API__ 9 | -------------------------------------------------------------------------------- /chaosvm/ChaosVmJmpTargetDataBase.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmJmpTargetDataBase.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmJmpTargetDataBase.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVMJMPTARGETDATABASE_H__) 2 | #define __CHAOSVMJMPTARGETDATABASE_H__ 3 | 4 | #include "Common.h" 5 | #include "ChaosVmp.h" 6 | 7 | #if defined(__cplusplus) 8 | extern "C" 9 | { 10 | #endif 11 | 12 | __void __INTERNAL_FUNC__ InitJmpTargetDataBaseTable(__integer iIndex); 13 | PCHAOSVMP_JMPTARGET_INST __INTERNAL_FUNC__ QueryJmpTargetInstFromTable(__integer iIndex, __address addrAddress); 14 | PCHAOSVMP_JMPTARGET_INST __INTERNAL_FUNC__ AddJmpTargetInstToTable(__integer iIndex, __address addrAddress, PCHAOSVMP_JMPTARGET_INST pJmpTargetInst); 15 | __void __INTERNAL_FUNC__ DestoryJmpTargetTable(__integer iIndex); 16 | 17 | #if defined(__cplusplus) 18 | } 19 | #endif 20 | 21 | #endif -------------------------------------------------------------------------------- /chaosvm/ChaosVmKernel.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmKernel.c -------------------------------------------------------------------------------- /chaosvm/ChaosVmKernel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/ChaosVmKernel.h -------------------------------------------------------------------------------- /chaosvm/chaosvm.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvm/chaosvm.vcproj -------------------------------------------------------------------------------- /chaosvm/chaosvm.vcproj.logic-PC.logic.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 67 | 91 | 92 | 95 | 119 | 120 | 123 | 147 | 148 | 151 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /chaosvm/dllmain.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL APIENTRY DllMain( HMODULE hModule, 4 | DWORD ul_reason_for_call, 5 | LPVOID lpReserved 6 | ) 7 | { 8 | switch (ul_reason_for_call) 9 | { 10 | case DLL_PROCESS_ATTACH: 11 | case DLL_PROCESS_DETACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | break; 15 | } 16 | return TRUE; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /chaosvm/efiler.h: -------------------------------------------------------------------------------- 1 | #define __CHAOSVM_DECRYPT_KEY__ 0x1853A805 2 | -------------------------------------------------------------------------------- /chaosvmldr/ChaosVmLdr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmldr/ChaosVmLdr.c -------------------------------------------------------------------------------- /chaosvmldr/ChaosVmLdr.def: -------------------------------------------------------------------------------- 1 | LIBRARY "chaosvmldr" 2 | EXPORTS 3 | 4 | g_ChaosVmLdrConfigure 5 | 6 | g_DISConfigure 7 | 8 | DISEntry 9 | DISEntryInDll -------------------------------------------------------------------------------- /chaosvmldr/ChaosVmLdr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmldr/ChaosVmLdr.h -------------------------------------------------------------------------------- /chaosvmldr/chaosvmldr.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmldr/chaosvmldr.aps -------------------------------------------------------------------------------- /chaosvmldr/chaosvmldr.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmldr/chaosvmldr.rc -------------------------------------------------------------------------------- /chaosvmldr/chaosvmldr.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmldr/chaosvmldr.vcproj -------------------------------------------------------------------------------- /chaosvmldr/dllmain.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL APIENTRY DllMain( HMODULE hModule, 4 | DWORD ul_reason_for_call, 5 | LPVOID lpReserved 6 | ) 7 | { 8 | switch (ul_reason_for_call) 9 | { 10 | case DLL_PROCESS_ATTACH: 11 | case DLL_PROCESS_DETACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | break; 15 | } 16 | return TRUE; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /chaosvmldr/efiler.h: -------------------------------------------------------------------------------- 1 | #define __CHAOSVMLDR_DECRYPT_KEY__ 0x9361A1B9 2 | -------------------------------------------------------------------------------- /chaosvmldr/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by chaosvmldr.rc 4 | // 5 | #define IDR_CHAOSVM_EMULATION 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /chaosvmp/CDK.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/CDK.h -------------------------------------------------------------------------------- /chaosvmp/ChaosVmKey.h: -------------------------------------------------------------------------------- 1 | #define __CHAOSVM_DECRYPT_KEY__ 0x1853A805 2 | -------------------------------------------------------------------------------- /chaosvmp/ChaosVmLdrKey.h: -------------------------------------------------------------------------------- 1 | #define __CHAOSVMLDR_DECRYPT_KEY__ 0x9361A1B9 2 | -------------------------------------------------------------------------------- /chaosvmp/ChaosVmpConsole.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/ChaosVmpConsole.cpp -------------------------------------------------------------------------------- /chaosvmp/ChaosVmpNotificationProc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/ChaosVmpNotificationProc.cpp -------------------------------------------------------------------------------- /chaosvmp/ChaosVmpSDK.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/ChaosVmpSDK.cpp -------------------------------------------------------------------------------- /chaosvmp/ChaosVmpSDK.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CHAOSVMP_SDK_H__) 2 | #define __CHAOSVMP_SDK_H__ 3 | 4 | #include "Common.h" 5 | #include "logic.h" 6 | #include "Support.h" 7 | 8 | __bool __INTERNAL_FUNC__ ChaosVmSDK(__tchar *pTargetFilePath, __tchar *pSdkXmlFilePath); 9 | 10 | #endif -------------------------------------------------------------------------------- /chaosvmp/SignDefined.h: -------------------------------------------------------------------------------- 1 | #if !defined(__SIGNDEFINED_H__) 2 | #define __SIGNDEFINED_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #define __VMP_PROTECT_START_PET__ "\x50\x83\xc0\x05\x8d\x40\xfb\x58\x03\xd2\x2b\xd2\x19\x83\x12\x10" 10 | #define __VMP_PROTECT_END_PET__ "\x60\x9c\x52\x83\xc0\x05\x8d\x40\xfb\x5a\x9d\x61\xc3\x19\x83\x12\x10" 11 | #define __VMP_PROTECTED_FLAG__ "\xe9\x09\x00\x00\x00\x19\x83\x12\x10" 12 | 13 | #define __POWER_PROTECT_START_PET__ "\x50\x83\xc0\x05\x8d\x40\xfb\x58\x03\xd2\x2b\xd2\x10\x12\x83\x19" 14 | #define __POWER_PROTECT_END_PET__ "\x60\x9c\x52\x83\xc0\x05\x8d\x40\xfb\x5a\x9d\x61\xc3\x10\x12\x83\x19" 15 | #define __POWER_PROTECTED_FLAG__ "\xe9\x09\x00\x00\x00\x10\x12\x83\x19" 16 | 17 | #if defined(__cplusplus) 18 | } 19 | #endif 20 | 21 | #endif -------------------------------------------------------------------------------- /chaosvmp/chaosvmp.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/chaosvmp.aps -------------------------------------------------------------------------------- /chaosvmp/chaosvmp.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/chaosvmp.rc -------------------------------------------------------------------------------- /chaosvmp/chaosvmp.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/chaosvmp/chaosvmp.vcproj -------------------------------------------------------------------------------- /chaosvmp/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by chaosvmp.rc 4 | // 5 | #define IDR_CHAOSVM 101 6 | #define IDR_CHAOSVM_EMULATION 102 7 | 8 | // Next default values for new objects 9 | // 10 | #ifdef APSTUDIO_INVOKED 11 | #ifndef APSTUDIO_READONLY_SYMBOLS 12 | #define _APS_NEXT_RESOURCE_VALUE 102 13 | #define _APS_NEXT_COMMAND_VALUE 40001 14 | #define _APS_NEXT_CONTROL_VALUE 1001 15 | #define _APS_NEXT_SYMED_VALUE 101 16 | #endif 17 | #endif 18 | -------------------------------------------------------------------------------- /crc32er/Crc32er.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/crc32er/Crc32er.c -------------------------------------------------------------------------------- /crc32er/crc32er.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/crc32er/crc32er.vcproj -------------------------------------------------------------------------------- /efiler/EFiler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/efiler/EFiler.c -------------------------------------------------------------------------------- /efiler/efiler.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/efiler/efiler.vcproj -------------------------------------------------------------------------------- /fuckme/fuckme.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/fuckme/fuckme.cpp -------------------------------------------------------------------------------- /fuckme/fuckme.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/fuckme/fuckme.vcproj -------------------------------------------------------------------------------- /fuckyou/dllmain.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL APIENTRY DllMain( HMODULE hModule, 4 | DWORD ul_reason_for_call, 5 | LPVOID lpReserved 6 | ) 7 | { 8 | switch (ul_reason_for_call) 9 | { 10 | case DLL_PROCESS_ATTACH: 11 | case DLL_PROCESS_DETACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | //MessageBoxA(NULL, "hello world", "fuckyou", MB_OK); 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | VOID __stdcall FuckYou() 21 | { 22 | MessageBoxA(NULL, "fuck you", "fuckyou", MB_OK); 23 | } 24 | -------------------------------------------------------------------------------- /fuckyou/fuckyou.def: -------------------------------------------------------------------------------- 1 | LIBRARY "fuckyou" 2 | EXPORTS 3 | 4 | FuckYou -------------------------------------------------------------------------------- /fuckyou/fuckyou.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/fuckyou/fuckyou.vcproj -------------------------------------------------------------------------------- /libanalyzer/AnalyzeBin.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzeBin.c -------------------------------------------------------------------------------- /libanalyzer/AnalyzeBin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzeBin.h -------------------------------------------------------------------------------- /libanalyzer/AnalyzeDataFromInstructionDispatcher.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzeDataFromInstructionDispatcher.c -------------------------------------------------------------------------------- /libanalyzer/AnalyzeInstruction.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzeInstruction.c -------------------------------------------------------------------------------- /libanalyzer/AnalyzeInstructionPass1Dispatcher.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzeInstructionPass1Dispatcher.c -------------------------------------------------------------------------------- /libanalyzer/AnalyzeProcedure.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzeProcedure.c -------------------------------------------------------------------------------- /libanalyzer/AnalyzerDebug.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/AnalyzerDebug.c -------------------------------------------------------------------------------- /libanalyzer/CheckValidAddress.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/CheckValidAddress.c -------------------------------------------------------------------------------- /libanalyzer/CpuContext.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/CpuContext.h -------------------------------------------------------------------------------- /libanalyzer/FeedbackAnalyzeInstruction.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/FeedbackAnalyzeInstruction.c -------------------------------------------------------------------------------- /libanalyzer/ImportTableReference.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/ImportTableReference.c -------------------------------------------------------------------------------- /libanalyzer/ImportTableReference.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/ImportTableReference.h -------------------------------------------------------------------------------- /libanalyzer/InstructionDispatcher.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/InstructionDispatcher.c -------------------------------------------------------------------------------- /libanalyzer/Proecdure.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/Proecdure.h -------------------------------------------------------------------------------- /libanalyzer/ValidAddress.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/ValidAddress.h -------------------------------------------------------------------------------- /libanalyzer/libanalyzer.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/libanalyzer.vcproj -------------------------------------------------------------------------------- /libanalyzer/x86Instruction.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libanalyzer/x86Instruction.h -------------------------------------------------------------------------------- /libassembler/Assembler.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/Assembler.c -------------------------------------------------------------------------------- /libassembler/Assembler.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ASSEMBLER_H__) 2 | #define __ASSEMBLER_H__ 3 | 4 | #include "AssemblerParse.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __void __API__ InitAssembler(PASM_SOURCE pSource, FPAssemblerHook pAssemblerHookFunc); 12 | __memory __API__ Assembler(PASM_SOURCE pSource, __integer *pBinSize, __integer iLoadBase); 13 | __void __API__ GenerateDefAsmSource(PASM_SOURCE pSource); 14 | __bool __API__ WriteInst(ASMER_TYPE Inst); 15 | __bool __API__ WriteLabel(__char *pSymbolName); 16 | __bool __API__ WriteImmediate(__memory pImmediate, ASMER_BIT Bits); 17 | __bool __API__ WriteDisplacement(__memory pImmediate, ASMER_BIT Bits); 18 | 19 | #if defined(__cplusplus) 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libassembler/Assembler.l: -------------------------------------------------------------------------------- 1 | %{ 2 | %} 3 | 4 | %% 5 | 6 | %% 7 | -------------------------------------------------------------------------------- /libassembler/Assembler.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/Assembler.y -------------------------------------------------------------------------------- /libassembler/AssemblerCommon.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerCommon.c -------------------------------------------------------------------------------- /libassembler/AssemblerCommon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerCommon.h -------------------------------------------------------------------------------- /libassembler/AssemblerEncoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerEncoder.c -------------------------------------------------------------------------------- /libassembler/AssemblerEncoder.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ASSEMBLERENCODER_H__) 2 | #define __ASSEMBLERENCODER_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include "AssemblerCommon.h" 10 | 11 | __integer __INTERNAL_FUNC__ Encoder(__memory pInstBuf, PASM_OBJ pAsmObj, __offset ofCurrentOffset); 12 | 13 | #if defined(__cplusplus) 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /libassembler/AssemblerHook.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerHook.h -------------------------------------------------------------------------------- /libassembler/AssemblerImmediateMemory.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerImmediateMemory.c -------------------------------------------------------------------------------- /libassembler/AssemblerImmediateMemory.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ASSEMBLERIMMEDIATEMEMORY_H__) 2 | #define __ASSEMBLERIMMEDIATEMEMORY_H__ 3 | 4 | #include "Common.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __EXTERN__ __memory g_pImmediateMemory; 12 | __EXTERN__ __integer g_iImmediateMemoryMaxSize; 13 | 14 | __memory __INTERNAL_FUNC__ InitImmediateMemory(__integer iMaxSize); 15 | __void __INTERNAL_FUNC__ FreeImmediateMemory(); 16 | __memory __INTERNAL_FUNC__ GetImmediate(__integer iValueSize); 17 | __void __INTERNAL_FUNC__ BackImmediate(__integer iValueSize); 18 | __void __INTERNAL_FUNC__ ResetImmediate(__memory pMemory, __integer iSize); 19 | 20 | #if defined(__cplusplus) 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libassembler/AssemblerParse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerParse.c -------------------------------------------------------------------------------- /libassembler/AssemblerParse.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ASSEMBLERPARSE_H__) 2 | #define __ASSEMBLERPARSE_H__ 3 | 4 | #include "AssemblerCommon.h" 5 | #include "AssemblerRelocation.h" 6 | #include "AssemblerEncoder.h" 7 | #include "AssemblerImmediateMemory.h" 8 | #include "AssemblerSymbolTable.h" 9 | #include "AssemblerHook.h" 10 | 11 | #if defined(__cplusplus) 12 | extern "C" 13 | { 14 | #endif 15 | 16 | __EXTERN__ __integer *g_pAsmTokenList; 17 | __EXTERN__ __integer g_iAsmTokenListIndex; 18 | __EXTERN__ __integer g_iAsmTokenListMaxCount; 19 | __EXTERN__ FPAssemblerHook g_pAssemblerHookFunc; 20 | __EXTERN__ __bool g_bCompilingError; 21 | __EXTERN__ __bool g_bLexAnalyzingError; 22 | __EXTERN__ PASM_OBJ *g_pCurrAsmObjPoint; 23 | __EXTERN__ PASM_OBJ g_pAsmObjList;//Assembler.c 24 | 25 | #define __PreFetcherToken__() *(int *)(g_pAsmTokenList + 1) 26 | #define __BackToken__() g_iAsmTokenIndex-- 27 | 28 | int yylex(); 29 | void yyerror(char const *pErrorMsg); 30 | __memory __INTERNAL_FUNC__ OutputToBin(PASM_OBJ pAsmObjList, __integer *pBinSize); 31 | 32 | #if defined(__cplusplus) 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /libassembler/AssemblerRelocation.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerRelocation.c -------------------------------------------------------------------------------- /libassembler/AssemblerRelocation.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ASSEMBLERRELOCATION_H__) 2 | #define __ASSEMBLERRELOCATION_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include "AssemblerCommon.h" 10 | #include "AssemblerSymbolTable.h" 11 | 12 | __void __INTERNAL_FUNC__ BuildAddrLabelInfo(PASM_OBJ pAsmObjList); 13 | __memory __INTERNAL_FUNC__ Relocation(__memory pBin, PASM_OBJ pAsmObjList, __integer iLoadBase); 14 | 15 | #if defined(__cplusplus) 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libassembler/AssemblerSymbolTable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/AssemblerSymbolTable.c -------------------------------------------------------------------------------- /libassembler/AssemblerSymbolTable.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ASSEMBLERSYMBOLTABLE_H__) 2 | #define __ASSEMBLERSYMBOLTABLE_H__ 3 | 4 | #include "AssemblerCommon.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __EXTERN__ __char **g_pSymbolList; 12 | __EXTERN__ __integer g_iSymbolNameMaxCount; 13 | 14 | __void __INTERNAL_FUNC__ BackSymbol(); 15 | __integer __INTERNAL_FUNC__ GetNowSymbolIndex(); 16 | __char * __INTERNAL_FUNC__ NextSymbol(); 17 | __void __INTERNAL_FUNC__ InitAsmerSymbolTable(__integer iSymbolNameLength, __integer iSymbolNameCount); 18 | PASMER_SYMBOL_NODE __INTERNAL_FUNC__ QuerySymbolFromTable(__char *pName); 19 | PASMER_SYMBOL_NODE __INTERNAL_FUNC__ AddSymbolToTable(__char *pName, __offset ofOffset, ASMER_SYMBOL_TYPE Type); 20 | __void __INTERNAL_FUNC__ DestoryAsmerSymbolTable(); 21 | 22 | #if defined(__cplusplus) 23 | } 24 | #endif 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /libassembler/Makefile.Debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/Makefile.Debug -------------------------------------------------------------------------------- /libassembler/libassembler.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/libassembler.vcproj -------------------------------------------------------------------------------- /libassembler/libassembler.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | 源文件 20 | 21 | 22 | 源文件 23 | 24 | 25 | 源文件 26 | 27 | 28 | 源文件 29 | 30 | 31 | 源文件 32 | 33 | 34 | 源文件 35 | 36 | 37 | 源文件 38 | 39 | 40 | 源文件 41 | 42 | 43 | 44 | 45 | 头文件 46 | 47 | 48 | 头文件 49 | 50 | 51 | 头文件 52 | 53 | 54 | 头文件 55 | 56 | 57 | 头文件 58 | 59 | 60 | 头文件 61 | 62 | 63 | 头文件 64 | 65 | 66 | 头文件 67 | 68 | 69 | 头文件 70 | 71 | 72 | 73 | 74 | 头文件 75 | 76 | 77 | 头文件 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /libassembler/old/Assembler.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/Assembler.cpp -------------------------------------------------------------------------------- /libassembler/old/Assembler.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/Assembler.h -------------------------------------------------------------------------------- /libassembler/old/AssemblerCompiling.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/AssemblerCompiling.cpp -------------------------------------------------------------------------------- /libassembler/old/AssemblerFillModrmSib.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/AssemblerFillModrmSib.cpp -------------------------------------------------------------------------------- /libassembler/old/AssemblerLinking.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/AssemblerLinking.cpp -------------------------------------------------------------------------------- /libassembler/old/AssemblerSymbolTable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/AssemblerSymbolTable.cpp -------------------------------------------------------------------------------- /libassembler/old/Encoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/Encoder.c -------------------------------------------------------------------------------- /libassembler/old/Encoder.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ENCODER_H__) 2 | #define __ENCODER_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include "AssemblerCommon.h" 10 | 11 | #define OPEX_NONE 0xFF 12 | 13 | __byte __INTERNAL_FUNC__ GetModRM(PASM_OBJ pAsmObj); 14 | __byte __INTERNAL_FUNC__ GetSIB(PASM_OBJ pAsmObj); 15 | __byte __INTERNAL_FUNC__ GetREX(PASM_OBJ pAsmObj); 16 | __integer __INTERNAL_FUNC__ MakeCode(PASM_OBJ pAsmObj, __byte bOpEx); 17 | 18 | #if defined(__cplusplus) 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libassembler/old/FPU.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/FPU.c -------------------------------------------------------------------------------- /libassembler/old/MMX.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/MMX.c -------------------------------------------------------------------------------- /libassembler/old/MacroSupport.h: -------------------------------------------------------------------------------- 1 | #if !defined(__MACROSUPPORT_H__) 2 | #define __MACROSUPPORT_H__ 3 | 4 | #define __new__(Type, Count) new Type [(Count)] 5 | #define __delete__(Pointer) delete [] (Pointer) 6 | 7 | #define __IsNegative8__(uNumber) ((unsigned char)(uNumber) >= 0x80) 8 | #define __IsNegative16__(uNumber) ((unsigned short)(uNumber) >= 0x8000) 9 | #define __IsNegative32__(uNumber) ((unsigned long)(uNumber) >= 0x80000000) 10 | 11 | #define __ToNegative__(uNumber) (~(uNumber) + 1) 12 | 13 | #define __Alig__(uNumber, Alignment) ((((uNumber) % (Alignment)) == 0) ? (uNumber) : ((uNumber) - ((uNumber) % (Alignment)) + (Alignment))) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /libassembler/old/SIMD.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/SIMD.c -------------------------------------------------------------------------------- /libassembler/old/SIMD~1.INS: -------------------------------------------------------------------------------- 1 | ADDPD 2 | ADDPS 3 | ADDSD 4 | ADDSS 5 | ADDSUBPD 6 | ADDSUBPS 7 | ANDPD 8 | ANDPS 9 | ANDNPD 10 | ANDNPS 11 | CMPPD 12 | CMPPS 13 | CMPSD 14 | CMPSS 15 | COMISD 16 | COMISS 17 | CVTDQ2PD 18 | CVTDQ2PS 19 | CVTPD2DQ 20 | CVTPD2PI 21 | CVTPD2PS 22 | CVTPI2PD 23 | CVTPI2PS 24 | CVTPS2DQ 25 | CVTPS2PD 26 | CVTPS2PI 27 | CVTSD2SI 28 | CVTSD2SS 29 | CVTSI2SD 30 | CVTSI2SS 31 | CVTSS2SD 32 | CVTSS2SI 33 | CVTTPD2PI 34 | CVTTPD2DQ 35 | CVTTPS2DQ 36 | CVTTPS2PI 37 | CVTTSD2SI 38 | CVTTSS2SI 39 | DIVPD 40 | DIVPS 41 | DIVSD 42 | DIVSS 43 | EMMS 44 | HADDPD 45 | HADDPS 46 | HSUBPD 47 | HSUBPS 48 | LDDQU 49 | MASKMOVDQU 50 | MASKMOVQ 51 | MAXPD 52 | MAXPS 53 | MAXSD 54 | MAXSS 55 | MINPD 56 | MINPS 57 | MINSD 58 | MINSS 59 | MOVAPD 60 | MOVAPS 61 | MOVD 62 | MOVQ 63 | MOVDDUP 64 | MOVDQA 65 | MOVDQU 66 | MOVDQ2Q 67 | MOVHLPS 68 | MOVHPD 69 | MOVHPS 70 | MOVLHPS 71 | MOVLPD 72 | MOVLPS 73 | MOVMSKPD 74 | MOVMSKPS 75 | MOVNTDQ 76 | MOVNTI 77 | MOVNTPD 78 | MOVNTPS 79 | MOVNTQ 80 | MOVQ 81 | MOVQ2DQ 82 | MOVSD 83 | MOVSHDUP 84 | MOVSLDUP 85 | MOVSS 86 | MOVUPD 87 | MOVUPS 88 | MULPD 89 | MULPS 90 | MULSD 91 | MULSS 92 | ORPD 93 | ORPS 94 | PABSB 95 | PABSW 96 | PABSD 97 | PACKSSWB 98 | PACKSSDW 99 | PACKUSWB 100 | PADDB 101 | PADDQ 102 | PADDSB 103 | PADDSW 104 | PADDUSB 105 | PADDUSW 106 | PALIGNR 107 | PAND 108 | PANDN 109 | PAUSE 110 | PAVGB 111 | PAVGW 112 | PCMPEQB 113 | PCMPEQW 114 | PCMPEQD 115 | PCMPGTB 116 | PCMPGTW 117 | PCMPGTD 118 | PEXTRW 119 | PHADDW 120 | PHADDD 121 | PHADDSW 122 | PHSUBW 123 | PHSUBD 124 | PHSUBSW 125 | PINSRW 126 | PMADDUBSW 127 | PMADDWD 128 | PMAXSW 129 | PMAXUB 130 | PMINSW 131 | PMINUB 132 | PMOVMSKB 133 | PMULHRSW 134 | PMULHUW 135 | PMULHW 136 | PMULLW 137 | PMULUDQ 138 | PSADBW 139 | PSHUFB 140 | PSHUFD 141 | PSHUFHW 142 | PSHUFLW 143 | PSHUFW 144 | PSIGNB 145 | PSIGNW 146 | PSIGND 147 | PSLLDQ 148 | PSLLW 149 | PSLLD 150 | PSLLQ 151 | PSRAW 152 | PSRAD 153 | PSRLDQ 154 | PSRLW 155 | PSRLD 156 | PSRLQ 157 | PSUBB 158 | PSUBW 159 | PSUBD 160 | PSUBQ 161 | PSUBSB 162 | PSUBSW 163 | PSUBUSB 164 | PSUBUSW 165 | PUNPCKHBW 166 | PUNPCKHWD 167 | PUNPCKHDQ 168 | PUNPCKHQDQ 169 | PUNPCKLBW 170 | PUNPCKLWD 171 | PUNPCKLDQ 172 | PUNPCKLQDQ 173 | PXOR 174 | RCPPS 175 | RCPSS 176 | RSQRTPS 177 | RSQRTSS 178 | SHUFPD 179 | SHUFPS 180 | SQRTPS 181 | SQRTSD 182 | SQRTSS 183 | SUBPD 184 | SUBPS 185 | SUBSD 186 | SUBSS 187 | UCOMISD 188 | UCOMISS 189 | UNPCKHPD 190 | UNPCKHPS 191 | UNPCKLPD 192 | UNPCKLPS 193 | XORPD 194 | XORPS 195 | -------------------------------------------------------------------------------- /libassembler/old/X86~1.INS: -------------------------------------------------------------------------------- 1 | AAA 2 | AAD 3 | AAM 4 | AAS 5 | ADC 6 | ADD 7 | AND 8 | ARPL 9 | BOUND 10 | BSF 11 | BSR 12 | BSWAP 13 | BT 14 | BTC 15 | BTR 16 | BTS 17 | CALL 18 | CBW 19 | CWDE 20 | CDQE 21 | CLC 22 | CLD 23 | CLFLUSH 24 | CLI 25 | CLTS 26 | CMC 27 | CMOVO 28 | CMOVNO 29 | CMOVB 30 | CMOVAE 31 | CMOVZ 32 | CMOVNZ 33 | CMOVBE 34 | CMOVA 35 | CMOVS 36 | CMOVNS 37 | CMOVP 38 | CMOVNP 39 | CMOVL 40 | CMOVGE 41 | CMOVLE 42 | CMOVG 43 | CMP 44 | CMPSB 45 | CMPSW 46 | CMPSD 47 | CMPSQ 48 | CMPXCHG 49 | CMPXCHG8B 50 | CPUID 51 | CWD 52 | CDQ 53 | CQO 54 | DAA 55 | DAS 56 | DEC 57 | DIV 58 | ENTER 59 | HLT 60 | IDIV 61 | IMUL 62 | IN 63 | INC 64 | INSB 65 | INSW 66 | INSD 67 | INT1 68 | INT3 69 | INT 70 | INTO 71 | INVD 72 | INVLPG 73 | IRETW 74 | IRETD 75 | IRETQ 76 | JO 77 | JNO 78 | JB 79 | JAE 80 | JZ 81 | JNZ 82 | JBE 83 | JA 84 | JS 85 | JNS 86 | JP 87 | JNP 88 | JL 89 | JGE 90 | JLE 91 | JG 92 | JCXZ 93 | JECXZ 94 | JRCXZ 95 | JMP 96 | LAHF 97 | LAR 98 | LDMXCSR 99 | LDS 100 | LES 101 | LFS 102 | LGS 103 | LSS 104 | LEA 105 | LEAVE 106 | LFENCE 107 | LGDT 108 | LIDT 109 | LLDT 110 | LMSW 111 | LOCK 112 | LODSB 113 | LODSW 114 | LODSD 115 | LODSQ 116 | LOOPNZ 117 | LOOPE 118 | LOOP 119 | LSL 120 | LTR 121 | MFENCE 122 | MONITOR 123 | MOV 124 | MOVSB 125 | MOVSW 126 | MOVSD 127 | MOVSQ 128 | MOVSX 129 | MOVSXD 130 | MOVZX 131 | MUL 132 | MWAIT 133 | NEG 134 | NOP 135 | NOT 136 | OR 137 | OUT 138 | OUTSB 139 | OUTSW 140 | OUTSD 141 | POP 142 | POPA 143 | POPAD 144 | POPF 145 | POPFD 146 | POPFQ 147 | POR 148 | PREFETCH 149 | PUSH 150 | PUSHA 151 | PUSHAD 152 | PUSHF 153 | PUSHFD 154 | RCL 155 | RCR 156 | ROL 157 | ROR 158 | RDMSR 159 | RDPMC 160 | RDTSC 161 | REP 162 | REPE 163 | REPZ 164 | REPNE 165 | REPNZ 166 | RET 167 | RSM 168 | SAHF 169 | SAL 170 | SAR 171 | SHL 172 | SHR 173 | SBB 174 | SCASB 175 | SCASW 176 | SCASD 177 | SCASQ 178 | SETO 179 | SETNO 180 | SETB 181 | SETNB 182 | SETZ 183 | SETNZ 184 | SETBE 185 | SETA 186 | SETS 187 | SETNS 188 | SETP 189 | SETNP 190 | SETL 191 | SETGE 192 | SETLE 193 | SETG 194 | SFENCE 195 | SGDT 196 | SHLD 197 | SHRD 198 | SIDT 199 | SLDT 200 | SMSW 201 | STC 202 | STD 203 | STI 204 | STMXCSR 205 | STOSB 206 | STOSW 207 | STOSD 208 | STOSQ 209 | STR 210 | SUB 211 | SWAPGS 212 | SYSCALL 213 | SYSENTER 214 | SYSEXIT 215 | SYSRET 216 | TEST 217 | UD2 218 | VERR 219 | VERW 220 | WAIT 221 | FWAIT 222 | WBINVD 223 | WRMSR 224 | XADD 225 | XCHG 226 | XLAT 227 | XLATB 228 | XOR -------------------------------------------------------------------------------- /libassembler/old/X87~1.INS: -------------------------------------------------------------------------------- 1 | F2XM1 2 | FABS 3 | FADD 4 | FADDP 5 | FIADD 6 | FBLD 7 | FBSTP 8 | FCHS 9 | FCLEX 10 | FNCLEX 11 | FCMOVB 12 | FCMOVE 13 | FCMOVBE 14 | FCMOVU 15 | FCMOVNB 16 | FCMOVNE 17 | FCMOVNBE 18 | FCMOVNU 19 | FCOMI 20 | FCOMIP 21 | FUCOMI 22 | FUCOMIP 23 | FCOS 24 | FDECSTP 25 | FDIV 26 | FDIVP 27 | FIDIV 28 | FDIVR 29 | FDIVRP 30 | FIDIVR 31 | FFREE 32 | FICOM 33 | FICOMP 34 | FILD 35 | FINCSTP 36 | FINIT 37 | FNINIT 38 | FIST 39 | FISTP 40 | FISTTP 41 | FLD 42 | FLD1 43 | FLDL2T 44 | FLDL2E 45 | FLDPI 46 | FLDLG2 47 | FLDLN2 48 | FLDZ 49 | FLDCW 50 | FLDENV 51 | FMUL 52 | FMULP 53 | FIMUL 54 | FNOP 55 | FPATAN 56 | FPREM 57 | FPREM1 58 | FPTAN 59 | FRNDINT 60 | FRSTOR 61 | FSAVE 62 | FNSAVE 63 | FSCALE 64 | FSIN 65 | FSINCOS 66 | FSQRT 67 | FST 68 | FSTP 69 | FSTCW 70 | FNSTCW 71 | FSTENV 72 | FNSTENV 73 | FSTSW 74 | FNSTSW 75 | FSUB 76 | FSUBP 77 | FISUB 78 | FSUBR 79 | FSUBRP 80 | FISUBR 81 | FTST 82 | FUCOM 83 | FUCOMP 84 | FUCOMPP 85 | FXAM 86 | FXCH 87 | FXRSTOR 88 | FXSAVE 89 | FXTRACT 90 | FYL2X 91 | FYL2XP1 92 | -------------------------------------------------------------------------------- /libassembler/old/liblogic/hashtree.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/hashtree.c -------------------------------------------------------------------------------- /libassembler/old/liblogic/hashtree.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/hashtree.h -------------------------------------------------------------------------------- /libassembler/old/liblogic/headfile.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/headfile.h -------------------------------------------------------------------------------- /libassembler/old/liblogic/linkedlist.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/linkedlist.c -------------------------------------------------------------------------------- /libassembler/old/liblogic/linkedlist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/linkedlist.h -------------------------------------------------------------------------------- /libassembler/old/liblogic/logic.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOGIC_V_1_0_H_ 2 | #define _LOGIC_V_1_0_H_ 3 | 4 | #include "linkedlist.h" 5 | #include "hashtree.h" 6 | #include "map.h" 7 | #include "pattern_matcher.h" 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /libassembler/old/liblogic/logicdbg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/logicdbg.c -------------------------------------------------------------------------------- /libassembler/old/liblogic/logicdbg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/logicdbg.h -------------------------------------------------------------------------------- /libassembler/old/liblogic/map.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/map.c -------------------------------------------------------------------------------- /libassembler/old/liblogic/map.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/map.h -------------------------------------------------------------------------------- /libassembler/old/liblogic/pattern_matcher.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/pattern_matcher.c -------------------------------------------------------------------------------- /libassembler/old/liblogic/pattern_matcher.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/pattern_matcher.h -------------------------------------------------------------------------------- /libassembler/old/liblogic/types.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/liblogic/types.h -------------------------------------------------------------------------------- /libassembler/old/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/main.cpp -------------------------------------------------------------------------------- /libassembler/old/x64Encoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/old/x64Encoder.c -------------------------------------------------------------------------------- /libassembler/old/x64Encoder.h: -------------------------------------------------------------------------------- 1 | #if !defined(__X64ENCODER_H__) 2 | #define __X64ENCODER_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #include "Encoder.h" 10 | 11 | __integer __INTERNAL_FUNC__ Encoder(PASM_OBJ pAsmObj, __memory pInstBuf); 12 | 13 | #if defined(__cplusplus) 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /libassembler/y.tab.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libassembler/y.tab.c -------------------------------------------------------------------------------- /libchaosvmath/ChaosVmAth.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmath/ChaosVmAth.c -------------------------------------------------------------------------------- /libchaosvmath/ChaosVmAth.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmath/ChaosVmAth.h -------------------------------------------------------------------------------- /libchaosvmath/ChaosVmAthDISAthSteps.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmath/ChaosVmAthDISAthSteps.c -------------------------------------------------------------------------------- /libchaosvmath/libchaosvmath.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmath/libchaosvmath.vcproj -------------------------------------------------------------------------------- /libchaosvmbcfile/ChaosVmByteCodeFile.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmbcfile/ChaosVmByteCodeFile.c -------------------------------------------------------------------------------- /libchaosvmbcfile/ChaosVmByteCodeFile.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmbcfile/ChaosVmByteCodeFile.h -------------------------------------------------------------------------------- /libchaosvmbcfile/libchaosvmbcfile.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmbcfile/libchaosvmbcfile.vcproj -------------------------------------------------------------------------------- /libchaosvmp/ChaosVmp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmp/ChaosVmp.c -------------------------------------------------------------------------------- /libchaosvmp/ChaosVmp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmp/ChaosVmp.h -------------------------------------------------------------------------------- /libchaosvmp/VmpThisInstruction.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmp/VmpThisInstruction.c -------------------------------------------------------------------------------- /libchaosvmp/libchaosvmp.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libchaosvmp/libchaosvmp.vcproj -------------------------------------------------------------------------------- /libcommon/Common.h: -------------------------------------------------------------------------------- 1 | #if !defined(__COMMON_H__) 2 | #define __COMMON_H__ 3 | 4 | #include "Configure.h" 5 | #include "TypeDef.h" 6 | #include "Endian.h" 7 | #include "LogicExcept.h" 8 | #include "PrintDbgInfo.h" 9 | #include "MemoryOperate.h" 10 | #include "LogicCrt.h" 11 | #include "PrintError.h" 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /libcommon/Configure.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CONFIGURE_H__) 2 | #define __CONFIGURE_H__ 3 | 4 | #include "xConfigure.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | #if defined(__cplusplus) 12 | #define __EXTERN__ extern "C" 13 | #else 14 | #define __EXTERN__ extern 15 | #endif 16 | 17 | #if defined(_MSC_VER) 18 | #define __INLINE__ __inline 19 | #define __API__ __stdcall 20 | #define __INTERNAL_FUNC__ __cdecl 21 | #define __FASTCALL__ __fastcall 22 | #define __NAKED__ __declspec(naked) 23 | #define __EXPORT__ extern __declspec(dllexport) 24 | #define __STATIC__ static 25 | #define __NEED_EXPORT__ 26 | #else 27 | #define __INLINE__ __inline 28 | #define __API__ __stdcall 29 | #define __INTERNAL_FUNC__ __stdcall 30 | #define __FASTCALL__ __fastcall 31 | #define __NAKED__ __declspec(naked) 32 | #define __EXPORT__ __declspec(naked) 33 | #define __STATIC__ static 34 | #define __NEED_EXPORT__ 35 | #endif 36 | 37 | #define __REGISTER__ register 38 | 39 | #if !defined( __GNUC__ ) && (defined( __MSDOS__ ) || defined( __WIN16__ )) 40 | #define __CONST__ const far 41 | #else 42 | #define __CONST__ const 43 | #endif 44 | 45 | #if defined(_MSC_VER) 46 | #define __ALIGN__(Alignment) __declspec(align(Alignment)) 47 | #else 48 | #define __ALIGN__() 49 | #endif 50 | 51 | #if defined(__cplusplus) 52 | } 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /libcommon/Endian.c: -------------------------------------------------------------------------------- 1 | #include "Endian.h" 2 | 3 | #if defined(__cplusplus) 4 | extern "C" 5 | { 6 | #endif 7 | 8 | __word __INTERNAL_FUNC__ MirrorWord(__word x) { 9 | return (x << 8) | (x >> 8); 10 | } 11 | 12 | __dword __INTERNAL_FUNC__ MirrorDword(__dword x) { 13 | __dword n = (__byte) x; 14 | n <<= 8; n |= (__byte)(x >> 8); 15 | n <<= 8; n |= (__byte)(x >> 16); 16 | return (n << 8) | (__byte)(x >> 24); 17 | } 18 | 19 | __qword __INTERNAL_FUNC__ MirrorQword(__qword x) { 20 | __qword n = (__byte) x; 21 | n <<= 8; n |= (__byte)(x >> 8); 22 | n <<= 8; n |= (__byte)(x >> 16); 23 | n <<= 8; n |= (__byte)(x >> 24); 24 | n <<= 8; n |= (__byte)(x >> 32); 25 | n <<= 8; n |= (__byte)(x >> 40); 26 | n <<= 8; n |= (__byte)(x >> 48); 27 | return (n << 8) | (__byte)(x >> 56); 28 | } 29 | 30 | #if defined(__cplusplus) 31 | } 32 | #endif -------------------------------------------------------------------------------- /libcommon/Endian.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ENDIAN_H__) 2 | #define __ENDIAN_H__ 3 | 4 | #include "Configure.h" 5 | #include "TypeDef.h" 6 | 7 | #if defined(__cplusplus) 8 | extern "C" 9 | { 10 | #endif 11 | 12 | #define __IS_LITTLE_ENDIAN__ 13 | //#define __IS_BIG_ENDIAN__ 14 | 15 | #if defined(__IS_LITTLE_ENDIAN__) 16 | #if !defined(__LITTLE_ENDIAN__) 17 | #define __LITTLE_ENDIAN__ 1234 18 | #endif 19 | 20 | #if !defined(__BYTE_ORDER__) 21 | #define __BYTE_ORDER__ __LITTLE_ENDIAN__ 22 | #endif 23 | 24 | #elif defined(__IS_BIG_ENDIAN__) 25 | #if !defined(__BIG_ENDIAN__) 26 | #define __BIG_ENDIAN__ 4321 27 | #endif 28 | 29 | #if !defined(__BYTE_ORDER__) 30 | #define __BYTE_ORDER__ __BIG_ENDIAN__ 31 | #endif 32 | 33 | #endif 34 | 35 | #if __BYTE_ORDER__ == __BIG_ENDIAN__ 36 | #define __LE16__(x) MirrorBytes16(x) 37 | #define __LE32__(x) MirrorBytes32(x) 38 | #define __LE64__(x) MirrorBytes64(x) 39 | #else 40 | #define __LE16__(x) (x) 41 | #define __LE32__(x) (x) 42 | #define __LE64__(x) (x) 43 | #endif 44 | 45 | #if __BYTE_ORDER__ == __LITTLE_ENDIAN__ 46 | #define __BE16__(x) MirrorWord(x) 47 | #define __BE32__(x) MirrorDword(x) 48 | #define __BE64__(x) MirrorQword(x) 49 | #else 50 | #define __BE16__(x) (x) 51 | #define __BE32__(x) (x) 52 | #define __BE64__(x) (x) 53 | #endif 54 | 55 | __word __INTERNAL_FUNC__ MirrorWord(__word x); 56 | __dword __INTERNAL_FUNC__ MirrorDword(__dword x); 57 | __qword __INTERNAL_FUNC__ MirrorQword(__qword x); 58 | 59 | #if defined(__cplusplus) 60 | } 61 | #endif 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /libcommon/LogicCrt.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcommon/LogicCrt.c -------------------------------------------------------------------------------- /libcommon/LogicCrt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcommon/LogicCrt.h -------------------------------------------------------------------------------- /libcommon/LogicExcept.h: -------------------------------------------------------------------------------- 1 | #if !defined(__LOGICEXCEPT_H__) 2 | #define __LOGICEXCEPT_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #define __EXCEPTION_EXECUTE_HANDLER__ 1 10 | #define __EXCEPTION_CONTINUE_SEARCH__ 0 11 | #define __EXCEPTION_CONTINUE_EXECUTION__ -1 12 | 13 | #if defined(__cplusplus) 14 | } 15 | #endif 16 | 17 | #endif -------------------------------------------------------------------------------- /libcommon/MemoryOperate.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcommon/MemoryOperate.c -------------------------------------------------------------------------------- /libcommon/MemoryOperate.h: -------------------------------------------------------------------------------- 1 | #if !defined(__DYNAMICARRAY_H__) 2 | #define __DYNAMICARRAY_H__ 3 | 4 | #include "Configure.h" 5 | #include "TypeDef.h" 6 | #include "LogicCrt.h" 7 | 8 | #if defined(__cplusplus) 9 | extern "C" 10 | { 11 | #endif 12 | 13 | #define __MemPut64Bits__(MemPtr, Data)\ 14 | *(MemPtr)++ = (__byte)(((Data) >> 56) & 0xFF),\ 15 | *(MemPtr)++ = (__byte)(((Data) >> 48) & 0xFF),\ 16 | *(MemPtr)++ = (__byte)(((Data) >> 40) & 0xFF),\ 17 | *(MemPtr)++ = (__byte)(((Data) >> 32) & 0xFF),\ 18 | *(MemPtr)++ = (__byte)(((Data) >> 24) & 0xFF),\ 19 | *(MemPtr)++ = (__byte)(((Data) >> 16) & 0xFF),\ 20 | *(MemPtr)++ = (__byte)(((Data) >> 8) & 0xFF),\ 21 | *(MemPtr)++ = (__byte)((Data) & 0xFF) 22 | 23 | #define __MemPut32Bits__(MemPtr, Data)\ 24 | *(MemPtr)++ = (__byte)(((Data) >> 24) & 0xFF),\ 25 | *(MemPtr)++ = (__byte)(((Data) >> 16) & 0xFF),\ 26 | *(MemPtr)++ = (__byte)(((Data) >> 8) & 0xFF),\ 27 | *(MemPtr)++ = (__byte)((Data) & 0xFF) 28 | 29 | #define __MemPut16Bits__(MemPtr, Data)\ 30 | *(MemPtr)++ = (__byte)(((Data) >> 8) & 0xFF),\ 31 | *(MemPtr)++ = (__byte)((Data) & 0xFF) 32 | 33 | #define __MemPut8Bits__(MemPtr, Data)\ 34 | *(MemPtr)++ = (__byte)Data 35 | 36 | #define __MemGet64Bits__(MemPtr)\ 37 | ((MemPtr) += 8, ((__qword)(MemPtr)[-8] << 56) | ((__qword)(MemPtr)[-7] << 48) |\ 38 | ((__qword)(MemPtr)[-6] << 40) | ((__qword)(MemPtr)[-5] << 32) |\ 39 | ((__qword)(MemPtr)[-4] << 24 ) | ((__qword)(MemPtr)[-3] << 16) |\ 40 | ((__qword)(MemPtr)[-2] << 8 ) | (__qword)(MemPtr)[-1]) 41 | 42 | #define __MemGet32Bits__(MemPtr)\ 43 | ((MemPtr) += 4, ((__dword)(MemPtr)[-4] << 24) | ((__dword)(MemPtr)[-3] << 16) |\ 44 | ((__dword)(MemPtr)[-2] << 8) | (__dword)(MemPtr)[-1]) 45 | 46 | #define __MemGet16Bits__(MemPtr)\ 47 | ((MemPtr) += 2, (__word)(MemPtr)[-2] << 8) | ((__word)(MemPtr)[-1]) 48 | 49 | #define __MemGet8Bits__(MemPtr)\ 50 | ((__byte) *(MemPtr)++) 51 | 52 | #define __ToBytePtr__(MemPtr) (__byte *)(MemPtr) 53 | #define __ToWordPtr__(MemPtr) (__word *)(MemPtr) 54 | #define __ToDwordPtr__(MemPtr) (__dword *)(MemPtr) 55 | #define __ToQwordPtr__(MemPtr) (__qword *)(MemPtr) 56 | #define __ToFloatPtr__(MemPtr) (__float *)(MemPtr) 57 | #define __ToDoublePtr__(MemPtr) (__double *)(MemPtr) 58 | 59 | #define __ToCharPtr__(MemPtr) (__char *)(MemPtr) 60 | #define __TosWordPtr__(MemPtr) (__sword *)(MemPtr) 61 | #define __TosDwordPtr__(MemPtr) (__sdword *)(MemPtr) 62 | #define __TosQwordPtr__(MemPtr) (__sqword *)(MemPtr) 63 | #define __TosFloatPtr__(MemPtr) (__sfloat *)(MemPtr) 64 | #define __TosDoublePtr__(MemPtr) (__sdouble *)(MemPtr) 65 | 66 | #define __ToIntegerPtr__(MemPtr) (__integer *)(MemPtr) 67 | 68 | __integer __INTERNAL_FUNC__ InputValueToMemory(__memory *pMemoryPoint, __integer iPoint, __memory pValue, __integer iValueSize); 69 | __memory __INTERNAL_FUNC__ GetValueFormMemory(__memory pMemory, __integer iPoint, __integer iValueSize); 70 | 71 | #if defined(__cplusplus) 72 | } 73 | #endif 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /libcommon/PrintDbgInfo.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcommon/PrintDbgInfo.c -------------------------------------------------------------------------------- /libcommon/PrintError.c: -------------------------------------------------------------------------------- 1 | #include "PrintError.h" 2 | #include 3 | #include 4 | __void __INTERNAL_FUNC__ LogicPrintError(__char *szMsg, __integer iErrNo, __integer iLine, __char *szFile) { 5 | __char DebugBuffer[1024] = {0}; 6 | sprintf(DebugBuffer,"%s(%d):%s Error[%d]\n", szFile, iLine, szMsg, iErrNo); 7 | OutputDebugStringA(DebugBuffer); 8 | } 9 | -------------------------------------------------------------------------------- /libcommon/PrintError.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PRINTERROR_H__) 2 | #define __PRINTERROR_H__ 3 | 4 | #include "TypeDef.h" 5 | #include "Configure.h" 6 | 7 | #if defined(__cplusplus) 8 | extern "C" 9 | { 10 | #endif 11 | 12 | __void __INTERNAL_FUNC__ LogicPrintError(__char *szMsg, __integer iErrNo, __integer iLine, __char *szFile); 13 | 14 | #define __LogicPrintError__(Msg, ErrNo) LogicPrintError((__char *)(Msg), (__integer)(ErrNo), (__integer)__LINE__, (__char *)__FILE__) 15 | 16 | #if defined(__cplusplus) 17 | } 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /libcommon/TypeDef.h: -------------------------------------------------------------------------------- 1 | #if !defined(__TYPEDEF_H__) 2 | #define __TYPEDEF_H__ 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | #define __BYTES_PER_KB__ 1024LL 10 | #define __BYTES_PER_MB__ 1048576LL 11 | #define __BYTES_PER_GB__ 1073741824LL 12 | #define __BYTES_PER_TB__ 1099511627776LL 13 | #define __BYTES_PER_PB__ 1125899906842624LL 14 | 15 | #ifdef _MSC_VER 16 | typedef signed __int8 __char; 17 | typedef signed __int16 __sword; 18 | typedef signed __int32 __sdword; 19 | typedef signed __int64 __sqword; 20 | 21 | typedef unsigned __int8 __byte; 22 | typedef unsigned __int16 __word; 23 | typedef unsigned __int32 __dword; 24 | typedef unsigned __int64 __qword; 25 | 26 | #else //! _MSC_VER 27 | #include 28 | #include 29 | typedef char __char; 30 | typedef short __sword; 31 | typedef long __sdword; 32 | typedef long long __sqword; 33 | 34 | typedef unsigned char __byte; 35 | typedef unsigned short __word; 36 | typedef unsigned long __dword; 37 | typedef unsigned long long __qword; 38 | #endif 39 | 40 | typedef float __float; 41 | typedef double __double; 42 | 43 | typedef __byte __bool; 44 | #if !defined(TRUE) 45 | #define TRUE 1 46 | #endif 47 | 48 | #if !defined(FALSE) 49 | #define FALSE 0 50 | #endif 51 | 52 | typedef void __void; 53 | typedef __byte* __memory; 54 | typedef __word __wchar; 55 | 56 | #if defined(_UNICODE) 57 | #define __tchar __wchar 58 | #else 59 | #define __tchar __char 60 | #endif 61 | 62 | #define __MAX_BYTE_SIZE__ 0xFF 63 | #define __MAX_WORD_SIZE__ 0xFFFF 64 | #define __MAX_DWORD_SIZE__ 0xFFFFFFFF 65 | #define __MAX_QWORD_SIZE__ 0xFFFFFFFFFFFFFFFF 66 | #define __MAX_FLOAT_SIZE__ 0xFFFFFFFF 67 | #define __MAX_DOUBLE_SIZE__ 0xFFFFFFFFFFFFFFFF 68 | 69 | #if defined(__X64__) 70 | typedef __qword __time; 71 | typedef __qword __address; 72 | typedef __qword __offset; 73 | typedef __qword __integer; 74 | typedef __sqword __sinteger; 75 | #define __MAX_INTEGER_SIZE__ 0xFFFFFFFFFFFFFFFF 76 | #else 77 | typedef __dword __time; 78 | typedef __dword __address; 79 | typedef __dword __offset; 80 | typedef __dword __integer; 81 | typedef __sdword __sinteger; 82 | #define __MAX_INTEGER_SIZE__ 0xFFFFFFFF 83 | #endif 84 | 85 | #define __IsNegative8__(uNumber) ((unsigned char)(uNumber) >= 0x80) 86 | #define __IsNegative16__(uNumber) ((unsigned short)(uNumber) >= 0x8000) 87 | #define __IsNegative32__(uNumber) ((unsigned long)(uNumber) >= 0x80000000) 88 | #define __IsNegative64__(uNumber) ((unsigned long)(uNumber) >= 0x8000000000000000) 89 | 90 | #define __ToNegative__(uNumber) (~(uNumber) + 1) 91 | 92 | #define __DEF_ALIGN__ sizeof(__integer) 93 | 94 | #define __Is_Align__(uNumber, Alignment)\ 95 | ((uNumber) < (Alignment) ? 0:\ 96 | (((uNumber) % (Alignment)) == 0)) 97 | 98 | #define __Alig__(uNumber, Alignment)\ 99 | ((uNumber) < (Alignment) ? (Alignment) :\ 100 | (uNumber) % (Alignment) == 0 ? (uNumber) :\ 101 | (uNumber) - (uNumber) % (Alignment) + (Alignment)) 102 | 103 | #define __CountOf__(Type, Size) ((Size) / sizeof(Type)) 104 | 105 | #if !defined(NULL) 106 | #define NULL 0 107 | #endif 108 | 109 | #if !defined(_T) 110 | #define _T(x) L ## x 111 | #endif 112 | 113 | #define __MakeWord__(a, b) ((__word)(((__byte)(((__dword *)(a)) & 0xff)) | ((__word)((__byte)(((__dword)(b)) & 0xff))) << 8)) 114 | #define __MakeDword__(a, b) ((__dword)(((__word)(((__dword *)(a)) & 0xffff)) | ((__dword)((__word)(((__dword)(b)) & 0xffff))) << 16)) 115 | #define __LoWord__(l) ((__word)(((__dword)(l)) & 0xffff)) 116 | #define __HiWord__(l) ((__word)((((__dword)(l)) >> 16) & 0xffff)) 117 | #define __LoByte__(w) ((__byte)(((__dword)(w)) & 0xff)) 118 | #define __HiByte__(w) ((__byte)((((__dword)(w)) >> 8) & 0xff)) 119 | 120 | #if defined(__cplusplus) 121 | } 122 | #endif 123 | 124 | #endif 125 | -------------------------------------------------------------------------------- /libcommon/libcommon.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcommon/libcommon.vcproj -------------------------------------------------------------------------------- /libcrypto/crc.h: -------------------------------------------------------------------------------- 1 | #if !defined(__CRC_H__) 2 | #define __CRC_H__ 3 | 4 | #include "Common.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | #define UPDC32(octet, crc)\ 12 | (__dword)((crc_32_tab[(((__dword)(crc)) ^ ((__byte)(octet))) & 0xff] ^ (((__dword)(crc)) >> 8))) 13 | 14 | __dword __API__ crc32(__memory data, __integer length); 15 | __dword __API__ crc32int(__dword *data); 16 | __bool __API__ crc32_selftests (); 17 | 18 | extern __dword crc_32_tab[]; 19 | 20 | #if defined(__cplusplus) 21 | } 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /libcrypto/lcrypto.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcrypto/lcrypto.c -------------------------------------------------------------------------------- /libcrypto/lcrypto.h: -------------------------------------------------------------------------------- 1 | #if !defined(__LCRYPTO_H__) 2 | #define __LCRYPTO_H__ 3 | 4 | #include "crc.h" 5 | #include "xor.h" 6 | 7 | #if defined(__cplusplus) 8 | extern "C" 9 | { 10 | #endif 11 | 12 | __integer __API__ EuclidAlgorithm(__integer m, __integer n); 13 | __integer __API__ EuclidAlgorithmEx(__integer m, __integer n, __integer *pa, __integer *pb); 14 | 15 | #if defined(__cplusplus) 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libcrypto/libcrypto.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcrypto/libcrypto.vcproj -------------------------------------------------------------------------------- /libcrypto/xor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libcrypto/xor.c -------------------------------------------------------------------------------- /libcrypto/xor.h: -------------------------------------------------------------------------------- 1 | #if !defined(__XOR_H__) 2 | #define __XOR_H__ 3 | 4 | #include "Common.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __dword __API__ PolyXorKey(__dword dwKey); 12 | __void __API__ XorArray(__dword dwKey, __memory pPoint, __memory pOut, __integer iLength); 13 | __void __API__ XorCoder(__memory pKey, __memory pBuffer, __integer iLength); 14 | __void __API__ XorKey32Bits(__dword dwKeyContext, __memory pKey, __integer iKeyLength); 15 | 16 | #if defined(__cplusplus) 17 | } 18 | #endif 19 | 20 | #endif -------------------------------------------------------------------------------- /libdetours/detoured.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Presence of this DLL (detoured.dll) marks a process as detoured. 4 | // 5 | // Microsoft Research Detours Package, Version 2.1. 6 | // 7 | // Copyright (c) Microsoft Corporation. All rights reserved. 8 | // 9 | 10 | #include 11 | #include "detoured.h" 12 | 13 | static HMODULE s_hDll; 14 | 15 | HMODULE WINAPI Detoured() 16 | { 17 | return s_hDll; 18 | } 19 | 20 | VOID WINAPI SetDetourModule(HMODULE hModule) 21 | { 22 | s_hDll = hModule; 23 | } 24 | 25 | 26 | //BOOL WINAPI DllMain(HINSTANCE hinst, DWORD dwReason, LPVOID reserved) 27 | //{ 28 | // (void)reserved; 29 | // 30 | // if (dwReason == DLL_PROCESS_ATTACH) { 31 | // s_hDll = hinst; 32 | // DisableThreadLibraryCalls(hinst); 33 | // } 34 | // return TRUE; 35 | //} 36 | 37 | // 38 | ///////////////////////////////////////////////////////////////// End of File. 39 | -------------------------------------------------------------------------------- /libdetours/detoured.h: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Presence of this DLL (detoured.dll) marks a process as detoured. 4 | // 5 | // Microsoft Research Detours Package, Version 2.1. 6 | // 7 | // Copyright (c) Microsoft Corporation. All rights reserved. 8 | // 9 | 10 | HMODULE WINAPI Detoured(); 11 | VOID WINAPI SetDetourModule(HMODULE hModule); 12 | 13 | // 14 | ///////////////////////////////////////////////////////////////// End of File. 15 | -------------------------------------------------------------------------------- /libdetours/libdetours.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdetours/libdetours.vcproj -------------------------------------------------------------------------------- /libdis/DISDNA.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISDNA.h -------------------------------------------------------------------------------- /libdis/DISEntry.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISEntry.c -------------------------------------------------------------------------------- /libdis/DISEntryInDll.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISEntryInDll.c -------------------------------------------------------------------------------- /libdis/DISError.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISError.h -------------------------------------------------------------------------------- /libdis/DISExFunctions.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | #if defined(__CHAOSVM_DIS__) 10 | #elif defined(__POWER_PROTECTER_DIS__) 11 | #elif defined(__Y_IMPORT_TABLE_DIS__) 12 | #else 13 | #endif 14 | -------------------------------------------------------------------------------- /libdis/DISKernel.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISKernel.c -------------------------------------------------------------------------------- /libdis/DISKernel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISKernel.h -------------------------------------------------------------------------------- /libdis/DISSteps.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/DISSteps.h -------------------------------------------------------------------------------- /libdis/libdis.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdis/libdis.vcproj -------------------------------------------------------------------------------- /libdisath/DISAth.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdisath/DISAth.c -------------------------------------------------------------------------------- /libdisath/DISAth.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdisath/DISAth.h -------------------------------------------------------------------------------- /libdisath/DISAthError.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdisath/DISAthError.h -------------------------------------------------------------------------------- /libdisath/DISAthSteps.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdisath/DISAthSteps.h -------------------------------------------------------------------------------- /libdisath/libdisath.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libdisath/libdisath.vcproj -------------------------------------------------------------------------------- /liblogic/array.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/array.c -------------------------------------------------------------------------------- /liblogic/array.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/array.h -------------------------------------------------------------------------------- /liblogic/hashtree.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/hashtree.c -------------------------------------------------------------------------------- /liblogic/hashtree.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/hashtree.h -------------------------------------------------------------------------------- /liblogic/headfile.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/headfile.h -------------------------------------------------------------------------------- /liblogic/liblogic.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/liblogic.vcproj -------------------------------------------------------------------------------- /liblogic/linkedlist.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/linkedlist.c -------------------------------------------------------------------------------- /liblogic/linkedlist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/linkedlist.h -------------------------------------------------------------------------------- /liblogic/logic.h: -------------------------------------------------------------------------------- 1 | #if !defined(__LOGIC_H__) 2 | #define __LOGIC_H__ 3 | 4 | #include "linkedlist.h" 5 | #include "hashtree.h" 6 | #include "map.h" 7 | #include "pattern_matcher.h" 8 | #include "stack.h" 9 | #include "array.h" 10 | #include "mp.h" 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /liblogic/logicdbg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/logicdbg.c -------------------------------------------------------------------------------- /liblogic/logicdbg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/logicdbg.h -------------------------------------------------------------------------------- /liblogic/map.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/map.c -------------------------------------------------------------------------------- /liblogic/map.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/map.h -------------------------------------------------------------------------------- /liblogic/mp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/mp.c -------------------------------------------------------------------------------- /liblogic/mp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/mp.h -------------------------------------------------------------------------------- /liblogic/pattern_matcher.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/pattern_matcher.c -------------------------------------------------------------------------------- /liblogic/pattern_matcher.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/pattern_matcher.h -------------------------------------------------------------------------------- /liblogic/stack.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/stack.c -------------------------------------------------------------------------------- /liblogic/stack.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/stack.h -------------------------------------------------------------------------------- /liblogic/util.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/liblogic/util.c -------------------------------------------------------------------------------- /libpowerprotecter/PowerProtecter.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecter/PowerProtecter.c -------------------------------------------------------------------------------- /libpowerprotecter/PowerProtecter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecter/PowerProtecter.h -------------------------------------------------------------------------------- /libpowerprotecter/PowerProtecterTestEFlag.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecter/PowerProtecterTestEFlag.c -------------------------------------------------------------------------------- /libpowerprotecter/PowerProtecterThunkCoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecter/PowerProtecterThunkCoder.c -------------------------------------------------------------------------------- /libpowerprotecter/libpowerprotecter.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecter/libpowerprotecter.vcproj -------------------------------------------------------------------------------- /libpowerprotecterath/PowerProtecterAth.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecterath/PowerProtecterAth.c -------------------------------------------------------------------------------- /libpowerprotecterath/PowerProtecterAth.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecterath/PowerProtecterAth.h -------------------------------------------------------------------------------- /libpowerprotecterath/PowerProtecterThunkCoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecterath/PowerProtecterThunkCoder.c -------------------------------------------------------------------------------- /libpowerprotecterath/libpowerprotecterath.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libpowerprotecterath/libpowerprotecterath.vcproj -------------------------------------------------------------------------------- /libprototype/CipherExpGen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libprototype/CipherExpGen.c -------------------------------------------------------------------------------- /libprototype/MathExpGen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libprototype/MathExpGen.c -------------------------------------------------------------------------------- /libprototype/MathExpGen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libprototype/MathExpGen.h -------------------------------------------------------------------------------- /libprototype/ProtoType.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libprototype/ProtoType.c -------------------------------------------------------------------------------- /libprototype/ProtoType.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PROTOTYPE_H__) 2 | #define __PROTOTYPE_H__ 3 | 4 | #include "Common.h" 5 | #include "Assembler.h" 6 | #include "RandRoll.h" 7 | #include "ProtoTypeConfigure.h" 8 | #include "MathExpGen.h" 9 | 10 | #if defined(__cplusplus) 11 | extern "C" 12 | { 13 | #endif 14 | 15 | 16 | 17 | #if defined(__cplusplus) 18 | } 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /libprototype/ProtoTypeConfigure.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libprototype/ProtoTypeConfigure.h -------------------------------------------------------------------------------- /libprototype/libprototype.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libprototype/libprototype.vcproj -------------------------------------------------------------------------------- /libprototype/libprototype.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 15 | 16 | 17 | 18 | 19 | 源文件 20 | 21 | 22 | 源文件 23 | 24 | 25 | 源文件 26 | 27 | 28 | 29 | 30 | 头文件 31 | 32 | 33 | 头文件 34 | 35 | 36 | 头文件 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /libsupport/DllLoaderPrivate.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/DllLoaderPrivate.c -------------------------------------------------------------------------------- /libsupport/IconEx.h: -------------------------------------------------------------------------------- 1 | typedef struct tagHEADER { 2 | __word idReserved; 3 | __word idType; 4 | __word idCount; 5 | }HEADER, *LPHEADER; 6 | 7 | typedef struct tagICONDIRENTRY { 8 | __byte bWidth; 9 | __byte bHeight; 10 | __byte bColorCount; 11 | __byte bReserved; 12 | __word wPlanes; 13 | __word wBitCount; 14 | __dword dwBytesInRes; 15 | __dword dwImageOffset; 16 | } ICONDIRENTRY, *LPICONDIRENTRY; 17 | 18 | #pragma pack( push ) 19 | #pragma pack( 2 ) 20 | typedef struct tagGRPICONDIRENTRY { 21 | __byte bWidth; 22 | __byte bHeight; 23 | __byte bColorCount; 24 | __byte bReserved; 25 | __word wPlanes; 26 | __word wBitCount; 27 | __dword dwBytesInRes; 28 | __word nID; 29 | } GRPICONDIRENTRY, *LPGRPICONDIRENTRY;; 30 | 31 | typedef struct tagGRPICONDIR { 32 | __word idReserved; 33 | __word idType; 34 | __word idCount; 35 | GRPICONDIRENTRY idEntries[1]; 36 | }GRPICONDIR, *LPGRPICONDIR; 37 | #pragma pack( pop ) 38 | -------------------------------------------------------------------------------- /libsupport/ImpTblProtecter.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/ImpTblProtecter.c -------------------------------------------------------------------------------- /libsupport/ImpTblProtecter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/ImpTblProtecter.h -------------------------------------------------------------------------------- /libsupport/Misc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/Misc.c -------------------------------------------------------------------------------- /libsupport/Misc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/Misc.h -------------------------------------------------------------------------------- /libsupport/OptResource.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/OptResource.c -------------------------------------------------------------------------------- /libsupport/OptResource.h: -------------------------------------------------------------------------------- 1 | __bool __API__ DecompressFile(HMODULE hModule, __word wResourceID, __tchar *theResourceName, __tchar *theExName, __tchar *theType); 2 | __memory __API__ GetResourcePoint(HMODULE hModule, __word wResourceID, __tchar *theType, __integer *piResourceSize); 3 | __memory __API__ MapResourceData(HMODULE hModule, __word wResourceID, __tchar *theType, __integer *piResourceSize); 4 | __memory __API__ MapResourceDataEx(HMODULE hModule, __word wResourceID, __tchar *theType, __integer *piResourceSize, __dword dwKey); 5 | __memory __API__ MapResourceDataPlusNewSize(__memory pMap, __integer iOldSize, __integer iNewPlusSize); 6 | __memory __API__ MapResourceDataSubNewSize(__memory pMap, __integer iOldSize, __integer iSubSize); 7 | __void __API__ UnMapResourceData(__memory pMap); 8 | __bool __API__ UnMapResourceDataToFile(__tchar *pFilePath, __memory pMap, __integer iMapSize); 9 | -------------------------------------------------------------------------------- /libsupport/PeDiy.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/PeDiy.c -------------------------------------------------------------------------------- /libsupport/PeDiy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/PeDiy.h -------------------------------------------------------------------------------- /libsupport/ProcedureRelocation.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/ProcedureRelocation.c -------------------------------------------------------------------------------- /libsupport/ProcedureRelocation.h: -------------------------------------------------------------------------------- 1 | __address __API__ CalcTargetAddress(__byte bSize, __address addrNowAddress, __offset ofOffset, __integer iInstLen, __bool bUp); 2 | __offset __API__ CalcCurrOffsetFromAddress(__byte bSize, __address addrTargetAddress, __address addrNowAddress, __integer iInstLen); 3 | __integer __API__ SimpleCalcThisProcedureLength(__memory pProcedure); 4 | __memory __API__ RelocationThisProcedure(__memory pProcedure, __memory pOrigProcedureAddress, __integer iProcedureSize); -------------------------------------------------------------------------------- /libsupport/RandRoll.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/RandRoll.c -------------------------------------------------------------------------------- /libsupport/RandRoll.h: -------------------------------------------------------------------------------- 1 | #if !defined(__RANDROLL_H__) 2 | #define __RANDROLL_H__ 3 | 4 | #include "Common.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __dword __INTERNAL_FUNC__ GetRandDword(); 12 | __bool __INTERNAL_FUNC__ RollIt(__bool *pInBoolArray); 13 | __void __INTERNAL_FUNC__ MakeRandArray(__bool *pOutBoolArray, __dword dwSeed); 14 | 15 | #if defined(__cplusplus) 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libsupport/RefixTlsPrivate.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/RefixTlsPrivate.c -------------------------------------------------------------------------------- /libsupport/Support.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/Support.h -------------------------------------------------------------------------------- /libsupport/VolumeInfo.c: -------------------------------------------------------------------------------- 1 | #include "VolumeInfo.h" 2 | #include 3 | #include 4 | 5 | #pragma comment(lib, "setupapi.lib") 6 | 7 | __bool __API__ IsReMovableDrive(__tchar *lpDev) { 8 | if (GetDriveType(lpDev) == DRIVE_REMOVABLE) 9 | return TRUE; 10 | return FALSE; 11 | } 12 | 13 | __dword __API__ GetVolumeSerialNumber(__tchar *lpVolumeName) { 14 | __dword dwVolumeSerialNumber = 0; 15 | if (GetVolumeInformation(lpVolumeName, NULL, 0, (__dword *)&dwVolumeSerialNumber, NULL, NULL, NULL, 0)) 16 | return dwVolumeSerialNumber; 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /libsupport/VolumeInfo.h: -------------------------------------------------------------------------------- 1 | #if !defined(__VOLUMEINFO_H__) 2 | #define __VOLUMEINFO_H__ 3 | 4 | #include "Common.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | #define __MAX_VOLUME_INFO_BUF_SIZE__ 256 12 | 13 | __bool __API__ IsReMovableDrive(__tchar *lpDev); 14 | __dword __API__ GetVolumeSerialNumber(__tchar *lpVolumeName); 15 | 16 | #if defined(__cplusplus) 17 | } 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /libsupport/XFileFormat.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/XFileFormat.c -------------------------------------------------------------------------------- /libsupport/XFileFormat.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/XFileFormat.h -------------------------------------------------------------------------------- /libsupport/hde32/hde32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 32 3 | * Copyright (c) 2006-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | * hde32.h: C/C++ header file 7 | * 8 | */ 9 | 10 | #ifndef _HDE32_H_ 11 | #define _HDE32_H_ 12 | 13 | /* stdint.h - C99 standard header 14 | * http://en.wikipedia.org/wiki/stdint.h 15 | * 16 | * if your compiler doesn't contain "stdint.h" header (for 17 | * example, Microsoft Visual C++), you can download file: 18 | * http://www.azillionmonkeys.com/qed/pstdint.h 19 | * and change next line to: 20 | * #include "pstdint.h" 21 | */ 22 | //#include 23 | 24 | #define F_MODRM 0x00000001 25 | #define F_SIB 0x00000002 26 | #define F_IMM8 0x00000004 27 | #define F_IMM16 0x00000008 28 | #define F_IMM32 0x00000010 29 | #define F_DISP8 0x00000020 30 | #define F_DISP16 0x00000040 31 | #define F_DISP32 0x00000080 32 | #define F_RELATIVE 0x00000100 33 | #define F_2IMM16 0x00000800 34 | #define F_ERROR 0x00001000 35 | #define F_ERROR_OPCODE 0x00002000 36 | #define F_ERROR_LENGTH 0x00004000 37 | #define F_ERROR_LOCK 0x00008000 38 | #define F_ERROR_OPERAND 0x00010000 39 | #define F_PREFIX_REPNZ 0x01000000 40 | #define F_PREFIX_REPX 0x02000000 41 | #define F_PREFIX_REP 0x03000000 42 | #define F_PREFIX_66 0x04000000 43 | #define F_PREFIX_67 0x08000000 44 | #define F_PREFIX_LOCK 0x10000000 45 | #define F_PREFIX_SEG 0x20000000 46 | #define F_PREFIX_ANY 0x3f000000 47 | 48 | #define PREFIX_SEGMENT_CS 0x2e 49 | #define PREFIX_SEGMENT_SS 0x36 50 | #define PREFIX_SEGMENT_DS 0x3e 51 | #define PREFIX_SEGMENT_ES 0x26 52 | #define PREFIX_SEGMENT_FS 0x64 53 | #define PREFIX_SEGMENT_GS 0x65 54 | #define PREFIX_LOCK 0xf0 55 | #define PREFIX_REPNZ 0xf2 56 | #define PREFIX_REPX 0xf3 57 | #define PREFIX_OPERAND_SIZE 0x66 58 | #define PREFIX_ADDRESS_SIZE 0x67 59 | 60 | #pragma pack(push,1) 61 | 62 | typedef struct { 63 | unsigned char len; 64 | unsigned char p_rep; 65 | unsigned char p_lock; 66 | unsigned char p_seg; 67 | unsigned char p_66; 68 | unsigned char p_67; 69 | unsigned char opcode; 70 | unsigned char opcode2; 71 | unsigned char modrm; 72 | unsigned char modrm_mod; 73 | unsigned char modrm_reg; 74 | unsigned char modrm_rm; 75 | unsigned char sib; 76 | unsigned char sib_scale; 77 | unsigned char sib_index; 78 | unsigned char sib_base; 79 | union { 80 | unsigned char imm8; 81 | unsigned short imm16; 82 | unsigned int imm32; 83 | } imm; 84 | union { 85 | unsigned char disp8; 86 | unsigned short disp16; 87 | unsigned int disp32; 88 | } disp; 89 | unsigned int flags; 90 | } hde32s; 91 | 92 | #pragma pack(pop) 93 | 94 | #ifdef __cplusplus 95 | extern "C" { 96 | #endif 97 | 98 | /* __cdecl */ 99 | unsigned int hde32_disasm(const void *code, hde32s *hs); 100 | 101 | #ifdef __cplusplus 102 | } 103 | #endif 104 | 105 | #endif /* _HDE32_H_ */ 106 | -------------------------------------------------------------------------------- /libsupport/hde32/table32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hacker Disassembler Engine 32 C 3 | * Copyright (c) 2008-2009, Vyacheslav Patkov. 4 | * All rights reserved. 5 | * 6 | */ 7 | 8 | #define C_NONE 0x00 9 | #define C_MODRM 0x01 10 | #define C_IMM8 0x02 11 | #define C_IMM16 0x04 12 | #define C_IMM_P66 0x10 13 | #define C_REL8 0x20 14 | #define C_REL32 0x40 15 | #define C_GROUP 0x80 16 | #define C_ERROR 0xff 17 | 18 | #define PRE_ANY 0x00 19 | #define PRE_NONE 0x01 20 | #define PRE_F2 0x02 21 | #define PRE_F3 0x04 22 | #define PRE_66 0x08 23 | #define PRE_67 0x10 24 | #define PRE_LOCK 0x20 25 | #define PRE_SEG 0x40 26 | #define PRE_ALL 0xff 27 | 28 | #define DELTA_OPCODES 0x4a 29 | #define DELTA_FPU_REG 0xf1 30 | #define DELTA_FPU_MODRM 0xf8 31 | #define DELTA_PREFIXES 0x130 32 | #define DELTA_OP_LOCK_OK 0x1a1 33 | #define DELTA_OP2_LOCK_OK 0x1b9 34 | #define DELTA_OP_ONLY_MEM 0x1cb 35 | #define DELTA_OP2_ONLY_MEM 0x1da 36 | 37 | unsigned char hde32_table[] = { 38 | 0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3,0xa8,0xa3, 39 | 0xa8,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xac,0xaa,0xb2,0xaa,0x9f,0x9f, 40 | 0x9f,0x9f,0xb5,0xa3,0xa3,0xa4,0xaa,0xaa,0xba,0xaa,0x96,0xaa,0xa8,0xaa,0xc3, 41 | 0xc3,0x96,0x96,0xb7,0xae,0xd6,0xbd,0xa3,0xc5,0xa3,0xa3,0x9f,0xc3,0x9c,0xaa, 42 | 0xaa,0xac,0xaa,0xbf,0x03,0x7f,0x11,0x7f,0x01,0x7f,0x01,0x3f,0x01,0x01,0x90, 43 | 0x82,0x7d,0x97,0x59,0x59,0x59,0x59,0x59,0x7f,0x59,0x59,0x60,0x7d,0x7f,0x7f, 44 | 0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x9a,0x88,0x7d, 45 | 0x59,0x50,0x50,0x50,0x50,0x59,0x59,0x59,0x59,0x61,0x94,0x61,0x9e,0x59,0x59, 46 | 0x85,0x59,0x92,0xa3,0x60,0x60,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59,0x59, 47 | 0x59,0x59,0x9f,0x01,0x03,0x01,0x04,0x03,0xd5,0x03,0xcc,0x01,0xbc,0x03,0xf0, 48 | 0x10,0x10,0x10,0x10,0x50,0x50,0x50,0x50,0x14,0x20,0x20,0x20,0x20,0x01,0x01, 49 | 0x01,0x01,0xc4,0x02,0x10,0x00,0x00,0x00,0x00,0x01,0x01,0xc0,0xc2,0x10,0x11, 50 | 0x02,0x03,0x11,0x03,0x03,0x04,0x00,0x00,0x14,0x00,0x02,0x00,0x00,0xc6,0xc8, 51 | 0x02,0x02,0x02,0x02,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xff,0xca, 52 | 0x01,0x01,0x01,0x00,0x06,0x00,0x04,0x00,0xc0,0xc2,0x01,0x01,0x03,0x01,0xff, 53 | 0xff,0x01,0x00,0x03,0xc4,0xc4,0xc6,0x03,0x01,0x01,0x01,0xff,0x03,0x03,0x03, 54 | 0xc8,0x40,0x00,0x0a,0x00,0x04,0x00,0x00,0x00,0x00,0x7f,0x00,0x33,0x01,0x00, 55 | 0x00,0x00,0x00,0x00,0x00,0xff,0xbf,0xff,0xff,0x00,0x00,0x00,0x00,0x07,0x00, 56 | 0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 57 | 0x00,0xff,0xff,0x00,0x00,0x00,0xbf,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 58 | 0x7f,0x00,0x00,0xff,0x4a,0x4a,0x4a,0x4a,0x4b,0x52,0x4a,0x4a,0x4a,0x4a,0x4f, 59 | 0x4c,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x55,0x45,0x40,0x4a,0x4a,0x4a, 60 | 0x45,0x59,0x4d,0x46,0x4a,0x5d,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, 61 | 0x4a,0x4a,0x4a,0x4a,0x4a,0x61,0x63,0x67,0x4e,0x4a,0x4a,0x6b,0x6d,0x4a,0x4a, 62 | 0x45,0x6d,0x4a,0x4a,0x44,0x45,0x4a,0x4a,0x00,0x00,0x00,0x02,0x0d,0x06,0x06, 63 | 0x06,0x06,0x0e,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x00,0x06,0x06,0x02,0x06, 64 | 0x00,0x0a,0x0a,0x07,0x07,0x06,0x02,0x05,0x05,0x02,0x02,0x00,0x00,0x04,0x04, 65 | 0x04,0x04,0x00,0x00,0x00,0x0e,0x05,0x06,0x06,0x06,0x01,0x06,0x00,0x00,0x08, 66 | 0x00,0x10,0x00,0x18,0x00,0x20,0x00,0x28,0x00,0x30,0x00,0x80,0x01,0x82,0x01, 67 | 0x86,0x00,0xf6,0xcf,0xfe,0x3f,0xab,0x00,0xb0,0x00,0xb1,0x00,0xb3,0x00,0xba, 68 | 0xf8,0xbb,0x00,0xc0,0x00,0xc1,0x00,0xc7,0xbf,0x62,0xff,0x00,0x8d,0xff,0x00, 69 | 0xc4,0xff,0x00,0xc5,0xff,0x00,0xff,0xff,0xeb,0x01,0xff,0x0e,0x12,0x08,0x00, 70 | 0x13,0x09,0x00,0x16,0x08,0x00,0x17,0x09,0x00,0x2b,0x09,0x00,0xae,0xff,0x07, 71 | 0xb2,0xff,0x00,0xb4,0xff,0x00,0xb5,0xff,0x00,0xc3,0x01,0x00,0xc7,0xff,0xbf, 72 | 0xe7,0x08,0x00,0xf0,0x02,0x00 73 | }; 74 | -------------------------------------------------------------------------------- /libsupport/libsupport.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libsupport/libsupport.vcproj -------------------------------------------------------------------------------- /libsupport/xRand.c: -------------------------------------------------------------------------------- 1 | #include "xRand.h" 2 | #include "RandRoll.h" 3 | 4 | __INLINE__ __dword __INTERNAL_FUNC__ GenerateRandomSeed() 5 | { 6 | //DWORD dwRandSeed = 0; 7 | //dwRandSeed = GetTickCount(); 8 | ////__asm 9 | ////{ 10 | //// push edx 11 | //// push eax 12 | //// rdtsc 13 | //// mov dwRandSeed, eax 14 | //// pop eax 15 | //// pop edx 16 | ////} 17 | //return dwRandSeed; 18 | return GetRandDword(); 19 | } 20 | 21 | __dword __API__ GenerateRandomNumber() { 22 | __byte bNew1, bNew2, bNew3, bNew4; 23 | __dword dwSeed = 0, dwRand = 0; 24 | __memory pPoint = NULL; 25 | dwSeed = GenerateRandomSeed(); 26 | bNew1 = (__byte)dwSeed; 27 | dwSeed = GenerateRandomSeed(); 28 | bNew2 = (__byte)dwSeed; 29 | dwSeed = GenerateRandomSeed(); 30 | bNew3 = (__byte)dwSeed; 31 | dwSeed = GenerateRandomSeed(); 32 | bNew4 = (__byte)dwSeed; 33 | 34 | pPoint = (__memory)&dwRand; 35 | *pPoint = bNew4; 36 | *(pPoint + 1) = bNew2; 37 | *(pPoint + 2) = bNew1; 38 | *(pPoint + 3) = bNew3; 39 | 40 | return dwRand; 41 | } 42 | 43 | __bool __API__ RandRoll(__bool *pInBoolArray) { 44 | __dword dwRoll = GenerateRandomNumber() % 100; 45 | return pInBoolArray[dwRoll]; 46 | } 47 | 48 | __void __API__ GenerateRollArray(__bool *pOutBoolArray, __integer iSeed) { 49 | MakeRandArray((__bool *)pOutBoolArray, iSeed); 50 | } 51 | -------------------------------------------------------------------------------- /libsupport/xRand.h: -------------------------------------------------------------------------------- 1 | #if !defined(__XRAND_H__) 2 | #define __XRAND_H__ 3 | 4 | #include "Common.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | __dword __API__ GenerateRandomNumber(); 12 | __bool __API__ RandRoll(__bool *pInBoolArray); 13 | __void __API__ GenerateRollArray(__bool *pOutBoolArray, __integer iSeed); 14 | 15 | #if defined(__cplusplus) 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libthunkcoder/FlowCodeGen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/FlowCodeGen.c -------------------------------------------------------------------------------- /libthunkcoder/FlowCodeGen.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/FlowCodeGen.h -------------------------------------------------------------------------------- /libthunkcoder/JunkCodeGen.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/JunkCodeGen.c -------------------------------------------------------------------------------- /libthunkcoder/JunkCodeGen.h: -------------------------------------------------------------------------------- 1 | #if !defined(__JUNKCODEGEN_H__) 2 | #define __JUNKCODEGEN_H__ 3 | 4 | #include "Common.h" 5 | #include "ThunkCoderRandRoll.h" 6 | #include "ThunkCoderConfigure.h" 7 | 8 | #if defined(__cplusplus) 9 | extern "C" 10 | { 11 | #endif 12 | 13 | __memory __INTERNAL_FUNC__ GenerateJunkCode(__integer *piOutSize, PTHUNKCODER_CONFIGURE pThunkCoderConfigure); 14 | 15 | #if defined(__cplusplus) 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libthunkcoder/Makefile: -------------------------------------------------------------------------------- 1 | ####### Compiler, tools and options 2 | 3 | CC = cl 4 | CXX = cl 5 | DEFINES = /D "WIN32" /D "NDEBUG" /D "_LIB" /D "MS_VER" 6 | DBGFLAG = /Zi 7 | CFLAGS = /O2 /Oi /GL /EHsc /MT /Gy /W3 /nologo /c $(DEFINES) $(DBGFLAG) 8 | CXXFLAGS = $(CFLAGS) /TP 9 | INCPATH = /I "..\..\..\winsdk\include" /I "..\..\..\winsdk\v6.0A\include" 10 | LIB = lib /NOLOGO /LTCG 11 | COPY = copy /y 12 | COPY_FILE = $(COPY) 13 | COPY_DIR = xcopy /s /q /y /i 14 | DEL_FILE = del 15 | DEL_DIR = rmdir 16 | MOVE = move 17 | CHK_DIR_EXISTS= if not exist 18 | MKDIR = mkdir 19 | INSTALL_FILE = $(COPY_FILE) 20 | INSTALL_PROGRAM = $(COPY_FILE) 21 | INSTALL_DIR = $(COPY_DIR) 22 | 23 | ####### Output directory 24 | 25 | OBJECTS_DIR = . 26 | 27 | ####### Files 28 | 29 | SOURCES = decode.c input.c itab.c syn-att.c\ 30 | syn-intel.c syn.c udis86.c 31 | OBJECTS = decode.obj input.obj itab.obj syn-att.obj\ 32 | syn-intel.obj syn.obj udis86.obj 33 | DESTDIR = ..\..\bin\ 34 | TARGET = libudis86.lib 35 | DESTDIR_TARGET = ..\..\bin\libudis86.lib 36 | 37 | ####### Build rules 38 | 39 | all: $(OBJECTS) 40 | $(LIB) /OUT:$(DESTDIR_TARGET) $(OBJECTS) 41 | 42 | clean: compiler_clean 43 | -$(DEL_FILE) $(OBJECTS) 44 | 45 | distclean: clean 46 | -$(DEL_FILE) $(DESTDIR_TARGET) 47 | 48 | ####### Compile 49 | 50 | decode.obj: decode.c types.h itab.h input.h decode.h 51 | $(CC) $(CFLAGS) $(INCPATH) decode.c 52 | 53 | input.obj: input.c extern.h types.h input.h 54 | $(CC) $(CFLAGS) $(INCPATH) input.c 55 | 56 | itab.obj: itab.c types.h decode.h itab.h 57 | $(CC) $(CFLAGS) $(INCPATH) itab.c 58 | 59 | syn-att.obj: syn-att.c types.h extern.h decode.h itab.h syn.h 60 | $(CC) $(CFLAGS) $(INCPATH) syn-att.c 61 | 62 | syn-intel.obj: syn-intel.c types.h extern.h decode.h itab.h syn.h 63 | $(CC) $(CFLAGS) $(INCPATH) syn-intel.c 64 | 65 | syn.obj: syn.c 66 | $(CC) $(CFLAGS) $(INCPATH) syn.c 67 | 68 | udis86.obj: udis86.c input.h extern.h 69 | $(CC) $(CFLAGS) $(INCPATH) udis86.c 70 | 71 | ####### Install 72 | 73 | install: FORCE 74 | 75 | uninstall: FORCE 76 | 77 | FORCE: 78 | 79 | -------------------------------------------------------------------------------- /libthunkcoder/ThunkCoder.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/ThunkCoder.c -------------------------------------------------------------------------------- /libthunkcoder/ThunkCoder.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/ThunkCoder.h -------------------------------------------------------------------------------- /libthunkcoder/ThunkCoderConfigure.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/ThunkCoderConfigure.h -------------------------------------------------------------------------------- /libthunkcoder/ThunkCoderRuntime.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/ThunkCoderRuntime.c -------------------------------------------------------------------------------- /libthunkcoder/ThunkCoderRuntime.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/ThunkCoderRuntime.h -------------------------------------------------------------------------------- /libthunkcoder/libthunkcoder.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libthunkcoder/libthunkcoder.vcproj -------------------------------------------------------------------------------- /libthunkcoder/libthunkcoder.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 6 | h;hpp;hxx;hm;inl;inc;xsd 7 | 8 | 9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav 11 | 12 | 13 | {afbc1d64-e8c8-4d44-a1a1-d38b438576d1} 14 | 15 | 16 | 17 | 18 | 头文件 19 | 20 | 21 | 头文件 22 | 23 | 24 | 头文件 25 | 26 | 27 | 头文件 28 | 29 | 30 | 头文件 31 | 32 | 33 | 34 | 35 | 源文件 36 | 37 | 38 | 源文件 39 | 40 | 41 | 源文件 42 | 43 | 44 | 源文件 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /libtinyxml/CTinyXml.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libtinyxml/CTinyXml.cpp -------------------------------------------------------------------------------- /libtinyxml/CTinyXml.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libtinyxml/CTinyXml.h -------------------------------------------------------------------------------- /libtinyxml/LString.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libtinyxml/LString.cpp -------------------------------------------------------------------------------- /libtinyxml/LString.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #pragma warning (disable : 4996) 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | class String : public std::string 12 | { 13 | 14 | public: 15 | String() {} 16 | String(const char* str); 17 | String(const std::string& str); 18 | 19 | public: 20 | int GetLens() const { return static_cast(length()); } 21 | const char* GetString() const { return c_str(); } 22 | bool IsEmpty() const { return empty(); } 23 | 24 | public: 25 | int A2I(void); 26 | float A2F(void); 27 | 28 | String GetToken(int nToken, char* strSep = NULL) const; 29 | 30 | void Format(const char *pString, ...); 31 | String GetFilename(void) const; 32 | int Search(const char *pStrSearch) const; 33 | void Replace(char cTarget, char cReplace); 34 | void Replace(const char* strTarget, const char* strReplace); 35 | void ExtractExt(void); 36 | void ReplaceExt(char *pExt); 37 | void GetPath(void); 38 | int GetCharCount(char cChar) const; 39 | }; 40 | 41 | unsigned int ComputeHashCode(const char *pSzString); 42 | bool GetStrParam(const char *pStrString, int iIndex, char *pStrParam); 43 | bool GetStrParam(const wchar_t *pStrString, int iIndex, wchar_t *pStrParam); 44 | 45 | //--------------------------------------------------------------------- 46 | class CUniToAnsi2 47 | { 48 | public : 49 | CUniToAnsi2(const wchar_t *pStrUni);; 50 | ~CUniToAnsi2(); 51 | operator char*(); 52 | 53 | char *m_pString; 54 | }; 55 | 56 | #define UniToAnsi2(str) string(CUniToAnsi2(str)).c_str() 57 | 58 | class CAnsiToUni2 59 | { 60 | public : 61 | CAnsiToUni2(const char *pStrAnsi); 62 | ~CAnsiToUni2(); 63 | operator wchar_t*(); 64 | 65 | wchar_t *m_pString; 66 | }; 67 | 68 | #define AnsiToUni2(str) wstring(CAnsiToUni2(str)).c_str() 69 | //------------------------------------------------------------------------------------- 70 | 71 | ////////////////////////////////////////////////////////////////////////// 72 | 73 | #define GetStrFormat(buf, fmt) \ 74 | va_list args;\ 75 | va_start(args, fmt);\ 76 | int len = _vscprintf(fmt, args) + 1;\ 77 | buf = static_cast(_alloca(len * sizeof(char)));\ 78 | vsprintf_s(buf, len, fmt, args); 79 | 80 | #define GetStrFormatW(buf, fmt) \ 81 | va_list args;\ 82 | va_start(args, fmt);\ 83 | int len = _vscwprintf(fmt, args) + 1;\ 84 | buf = static_cast(_alloca(len * sizeof(wchar_t)));\ 85 | vswprintf_s(buf, len, fmt, args); 86 | 87 | #pragma warning (default : 4996) 88 | -------------------------------------------------------------------------------- /libtinyxml/libtinyxml.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libtinyxml/libtinyxml.vcproj -------------------------------------------------------------------------------- /libtinyxml/libtinyxml.vcproj.logic-PC.logic.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /libtinyxml/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /libtinyxml/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define TIXML_USE_STL -------------------------------------------------------------------------------- /libtinyxml/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libtinyxml/targetver.h -------------------------------------------------------------------------------- /libtinyxml/tinystr.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #ifndef TIXML_USE_STL 4 | 5 | #include "tinystr.h" 6 | 7 | // Error value for find primitive 8 | const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1); 9 | 10 | 11 | // Null rep. 12 | TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } }; 13 | 14 | 15 | void TiXmlString::reserve (size_type cap) 16 | { 17 | if (cap > capacity()) 18 | { 19 | TiXmlString tmp; 20 | tmp.init(length(), cap); 21 | memcpy(tmp.start(), data(), length()); 22 | swap(tmp); 23 | } 24 | } 25 | 26 | 27 | TiXmlString& TiXmlString::assign(const char* str, size_type len) 28 | { 29 | size_type cap = capacity(); 30 | if (len > cap || cap > 3*(len + 8)) 31 | { 32 | TiXmlString tmp; 33 | tmp.init(len); 34 | memcpy(tmp.start(), str, len); 35 | swap(tmp); 36 | } 37 | else 38 | { 39 | memmove(start(), str, len); 40 | set_size(len); 41 | } 42 | return *this; 43 | } 44 | 45 | 46 | TiXmlString& TiXmlString::append(const char* str, size_type len) 47 | { 48 | size_type newsize = length() + len; 49 | if (newsize > capacity()) 50 | { 51 | reserve (newsize + capacity()); 52 | } 53 | memmove(finish(), str, len); 54 | set_size(newsize); 55 | return *this; 56 | } 57 | 58 | 59 | TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) 60 | { 61 | TiXmlString tmp; 62 | tmp.reserve(a.length() + b.length()); 63 | tmp += a; 64 | tmp += b; 65 | return tmp; 66 | } 67 | 68 | TiXmlString operator + (const TiXmlString & a, const char* b) 69 | { 70 | TiXmlString tmp; 71 | TiXmlString::size_type b_len = static_cast( strlen(b) ); 72 | tmp.reserve(a.length() + b_len); 73 | tmp += a; 74 | tmp.append(b, b_len); 75 | return tmp; 76 | } 77 | 78 | TiXmlString operator + (const char* a, const TiXmlString & b) 79 | { 80 | TiXmlString tmp; 81 | TiXmlString::size_type a_len = static_cast( strlen(a) ); 82 | tmp.reserve(a_len + b.length()); 83 | tmp.append(a, a_len); 84 | tmp += b; 85 | return tmp; 86 | } 87 | 88 | 89 | #endif // TIXML_USE_STL 90 | -------------------------------------------------------------------------------- /libtinyxml/tinyxmlerror.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "tinyxml.h" 3 | 4 | // The goal of the seperate error file is to make the first 5 | // step towards localization. tinyxml (currently) only supports 6 | // english error messages, but the could now be translated. 7 | // 8 | // It also cleans up the code a bit. 9 | // 10 | 11 | const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] = 12 | { 13 | "No error", 14 | "Error", 15 | "Failed to open file", 16 | "Memory allocation failed.", 17 | "Error parsing Element.", 18 | "Failed to read Element name", 19 | "Error reading Element value.", 20 | "Error reading Attributes.", 21 | "Error: empty tag.", 22 | "Error reading end tag.", 23 | "Error parsing Unknown.", 24 | "Error parsing Comment.", 25 | "Error parsing Declaration.", 26 | "Error document empty.", 27 | "Error null (0) or unexpected EOF found in input stream.", 28 | "Error parsing CDATA.", 29 | "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.", 30 | }; 31 | -------------------------------------------------------------------------------- /libtinyxml/xmltest.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libtinyxml/xmltest.cpp -------------------------------------------------------------------------------- /libudis86/extern.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * extern.h 3 | * 4 | * Copyright (c) 2004, 2005, 2006, Vivek Mohan 5 | * All rights reserved. See LICENSE 6 | * ----------------------------------------------------------------------------- 7 | */ 8 | #ifndef UD_EXTERN_H 9 | #define UD_EXTERN_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #include 16 | #include "types.h" 17 | 18 | /* ============================= PUBLIC API ================================= */ 19 | 20 | extern void ud_init(struct ud*); 21 | 22 | extern void ud_set_mode(struct ud*, uint8_t); 23 | 24 | extern void ud_set_pc(struct ud*, uint64_t); 25 | 26 | extern void ud_set_input_hook(struct ud*, int (*)(struct ud*)); 27 | 28 | extern void ud_set_input_buffer(struct ud*, uint8_t*, size_t); 29 | 30 | #ifndef __UD_STANDALONE__ 31 | extern void ud_set_input_file(struct ud*, FILE*); 32 | #endif /* __UD_STANDALONE__ */ 33 | 34 | extern void ud_set_vendor(struct ud*, unsigned); 35 | 36 | extern void ud_set_syntax(struct ud*, void (*)(struct ud*)); 37 | 38 | extern void ud_input_skip(struct ud*, size_t); 39 | 40 | extern int ud_input_end(struct ud*); 41 | 42 | extern unsigned int ud_decode(struct ud*); 43 | 44 | extern unsigned int ud_disassemble(struct ud*); 45 | 46 | extern void ud_translate_intel(struct ud*); 47 | 48 | extern void ud_translate_att(struct ud*); 49 | 50 | extern char* ud_insn_asm(struct ud* u); 51 | 52 | extern uint8_t* ud_insn_ptr(struct ud* u); 53 | 54 | extern uint64_t ud_insn_off(struct ud*); 55 | 56 | extern char* ud_insn_hex(struct ud*); 57 | 58 | extern unsigned int ud_insn_len(struct ud* u); 59 | 60 | extern const char* ud_lookup_mnemonic(enum ud_mnemonic_code c); 61 | 62 | /* ========================================================================== */ 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /libudis86/input.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * input.h 3 | * 4 | * Copyright (c) 2006, Vivek Mohan 5 | * All rights reserved. See LICENSE 6 | * ----------------------------------------------------------------------------- 7 | */ 8 | #ifndef UD_INPUT_H 9 | #define UD_INPUT_H 10 | 11 | #include "types.h" 12 | 13 | uint8_t inp_next(struct ud*); 14 | uint8_t inp_peek(struct ud*); 15 | uint8_t inp_uint8(struct ud*); 16 | uint16_t inp_uint16(struct ud*); 17 | uint32_t inp_uint32(struct ud*); 18 | uint64_t inp_uint64(struct ud*); 19 | void inp_move(struct ud*, size_t); 20 | void inp_back(struct ud*); 21 | 22 | /* inp_init() - Initializes the input system. */ 23 | #define inp_init(u) \ 24 | do { \ 25 | u->inp_curr = 0; \ 26 | u->inp_fill = 0; \ 27 | u->inp_ctr = 0; \ 28 | u->inp_end = 0; \ 29 | } while (0) 30 | 31 | /* inp_start() - Should be called before each de-code operation. */ 32 | #define inp_start(u) u->inp_ctr = 0 33 | 34 | /* inp_back() - Resets the current pointer to its position before the current 35 | * instruction disassembly was started. 36 | */ 37 | #define inp_reset(u) \ 38 | do { \ 39 | u->inp_curr -= u->inp_ctr; \ 40 | u->inp_ctr = 0; \ 41 | } while (0) 42 | 43 | /* inp_sess() - Returns the pointer to current session. */ 44 | #define inp_sess(u) (u->inp_sess) 45 | 46 | /* inp_cur() - Returns the current input byte. */ 47 | #define inp_curr(u) ((u)->inp_cache[(u)->inp_curr]) 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /libudis86/libudis86.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/libudis86/libudis86.vcproj -------------------------------------------------------------------------------- /libudis86/syn.c: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * syn.c 3 | * 4 | * Copyright (c) 2002, 2003, 2004 Vivek Mohan 5 | * All rights reserved. See (LICENSE) 6 | * ----------------------------------------------------------------------------- 7 | */ 8 | 9 | /* ----------------------------------------------------------------------------- 10 | * Intel Register Table - Order Matters (types.h)! 11 | * ----------------------------------------------------------------------------- 12 | */ 13 | const char* ud_reg_tab[] = 14 | { 15 | "al", "cl", "dl", "bl", 16 | "ah", "ch", "dh", "bh", 17 | "spl", "bpl", "sil", "dil", 18 | "r8b", "r9b", "r10b", "r11b", 19 | "r12b", "r13b", "r14b", "r15b", 20 | 21 | "ax", "cx", "dx", "bx", 22 | "sp", "bp", "si", "di", 23 | "r8w", "r9w", "r10w", "r11w", 24 | "r12w", "r13W" , "r14w", "r15w", 25 | 26 | "eax", "ecx", "edx", "ebx", 27 | "esp", "ebp", "esi", "edi", 28 | "r8d", "r9d", "r10d", "r11d", 29 | "r12d", "r13d", "r14d", "r15d", 30 | 31 | "rax", "rcx", "rdx", "rbx", 32 | "rsp", "rbp", "rsi", "rdi", 33 | "r8", "r9", "r10", "r11", 34 | "r12", "r13", "r14", "r15", 35 | 36 | "es", "cs", "ss", "ds", 37 | "fs", "gs", 38 | 39 | "cr0", "cr1", "cr2", "cr3", 40 | "cr4", "cr5", "cr6", "cr7", 41 | "cr8", "cr9", "cr10", "cr11", 42 | "cr12", "cr13", "cr14", "cr15", 43 | 44 | "dr0", "dr1", "dr2", "dr3", 45 | "dr4", "dr5", "dr6", "dr7", 46 | "dr8", "dr9", "dr10", "dr11", 47 | "dr12", "dr13", "dr14", "dr15", 48 | 49 | "mm0", "mm1", "mm2", "mm3", 50 | "mm4", "mm5", "mm6", "mm7", 51 | 52 | "st0", "st1", "st2", "st3", 53 | "st4", "st5", "st6", "st7", 54 | 55 | "xmm0", "xmm1", "xmm2", "xmm3", 56 | "xmm4", "xmm5", "xmm6", "xmm7", 57 | "xmm8", "xmm9", "xmm10", "xmm11", 58 | "xmm12", "xmm13", "xmm14", "xmm15", 59 | 60 | "rip" 61 | }; 62 | -------------------------------------------------------------------------------- /libudis86/syn.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * syn.h 3 | * 4 | * Copyright (c) 2006, Vivek Mohan 5 | * All rights reserved. See LICENSE 6 | * ----------------------------------------------------------------------------- 7 | */ 8 | #ifndef UD_SYN_H 9 | #define UD_SYN_H 10 | 11 | #include 12 | #include 13 | #include "types.h" 14 | 15 | extern const char* ud_reg_tab[]; 16 | 17 | static void mkasm(struct ud* u, const char* fmt, ...) 18 | { 19 | va_list ap; 20 | va_start(ap, fmt); 21 | u->insn_fill += vsprintf((char*) u->insn_buffer + u->insn_fill, fmt, ap); 22 | va_end(ap); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /libudis86/udis86.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------------- 2 | * udis86.h 3 | * 4 | * Copyright (c) 2002, 2003, 2004 Vivek Mohan 5 | * All rights reserved. See (LICENSE) 6 | * ----------------------------------------------------------------------------- 7 | */ 8 | 9 | #ifndef UDIS86_H 10 | #define UDIS86_H 11 | 12 | #include "types.h" 13 | #include "extern.h" 14 | #include "itab.h" 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /pefix/PeFix.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/pefix/PeFix.c -------------------------------------------------------------------------------- /pefix/pefix.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/pefix/pefix.vcproj -------------------------------------------------------------------------------- /statisticsfile/statisticsfile.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/statisticsfile/statisticsfile.c -------------------------------------------------------------------------------- /statisticsfile/statisticsfile.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/statisticsfile/statisticsfile.vcproj -------------------------------------------------------------------------------- /test_assembler/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/test_assembler/main.cpp -------------------------------------------------------------------------------- /test_assembler/test_assembler.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {B0648D05-4AED-44D0-BCCF-42E13561B8B5} 15 | Win32Proj 16 | test_assembler 17 | 18 | 19 | 20 | Application 21 | true 22 | Unicode 23 | 24 | 25 | Application 26 | false 27 | true 28 | Unicode 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | true 42 | ..\..\bin 43 | E:\logic\projects\include;$(IncludePath) 44 | E:\logic\projects\bin;$(LibraryPath) 45 | 46 | 47 | false 48 | 49 | 50 | 51 | 52 | 53 | Level3 54 | Disabled 55 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 56 | 57 | 58 | Console 59 | true 60 | libcommon.lib;libassembler.lib;liblogic.lib;%(AdditionalDependencies) 61 | 62 | 63 | 64 | 65 | Level3 66 | 67 | 68 | MaxSpeed 69 | true 70 | true 71 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 72 | 73 | 74 | Console 75 | true 76 | true 77 | true 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /test_assembler/test_assembler.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /xanalyzer/Analyze.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Analyze.c -------------------------------------------------------------------------------- /xanalyzer/Analyze.h: -------------------------------------------------------------------------------- 1 | #if !defined(__ANALYZE_H__) 2 | #define __ANALYZE_H__ 3 | 4 | #include "Common.h" 5 | #include "AnalyzeBin.h" 6 | #include "Support.h" 7 | #include "Setting.h" 8 | 9 | extern __bool g_bGenProcedureFlowChart; 10 | 11 | __bool __INTERNAL_FUNC__ Analyze(PXFILE_ATTACH_INFO pTarget, __tchar *pResultDir, __tchar *pResultFilePath, PANALYZE_CONFIGURE pConfigure); 12 | 13 | #endif -------------------------------------------------------------------------------- /xanalyzer/Disasm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Disasm.c -------------------------------------------------------------------------------- /xanalyzer/Disasm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Disasm.h -------------------------------------------------------------------------------- /xanalyzer/Dump.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Dump.c -------------------------------------------------------------------------------- /xanalyzer/Dump.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Dump.h -------------------------------------------------------------------------------- /xanalyzer/IATRef.c: -------------------------------------------------------------------------------- 1 | #include "IATRef.h" 2 | #include "Support.h" 3 | 4 | __bool __INTERNAL_FUNC__ IatRef(__memory pMem, __tchar *pResultFilePath, PIATREF_CONFIGURE pConfigure) { 5 | return TRUE; 6 | } -------------------------------------------------------------------------------- /xanalyzer/IATRef.h: -------------------------------------------------------------------------------- 1 | #if !defined(__IATREF_H__) 2 | #define __IATREF_H__ 3 | 4 | #include "Common.h" 5 | 6 | typedef struct _IATREF_CONFIGURE { 7 | __bool bIATREF; 8 | } IATREF_CONFIGURE, *PIATREF_CONFIGURE; 9 | 10 | __bool __INTERNAL_FUNC__ IatRef(__memory pMem, __tchar *pResultFilePath, PIATREF_CONFIGURE pConfigure); 11 | 12 | #endif -------------------------------------------------------------------------------- /xanalyzer/Monitor.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Monitor.c -------------------------------------------------------------------------------- /xanalyzer/Monitor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/Monitor.h -------------------------------------------------------------------------------- /xanalyzer/PeView.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/PeView.c -------------------------------------------------------------------------------- /xanalyzer/PeView.h: -------------------------------------------------------------------------------- 1 | #if !defined(__PEVIEW_H__) 2 | #define __PEVIEW_H__ 3 | 4 | #include "Common.h" 5 | 6 | typedef struct _PEVIEW_CONFIGURE { 7 | __bool bPrintPEHeader; 8 | __bool bPrintSectionHeaders; 9 | __bool bPrintImportTable; 10 | __bool bPrintExportTable; 11 | __bool bPrintDebugTable; 12 | __bool bPrintRelocateTable; 13 | __bool bPrintResourceTable; 14 | } PEVIEW_CONFIGURE, *PPEVIEW_CONFIGURE; 15 | 16 | __bool __INTERNAL_FUNC__ PeView(__memory pMem, __tchar *pResultFilePath, PPEVIEW_CONFIGURE pConfigure); 17 | 18 | #endif -------------------------------------------------------------------------------- /xanalyzer/xAnalyzerConsole.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/xAnalyzerConsole.c -------------------------------------------------------------------------------- /xanalyzer/xanalyzer.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xanalyzer/xanalyzer.vcproj -------------------------------------------------------------------------------- /xdetours/dllmain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xdetours/dllmain.cpp -------------------------------------------------------------------------------- /xdetours/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xdetours/stdafx.cpp -------------------------------------------------------------------------------- /xdetours/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xdetours/stdafx.h -------------------------------------------------------------------------------- /xdetours/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xdetours/targetver.h -------------------------------------------------------------------------------- /xdetours/xdetours.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xdetours/xdetours.cpp -------------------------------------------------------------------------------- /xdetours/xdetours.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xdetours/xdetours.h -------------------------------------------------------------------------------- /xfileview/XFileView.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xfileview/XFileView.c -------------------------------------------------------------------------------- /xfileview/xfileview.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xfileview/xfileview.vcproj -------------------------------------------------------------------------------- /xhooker/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xhooker/stdafx.cpp -------------------------------------------------------------------------------- /xhooker/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xhooker/stdafx.h -------------------------------------------------------------------------------- /xhooker/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xhooker/targetver.h -------------------------------------------------------------------------------- /xhooker/xHookerConsole.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xhooker/xHookerConsole.cpp -------------------------------------------------------------------------------- /ximptbl/YImpTblKey.h: -------------------------------------------------------------------------------- 1 | #define __EFILER_KEY__ 0x81CDE3AE 2 | -------------------------------------------------------------------------------- /ximptbl/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by ximptbl.rc 4 | // 5 | #define IDR_YIMPORTTABLE 102 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 103 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ximptbl/xImportTable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/ximptbl/xImportTable.c -------------------------------------------------------------------------------- /ximptbl/ximptbl.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/ximptbl/ximptbl.rc -------------------------------------------------------------------------------- /ximptbl/ximptbl.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/ximptbl/ximptbl.vcproj -------------------------------------------------------------------------------- /xsign/xSign.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xsign/xSign.c -------------------------------------------------------------------------------- /xsign/xsign.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/xsign/xsign.vcproj -------------------------------------------------------------------------------- /yimptbl/dllmain.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL APIENTRY DllMain( HMODULE hModule, 4 | DWORD ul_reason_for_call, 5 | LPVOID lpReserved 6 | ) 7 | { 8 | switch (ul_reason_for_call) 9 | { 10 | case DLL_PROCESS_ATTACH: 11 | case DLL_PROCESS_DETACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | break; 15 | } 16 | return TRUE; 17 | } 18 | 19 | -------------------------------------------------------------------------------- /yimptbl/efiler.h: -------------------------------------------------------------------------------- 1 | #define __EFILER_KEY__ 0x81CDE3AE 2 | -------------------------------------------------------------------------------- /yimptbl/yImportTable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/yimptbl/yImportTable.c -------------------------------------------------------------------------------- /yimptbl/yImportTable.def: -------------------------------------------------------------------------------- 1 | LIBRARY "yimptbl" 2 | EXPORTS 3 | 4 | g_DISConfigure 5 | 6 | DISEntry 7 | DISEntryInDll -------------------------------------------------------------------------------- /yimptbl/yImportTable.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/yimptbl/yImportTable.h -------------------------------------------------------------------------------- /yimptbl/yimptbl.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/yimptbl/yimptbl.vcproj -------------------------------------------------------------------------------- /带有代码分析器的混乱虚拟机保护引擎.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gA4ss/cerberus/0023dba54a27e6f87acb9dfec9b5fcda0e611bbf/带有代码分析器的混乱虚拟机保护引擎.doc --------------------------------------------------------------------------------