mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
Fix stupid s4
This commit is contained in:
@@ -54,12 +54,12 @@ uint64 FindGIsClient()
|
||||
{0x88, 0x05}, // 20.40 21.00
|
||||
{0xC6, 0x05}, // mov cs X // Checked on 1.11, 12.41
|
||||
{0x88, 0x1D}, // mov cs bl // Checked on 17.50, 19.10
|
||||
{0x44, 0x88} // IDK WHAT VERSION This for but it scuffs older builds
|
||||
{0x44, 0x88} // 4.5
|
||||
};
|
||||
|
||||
int Skip = 2; // Skip GIsServer and some variable i forgot
|
||||
int Skip = 2;
|
||||
|
||||
uint64 Addy;
|
||||
uint64 Addy = 0;
|
||||
|
||||
for (int i = 0; i < 50; i++) // we should subtract from skip if go up
|
||||
{
|
||||
@@ -87,16 +87,25 @@ uint64 FindGIsClient()
|
||||
}
|
||||
if (Found)
|
||||
{
|
||||
int Relative = Bytes[0] == 0x44 ? 3 : 2;
|
||||
bool bIsScuffedByte = Bytes[0] == 0x44;
|
||||
int Relative = bIsScuffedByte ? 3 : 2;
|
||||
auto current = Memcury::Scanner(Addr.Get() - i);
|
||||
// LOG_INFO(LogDev, "[{}] No Rel 0x{:x} Rel: 0x{:x}", Skip, current.Get() - __int64(GetModuleHandleW(0)), Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get() - __int64(GetModuleHandleW(0)));
|
||||
|
||||
if (bIsScuffedByte)
|
||||
{
|
||||
if (Bytes[2] == 0x74) // DIE 4.5 (todo check length of entire instruction)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (Skip > 0)
|
||||
{
|
||||
Skip--;
|
||||
continue;
|
||||
}
|
||||
|
||||
LOG_INFO(LogDev, "Found GIsClient with byte 0x{:x}", Bytes[0]);
|
||||
|
||||
Addy = Bytes[0] == 0xC6
|
||||
? current.RelativeOffset(Relative, 1).Get() // If mov cs then we add 1 because the last byte is the value and makes whole instructions 1 byte longer
|
||||
: current.RelativeOffset(Relative).Get();
|
||||
|
||||
Reference in New Issue
Block a user