├── internal ├── engine_lean.h ├── Sdk.h ├── sdkgen │ ├── PUBG.h │ ├── Engine │ │ ├── Logger.cpp │ │ ├── NameValidator.h │ │ ├── UE4 │ │ │ ├── Package.cpp │ │ │ ├── FunctionFlags.h │ │ │ ├── PropertyFlags.h │ │ │ └── FunctionFlags.cpp │ │ ├── PrintHelper.h │ │ ├── Logger.h │ │ ├── NamesStore.cpp │ │ ├── NamesStore.h │ │ ├── NameValidator.cpp │ │ ├── PrintHelper.cpp │ │ ├── ObjectsStore.cpp │ │ └── ObjectsStore.h │ └── Target │ │ └── PUBG │ │ └── ObjectsStore.cpp └── sdk │ ├── Names.h │ ├── Format.h │ ├── World.h │ ├── EnumClassFlags.h │ ├── World.cpp │ ├── Encryption.h │ ├── UnrealTypes.cpp │ ├── World_decrypt.asm │ └── Names_decrypt.asm ├── contrib └── distorm │ ├── examples │ ├── ddk │ │ ├── makefile │ │ ├── sources │ │ ├── distorm.ini │ │ ├── dummy.c │ │ ├── README │ │ └── main.c │ ├── cs │ │ ├── readme │ │ ├── distorm-net │ │ │ ├── DecodedResult.cs │ │ │ ├── DecomposedResult.cs │ │ │ ├── DecodedInst.cs │ │ │ ├── Operand.cs │ │ │ ├── CodeInfo.cs │ │ │ ├── DecomposedInst.cs │ │ │ ├── Opcodes.tt │ │ │ ├── Properties │ │ │ │ └── AssemblyInfo.cs │ │ │ └── distorm-net.csproj │ │ ├── distorm-net.sln │ │ └── TestdiStorm │ │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ │ ├── Program.cs │ │ │ └── TestdiStorm.csproj │ ├── linux │ │ └── Makefile │ ├── tests │ │ ├── Makefile │ │ ├── tests.sln │ │ ├── tests.vcxproj.filters │ │ ├── main.cpp │ │ ├── main.py │ │ └── tests.vcxproj │ ├── java │ │ ├── distorm │ │ │ ├── src │ │ │ │ ├── diStorm3 │ │ │ │ │ ├── DecodedResult.java │ │ │ │ │ ├── DecomposedResult.java │ │ │ │ │ ├── Operand.java │ │ │ │ │ ├── DecodedInst.java │ │ │ │ │ ├── CodeInfo.java │ │ │ │ │ ├── distorm3.java │ │ │ │ │ └── DecomposedInst.java │ │ │ │ └── Main.java │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ └── .settings │ │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── Makefile │ │ ├── jdistorm.sln │ │ └── jdistorm.h │ ├── win32 │ │ ├── disasm.vcxproj.filters │ │ └── disasm.sln │ └── python │ │ └── sample.py │ ├── make │ ├── win32 │ │ ├── distorm.idb │ │ ├── resource.rc │ │ ├── resource.h │ │ ├── distorm.sln │ │ └── cdistorm.vcxproj.filters │ ├── mac │ │ └── Makefile │ └── linux │ │ └── Makefile │ ├── setup.cfg │ ├── MANIFEST.in │ ├── MANIFEST │ ├── src │ ├── operands.h │ ├── wstring.c │ ├── decoder.h │ ├── wstring.h │ ├── textdefs.h │ ├── insts.h │ ├── x86defs.h │ └── prefix.h │ ├── README.md │ ├── COPYING │ └── disOps │ └── registers.py ├── vendor └── vmp │ ├── VMProtectDDK32.lib │ ├── VMProtectDDK32.sys │ ├── VMProtectDDK64.lib │ ├── VMProtectDDK64.sys │ ├── VMProtectSDK32.dll │ ├── VMProtectSDK32.lib │ ├── VMProtectSDK64.dll │ ├── VMProtectSDK64.lib │ ├── driver.vmp │ ├── VMProtectDDK.h │ └── VMProtectSDK.h ├── README.md ├── driver ├── driver.inf ├── dispatch.h ├── mm.h ├── mm.c ├── nttrust.h ├── crypto.h ├── inject.h ├── image.h ├── ntbuild.h ├── shared.h └── driver.h ├── native ├── private │ ├── nativeexcept.h │ ├── nativewow64.h │ ├── nativepool.h │ └── nativeuser.h ├── native.h ├── service.h ├── wow64.h ├── service.c └── eresource.h ├── utils ├── vmt.cpp ├── vthook.cpp ├── vmt.h ├── vthook.h ├── disasm.c ├── disasm.h └── xorstr.h ├── reversal └── pubg_reference_scan.py ├── .gitattributes ├── service └── main.cpp └── internal.sln /internal/engine_lean.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /contrib/distorm/examples/ddk/makefile: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def -------------------------------------------------------------------------------- /vendor/vmp/VMProtectDDK32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectDDK32.lib -------------------------------------------------------------------------------- /vendor/vmp/VMProtectDDK32.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectDDK32.sys -------------------------------------------------------------------------------- /vendor/vmp/VMProtectDDK64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectDDK64.lib -------------------------------------------------------------------------------- /vendor/vmp/VMProtectDDK64.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectDDK64.sys -------------------------------------------------------------------------------- /vendor/vmp/VMProtectSDK32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectSDK32.dll -------------------------------------------------------------------------------- /vendor/vmp/VMProtectSDK32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectSDK32.lib -------------------------------------------------------------------------------- /vendor/vmp/VMProtectSDK64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectSDK64.dll -------------------------------------------------------------------------------- /vendor/vmp/VMProtectSDK64.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/vendor/vmp/VMProtectSDK64.lib -------------------------------------------------------------------------------- /contrib/distorm/make/win32/distorm.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/contrib/distorm/make/win32/distorm.idb -------------------------------------------------------------------------------- /contrib/distorm/make/win32/resource.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajkhoury/pubg_internal/HEAD/contrib/distorm/make/win32/resource.rc -------------------------------------------------------------------------------- /contrib/distorm/setup.cfg: -------------------------------------------------------------------------------- 1 | [wheel] 2 | universal = 1 3 | 4 | [install] 5 | force=1 6 | compile=1 7 | optimize=1 8 | 9 | [bdist_wininst] 10 | user-access-control=auto 11 | -------------------------------------------------------------------------------- /contrib/distorm/examples/cs/readme: -------------------------------------------------------------------------------- 1 | This is a .NET Wrapper of the distorm project for seamless decompilation of 32-bit and 64-bit intel binaries. 2 | This project is licensed under the GPLv3. 3 | By Dan Shechter -------------------------------------------------------------------------------- /internal/Sdk.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "sdk/Types.h" 4 | #include "sdk/Names.h" 5 | #include "sdk/Objects.h" 6 | #include "sdk/World.h" 7 | 8 | #if defined(ENABLE_SDK) 9 | #include "sdk/PUBG_SDK.h" 10 | #else 11 | #include "sdk/UnrealTypes.h" 12 | #endif -------------------------------------------------------------------------------- /contrib/distorm/examples/ddk/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME = distorm 2 | TARGETPATH = obj 3 | TARGETTYPE = DRIVER 4 | 5 | C_DEFINES = $(C_DEFINES) -DSUPPORT_64BIT_OFFSET -DLIBDISTORM 6 | 7 | INCLUDES = %BUILD%\inc;..\src; 8 | LIBS = %BUILD%\lib 9 | 10 | SOURCES = main.c 11 | -------------------------------------------------------------------------------- /contrib/distorm/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include COPYING setup.cfg setup.py 2 | include make\win32\cdistorm.vcxproj make\win32\cdistorm.vcxproj.filters make\win32\distorm.sln make\win32\resource.h make\win32\Resource.rc 3 | recursive-include src *.c *.h 4 | recursive-include include *.c *.h 5 | recursive-include . *.py 6 | -------------------------------------------------------------------------------- /contrib/distorm/examples/linux/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # diStorm (Linux Port) / Demo Application Makefile 3 | # 4 | 5 | TARGET = disasm 6 | CC = gcc 7 | CFLAGS = -Wall -O2 -o 8 | 9 | all: disasm 10 | 11 | disasm: 12 | ${CC} ${CFLAGS} ${TARGET} main.c ../../distorm3.a 13 | 14 | clean: 15 | /bin/rm -rf *.o ${TARGET} 16 | -------------------------------------------------------------------------------- /contrib/distorm/examples/tests/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # diStorm (Linux Port) / Demo Application Makefile 3 | # 4 | 5 | TARGET = disasm 6 | CC = gcc 7 | CFLAGS = -Wall -O2 -I. -o 8 | 9 | all: disasm 10 | 11 | disasm: 12 | ${CC} ${CFLAGS} ${TARGET} main.cpp ../distorm64.a 13 | 14 | clean: 15 | /bin/rm -rf *.o ${TARGET} 16 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/src/diStorm3/DecodedResult.java: -------------------------------------------------------------------------------- 1 | package diStorm3; 2 | 3 | public class DecodedResult { 4 | public DecodedResult(int maxInstructions) { 5 | mMaxInstructions = maxInstructions; 6 | mInstructions = null; 7 | } 8 | 9 | public DecodedInst[] mInstructions; 10 | private int mMaxInstructions; 11 | } -------------------------------------------------------------------------------- /internal/sdkgen/PUBG.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Engine/IGenerator.h" 4 | #include "Engine/UE4/GenericTypes.h" 5 | #include "Engine/ObjectsStore.h" 6 | #include "Engine/NamesStore.h" 7 | #include "Engine/NameValidator.h" 8 | #include "Target/PUBG/EngineClasses.h" 9 | 10 | DWORD WINAPI SdkGeneratorOnAttach(LPVOID lpParameter); 11 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/src/diStorm3/DecomposedResult.java: -------------------------------------------------------------------------------- 1 | package diStorm3; 2 | 3 | public class DecomposedResult { 4 | public DecomposedResult(int maxInstructions) { 5 | mMaxInstructions = maxInstructions; 6 | mInstructions = null; 7 | } 8 | 9 | public DecomposedInst[] mInstructions; 10 | private int mMaxInstructions; 11 | } -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /internal/sdkgen/Engine/Logger.cpp: -------------------------------------------------------------------------------- 1 | #include "Logger.h" 2 | 3 | std::ostream* Logger::stream = nullptr; 4 | 5 | void Logger::SetStream(std::ostream* _stream) 6 | { 7 | stream = _stream; 8 | } 9 | 10 | void Logger::Log(const std::string& message) 11 | { 12 | if (stream != nullptr) { 13 | (*stream) << message << '\n' << std::flush; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /internal/sdk/Names.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Types.h" 4 | 5 | 6 | class NamesProxy { 7 | public: 8 | NamesProxy(); 9 | 10 | inline void *GetAddress() const { return Names; } 11 | 12 | int32_t GetNum() const; 13 | bool IsValid(int32_t id) const; 14 | std::string GetById(int32_t id) const; 15 | 16 | private: 17 | void *Names; 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pubg_internal 2 | 3 | Old PUBG internal I made for fun and research. It seems some bad actors were able to get their hands on this, so I am publicizing it. 4 | 5 | ## Contains 6 | 7 | - Kernel driver used for mapping the PE image into a protected process. 8 | - PUBG SDK generator updated around summer of 2019 9 | - Simple PUBG cheat with ESP 10 | 11 | Have fun, and fuck you UnknownCheats 🖕 12 | -------------------------------------------------------------------------------- /contrib/distorm/examples/cs/distorm-net/DecodedResult.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace diStorm 3 | { 4 | public class DecodedResult 5 | { 6 | public DecodedResult(int maxInstructions) 7 | { 8 | MaxInstructions = maxInstructions; 9 | Instructions = null; 10 | } 11 | public DecodedInst[] Instructions { get; internal set; } 12 | public int MaxInstructions { get; internal set; } 13 | } 14 | } -------------------------------------------------------------------------------- /contrib/distorm/examples/cs/distorm-net/DecomposedResult.cs: -------------------------------------------------------------------------------- 1 | namespace diStorm 2 | { 3 | public class DecomposedResult 4 | { 5 | public DecomposedResult(int maxInstructions) 6 | { 7 | MaxInstructions = maxInstructions; 8 | Instructions = null; 9 | } 10 | 11 | public DecomposedInst[] Instructions { get; internal set; } 12 | public int MaxInstructions { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /contrib/distorm/examples/cs/distorm-net/DecodedInst.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace diStorm 4 | { 5 | public class DecodedInst 6 | { 7 | internal DecodedInst() { } 8 | 9 | public string Mnemonic { get; internal set; } 10 | public string Operands { get; internal set; } 11 | public string Hex { get; internal set; } 12 | public uint Size { get; internal set; } 13 | public IntPtr Offset { get; internal set; } 14 | } 15 | } -------------------------------------------------------------------------------- /contrib/distorm/examples/ddk/distorm.ini: -------------------------------------------------------------------------------- 1 | \registry\machine\system\currentcontrolset\services\distorm 2 | ImagePath = system32\drivers\distorm.sys 3 | DisplayName = "distorm" 4 | Type = REG_DWORD 0x1 5 | Start = REG_DWORD 0x3 6 | Group = Extended base 7 | ErrorControl = REG_DWORD 0x1 8 | \registry\machine\system\currentcontrolset\services\distorm\Parameters 9 | BreakOnEntry = REG_DWORD 0x0 10 | DebugMask = REG_DWORD 0x0 11 | LogEvents = REG_DWORD 0x0 -------------------------------------------------------------------------------- /contrib/distorm/examples/cs/distorm-net/Operand.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace diStorm 3 | { 4 | 5 | public enum OperandType : byte 6 | { 7 | None, 8 | Reg, 9 | Imm, 10 | Imm1, 11 | Imm2, 12 | Disp, 13 | Smem, 14 | Mem, 15 | Pc, 16 | Ptr 17 | } 18 | 19 | public class Operand 20 | { 21 | public OperandType Type { get; internal set; } 22 | public int Index { get; internal set; } 23 | public int Size { get; internal set; } 24 | } 25 | } -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | distorm 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /internal/sdk/Format.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Types.h" 4 | 5 | #include 6 | 7 | class UEnum; 8 | class UStruct; 9 | 10 | namespace fmt { 11 | 12 | std::string MakeValidName(const std::string&& Name); 13 | std::string MakeUniqueEnumCppName(UEnum const* e); 14 | std::string MakeUniqueStructCppName(UStruct const* s); 15 | 16 | std::string StringifyFunctionFlags(const uint32_t Flags); 17 | std::string StringifyPropertyFlags(const uint64_t Flags); 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/src/diStorm3/Operand.java: -------------------------------------------------------------------------------- 1 | package diStorm3; 2 | 3 | public class Operand { 4 | 5 | public enum OperandType { 6 | None, Reg, Imm, Imm1, Imm2, Disp, Smem, Mem, Pc, Ptr 7 | } 8 | 9 | private int mType; 10 | private int mIndex; 11 | private int mSize; 12 | 13 | public OperandType getType() { 14 | return OperandType.values()[mType]; 15 | } 16 | 17 | public int getIndex() { 18 | return mIndex; 19 | } 20 | 21 | public int getSize() { 22 | return mSize; 23 | } 24 | } -------------------------------------------------------------------------------- /contrib/distorm/examples/ddk/dummy.c: -------------------------------------------------------------------------------- 1 | // Since the DDK's nmake is limited with directories, we will bypass that with this simple hack. 2 | // Thanks to Razvan Hobeanu. 3 | // Sep 2009. 4 | 5 | 6 | #include "../src/mnemonics.c" 7 | #include "../src/wstring.c" 8 | #include "../src/textdefs.c" 9 | #include "../src/x86defs.c" 10 | #include "../src/prefix.c" 11 | #include "../src/operands.c" 12 | #include "../src/insts.c" 13 | #include "../src/instructions.c" 14 | #include "../src/distorm.c" 15 | #include "../src/decoder.c" 16 | -------------------------------------------------------------------------------- /contrib/distorm/examples/win32/disasm.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | 10 | 11 | Source Files 12 | 13 | 14 | -------------------------------------------------------------------------------- /internal/sdkgen/Engine/NameValidator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class UEConst; 6 | class UEEnum; 7 | class UEStruct; 8 | 9 | /// 10 | /// Makes valid C++ name from the given name. 11 | /// 12 | /// The name to process. 13 | /// A valid C++ name. 14 | std::string MakeValidName(std::string&& name); 15 | 16 | std::string SimplifyEnumName(std::string&& name); 17 | 18 | std::string MakeUniqueCppName(const UEConst& c); 19 | std::string MakeUniqueCppName(const UEEnum& e); 20 | std::string MakeUniqueCppName(const UEStruct& ss); 21 | -------------------------------------------------------------------------------- /driver/driver.inf: -------------------------------------------------------------------------------- 1 | ; 2 | ; driver.inf 3 | ; 4 | 5 | [Version] 6 | Signature="$WINDOWS NT$" 7 | Class=System 8 | ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318} 9 | Provider=%ManufacturerName% 10 | DriverVer= 11 | CatalogFile=driver.cat 12 | 13 | [DestinationDirs] 14 | DefaultDestDir = 12 15 | 16 | 17 | [SourceDisksNames] 18 | 1 = %DiskName%,,,"" 19 | 20 | [SourceDisksFiles] 21 | 22 | 23 | [Manufacturer] 24 | %ManufacturerName%=Standard,NT$ARCH$ 25 | 26 | [Standard.NT$ARCH$] 27 | 28 | 29 | [Strings] 30 | ManufacturerName="" ;TODO: Replace with your manufacturer name 31 | ClassName="" 32 | DiskName="" -------------------------------------------------------------------------------- /contrib/distorm/examples/cs/distorm-net/CodeInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace diStorm 4 | { 5 | public class CodeInfo 6 | { 7 | public CodeInfo(long codeOffset, byte[] rawCode, DecodeType dt, int features) 8 | { 9 | _code = new byte[rawCode.Length]; 10 | Array.Copy(rawCode, _code, _code.Length); 11 | 12 | _codeOffset = codeOffset; 13 | _decodeType = dt; 14 | _features = features; 15 | } 16 | 17 | internal long _codeOffset; 18 | internal long _nextOffset; 19 | internal byte[] _code; 20 | internal DecodeType _decodeType; 21 | internal int _features; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/src/diStorm3/DecodedInst.java: -------------------------------------------------------------------------------- 1 | package diStorm3; 2 | 3 | public class DecodedInst { 4 | DecodedInst() 5 | { 6 | } 7 | private String mMnemonic; 8 | private String mOperands; 9 | private String mHex; 10 | private int mSize; 11 | private long mOffset; 12 | 13 | public String getMnemonic() { 14 | return mMnemonic; 15 | } 16 | 17 | public String getOperands() { 18 | return mOperands; 19 | } 20 | 21 | public String getHex() { 22 | return mHex; 23 | } 24 | 25 | public int getSize() { 26 | return mSize; 27 | } 28 | 29 | public long getOffset() { 30 | return mOffset; 31 | } 32 | } -------------------------------------------------------------------------------- /native/private/nativeexcept.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "nativecommon.h" 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif // __cplusplus 8 | 9 | 10 | /// 11 | /// < Exception Routines > 12 | /// 13 | 14 | typedef 15 | NTSTATUS 16 | (NTAPI *PNT_RAISE_EXCEPTION)( 17 | IN PEXCEPTION_RECORD ExceptionRecord, 18 | IN PCONTEXT Context, 19 | IN BOOLEAN FirstChance 20 | ); 21 | NTSYSAPI 22 | NTSTATUS 23 | NTAPI 24 | NtRaiseException( 25 | IN PEXCEPTION_RECORD ExceptionRecord, 26 | IN PCONTEXT Context, 27 | IN BOOLEAN FirstChance 28 | ); 29 | 30 | 31 | #ifdef __cplusplus 32 | } // extern "C" 33 | #endif // __cplusplus -------------------------------------------------------------------------------- /contrib/distorm/MANIFEST: -------------------------------------------------------------------------------- 1 | COPYING 2 | setup.cfg 3 | setup.py 4 | include\distorm.h 5 | include\mnemonics.h 6 | python\distorm3\__init__.py 7 | examples\python\sample.py 8 | src\config.h 9 | src\decoder.c 10 | src\decoder.h 11 | src\distorm.c 12 | src\instructions.c 13 | src\instructions.h 14 | src\insts.c 15 | src\insts.h 16 | src\mnemonics.c 17 | src\operands.c 18 | src\operands.h 19 | src\prefix.c 20 | src\prefix.h 21 | src\textdefs.c 22 | src\textdefs.h 23 | src\wstring.c 24 | src\wstring.h 25 | src\x86defs.h 26 | make\win32\cdistorm.vcxproj 27 | make\win32\cdistorm.vcxproj.filters 28 | make\win32\distorm.sln 29 | make\win32\resource.h 30 | make\win32\Resource.rc 31 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/Makefile: -------------------------------------------------------------------------------- 1 | UNAME_S := $(shell uname -s) 2 | 3 | ifeq ($(UNAME_S),Darwin) 4 | 5 | JAVA_HOME=$(shell /usr/libexec/java_home) 6 | 7 | all: libjdistorm.dylib 8 | libjdistorm.dylib: jdistorm.c jdistorm.h 9 | gcc -dynamiclib -o libjdistorm.dylib jdistorm.c -I ${JAVA_HOME}/include/ -I ${JAVA_HOME}/include/darwin/ -ldistorm3 10 | 11 | endif 12 | 13 | ifeq ($(UNAME_S),Linux) 14 | 15 | all: libjdistorm.so 16 | jdistorm.o: jdistorm.c jdistorm.h 17 | gcc -c jdistorm.c -fPIC -I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux 18 | 19 | libjdistorm.so: jdistorm.o 20 | gcc -shared -o libjdistorm.so -L${JAVA_HOME}/jre/lib -ldistorm3 jdistorm.o 21 | 22 | endif 23 | 24 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | #Sun Oct 31 17:27:29 IST 2010 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.6 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.source=1.6 13 | -------------------------------------------------------------------------------- /internal/sdkgen/Engine/UE4/Package.cpp: -------------------------------------------------------------------------------- 1 | #include "../Package.h" 2 | 3 | bool Package::Method::Parameter::MakeType(UEPropertyFlags flags, Type& type) 4 | { 5 | if (flags & UEPropertyFlags::ReturnParm) { 6 | 7 | type = Type::Return; 8 | 9 | } else if (flags & UEPropertyFlags::OutParm) { 10 | 11 | //if it is a const parameter make it a default parameter 12 | if (flags & UEPropertyFlags::ConstParm) { 13 | type = Type::Default; 14 | } else { 15 | type = Type::Out; 16 | } 17 | 18 | } else if (flags & UEPropertyFlags::Parm) { 19 | 20 | type = Type::Default; 21 | 22 | } else { 23 | 24 | return false; 25 | } 26 | 27 | return true; 28 | } -------------------------------------------------------------------------------- /native/native.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // 4 | // Thanks to Microsoft's DDK and Process Hacker for this stuff! 5 | // 6 | 7 | #include "private/nativecommon.h" 8 | #include "private/nativepool.h" 9 | #include "private/nativeex.h" 10 | #include "private/nativeob.h" 11 | #include "private/nativepeb.h" 12 | #include "private/nativeteb.h" 13 | #include "private/nativeexcept.h" 14 | #include "private/nativeps.h" 15 | #include "private/nativeinfo.h" 16 | #include "private/nativemm.h" 17 | #include "private/nativeprefetch.h" 18 | #include "private/nativeio.h" 19 | #include "private/nativesec.h" 20 | #include "private/nativepecoff.h" 21 | #include "private/nativertl.h" 22 | #include "private/nativeldr.h" 23 | #include "private/nativeuser.h" 24 | #include "private/nativewow64.h" 25 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/distorm/src/diStorm3/CodeInfo.java: -------------------------------------------------------------------------------- 1 | package diStorm3; 2 | 3 | import java.nio.ByteBuffer; 4 | 5 | public class CodeInfo { 6 | public CodeInfo(long codeOffset, ByteBuffer code, distorm3.DecodeType dt, int features) { 7 | mCodeOffset = codeOffset; 8 | mCode = code; 9 | mDecodeType = dt.ordinal(); 10 | mFeatures = features; 11 | } 12 | 13 | public CodeInfo(long codeOffset, byte[] rawCode, distorm3.DecodeType dt, int features) { 14 | mCode = ByteBuffer.allocateDirect(rawCode.length); 15 | mCode.put(rawCode); 16 | 17 | mCodeOffset = codeOffset; 18 | mDecodeType = dt.ordinal(); 19 | mFeatures = features; 20 | } 21 | 22 | private long mCodeOffset; 23 | private long mNextOffset; 24 | private ByteBuffer mCode; 25 | private int mDecodeType; 26 | private int mFeatures; 27 | } -------------------------------------------------------------------------------- /driver/dispatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Blackout Driver 3 | * Copyright (c) 2018-2019 Aidan Khoury. All rights reserved. 4 | * 5 | * @file dispatch.h 6 | * @author Aidan Khoury (ajkhoury) 7 | * @date 12/12/2018 8 | */ 9 | 10 | #ifndef _BLACKOUT_DRIVER_IOCTL_H_ 11 | #define _BLACKOUT_DRIVER_IOCTL_H_ 12 | #if defined(_MSC_VER) 13 | #pragma once 14 | #endif 15 | 16 | #include "driver.h" 17 | 18 | _Dispatch_type_(IRP_MJ_CREATE) DRIVER_DISPATCH BoDeviceCreate; // This function handles the 'create' irp. 19 | _Dispatch_type_(IRP_MJ_CLOSE) DRIVER_DISPATCH BoDeviceClose; // This function handles the 'close' irp. 20 | _Dispatch_type_(IRP_MJ_CLEANUP) DRIVER_DISPATCH BoDeviceCleanup; // This function handles the 'cleanup' irp. 21 | _Dispatch_type_(IRP_MJ_DEVICE_CONTROL) DRIVER_DISPATCH BoDeviceControl; // This function handles the 'ioctl' irp. 22 | 23 | #endif // _BLACKOUT_DRIVER_IOCTL_H_ -------------------------------------------------------------------------------- /contrib/distorm/src/operands.h: -------------------------------------------------------------------------------- 1 | /* 2 | operands.h 3 | 4 | diStorm3 - Powerful disassembler for X86/AMD64 5 | http://ragestorm.net/distorm/ 6 | distorm at gmail dot com 7 | Copyright (C) 2003-2018 Gil Dabah 8 | This library is licensed under the BSD license. See the file COPYING. 9 | */ 10 | 11 | 12 | #ifndef OPERANDS_H 13 | #define OPERANDS_H 14 | 15 | #include "config.h" 16 | #include "decoder.h" 17 | #include "prefix.h" 18 | #include "instructions.h" 19 | 20 | 21 | extern uint32_t _REGISTERTORCLASS[]; 22 | 23 | int operands_extract(_CodeInfo* ci, _DInst* di, const uint8_t* startCode, _InstInfo* ii, 24 | _iflags instFlags, _OpType type, _OperandNumberType opNum, 25 | unsigned int modrm, _PrefixState* ps, _DecodeType effOpSz, 26 | _DecodeType effAdrSz, int* lockableInstruction); 27 | 28 | #endif /* OPERANDS_H */ 29 | -------------------------------------------------------------------------------- /internal/sdkgen/Engine/PrintHelper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | void PrintFileHeader(std::ostream& os, const std::vector& includes, const bool isHeaderFile); 7 | 8 | void PrintFileHeader(std::ostream& os, const bool isHeaderFile); 9 | 10 | void PrintFileFooter(std::ostream& os); 11 | 12 | void PrintSectionHeader(std::ostream& os, const char* name); 13 | 14 | enum class FileContentType { 15 | Structs, 16 | Classes, 17 | Functions, 18 | FunctionParameters 19 | }; 20 | 21 | /// 22 | /// Generates a file name composed by the game name and the package object. 23 | /// 24 | /// The type of the file. 25 | /// 26 | /// The generated file name. 27 | /// 28 | std::string GenerateFileName(const FileContentType type, const class Package& package); 29 | -------------------------------------------------------------------------------- /utils/vmt.cpp: -------------------------------------------------------------------------------- 1 | #include "vmt.h" 2 | #include "utils.h" 3 | 4 | VTHook::VTHook(void *InObject) 5 | { 6 | Instance = static_cast(InObject); 7 | 8 | // Roughly calculate the VTable method count. 9 | uintptr_t ImageBase = reinterpret_cast(utils::GetModuleHandleWIDE(NULL)); 10 | size_t ImageSize = utils::GetModuleSize((HMODULE)ImageBase); 11 | VTableSize = 0; 12 | while (1) { 13 | uintptr_t VTableEntry = static_cast(*Instance)[VTableSize]; 14 | if (VTableEntry < ImageBase || VTableEntry >= ImageBase + ImageSize) 15 | break; 16 | ++VTableSize; 17 | } 18 | 19 | OriginalVTable = *Instance; 20 | CurrentVTable = std::make_unique(VTableSize); 21 | 22 | memcpy(CurrentVTable.get(), OriginalVTable, VTableSize * sizeof(uintptr_t)); 23 | 24 | *Instance = CurrentVTable.get(); 25 | } 26 | -------------------------------------------------------------------------------- /utils/vthook.cpp: -------------------------------------------------------------------------------- 1 | #include "vthook.h" 2 | #include "utils.h" 3 | 4 | SafeVTableHook::SafeVTableHook(void *InObject) 5 | { 6 | Instance = static_cast(InObject); 7 | 8 | // Roughly calculate the VTable method count. 9 | uintptr_t ImageBase = reinterpret_cast(utils::GetModuleHandleWIDE(NULL)); 10 | size_t ImageSize = utils::GetModuleSize((HMODULE)ImageBase); 11 | VTableSize = 0; 12 | while (1) { 13 | uintptr_t VTableEntry = static_cast(*Instance)[VTableSize]; 14 | if (VTableEntry < ImageBase || VTableEntry >= ImageBase + ImageSize) 15 | break; 16 | ++VTableSize; 17 | } 18 | 19 | OriginalVTable = *Instance; 20 | CurrentVTable = std::make_unique(VTableSize); 21 | 22 | memcpy(CurrentVTable.get(), OriginalVTable, VTableSize * sizeof(uintptr_t)); 23 | 24 | *Instance = CurrentVTable.get(); 25 | } 26 | -------------------------------------------------------------------------------- /contrib/distorm/make/win32/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by resource.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | //{{NO_DEPENDENCIES}} 16 | // Microsoft Visual C++ generated include file. 17 | // Used by Resource.rc 18 | 19 | // Next default values for new objects 20 | // 21 | #ifdef APSTUDIO_INVOKED 22 | #ifndef APSTUDIO_READONLY_SYMBOLS 23 | #define _APS_NEXT_RESOURCE_VALUE 101 24 | #define _APS_NEXT_COMMAND_VALUE 40001 25 | #define _APS_NEXT_CONTROL_VALUE 1001 26 | #define _APS_NEXT_SYMED_VALUE 101 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/distorm/examples/java/jdistorm.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jdistorm", "jdistorm.vcproj", "{AB6B51F5-79C6-44CA-9D0B-7CB2A009A9AB}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x64 = Debug|x64 9 | Release|x64 = Release|x64 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {AB6B51F5-79C6-44CA-9D0B-7CB2A009A9AB}.Debug|x64.ActiveCfg = Debug|x64 13 | {AB6B51F5-79C6-44CA-9D0B-7CB2A009A9AB}.Debug|x64.Build.0 = Debug|x64 14 | {AB6B51F5-79C6-44CA-9D0B-7CB2A009A9AB}.Release|x64.ActiveCfg = Release|x64 15 | {AB6B51F5-79C6-44CA-9D0B-7CB2A009A9AB}.Release|x64.Build.0 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /contrib/distorm/examples/tests/tests.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "tests.vcxproj", "{C35D3921-227A-432A-BB5D-90ECEBAB08B2}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {C35D3921-227A-432A-BB5D-90ECEBAB08B2}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {C35D3921-227A-432A-BB5D-90ECEBAB08B2}.Debug|Win32.Build.0 = Debug|Win32 14 | {C35D3921-227A-432A-BB5D-90ECEBAB08B2}.Release|Win32.ActiveCfg = Release|Win32 15 | {C35D3921-227A-432A-BB5D-90ECEBAB08B2}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /driver/mm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Blackout Driver 3 | * Copyright (c) 2018-2019 Aidan Khoury. All rights reserved. 4 | * 5 | * @file mm.h 6 | * @author Aidan Khoury (ajkhoury) 7 | * @date 8/27/2018 8 | */ 9 | 10 | #ifndef _BLACKOUT_DRIVER_MM_H_ 11 | #define _BLACKOUT_DRIVER_MM_H_ 12 | #if defined(_MSC_VER) 13 | #pragma once 14 | #endif 15 | 16 | #include "ntapi.h" 17 | 18 | #define MMAPI NTAPI 19 | 20 | #define MM_POOL_TAG ' mM' 21 | 22 | 23 | PVOID 24 | MMAPI 25 | MmAllocateNonPaged( 26 | IN SIZE_T NumberOfBytes 27 | ); 28 | 29 | PVOID 30 | MMAPI 31 | MmAllocateNonPagedNx( 32 | IN SIZE_T NumberOfBytes 33 | ); 34 | 35 | PVOID 36 | MMAPI 37 | MmAllocatePaged( 38 | IN SIZE_T NumberOfBytes 39 | ); 40 | 41 | VOID 42 | MMAPI 43 | MmFreeNonPaged( 44 | IN PVOID P 45 | ); 46 | 47 | #define MmFreeNonPagedNx MmFreeNonPaged 48 | 49 | VOID 50 | MMAPI 51 | MmFreePaged( 52 | IN PVOID P 53 | ); 54 | 55 | 56 | #endif // _BLACKOUT_DRIVER_MM_H_ -------------------------------------------------------------------------------- /vendor/vmp/driver.vmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | A debugger has been found running in your system. 6 | Sorry, this application cannot run under a vm. 7 | File corrupted! 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |