Skip to content
TheChatArchiveThe Chat Archive
gpt-4-1106-preview· openaiHugging Face Suzhen/CodeChat

Untitled conversation

  1. User

    { Game : Palworld-Win64-Shipping.exe Version: Date : 2024-01-25 Author : Sora

    This script does blah blah blah }

    define(address,"Palworld-Win64-Shipping.exe"+2B8F253) define(bytes,48 89 01 48 8B C1)

    [ENABLE]

    assert(address,bytes) alloc(newmem,$1000,"Palworld-Win64-Shipping.exe"+2B8F253)

    label(code) label(return)

    newmem: nop nop

    code: mov [rcx],rax mov rax,rcx jmp return

    address: jmp newmem nop return:

    [DISABLE]

    address: db bytes // mov [rcx],rax // mov rax,rcx

    dealloc(newmem)

    { // ORIGINAL CODE - INJECTION POINT: Palworld-Win64-Shipping.exe+2B8F253

    Palworld-Win64-Shipping.exe+2B8F22E: E8 CD 26 3C 00 - call Palworld-Win64-Shipping.exe+2F51900 Palworld-Win64-Shipping.exe+2B8F233: 48 8B CB - mov rcx,rbx Palworld-Win64-Shipping.exe+2B8F236: 48 8B 5C 24 30 - mov rbx,[rsp+30] Palworld-Win64-Shipping.exe+2B8F23B: 48 8B 6C 24 38 - mov rbp,[rsp+38] Palworld-Win64-Shipping.exe+2B8F240: 48 8B 74 24 40 - mov rsi,[rsp+40] Palworld-Win64-Shipping.exe+2B8F245: 48 83 C4 20 - add rsp,20 Palworld-Win64-Shipping.exe+2B8F249: 5F - pop rdi Palworld-Win64-Shipping.exe+2B8F24A: E9 B1 7A 40 00 - jmp Palworld-Win64-Shipping.exe+2F96D00 Palworld-Win64-Shipping.exe+2B8F24F: CC - int 3 Palworld-Win64-Shipping.exe+2B8F250: 48 8B 02 - mov rax,[rdx] // ---------- INJECTING HERE ---------- Palworld-Win64-Shipping.exe+2B8F253: 48 89 01 - mov [rcx],rax // ---------- DONE INJECTING ---------- Palworld-Win64-Shipping.exe+2B8F256: 48 8B C1 - mov rax,rcx Palworld-Win64-Shipping.exe+2B8F259: C3 - ret Palworld-Win64-Shipping.exe+2B8F25A: CC - int 3 Palworld-Win64-Shipping.exe+2B8F25B: CC - int 3 Palworld-Win64-Shipping.exe+2B8F25C: CC - int 3 Palworld-Win64-Shipping.exe+2B8F25D: CC - int 3 Palworld-Win64-Shipping.exe+2B8F25E: CC - int 3 Palworld-Win64-Shipping.exe+2B8F25F: CC - int 3 Palworld-Win64-Shipping.exe+2B8F260: 8B 02 - mov eax,[rdx] Palworld-Win64-Shipping.exe+2B8F262: 89 01 - mov [rcx],eax }

  2. Assistant

    This text appears to be a template for a Cheat Engine script used to modify the behavior of a game. Cheat Engine is a memory scanner/hex editor/debugger that can be used to modify games to create cheats.

    Let's break down the components of your script and its function:

    • Game: This identifies the game the script is for, which in this case is "Palworld-Win64-Shipping.exe".

    • Version: The version of the game or the script is not identified here. Typically, this would match the release version of the game the script is compatible with.

    • Date: This likely refers to the date the script was written or last updated.

    • Author: The creator of the script, in this case "Sora".

    • This script does blah blah blah: This would normally be a description of what the script does or what cheat it enables, but it is not specified here.

    • define(address, "Palworld-Win64-Shipping.exe"+2B8F253): This defines a symbolic name "address" for a specific memory address in the game's executable.

    • define(bytes, 48 89 01 48 8B C1): This defines a sequence of bytes that are expected to be found at the "address".

    • [ENABLE] and [DISABLE]: These are sections that define what the script will do when activated or deactivated.

      • assert(address, bytes): This checks if the specified bytes match the bytes present at the address. If they don't match, it prevents the script from being activated.

      • alloc(newmem,$1000,"Palworld-Win64-Shipping.exe"+2B8F253): Allocates a new memory region, giving us space where we can write our custom code.

      • label(code) and label(return): These are placeholders for referencing locations within the allocated memory region.

      • code: ... return: This block defines the new code that will replace the original code at the injection point.

      • jmp newmem: This makes the instruction pointer jump to the newly allocated memory region to execute our custom code.

      • nop: Stands for "no operation". It's often used to overwrite existing code without changing the program's behavior.

    • The [DISABLE] section reverts the changes made by the [ENABLE] section when the script is turned off.

    • The comments at the end outline the original code found at the injection point and surrounding bytes which is useful when disabling the script or if anything goes wrong, to understand what the script was targeting.

    In simpler terms, when the script is enabled, it overwrites the operation at a specific point in the game's code (the part where it's moving the contents of RAX into the address pointed by RCX) and replaces it with NOP instructions (effectively doing nothing in this part). When disabled, it writes back the original instructions.

    Please keep in mind that using such scripts often violates game's End User License Agreement (EULA) and can result in online bans or other punitive measures if used in multiplayer settings. Use at your own discretion and risk.

  3. User

    Нужно установить значение на 500

  4. Assistant

    Чтобы изменить значение на 500 в контексте этого Cheat Engine скрипта, нам потребуется знание того, что означает значение, которое вы хотите установить, и как оно используется в игре. Предположим, что вы хотите установить значение какой-то переменной, содержащейся в регистре RAX или RCX, на 500. Вам нужно будет записать инструкции в блок newmem: вашего скрипта, которые устанавливали бы нужное значение. Вот пример того, как это может выглядеть:

    [ENABLE]
    
    assert(address,bytes)
    alloc(newmem,$1000,"Palworld-Win64-Shipping.exe"+2B8F253)
    
    label(code)
    label(return)
    
    newmem:
    
    // Устанавливаем значение 500 в RAX вместо оригинальных операций.
    mov rax, 1F4h // 1F4 в шестнадцатеричном представлении равно 500 в десятичном
    mov [rcx], rax // Сохраняем значение 500 в память, на которую указывает RCX
    
    code:
      jmp return
    
    address:
      jmp newmem
      nop
    return:
    
    [DISABLE]
    
    address:
      db bytes
    
    dealloc(newmem)
    

    В этом измененном скрипте, после включения чита ([ENABLE]), он устанавливает 500 (шестнадцатеричное 1F4h) в RAX и сохраняет это значение по адресу, на который указывает RCX. Это заменяет оригинальные инструкции, которые были найдены по данному адресу, на операцию установки значения 500. Когда скрипт отключается ([DISABLE]), он восстанавливает оригинальные байты, чтобы вернуть игру в её исходное состояние.

    Учтите, чтоб эти изменения корректно работали, необходимо точно знать, что делает эта часть кода в игре, и какие последствия влечет за собой это изменение. Если целью изменения является что-то иное, скажем количество какого-то ресурса, тогда вам потребуется найти правильный адрес и контекст для этой переменной, и изменить скрипт соответственно.

  5. User

    Нужно просто установить значение на 500 и заморозить его

  6. Assistant

    Чтобы установить значение в игре на 500 и "заморозить" его (то есть, чтобы его значение не менялось в процессе игры), вам нужно не только записать значение в память, но и продолжать перезаписывать его, чтобы оно оставалось постоянным. Это может быть сделано с помощью Cheat Engine. Приведем измененный скрипт, который устанавливает значение 500, и затем регулярно обновляет его:

    [ENABLE]
    
    assert(address,bytes)
    alloc(newmem,$1000,"Palworld-Win64-Shipping.exe"+2B8F253)
    
    label(code)
    label(return)
    
    newmem:
    // Замена оригинального кода, чтобы установить значение 500 и заморозить его.
    mov dword ptr [rcx],000001F4 // 1F4 в HEX равно 500 в DEC
    jmp return
    
    code:
      jmp newmem
    return:
      jmp address+6 // Переходим на инструкцию, следующую за заменяемой частью
    
    address:
      jmp newmem
      nop
      nop
    // Остальные 'nop' убраны для экономии места
    
    [DISABLE]
    
    address:
      db 48 89 01 48 8B C1 // Записываем обратно оригинальные байты
    
    dealloc(newmem)
    

    В этой версии скрипта мы добавляем инструкцию mov dword ptr [rcx], 000001F4, которая записывает значение 500 (1F4 в шестнадцатеричном виде) в место памяти, на которое указывает регистр RCX. С помощью этого изменения каждый раз, когда игра пытается изменить значение по этому адресу, Cheat Engine будет перезаписывать его обратно на 500.

    Однако применение таких изменений должно быть проделано осторожно. Убедитесь, что вы знаете, для чего предназначен адрес в памяти, который вы изменяете, чтобы не вызвать нестабильность игры или другие нежелательные последствия. Также стоит заметить, что использование таких скриптов может нарушать условия использования игры и привести к бану в мультиплеере или другим санкциям со стороны разработчиков игры. Используйте скрипты на свой страх и риск.