This is my code: [code] This logs: PS C:\Users\Medic\Desktop\Other\Programming\Journey>…
- User
This is my code:
codeimport pymem import ctypes import time from capstone import Cs, CS_ARCH_X86, CS_MODE_64 process_name = "Journey.exe" #aob = b"\xF3\x0F\x10\xB7\x00\x01\x00\x00" pm = pymem.Pymem(process_name) def toByteArr(hex_string): bytes_list = hex_string.split() byte_arr = ''.join([r'\x' + byte for byte in bytes_list]) return byte_arr cXBytes = "44 0F 5C 4F 30" aob = toByteArr(cXBytes) print("AOB:", aob) # Look for the module (your game) in the process module = pymem.process.module_from_name(pm.process_handle, process_name) # Scan for the signature instruction_address = pymem.pattern.pattern_scan_module(pm.process_handle, module, aob.encode()) print("Address:",hex(instruction_address)) # Read the value at the memory address and # Interpret the bytes as a 32-bit integer (assuming it's an integer value) #value = pm.read_bytes(instruction_address, 4) #integer_value = int.from_bytes(value, byteorder='little') #print(integer_value) # Initialize Capstone disassembler md = Cs(CS_ARCH_X86, CS_MODE_64) # Read the bytes at the memory address and disassemble the bytes bytes_read = pm.read_bytes(instruction_address, 16) # Adjust the number of bytes as needed instructions = md.disasm(bytes_read, instruction_address) # Print the disassembled instructions print("instructions") for insn in instructions: print("0x%x:\t%s\t%s" % (insn.address, insn.mnemonic, insn.op_str))This logs: PS C:\Users\Medic\Desktop\Other\Programming\Journey> python tool.py AOB: \x44\x0F\x5C\x4F\x30 Address: 0x14022eba4 instructions 0x14022eba4: subps xmm9, xmmword ptr [rdi + 0x30] 0x14022eba9: movss xmm2, dword ptr [rip + 0x45c2d7]
- Assistant
You can use
pymemlibrary and the provided address in your code to find what addresses the instruction accesses. You need to read the[rdi + 0x30]operand and calculate the address it points to. Here's a modified version of your code that should do that:python