ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Portal:Syringe

From ModEnc
Jump to navigation Jump to search


Syringe

Witty subtitle here

Syringe
by pd

Release date Release Date Unknown
Latest Version 0.1? (taken down, update in progress)
Homepage Link

End User Information

What is Syringe?

Syringe is an application developed by pd primarily to simplify modification of Yuri's Revenge. It can inject code into any other executable as well, so it is a general-purpose code injector tool.

How does it work?

In simple terms, a patch developer creates a small DLL file and an "injection control file". When Syringe is run, it loads all recognized DLLs into the target program, and instructs the program to call certain functions from the DLL file under certain circumstances.

How does this benefit the end user, compared to the old RockPatch patching method?

No patching required
The end user no longer needs to apply patches to the executable. Instead, when he/she wants to use the added functionality, they simply need to run Syringe instead of the target executable. Running the executable itself will run the application without any modifications.
Third-party contributions
Syringe makes proper third-party patches possible, since multiple DLLs can be loaded and perform different tasks, whereas RockPatch was incompatible with any third-party changes.

Are there any released patches which use Syringe?

So far, the only publicly released project using Syringe is a demonstration of pd's new project Ares, also known as RockPatch 2.

DCoder is also using Syringe for a modification for a different game (Urban Chaos), but it is not yet intended for public use.

Developer Information

What skills do I need to use Syringe?

DLLs are written using C++, but naturally the executable you are targeting needs to be reverse-engineered for any meaningful changes.

For example, if you have reverse engineered a game and could possibly write some patches for it in assembler, you will be able to do the same in Syringe with no difficulty. If you don't know reverse-engineering, don't panic just yet - if the Syringe wrappers have been written for that executable, you can use them and write normal C++ code with some guidance from the reverse-engineers. For more info, check the Getting Started with Syringe page.

I want to contribute something to the Ares/RockPatch 2 project

Please see the Ares project page.

I want to create another DLL for YR

Please see the Writing A DLL for Syringe page.

I want to create DLLs for a different application

Please see the Injecting Syringe DLLs Into An Application page.

How does it work, really?

Syringe uses a variant of the infamous DLL Injection technique - a small chunk of ASM code is inserted at executable startup, forcing the executable to search for and load suitable DLLs into its context. An injection control file dictates the functions to call at certain addresses, Syringe overwrites code at those addresses with 0xCC (int 3), and those interrupts are trapped using Debug API and the executable is redirected to invoke said functions.

Does it work with Launch Base?

Yes. Launch Base includes the latest version of Syringe and automatically knows when to execute it - your mod just needs to include any DLL files it requires in it's own "syringe" directory.