ScrapHacks/ScrapHacks
Daniel S. 7afdfb5869 Lots of changes, expand to read
- Add notes folder with MDBook documentation (the NOTES.md file was getting kind of large)
- Add rz_analyze.py, does the same a r2_analyze.py just with Rizin instead of radare2 so the project can be loaded in Cutter (*and* it's faster)
- Add Scrap.rzdb, Rizin database for the Scrap.exe executable
- Add Scrapper_rs, Rust version of .packed extractor and repacker
- replace helplib.txt with helplib.md
- add Py_Docs folder which contains generated documentation for the binary python modules built into Scrap.exe
2021-01-20 23:53:14 +01:00
..
.vscode Lots of Updates (expand for more): 2020-08-04 18:05:34 +02:00
src Lots of Updates (expand for more): 2020-08-04 18:05:34 +02:00
utils Lots of changes (expand to read more) 2020-01-03 03:22:09 +01:00
.gitattributes Add DLL-Injector+ScrapHacks DLL 2019-02-23 22:40:05 +01:00
.gitignore Lots of changes, expand to read 2021-01-20 23:53:14 +01:00
CMakeLists.txt Lots of changes, expand to read 2021-01-20 23:53:14 +01:00
README.md Lots of changes, expand to read 2021-01-20 23:53:14 +01:00
build.bat Lots of changes, expand to read 2021-01-20 23:53:14 +01:00
patcher.py Lots of changes, expand to read 2021-01-20 23:53:14 +01:00

README.md

Features

  • read and write memory
  • disassemble memory (using zydis)
  • change DirectX state
  • Draw DirectX overlay (still need to make a useful overlay)
  • Dump various data structures to the console
  • Assemble and execute code on the fly (using asmtk)
  • Can be controlled via keyboard shortcuts (TODO: allow defining own shortcuts for commands)

Prerequisites

  • Visual Studio 2017/2019 (others might work)
  • CMake
  • Python 3.6 or newer

Building

Open VS 32-bit command prompt (vcvars32.bat) and run the following two commands

cmake -G"NMake Makefiles" -B build
cmake --build build --target install

This will find the Games's installation folder, verify that the version you have is compatible with ScrapHacks and drop the compiled .pyd file into the correct folder to be imported

Getting started

  • open the ingame console (Ctrl+^)
  • type import ScrapHack
  • type $help

Config file keys (not yet implemented?)

  • patches.asm: map of address->list of assembly instructions
  • patches.hex: map of address->hex bytes

Example:

{
    "patches": {
        "hex": {
            "0xDEADBEEF": "BADFOODDEADFEED"
        },
        "asm": {
            "0xBADF00D": [
                "pushad",
                "call 0xf00dbabe",
                "popad",
                "mov eax, 0x42",
                "ret"
            ]
        },
    }
}

Third-Party components used

  • Zydis disassembler
  • asmJIT/asmTK assembler
  • nlohmann/json JSON-parser
  • LIEF/lief