mirror of https://github.com/x64dbg/TitanEngine
- renamed Helper to Global.Helper
- added Global.Helper to the project files
This commit is contained in:
parent
68a5a4b7a0
commit
6bdbe09afe
|
|
@ -1,5 +1,5 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "Helper.h"
|
#include "Global.Helper.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -52,9 +52,18 @@ public:
|
||||||
{
|
{
|
||||||
mem.clear();
|
mem.clear();
|
||||||
}
|
}
|
||||||
DynBufVec& GetVector() {return mem;}
|
DynBufVec& GetVector()
|
||||||
const DynBufVec& GetVector() const {return mem;}
|
{
|
||||||
size_t Size() const {return mem.size();}
|
return mem;
|
||||||
|
}
|
||||||
|
const DynBufVec& GetVector() const
|
||||||
|
{
|
||||||
|
return mem;
|
||||||
|
}
|
||||||
|
size_t Size() const
|
||||||
|
{
|
||||||
|
return mem.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
@ -292,7 +292,7 @@ __declspec(dllexport) long long TITCALL GetJumpDestinationEx(HANDLE hProcess, UL
|
||||||
}
|
}
|
||||||
else if(CompareMemory->DataByte[0] == 0x0F && CompareMemory->DataByte[1] >= 0x81 && CompareMemory->DataByte[1] <= 0x8F && CurrentInstructionSize == 4)
|
else if(CompareMemory->DataByte[0] == 0x0F && CompareMemory->DataByte[1] >= 0x81 && CompareMemory->DataByte[1] <= 0x8F && CurrentInstructionSize == 4)
|
||||||
{
|
{
|
||||||
ReadMemData = 0;
|
ReadMemData = 0;
|
||||||
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)ReadMemory + 2), 2);
|
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)ReadMemory + 2), 2);
|
||||||
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
||||||
}
|
}
|
||||||
|
|
@ -321,7 +321,7 @@ __declspec(dllexport) long long TITCALL GetJumpDestinationEx(HANDLE hProcess, UL
|
||||||
}
|
}
|
||||||
else if(CompareMemory->DataByte[0] == 0xFF && CompareMemory->DataByte[1] != 0x64 && CompareMemory->DataByte[1] >= 0x60 && CompareMemory->DataByte[1] <= 0x67 && CurrentInstructionSize == 3)
|
else if(CompareMemory->DataByte[0] == 0xFF && CompareMemory->DataByte[1] != 0x64 && CompareMemory->DataByte[1] >= 0x60 && CompareMemory->DataByte[1] <= 0x67 && CurrentInstructionSize == 3)
|
||||||
{
|
{
|
||||||
ReadMemData = 0;
|
ReadMemData = 0;
|
||||||
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)ReadMemory + 2), 1);
|
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)ReadMemory + 2), 1);
|
||||||
TargetedAddress = ReadMemData;
|
TargetedAddress = ReadMemData;
|
||||||
if(CompareMemory->DataByte[1] == 0x60)
|
if(CompareMemory->DataByte[1] == 0x60)
|
||||||
|
|
@ -427,7 +427,7 @@ __declspec(dllexport) long long TITCALL GetJumpDestinationEx(HANDLE hProcess, UL
|
||||||
}
|
}
|
||||||
else if(CompareMemory->DataByte[0] == 0x0F && CompareMemory->DataByte[1] >= 0x81 && CompareMemory->DataByte[1] <= 0x8F && CurrentInstructionSize == 4)
|
else if(CompareMemory->DataByte[0] == 0x0F && CompareMemory->DataByte[1] >= 0x81 && CompareMemory->DataByte[1] <= 0x8F && CurrentInstructionSize == 4)
|
||||||
{
|
{
|
||||||
ReadMemData = 0;
|
ReadMemData = 0;
|
||||||
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)InstructionAddress + 2), 2);
|
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)InstructionAddress + 2), 2);
|
||||||
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
||||||
}
|
}
|
||||||
|
|
@ -456,7 +456,7 @@ __declspec(dllexport) long long TITCALL GetJumpDestinationEx(HANDLE hProcess, UL
|
||||||
}
|
}
|
||||||
else if(CompareMemory->DataByte[0] == 0xFF && CompareMemory->DataByte[1] != 0x64 && CompareMemory->DataByte[1] >= 0x60 && CompareMemory->DataByte[1] <= 0x67 && CurrentInstructionSize == 3)
|
else if(CompareMemory->DataByte[0] == 0xFF && CompareMemory->DataByte[1] != 0x64 && CompareMemory->DataByte[1] >= 0x60 && CompareMemory->DataByte[1] <= 0x67 && CurrentInstructionSize == 3)
|
||||||
{
|
{
|
||||||
ReadMemData = 0;
|
ReadMemData = 0;
|
||||||
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)InstructionAddress + 2), 1);
|
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)InstructionAddress + 2), 1);
|
||||||
TargetedAddress = ReadMemData;
|
TargetedAddress = ReadMemData;
|
||||||
if(CompareMemory->DataByte[1] == 0x60)
|
if(CompareMemory->DataByte[1] == 0x60)
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ __declspec(dllexport) void* TITCALL HandlerGetHandleName(HANDLE hProcess, DWORD
|
||||||
TotalHandleCount--;
|
TotalHandleCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NameFound)
|
if(!NameFound)
|
||||||
{
|
{
|
||||||
VirtualFree(HandleFullName, NULL, MEM_RELEASE);
|
VirtualFree(HandleFullName, NULL, MEM_RELEASE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
@ -200,7 +200,7 @@ __declspec(dllexport) void* TITCALL HandlerGetHandleNameW(HANDLE hProcess, DWORD
|
||||||
TotalHandleCount--;
|
TotalHandleCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NameFound)
|
if(!NameFound)
|
||||||
{
|
{
|
||||||
VirtualFree(HandleFullName, NULL, MEM_RELEASE);
|
VirtualFree(HandleFullName, NULL, MEM_RELEASE);
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@
|
||||||
<Unit filename="Global.Garbage.h" />
|
<Unit filename="Global.Garbage.h" />
|
||||||
<Unit filename="Global.Handle.cpp" />
|
<Unit filename="Global.Handle.cpp" />
|
||||||
<Unit filename="Global.Handle.h" />
|
<Unit filename="Global.Handle.h" />
|
||||||
|
<Unit filename="Global.Helper.cpp" />
|
||||||
|
<Unit filename="Global.Helper.h" />
|
||||||
<Unit filename="Global.Injector.cpp" />
|
<Unit filename="Global.Injector.cpp" />
|
||||||
<Unit filename="Global.Injector.h" />
|
<Unit filename="Global.Injector.h" />
|
||||||
<Unit filename="Global.Librarian.cpp" />
|
<Unit filename="Global.Librarian.cpp" />
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,7 @@
|
||||||
<ClCompile Include="Global.Engine.Threading.cpp" />
|
<ClCompile Include="Global.Engine.Threading.cpp" />
|
||||||
<ClCompile Include="Global.Garbage.cpp" />
|
<ClCompile Include="Global.Garbage.cpp" />
|
||||||
<ClCompile Include="Global.Handle.cpp" />
|
<ClCompile Include="Global.Handle.cpp" />
|
||||||
|
<ClCompile Include="Global.Helper.cpp" />
|
||||||
<ClCompile Include="Global.Injector.cpp" />
|
<ClCompile Include="Global.Injector.cpp" />
|
||||||
<ClCompile Include="Global.Librarian.cpp" />
|
<ClCompile Include="Global.Librarian.cpp" />
|
||||||
<ClCompile Include="Global.Mapping.cpp" />
|
<ClCompile Include="Global.Mapping.cpp" />
|
||||||
|
|
@ -288,6 +289,7 @@
|
||||||
<ClInclude Include="Global.Engine.Threading.h" />
|
<ClInclude Include="Global.Engine.Threading.h" />
|
||||||
<ClInclude Include="Global.Garbage.h" />
|
<ClInclude Include="Global.Garbage.h" />
|
||||||
<ClInclude Include="Global.Handle.h" />
|
<ClInclude Include="Global.Handle.h" />
|
||||||
|
<ClInclude Include="Global.Helper.h" />
|
||||||
<ClInclude Include="Global.Injector.h" />
|
<ClInclude Include="Global.Injector.h" />
|
||||||
<ClInclude Include="Global.Librarian.h" />
|
<ClInclude Include="Global.Librarian.h" />
|
||||||
<ClInclude Include="Global.Mapping.h" />
|
<ClInclude Include="Global.Mapping.h" />
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,9 @@
|
||||||
<ClCompile Include="Global.Engine.Threading.cpp">
|
<ClCompile Include="Global.Engine.Threading.cpp">
|
||||||
<Filter>Source Files\TitanEngine</Filter>
|
<Filter>Source Files\TitanEngine</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Global.Helper.cpp">
|
||||||
|
<Filter>Source Files\TitanEngine</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="resource.h">
|
||||||
|
|
@ -284,6 +287,12 @@
|
||||||
<ClInclude Include="Global.Engine.Threading.h">
|
<ClInclude Include="Global.Engine.Threading.h">
|
||||||
<Filter>Header Files\TitanEngine</Filter>
|
<Filter>Header Files\TitanEngine</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="ntdll.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Global.Helper.h">
|
||||||
|
<Filter>Header Files\TitanEngine</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="TitanEngine.rc">
|
<ResourceCompile Include="TitanEngine.rc">
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ extern "C" {
|
||||||
typedef enum {
|
typedef enum {
|
||||||
Decode16Bits = 0, Decode32Bits = 1, Decode64Bits = 2
|
Decode16Bits = 0, Decode32Bits = 1, Decode64Bits = 2
|
||||||
}
|
}
|
||||||
_DecodeType;
|
_DecodeType;
|
||||||
|
|
||||||
typedef OFFSET_INTEGER _OffsetType;
|
typedef OFFSET_INTEGER _OffsetType;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@
|
||||||
typedef LONG NTSTATUS;
|
typedef LONG NTSTATUS;
|
||||||
typedef LONG KPRIORITY;
|
typedef LONG KPRIORITY;
|
||||||
|
|
||||||
typedef struct _CLIENT_ID {
|
typedef struct _CLIENT_ID
|
||||||
|
{
|
||||||
HANDLE UniqueProcess;
|
HANDLE UniqueProcess;
|
||||||
HANDLE UniqueThread;
|
HANDLE UniqueThread;
|
||||||
} CLIENT_ID, *PCLIENT_ID;
|
} CLIENT_ID, *PCLIENT_ID;
|
||||||
|
|
@ -53,7 +54,8 @@ typedef struct _PROCESS_BASIC_INFORMATION
|
||||||
} PROCESS_BASIC_INFORMATION;
|
} PROCESS_BASIC_INFORMATION;
|
||||||
typedef PROCESS_BASIC_INFORMATION *PPROCESS_BASIC_INFORMATION;
|
typedef PROCESS_BASIC_INFORMATION *PPROCESS_BASIC_INFORMATION;
|
||||||
|
|
||||||
typedef struct _THREAD_BASIC_INFORMATION {
|
typedef struct _THREAD_BASIC_INFORMATION
|
||||||
|
{
|
||||||
NTSTATUS ExitStatus;
|
NTSTATUS ExitStatus;
|
||||||
PVOID TebBaseAddress;
|
PVOID TebBaseAddress;
|
||||||
CLIENT_ID ClientId;
|
CLIENT_ID ClientId;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#include "aplib.h"
|
#include "aplib.h"
|
||||||
#include "LzmaDec.h"
|
#include "LzmaDec.h"
|
||||||
|
|
||||||
#include "Helper.h"
|
#include "Global.Helper.h"
|
||||||
|
|
||||||
#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) // ntsubauth
|
#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) // ntsubauth
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue