mirror of https://github.com/x64dbg/TitanEngine
fix some potential underflows (more to come)
This commit is contained in:
parent
e7deed5ef4
commit
7f1e44bda7
|
|
@ -295,6 +295,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;
|
||||||
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)ReadMemory + 2), 2);
|
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)ReadMemory + 2), 2);
|
||||||
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
||||||
}
|
}
|
||||||
|
|
@ -323,6 +324,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;
|
||||||
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)
|
||||||
|
|
@ -429,6 +431,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;
|
||||||
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)InstructionAddress + 2), 2);
|
RtlMoveMemory(&ReadMemData, (LPVOID)((ULONG_PTR)InstructionAddress + 2), 2);
|
||||||
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
TargetedAddress = ReadMemData + InstructionAddress + CurrentInstructionSize;
|
||||||
}
|
}
|
||||||
|
|
@ -457,6 +460,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;
|
||||||
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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue