🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.

Overview

Plants vs. Zombies Online Battle

C++ MASM CMake Visual-Studio Windows License DOI

This project has two original repositories:

Introduction

Cover

This project adds the multiplayer battle to Plants vs. Zombies via reverse engineering, inline hook and dynamic-link library injection. Two online players can defend and attack as Plant and Zombie respectively.

Getting Started

Prerequisites

Building

Open x86 Native Tools Command Prompt provided by Visual Studio 2022 and set the location to the project folder.

mkdir -p build
cd build
cmake ..
cmake --build .

Two dynamic-link libraries plant.dll and zombie.dll will be generated in build/bin folder. Copy them to the game root folder.

IPv6

The default IP version is IPv4. Enable the following statement in src/lib/game/CMakeLists.txt if you want to build IPv6 libraries.

target_compile_definitions(game PRIVATE INET6=1)

Usage

The project only works with Plants vs. Zombies 1.0.0.1051 CHINESE version, provided in game folder.

The MD5 of PlantsVsZombies.exe is 37B729B4056131722A556E646AC915E9.

In order to activate online functions, plant.dll and zombie.dll must be injected into the game when it starts. You can directly use this simple injection tool: Dll-Injector.

online-battle

Playing as Plant

If a player plays as the plant, the game will launch as a server.

Dll-Injector -f PlantsVsZombies.exe plant.dll

Or use Start-OnlineGame.ps1 directly. It needs to be copied to the game root folder.

Start-OnlineGame.ps1 -Role Plant

Start I, Zombie Endless level, the game will pause and wait for a client to connect.

Playing as Zombie

If a player plays as the zombie, the game will launch as a client.

Dll-Injector -f PlantsVsZombies.exe zombie.dll

Or use Start-OnlineGame.ps1.

Start-OnlineGame.ps1 -Role Zombie

Start I, Zombie Endless level, the game will try to connect to the server.

I, Zombie Endless

If the modification has been loaded successfully, I, Zombie Endless level will be converted into an online level. If your current progress does not have this level, you can copy game/userdata to C:\ProgramData\PopCap Games\PlantsVsZombies\userdata. Remember to back up your own save-files before copying.

In the Chinese version of the game, you can start this level as follows:

  1. Select "解谜模式", which means "Puzzle" in English.

    puzzle-mode

  2. Select "我是僵尸无尽版", the final level. It is "I, Zombie Endless" in English.

    i-zombie-endless

  3. The game will display a dialog box shown as below. Select "继续", the left button, meaning "Continue" in English.

    continue-or-new-game

    Before starting an online battle, the progress of this level must be empty. Otherwise the battlefields of two online players will be different. If that happens, you need to restart the game without the modification, enter this level again but select "新游戏", the right button, to reset the progress. It means "New Game".

Configurations

Copy online_config.ini to the game root folder. You can set the server's IP address and port number in it.

[Network]
ServerIP=127.0.0.1
Port=10000

Documents

The code comment style follows the Doxygen specification.

docs/Key Data and Functions.md describes key data and functions obtained by reverse engineering.

Issues & Bugs

  • The game sometimes crashes when creating zombies.
  • If the progress of I, Zombie Endless level is not empty, two players will have different battlefields.
  • In order to simplify the code, the running menu and automatic pause are disabled.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

You might also like...
Resources gathered for reverse engineering the FNIRSI-1013D scope

# FNIRSI-1013D-Hack Resources gathered for reverse engineering the FNIRSI-1013D scope As part of what is on EEVBLOG, resources for the reverse engine

A lightweight ARM reverse engineering tool.

eydis A lightweight (basic and slow) ARM reverse engineering tool. I. Requierements macOS/Linux, Basics compiling tools, The SQLite3 + readline framew

Info & tools for reverse engineering the M6 smart fitness band
Info & tools for reverse engineering the M6 smart fitness band

m6-reveng This repo contains information and tools for reverse engineering the $7 M6 smart fitness band. Hardware The SoC (system-on-a-chip) is a Teli

Reverse engineering the V831 npu

v831-npu Reverse engineering the V831 Neural Network Accelerator (NNA) Hardware is primarily based off NVIDIA Deep Learning Accelerator(NVDLA) archite

Reverse engineering / documenting the SSC (qcom Snapdragon Sensor Core) or SLPI.

QRTR / QMI sensor daemon Device setup (pmos) Install deps sudo apk add alpine-sdk sshfs eudev-dev qrtr-dev Mount build dir First on host setup USB net

