As a heads-up, you can rename and retype variables within Ghidra, and it'll produce more correct/nicer output. You can also create data structures within Ghidra, and get even nicer output.
bedankt kerel! Ik zag toevallig dat je uit belgie komt. Er zijn niet veel nederlandse/belgiesche mensen die reverse engineering uitleggen en doen. Dit geeft mij hoop om nog meer te leren en ooit zelf ook te kunnen reverse engineeren. Bedankt voor de motivatieboost!
Bedankt (?)! Ich sah zufällig, dass du aus Belgien kommst. Es gibt nicht viele niederländische/belgische Menschen die Reverse Engineering auslegen[/erklären] und tun. Das gibt mir Hoffnung um noch mehr zu lernen und selber auch reverse engineeren zu können. Danke für den Motivationsschub! If you don't speak German, are you still able to understand that? I don't speak a single word of Belgian but I still managed to read your comment because the languages are so similar, haha!
Heb advies voor je, leer eerst C/C++ goed genoeg snap hoe pointers werken en daarna leer assembly x86 (eigen ISA) daarna vind tutorials op hoe statische analyse met IDA/ghidra werkt en probeer een paar crackme’s te doen. RE leren is veel praktische ervaring op doen en veel proberen. Goed advies is ook godbolt/dogbolt gebruiken voor interactieve deassembly en eigen C/C++ apps maken en dan de asm lezen en snappen hoe de structuur in elkaar zit.
Thanks, nice info. I didn't know that you actually don't need to understand code fully while decompiling. But there is one problem with this code-comparing approach. For example, the original devs could have different (much older) version of the compiler or even write the assembly by hand (from my experience handwritten code may drastically differ from the original). In that case by simply compiling with a modern compiler you won't be able to get the same output, especially down to the hash matching
I wonder if it is possible to decompile the code into C or Assembly, make some modifications, and then recompile a modified version of the original software?
What is the general process for figuring out what each function does? You mentioned giving some functions a name, that matched their functionality, but I can imagine the decompiled C code bring pretty general like the example you gave. Do you just mess a little with the functions and see what happens after you rebuild, or do you have a better approach?
@Exellys I’m familiar with opening a binary in a reverse engineering program like Ghidra, but how do you get .asm files from the binary that I can put in a folder and maybe share so others can collaborate on decompiling a game?
very informative video. It could be cool if you do a tutorial video taking the same mario kart but starting from zero to showing each step of how you decompile a first function from assembly to c.
It’s funny that you mention Mario 64 being ported to PlayStation consoles, because even though I’ve played that game numerous times for many years now, the first time I got all 120 Stars in that game… was on my Vita 😂 also not a bad time to mention that I got all 120 Stars in Mario Galaxy for the first time on Steam Deck
Is it possible to decompile or to reverse engineer, say a PS4 games .exe to get an approximation of how an actual source code look like and build a port from there? Say run PS4 exclusives on jailbroken consoles like PS3 or Xbox 360 wiith cut-back here and there for final version. Ignore the performance, can we make it run at all at say 10 fps for first iteration (v1.0)?
none of the comments here are that informative. For clarity sake, the OP is unaware that .exe is specific to windows, but I believe the intent was to refer to the program/game's code being ran. I'll just refer to it as execution format) As for OP's question. Which I'm taking as "could a ps4 game run on a xbox 360 or ps3, if it was reversed engineered converted to source code. then compiled for 360/ps3" On paper, sure, maybe. In practice it's way more complicated, and could be a no. For example, someone is working on a port of legend of zelda OOT to a ds. The ds on paper is technically "weaker" than a n64 if we're just talking raw clock speeds. But due to what in the hardware, and specifications, certain tasks can be done faster than then n64. But that's the problem, you need someone who not only knows enough to reverse engineer a ps4 game, but someone who also knows the in's an outs of the target console. And there are likely some tasks that just, cannot be done on a weaker system (at a reasonable framerate)
@@isaiahkern9434 thank you so much. I thought ".exe" executable file was universal to all machine. didn't know the it is a proprietary executable file format for windows.
@@soraaoixxthebluesky of course, no problem. If anything, you may want to look up and into what assembly is and how it works. And the relationship between a executable format (start with a windows .exe) assembly programing, and operating systems (like windows) is it will take a quite a bit of time, but it will help prevent scenarios of getting effectively laughed at. Which is pretty rude.
How can you reverse engineer internal cooldowns? For example, reload times for FPS games. I mean down to the milisecond, regardless of framerate. Could record a video but wouldn't the framerate of the video mess with the actual in-game timer?
You could reverse engineer the animation files and figure out how long it is from there, but recording a video and counting the frames is the easier and more reliable option
No, for 2d game, you (mostly) have to use an emulator with debug tools. But with 3d assets it's complicated, older games (from 5th generation to 7th) use different extensions for models (for example: super mario sunshine models are easier to dump than mario party 4-7 models)
i would realy want to look at warzone code cause the game is so bad, you can think of 10 problems and 0 good things... servers cheap, developers probably cheap as well cause such bad game, crashing, lagging, lagging whole PC in alt tab, constant bugs as example when already landed get teleported up as if landing again in plunder... its so bad... always 99% GPU and low fps while game looks like 2005 game on all low
This is a great video. It could have been a fantastic video but it took you 21 minutes to get down to brass tacks. Introductions for yourself, what reverse engineering is etc is fantastic. But you must be more succinct. The intro shouldn't be longer than the meat and potatoes.
Understanding the gear of the game and taking advantage of it is the most satisfying part of ROM Hacking/Game Modding.
I really wish you would also show the how you broke down the program into seperate assembly segments in your IDE.
As a heads-up, you can rename and retype variables within Ghidra, and it'll produce more correct/nicer output. You can also create data structures within Ghidra, and get even nicer output.
bedankt kerel! Ik zag toevallig dat je uit belgie komt. Er zijn niet veel nederlandse/belgiesche mensen die reverse engineering uitleggen en doen. Dit geeft mij hoop om nog meer te leren en ooit zelf ook te kunnen reverse engineeren. Bedankt voor de motivatieboost!
Bedankt (?)! Ich sah zufällig, dass du aus Belgien kommst. Es gibt nicht viele niederländische/belgische Menschen die Reverse Engineering auslegen[/erklären] und tun. Das gibt mir Hoffnung um noch mehr zu lernen und selber auch reverse engineeren zu können. Danke für den Motivationsschub!
If you don't speak German, are you still able to understand that? I don't speak a single word of Belgian but I still managed to read your comment because the languages are so similar, haha!
@@Reichstaubenminister yeah. i can read all of it 😅
Heb advies voor je, leer eerst C/C++ goed genoeg snap hoe pointers werken en daarna leer assembly x86 (eigen ISA) daarna vind tutorials op hoe statische analyse met IDA/ghidra werkt en probeer een paar crackme’s te doen. RE leren is veel praktische ervaring op doen en veel proberen. Goed advies is ook godbolt/dogbolt gebruiken voor interactieve deassembly en eigen C/C++ apps maken en dan de asm lezen en snappen hoe de structuur in elkaar zit.
Nederlands 🇳🇱
Thanks, nice info. I didn't know that you actually don't need to understand code fully while decompiling. But there is one problem with this code-comparing approach. For example, the original devs could have different (much older) version of the compiler or even write the assembly by hand (from my experience handwritten code may drastically differ from the original). In that case by simply compiling with a modern compiler you won't be able to get the same output, especially down to the hash matching
Tools like Detect It Easy usually can tell you what compiler and linker were used to build the final executable.
I would love to see the process of going from game files to decompiled code that we are seeing in this video.
Incredible! Thank you so much for sharing all of this information
This was amazing, thanks so much for posting it.
I wonder if it is possible to decompile the code into C or Assembly, make some modifications, and then recompile a modified version of the original software?
What is the general process for figuring out what each function does? You mentioned giving some functions a name, that matched their functionality, but I can imagine the decompiled C code bring pretty general like the example you gave. Do you just mess a little with the functions and see what happens after you rebuild, or do you have a better approach?
There is a compiler explorer extension for VSC ;)
Thank you for the good presentation!
it's possible to access the models and textures of a game without programming knowledge?
There's a tool called Ninja Ripper that can do this for DirectX games.
Depends. Some games give you complete access to them, others have them in a completely proprietary file format
@Exellys I’m familiar with opening a binary in a reverse engineering program like Ghidra, but how do you get .asm files from the binary that I can put in a folder and maybe share so others can collaborate on decompiling a game?
how is he building the rom from asm and c code mixed?
Do you already know the answer ? I'm looking for it too
@@renanmoura2168 he has must have a specific makefile, but this is beyond my knowledge
The compiler, c supports inline assembly. But yes, a special makefile will work too.
This is a very good lesson for beginner to learn.
very informative video. It could be cool if you do a tutorial video taking the same mario kart but starting from zero to showing each step of how you decompile a first function from assembly to c.
Interesting approach
Awesome video man thanks
Thank you for your effort.
Could you please know how can be Coin Master game hacked?
Great content, thanks
It’s funny that you mention Mario 64 being ported to PlayStation consoles, because even though I’ve played that game numerous times for many years now, the first time I got all 120 Stars in that game… was on my Vita 😂 also not a bad time to mention that I got all 120 Stars in Mario Galaxy for the first time on Steam Deck
It was nice to see your process! thanks
This was fascinating. Thank you.
Great video brother.
Thank-you Exellys!
really useful video
how are you compiling from assembly and c at the same time?
inline asm is supported by a lot of compilers and linkers
@@antiimperialista interesting, thanks for the reply
How did you know that the type was "char"?
1 byte is always char
4 bytes can be an int (32 bits)
lots of 1 byte aligned is a char array
Awesome Video!
Cool
I'm looking to decompile "Nicktoons: Battle for Volcano Island" on the Nintendo DS to then port it to other platforms.
a mention of the efteling!?
wooooooooooooooooooooooooooooooh
wait a minute...
are you dutch?
Is it possible to decompile or to reverse engineer, say a PS4 games .exe to get an approximation of how an actual source code look like and build a port from there? Say run PS4 exclusives on jailbroken consoles like PS3 or Xbox 360 wiith cut-back here and there for final version. Ignore the performance, can we make it run at all at say 10 fps for first iteration (v1.0)?
noh
"PS4 games .exe" are you ok?
none of the comments here are that informative. For clarity sake, the OP is unaware that .exe is specific to windows, but I believe the intent was to refer to the program/game's code being ran. I'll just refer to it as execution format)
As for OP's question. Which I'm taking as "could a ps4 game run on a xbox 360 or ps3, if it was reversed engineered converted to source code. then compiled for 360/ps3"
On paper, sure, maybe. In practice it's way more complicated, and could be a no.
For example, someone is working on a port of legend of zelda OOT to a ds. The ds on paper is technically "weaker" than a n64 if we're just talking raw clock speeds. But due to what in the hardware, and specifications, certain tasks can be done faster than then n64. But that's the problem, you need someone who not only knows enough to reverse engineer a ps4 game, but someone who also knows the in's an outs of the target console. And there are likely some tasks that just, cannot be done on a weaker system (at a reasonable framerate)
@@isaiahkern9434 thank you so much. I thought ".exe" executable file was universal to all machine. didn't know the it is a proprietary executable file format for windows.
@@soraaoixxthebluesky of course, no problem. If anything, you may want to look up and into what assembly is and how it works. And the relationship between a executable format (start with a windows .exe) assembly programing, and operating systems (like windows) is
it will take a quite a bit of time, but it will help prevent scenarios of getting effectively laughed at. Which is pretty rude.
How can you reverse engineer internal cooldowns? For example, reload times for FPS games. I mean down to the milisecond, regardless of framerate. Could record a video but wouldn't the framerate of the video mess with the actual in-game timer?
You could reverse engineer the animation files and figure out how long it is from there, but recording a video and counting the frames is the easier and more reliable option
@@ougonce Hi, could you please help me to bypass the registry of the app that the manufacturer of this software is not existing anymore
This stuff is so complexed and I dont even know how to read C# or C++
C# is something you can learn to read in a few days
@@WayneModz😂
@@WayneModz😂
Did you think games were written in plaintext essays or something
Honestly it’s very simple to understand and modify c# decompiled executables for simple tasks like removing the health logic
In Ghidra is possible dump and rip 2d sprites and 3d models from any games consoles to pcs ???
No, for 2d game, you (mostly) have to use an emulator with debug tools.
But with 3d assets it's complicated, older games (from 5th generation to 7th) use different extensions for models (for example: super mario sunshine models are easier to dump than mario party 4-7 models)
Bro can you change bluestacks emulator tweaks ???
i would realy want to look at warzone code cause the game is so bad, you can think of 10 problems and 0 good things...
servers cheap, developers probably cheap as well cause such bad game, crashing, lagging, lagging whole PC in alt tab, constant bugs as example when already landed get teleported up as if landing again in plunder... its so bad... always 99% GPU and low fps while game looks like 2005 game on all low
This is a great video. It could have been a fantastic video but it took you 21 minutes to get down to brass tacks. Introductions for yourself, what reverse engineering is etc is fantastic. But you must be more succinct. The intro shouldn't be longer than the meat and potatoes.
it reads like a work presentation
Jesus loves you!
thank goodness cuz god doesnt
does anyone knows the reste of the compiler options: emerald_new_agbcc -O2 -g -m.....