Giter Site home page Giter Site logo

mml2-toolkit's Introduction

MML2 Toolkit

Framework for reversing and hacking MegaMan Legends 2 on pc!

Requirements:

  • Python (Tested with 3.11)
  • Visual Studio 2019

How does it work?

Every PE (portable executable) file has a dll import table. This table lists all of the dll requirements and function imports required for the program to work. We can rename a dll in this table to force the executable to load our own dll (dash-patcher.py). In our hack dll we then have to "forward" the functions from the original dll in to the game. After that we can write code to manipulate our games memory as we are now running in the same process.

Building dash2.dll

Open the dash2.sln project in Visual Studio 2019. Click Build, Build Solution. This will generate dash2.dll at /dash2/Debug/dash2.dll. Copy this dll and place it in the same folder as your dash2.exe

Patching dash2.exe

Copy dash-patcher.py to the same folder as dash2.exe. MAKE A BACKUP OF dash2.exe!!! I have taken several steps to prevent this from being corrupted on patching but accidents happen. If you run into issues during patching start over with a clean dash2.exe and try again. Successful output will look like this:

python dash-patcher.py patch

Game patched successfully!

If everything works when you launch dash2.exe a console will appear that says "DASH2 v0." with data about your graphics card and zenny count. You can now execute code in the games process. You can restore dash2.exe back to default by running:

python dash-patcher.py unpatch

Dat Walker

The dat-walker script will scan a mml2 ".dat" file index header and output files contained inside and their length. This script is based on the awesome work of Kion found here: https://docs.dashgl.com/format/mml2/file-formats/dat-pc. It appears there are 9 different file types (I have found so far). Eventually I would like this script to extract these files and save them on disk.

Requirements:

  • Python (Tested with 3.11)

Example usage of the dat-walker script:

python dat-walker.py TITLE.dat

File type: b'\x01'
File Size: 21112

File type: b'\x04'
File Size: 8590042648

File type: b'\x04'
File Size: 8589967480

File type: b'\x04'
File Size: 8589967448

File type: b'\x04'
File Size: 8589967576

File type: b'\x04'
File Size: 33048

File type: b'\t'
File Size: 4295840958

End of file header. Found 7 files.

mml2-toolkit's People

Contributors

sphyrna-029 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.