Code:
GetAddress(Window) {
WinGet, hWnd, ID, %Window%
return DllCall(A_PtrSize = 4
? "GetWindowLong"
: "GetWindowLongPtr"
, "Ptr", hWnd, "Int", -6, "Int64")
}
GetHandle(Window) {
WinGet, pid, PID, %Window%
return DllCall("OpenProcess", "Int", 56, "Char", 0, "UInt", pid, "UInt")
}
ReadInt64(Handle, Address) {
VarSetCapacity(Buffer, 8, 0)
DllCall("ReadProcessMemory", "UInt", Handle, "Ptr", Address, "Ptr", &Buffer, "Int64", 8)
Loop 8
Result += *(&Buffer + A_Index-1) << 8*(A_Index-1)
return Result
}
WriteUInt(Handle, Address, Value)
{
VarSetCapacity(Buffer, 4, 0)
NumPut(Value, Buffer, 0, "UInt")
return DllCall("WriteProcessMemory", "Uint", Handle, "Ptr", Address, "Ptr", &Buffer, "UInt", 4)
}
Handle := GetHandle("Fallout76")
if (Handle > 0) {
Address := GetAddress("Fallout76")
if (Address > 0) {
ListPointer := ReadInt64(Handle, Address + 89666888)
if (ListPointer > 48) {
A_ListPointer := ReadInt64(Handle, ListPointer + 1048)
if (A_ListPointer > 48) {
B_ListPointer := ReadInt64(Handle, ListPointer + 1384)
if (B_ListPointer > 48) {
A_ListBuffer := ReadInt64(Handle, A_ListPointer + 5064)
if (A_ListBuffer > 48) {
B_ListBuffer := ReadInt64(Handle, B_ListPointer + 6368)
if (B_ListBuffer > 48) {
A_ListCheck := ReadInt64(Handle, A_ListBuffer)
if (A_ListCheck == Address + 55898504) {
B_ListCheck := ReadInt64(Handle, B_ListBuffer)
if (B_ListCheck == Address + 55860432) {
WriteUInt(Handle, A_ListBuffer + 32, 1409003)
WriteUInt(Handle, B_ListBuffer + 568, 256)
}
else {
MsgBox B_ListCheck failed
}
}
else {
MsgBox A_ListCheck failed
}
}
else {
MsgBox Failed to get B_ListBuffer
}
}
else {
MsgBox Failed to get A_ListBuffer
}
}
else {
MsgBox Failed to get B_ListPointer
}
}
else {
MsgBox Failed to get A_ListPointer
}
}
else {
MsgBox Failed to get ListPointer
}
}
else {
MsgBox Failed to get Address
}
}
else {
MsgBox Failed to get Handle
}
Steps: