REVERSE ENGINEERING: The Classic Collection was released without compiler optimizations enabled

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
flaffwaffle
Posts: 1
Joined: Thu Mar 14, 2024 11:04 am
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront Classic
xbox live or psn: No gamertag set

REVERSE ENGINEERING: The Classic Collection was released without compiler optimizations enabled

Post by flaffwaffle »

Hey everyone. I'm new to the Battlefront 2 modding scene, but with the disaster that is Apsyr's release, I decided to do some static analysis on the binaries...And BOY did I find something pretty big (or at least I think I did). I'm a software engineer with some reverse engineering experience, but please note that I have no experience with the engine, so if I say something obvious or stupid, please excuse me.

Take a look at the following decompiler output from Ghidra. Notice anything?

Image

How about those zero multiplications and then additions? A compiler would normally completely wipe that out with optimizations enabled. This, however, is still in the build.

What are we looking at? Matrix multiplication. It looks like they're doing something with the identity matrix, so they may be generating some sort of projection or translation matrix.

The fact that I can tell what this is doing at a glance is huge. We don't have the debug symbols, but the decomp is more or less readable out of the gate.

This is true for BOTH GAMES in the classic collection. I think we could reverse engineer the battlefront engine with this if we wanted to.

Is anyone interested in looking into this with me? I've backed up the release day builds in case they realize their mistake and patch it.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: REVERSE ENGINEERING: The Classic Collection was released without compiler optimizations enabled

Post by Sporadia »

Double check, but I think reverse engineering engines breaches the battlefront eulas.

Edit: Also it's impossible to look stupid when you're engine modding; those are some of the rarest mods around.
JaKeCrAzY
Posts: 1
Joined: Wed Apr 20, 2016 5:51 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: REVERSE ENGINEERING: The Classic Collection was released without compiler optimizations enabled

Post by JaKeCrAzY »

Hi, this is also my interest. I have some X86 knowledge and have worked with a couple of debuggers and other tools such as Ghidra, X96DBG, Cheat Engine. I have tampered with original BF2 a little bit mainly was interested in finding a way to increase the memory pool at the start of each map and get rid of low resolution models. The LOD system is garbage imo. Also tampering with the netcode because it to is very poor even over a LAN network.
Post Reply