• XSS.stack #1 – первый литературный журнал от юзеров форума

Как сделать быструю загрузку hex значения?

Spinel

CD-диск
Пользователь
Регистрация
08.10.2023
Сообщения
10
Реакции
0
При помощи cheat engine, я открываю memory viewer в процессе с 1 игрой
Нужно по определнному адресу (7FFA7D738969), изменить hex значение с этого 0f 84 c2 00 00 00 8b 40 2c 8b c8, на это 0f 84 c2 00 00 00 b8 01 00 00 00
Менять значение нужно при загрузке игры, каждый раз искать вручную этот адрес и руками менять значение не хочется, возможно ли сделать что-то вроде конфига или программы, чтобы при активации сразу бы менялось значение на нужном адресе?
1724705799851.png
 
Пожалуйста, обратите внимание, что пользователь заблокирован
Yes, it is possible to automate the process of changing memory values in a game using cheat engine by creating a script using Lua which that will auto finds and modifies the desired memory values every time you load the game.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
it is a memory editor similar to cheat engine that can be used to search and modify values in the memory of a running game
go to the search feature to look for the hexadecimal pattern. save the search results for future use. create a pointer or a custom script that will automatically locate the address in future sessions. Set the pointer or script to automatically change the value at the found addres. Save the address and the value change in an artmoney table and it will automatically apply the changes for you.
 
it is a memory editor similar to cheat engine that can be used to search and modify values in the memory of a running game
go to the search feature to look for the hexadecimal pattern. save the search results for future use. create a pointer or a custom script that will automatically locate the address in future sessions. Set the pointer or script to automatically change the value at the found addres. Save the address and the value change in an artmoney table and it will automatically apply the changes for you.
artmoney, for some reason can't find this address and hex value either. And in cheat engine, I can't find how to create a script.
 
вот примерная реализация на C++
вписываешь имя процесса и активация на F10 после запуска игры
насчет автоматизации средствами только CE не подскажу
C++:
#include <Windows.h>
#include <iostream>
#include <vector>
#include <string>
#include <TlHelp32.h>

const DWORD_PTR TARGET_ADDRESS = 0x7FFA7D738969;
const std::vector<BYTE> OLD_BYTES = {0x0f, 0x84, 0xc2, 0x00, 0x00, 0x00, 0x8b, 0x40, 0x2c, 0x8b, 0xc8};
const std::vector<BYTE> NEW_BYTES = {0x0f, 0x84, 0xc2, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x00};

DWORD GetProcessIdByName(const std::wstring& processName) {
    DWORD processId = 0;
    HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
    
    if (snapshot != INVALID_HANDLE_VALUE) {
        PROCESSENTRY32W processEntry;
        processEntry.dwSize = sizeof(processEntry);

        if (Process32FirstW(snapshot, &processEntry)) {
            do {
                if (processName == processEntry.szExeFile) {
                    processId = processEntry.th32ProcessID;
                    break;
                }
            } while (Process32NextW(snapshot, &processEntry));
        }
        CloseHandle(snapshot);
    }
    return processId;
}

bool PatchMemory(HANDLE hProcess) {
    DWORD oldProtect;
    if (!VirtualProtectEx(hProcess, (LPVOID)TARGET_ADDRESS, NEW_BYTES.size(), PAGE_EXECUTE_READWRITE, &oldProtect)) {
        return false;
    }

    SIZE_T bytesWritten;
    if (!WriteProcessMemory(hProcess, (LPVOID)TARGET_ADDRESS, NEW_BYTES.data(), NEW_BYTES.size(), &bytesWritten)) {
        VirtualProtectEx(hProcess, (LPVOID)TARGET_ADDRESS, NEW_BYTES.size(), oldProtect, &oldProtect);
        return false;
    }

    VirtualProtectEx(hProcess, (LPVOID)TARGET_ADDRESS, NEW_BYTES.size(), oldProtect, &oldProtect);
    return true;
}

int main() {
    std::wstring processName;
    std::wcout << L"Enter the target process name (e.g., notepad.exe): ";
    std::wcin >> processName;

    std::wcout << L"Press F10 to activate" << std::endl;

    bool patched = false;
    while (true) {
        if (GetAsyncKeyState(VK_F10) & 0x8000) {
            if (!patched) {
                DWORD processId = GetProcessIdByName(processName);
                if (processId == 0) {
                    std::wcerr << L"Process " << processName << L" not found." << std::endl;
                } else {
                    HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, processId);
                    if (hProcess == NULL) {
                        std::cerr << "Error: " << GetLastError() << std::endl;
                    } else {
                        if (PatchMemory(hProcess)) {
                            std::wcout << L"Memory patched " << processName << L"!" << std::endl;
                            patched = true;
                        } else {
                            std::wcout << L"Failed" << processName << L"." << std::endl;
                        }
                        CloseHandle(hProcess);
                    }
                }
            }
            Sleep(500);
        }

        if (GetAsyncKeyState(VK_ESCAPE) & 0x8000) {
            break;
        }

        Sleep(100);
    }

    return 0;
}
 
Пожалуйста, обратите внимание, что пользователь заблокирован
bro If artmoney can't find the address and hex value and problem in creating a script in cheat engine then use cheat enegine built-in tools. to create an auto-assembly script that will automatically change the values when you activate it.


Start your game and then open cheat engine
Attach cheat engine to the game process
Go to memory view
Use search find array or the byte(remember that or paste it)
go to mem view then tools then auto assemble
Auto assemble window code it like this
Код:
[ENABLE]
aobscan(INJECT,0f 84 c2 00 00 00 8b 40 2c 8b c8) // Finds the specific pattern in memory
label(code)
label(return)

newmem:
  // Your custom code to replace the pattern
  db 0f 84 c2 00 00 00 b8 01 00 00 00

INJECT+06:
  jmp newmem
  nop
return:

[DISABLE]
INJECT+06:
  db 0f 84 c2 00 00 00 8b 40 2c 8b c8 // Reverts back to the original bytes

dealloc(newmem)


this script will search for the specific byte pattern in the game memory and replace it with the new pattern when you enable the script.

assign the Script to the cheat table will create an entry in your cheat table

start the game and open this cheat table and activate the script
 
Последнее редактирование:


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх