fix ls drop bug

This commit is contained in:
Milxnor
2023-06-21 14:51:42 -04:00
parent 5e2a74764a
commit e049e870dc
7 changed files with 85 additions and 48 deletions

View File

@@ -549,6 +549,7 @@ DWORD WINAPI Main(LPVOID)
LOG_INFO(LogDev, "Switch levels.");
auto AddressesToNull = Addresses::GetFunctionsToNull();
const auto AddressesToReturnTrue = Addresses::GetFunctionsToReturnTrue();
auto ServerCheatAllIndex = GetFunctionIdxOrPtr(FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerCheatAll"));
@@ -571,6 +572,17 @@ DWORD WINAPI Main(LPVOID)
VirtualProtect((PVOID)func, 1, dwProtection, &dwTemp);
}
for (auto func : AddressesToReturnTrue)
{
if (func == 0)
continue;
LOG_INFO(LogDev, "Forcing return true on 0x{:x}", func - __int64(GetModuleHandleW(0)));
MH_CreateHook((PVOID)func, ReturnTrueHook, nullptr);
MH_EnableHook((PVOID)func);
}
if (Fortnite_Version != 22.4)
{
auto matchmaking = Memcury::Scanner::FindPattern("83 BD ? ? ? ? 01 7F 18 49 8D 4D D8 48 8B D6 E8 ? ? ? ? 48", false).Get();