Reverse engineering Genshin Impact anticheat to study how anticheats work on the Windows operating system.
Reverse engineering Genshin Impact anticheat to study how anticheats work on the Windows operating system.

mhyprot2 - Reverse engineering Genshin Impact anticheat for study 1. Demonstration video 2. Screenshots 2.1 Panel 3. Future updates and questions As I

(C++) Integrity dynamic link library made in C++ that you can export to C#

C-Integrity-Library ✔ (C++) Integrity dynamic link library made in C++ that can export to C# C# Exports [DllImport("Exports.dll")] public static exter

The dynamic-link-library of DiscordCoreAPI.

The dynamic-link-library of DiscordCoreAPI.

This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge, and Hackerrank.

CPP_Soln This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge , LeetCod

Releases(v1.0.0)
  • v1.0.0(Aug 1, 2021)

    Introduction

    This project adds the multiplayer battle to Plants vs. Zombies via reverse engineering, inline hook and dynamic-link library injection. Two online players can defend and attack as Plant and Zombie respectively.

    If the modification has been loaded successfully, I, Zombie Endless level will be converted into an online level.

    Issues & Bugs

    • The game sometimes crashes when creating zombies.
    • If the progress of I, Zombie Endless level is not empty, two players will have different battlefields.
    • In order to simplify the code, the running menu and automatic pause are disabled.

    Contact

    Source code(tar.gz)
    Source code(zip)
    Plants-vs.-Zombies-Online-Chinese-Version.zip(57.31 MB)
Owner
Liugw
MSc Student at Trinity College Dublin 🇮🇪, Malware Analysis | Software Development | Artificial Intelligence.
Liugw
shadowhook is an inline hook library for Android apps.

shadowhook is an inline hook library for Android apps.

Bytedance Inc. 819 Jan 1, 2023
A simple Z-Machine implementation in a single C file. Now with online multiplayer! :)

This is an implementation of Infocom's Z-Machine. The Z-Machine is a virtual machine that's something like a high-level CPU. To keep their games portable and easier to write, Infocom's games all use this fake processor and ship with a platform-specific Z-Machine "emulator" ... so a game could run wherever someone had implemented the Z-Machine.

Ryan C. Gordon 92 Dec 28, 2022
Experimental Worms Armageddon WormKit module that implements real-time online multiplayer for racing schemes

wkRealTime v.0.0.4d Experimental Worms Armageddon WormKit module that implements real-time online multiplayer for racing schemes. Installation Place w

null 15 Jul 12, 2022
A C++ library with all the online array problems and etc which I get online

cpp-Library A C++ library with all the online array problems and etc which I get online. Setup To setup it simply just download the repo and then move

Padmashree Jha 6 Dec 6, 2021
Injection - Windows process injection methods

Windows Process Injection Here are some popular methods used for process injection on the windows operating system. Conhost ExtraBytes PROPagate Servi

null 1.4k Dec 28, 2022
The purpose of these streams is to be educational and entertaining for viewers to learn about systems architecture, reverse engineering, software security, etc., and NOT to encourage nor endorse malicious game hacking.

Memestream This repository holds the code that I develop during my live game "modding" ?? sessions. When I stream, I like to speedrun making a success

Stephen Tong 28 Jul 6, 2022
OverRide - Binary Exploitation and Reverse-Engineering (from assembly into C)

OverRide Explore disassembly, binary exploitation & reverse-engineering through 10 little challenges. In the folder for each level you will find: flag

Anya Schukin 69 Sep 22, 2022
Cutter is a free and open-source reverse engineering platform powered by rizin

Cutter is a free and open-source reverse engineering platform powered by rizin. It aims at being an advanced and customizable reverse engineering platform while keeping the user experience in mind. Cutter is created by reverse engineers for reverse engineers.

Rizin Organization 12.4k Jan 1, 2023
Block Cipher Reverse Engineering: A Challenge by Nintendo European Research & Development

My algorithm cracks NERD HireMe for any output within 1 Second without Brute-Force! Read more if you want to find out how this was accomplished or execute this algorithm yourself on Wandbox - Online C++ Compiler

Alexander Töpfer 58 Nov 15, 2021
Powerful automated tool for reverse engineering Unity IL2CPP binaries

Powerful automated tool for reverse engineering Unity IL2CPP binaries

Katy 2.1k Jan 7, 2023