Skip to content

Commit

Permalink
Merge pull request #127 from Connor-jt/master
Browse files Browse the repository at this point in the history
potentially fixed address loading; test commit
  • Loading branch information
Gamergotten authored Jun 25, 2023
2 parents 00aa9b5 + b4d3d5b commit 348bd08
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,16 +1126,17 @@ public async Task ScanMem()

long aobScan = 0;
long haloInfinite = 0;
bool found_pointer = false;
if (aobScanResults != null)
{
foreach (long aobResult in aobScanResults)
{
string temp = aobResult.ToString("X");
if (temp.EndsWith("0000"))
if (temp.EndsWith("0000") || aobScan == 0) // failsafe for if it doesn't end in "0000"
{
aobScan = aobResult;
}
aobScan = aobResult;
//aobScan = aobResult; // problematic code; if an address was found after (before?) then it wouldn't find the pointer
}

//get all processes named HaloInfinite
Expand All @@ -1151,7 +1152,10 @@ public async Task ScanMem()
aobSingle = Regex.Replace(aobSingle, ".{2}", "$0 ");
aobSingle = aobSingle.TrimEnd();
Debugger.Log(0, "DBGTIMING", "AOB: " + aobSingle);
long pointer = (await M.AoBScan(haloInfinite, 140737488289791, aobSingle + " 00 00", true, true, true)).First();
var testing_var = await M.AoBScan(haloInfinite, 0x7FFFFFFEFFFF, aobSingle + " 00 00", true, true, true);
long pointer = testing_var.First();
found_pointer = (pointer != 0);

Debug.WriteLine(pointer);
Settings.Default.ProcAsyncBaseAddr = "HaloInfinite.exe+0x" + (pointer - haloInfinite).ToString("X");
Settings.Default.Save();
Expand All @@ -1169,7 +1173,8 @@ public async Task ScanMem()
else
{
BaseAddress = aobScan;
SetStatus("Process Hooked: " + M.mProc.Process.Id + " (AOB)");
if (found_pointer) SetStatus("Process Hooked: " + M.mProc.Process.Id + " (AOB): pointer found");
else SetStatus("Process Hooked: " + M.mProc.Process.Id + " (AOB): pointer not found (may not load tags)");
hooked = true;
}
}
Expand Down

0 comments on commit 348bd08

Please sign in to comment.