mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
Fixed GIsClient (BIG)
This commit is contained in:
@@ -1109,7 +1109,7 @@ static inline uint64 FindCollectGarbage()
|
||||
|
||||
static inline uint64 FindActorGetNetMode()
|
||||
{
|
||||
// return 0;
|
||||
return 0; // We *shouldnt* need to hook this now because I fixed FindGIsClient
|
||||
|
||||
if (Engine_Version == 500) // hah well this and 427 does like nothing cuz inline mostly
|
||||
{
|
||||
@@ -1463,81 +1463,7 @@ static inline uint64 FindMcpIsDedicatedServerOffset()
|
||||
return 0x60; // 1.7.2 & 1.11 & 4.1
|
||||
}
|
||||
|
||||
static inline uint64 FindGIsClient()
|
||||
{
|
||||
/* if (Fortnite_Version >= 20)
|
||||
return 0; */
|
||||
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
|
||||
std::vector<std::vector<uint8_t>> BytesArray = { {0x88, 0x05}, {0xC6, 0x05}, {0x88, 0x1D}, {0x44, 0x88}};
|
||||
|
||||
int Skip = Engine_Version <= 420 ? 1 : 2;
|
||||
|
||||
uint64 Addy;
|
||||
|
||||
for (int i = 0; i < 50; i++) // we should subtract from skip if goup
|
||||
{
|
||||
auto CurrentByte = *(Memcury::ASM::MNEMONIC*)(Addr.Get() - i);
|
||||
|
||||
// if (bPrint)
|
||||
// std::cout << "CurrentByte: " << std::hex << (int)CurrentByte << '\n';
|
||||
|
||||
bool ShouldBreak = false;
|
||||
|
||||
// LOG_INFO(LogDev, "[{}] Byte: 0x{:x}", i, (int)CurrentByte);
|
||||
|
||||
for (auto& Bytes : BytesArray)
|
||||
{
|
||||
if (CurrentByte == Bytes[0])
|
||||
{
|
||||
bool Found = true;
|
||||
for (int j = 1; j < Bytes.size(); j++)
|
||||
{
|
||||
if (*(Memcury::ASM::MNEMONIC*)(Addr.Get() - i + j) != Bytes[j])
|
||||
{
|
||||
Found = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Found)
|
||||
{
|
||||
int Relative = Bytes[0] == 0x44 ? 3 : 2;
|
||||
// LOG_INFO(LogDev, "[{}] No Rel 0x{:x} Rel: 0x{:x}", Skip, Memcury::Scanner(Addr.Get() - i).Get() - __int64(GetModuleHandleW(0)), Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get() - __int64(GetModuleHandleW(0)));
|
||||
|
||||
if (Skip > 0)
|
||||
{
|
||||
Skip--;
|
||||
continue;
|
||||
}
|
||||
|
||||
Addy = Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get();
|
||||
ShouldBreak = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ShouldBreak)
|
||||
break;
|
||||
|
||||
// std::cout << std::format("CurrentByte: 0x{:x}\n", (uint8_t)CurrentByte);
|
||||
}
|
||||
|
||||
// LOG_INFO(LogDev, "Addy: 0x{:x}", Addy - __int64(GetModuleHandleW(0)));
|
||||
|
||||
return Addy; // 0; // Memcury::Scanner(Addy3).RelativeOffset(2).Get();
|
||||
|
||||
/*
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
int Skip = 1;
|
||||
auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, Skip);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, Skip);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x88, 0x1D }, 50, 0, true, Skip);
|
||||
|
||||
return Memcury::Scanner(Addy).RelativeOffset(2).Get();
|
||||
*/
|
||||
}
|
||||
uint64 FindGIsClient(); // AHHH
|
||||
|
||||
static inline uint64 FindGetNetMode()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user