mirror of
https://github.com/ApfelTeeSaft/UniversalSlashingSimulator.git
synced 2026-08-26 19:33:39 +00:00
[+] ProcessEvent VTable
This commit is contained in:
@@ -14,3 +14,26 @@ uintptr_t PatternScanner::FindGetEngineVersion()
|
||||
|
||||
return Results.Get();
|
||||
}
|
||||
|
||||
uintptr_t PatternScanner::FindProcessEvent()
|
||||
{
|
||||
auto Results = Memcury::Scanner::FindStringRef(L"BadProperty");
|
||||
if (!Results.IsValid())
|
||||
return 0;
|
||||
|
||||
uintptr_t Address = Results.Get();
|
||||
uint8_t* Ptr = reinterpret_cast<uint8_t*>(Address);
|
||||
|
||||
for (int i = 0; i < 0x500; i++)
|
||||
{
|
||||
Ptr--;
|
||||
|
||||
if (Ptr[0] == 0xFF && Ptr[1] == 0x90)
|
||||
{
|
||||
int32_t Offset = *reinterpret_cast<int32_t*>(Ptr + 2);
|
||||
return static_cast<uintptr_t>(Offset / 8);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,5 @@ public:
|
||||
static PatternScanner* Get();
|
||||
public:
|
||||
uintptr_t FindGetEngineVersion();
|
||||
uintptr_t FindProcessEvent();
|
||||
};
|
||||
@@ -255,10 +255,10 @@ namespace USS
|
||||
{
|
||||
USS_LOG("Version detected from CL mapping");
|
||||
}
|
||||
else if (TryDetectFromPatterns())
|
||||
/*else if (TryDetectFromPatterns())
|
||||
{
|
||||
USS_LOG("Version detected from memory patterns");
|
||||
}
|
||||
}*/
|
||||
else
|
||||
{
|
||||
USS_ERROR("Failed to detect version");
|
||||
@@ -417,7 +417,7 @@ namespace USS
|
||||
return MapCLToVersion(CL);
|
||||
}
|
||||
|
||||
bool FVersionResolver::TryDetectFromPatterns()
|
||||
/*bool FVersionResolver::TryDetectFromPatterns()
|
||||
{
|
||||
// Try to detect version from characteristic patterns
|
||||
|
||||
@@ -486,7 +486,7 @@ namespace USS
|
||||
m_VersionInfo.FortniteCL = 3724489;
|
||||
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
|
||||
bool FVersionResolver::MapCLToVersion(uint32 CL)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace USS
|
||||
private:
|
||||
bool TryDetectFromVersionInfo();
|
||||
bool TryDetectFromCL();
|
||||
bool TryDetectFromPatterns();
|
||||
//bool TryDetectFromPatterns();
|
||||
|
||||
bool MapCLToVersion(uint32 CL);
|
||||
void ComputeFeatureFlags();
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "../STW/Missions/MissionManager.h"
|
||||
#include "../STW/Inventory/InventoryManager.h"
|
||||
#include "../STW/Building/BuildingManager.h"
|
||||
#include "../Core/Memory/PatternScanner.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
@@ -261,6 +262,8 @@ namespace USS
|
||||
USS_LOG("TObjectPtr: %s", Version.bUseTObjectPtr ? "Yes" : "No");
|
||||
USS_LOG("");
|
||||
|
||||
//printf("0x%llX\n", (unsigned long long)PatternScanner::Get()->FindProcessEvent());
|
||||
|
||||
// Initialize STW systems
|
||||
USS_LOG("Initializing STW systems...");
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -824,7 +824,7 @@ namespace Memcury
|
||||
}
|
||||
}
|
||||
|
||||
MemcuryAssertM(add != 0, "FindStringRef return nullptr");
|
||||
//MemcuryAssertM(add != 0, "FindStringRef return nullptr");
|
||||
|
||||
return Scanner(add);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user