import r2pipe, sys, io sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace') r2 = r2pipe.open("Z:/Development/devl/Havoc/HAVOC_NOCD.EXE", ["-e", "bin.relocs.apply=true"]) # CD check function around 0x42A6BE print("=== CD check function area 0x42A680 - 0x42A800 ===") print(r2.cmd("pd 100 @ 0x42a680")) print("\n=== NOCD stub at 0x42A7B0 (existing patch) ===") print(r2.cmd("pd 8 @ 0x42a7b0")) # Also check the caller of this function print("\n=== Looking backwards: what calls 0x42A6BE area? ===") print(r2.cmd("pd 5 @ 0x42a67e")) # entry point of the function r2.quit()