Lite mode. Switch to Full
invert_colors
logout
/sci/
/sci/
Post a Replyarrow_backarrow_downward
MoscowReverse EngineeringBernd2026-06-20 09:35:08 · 4wNo. 361875reply
Have you ever reverse engineered anything?
Right now I'm in the process of digging around Petz 5 files. (mostly to learn reverse engineering and I wonder how my childhood games ran)
 
I'll post some findings here and invite you to do the same.
 
Picrelated: Ruckingenur II: The Hardware Hacking Game https://www.zachtronics.com/ruckingenur-ii/
MoscowBernd2026-06-21 17:08:49 · 4wNo. 361995reply
I finished my initial analysis of the "Alley Cat.cat" file. I presumed this file would just be data about the "Alley Cat" breed, but it was a whole executable compiled in C++.
Pic related, the Alley cat in question. (https://petz.miraheze.org/wiki/Alley_Cat)
 
I have downloaded HxD to analyze the file (it is a hex editor).
I went through it while documenting what's happening at each offset. Mostly the plain text because I'm not good at analyzing hex yet.
 
Offset: data.
Header section - Beginning.
—0: Beginning of the header section. MS DOS signature. "This program cannot run in DOS mode".
—1F1-296: Strings: text, rdata, data, rsrc, reloc. These are Windows portable executable headers.
Headers - End. (at 0xFFF)
Text - Beginning. (at 0x1000)
Text - Ending. (at 0x2fff)
Rdata - Beginning. (at 0x3000)
—3000: 32 bit structures that are likely array of some game data/lookup table
—3BAB: Section of FF's. Around like 168 FF's? I am not sure what these are for.
—5434: Import/Export table? Shows C++ functions
Rdata - Ending. (at 0x5fff)
Data - Beginning. (at 0x6000)
—6150: String table begins. Contains emotional states, personality traits, item properties, various filepaths in PtzFiles.
Data - Ending. (at 0x6fff)
Rsrc - Beginning (at 0x7000)
—8740: UTF-16 little-endian filenames (Breed sounds, etc)
—0x92E0 AlleycatSprite definition. Petz 5 uses c++ classes with inheritance, and AlleycatSprite is that for this breed.
—BCF0 data structure for the rigs, ie this is where the ingame sprites for cats are programmed.
—14D60 a lot of filenames for audio again (a lot of toyNN.wav files, etc)
—31450 onwards: This section is long as FUCK because there's a bunch of wav files for some reason. Like not filenames but just straight up audio
Rsrc - Ending (at 0x138fff)
Reloc - Beginning (at 0x139000)
—Some weird binary data in the middle of nothing here. Looks like an index and it refers to the rdata range.
Reloc - Ending (at 0x13afff)
—Somewhere here there's a lot of export strings, and interestingly enough there's pretty much all functions you can think of named here. Some examples:
>GetIsBehindPetDoor
>IsThisAPet
>AreWeIncestuous
>MutualHorniness
This is the most exciting for me because I'd like to get to the logic behind these exactly.
Tdb - ffdff000 to ffddfffff
MoscowBernd2026-06-21 17:59:12 · 4wNo. 361998reply
https://github.com/thenickdude/PetzA Here's a mod that allows the player to do debug-level stuff in the game. I have always been fascinated by this kind of stuff. Maybe I'll recreate my own small version, just to learn.
 
I'll compile a small reading list on the subject also. What's interesting is how there's vastly more resources for this than for something like digital forensics. (from what I saw)
https://www.starcubelabs.com/reverse-engineering-gba/ - I'd be interested in understanding romhacking further.
https://www.starcubelabs.com/reverse-engineering-ds/ - same but for a DS game
https://www.reddit.com/r/programming/comments/y8hb6z/wrote_a_blog_post_about_work_i_did/ - Cracking the compression algorithm for a DS game. Also people seem to like OP's writing style, I should take some notes.
https://medium.com/@valeriy.krygin/reverse-engineering-a-videogame-part-1-know-your-tools-7906f9bd0e3e some article idk I want to check it later
https://github.com/kovidomi/game-reversing - general basics
https://ssno.cc/posts/reversing-tac-1-4-2025/ - CoD anticheat analysis
https://connorjaydunn.github.io/blog/posts/denuvo-analysis/ - Denuvo Analysis. There seems to be a lot on the subject
I'd also be interested in finding material for more complex and modern games, too...
Maybe I should be putting an effort to backing up all that data in a personal library or something... Could be useful.
MoscowBernd2026-06-25 09:31:30 · 3wNo. 362112reply
While trying to find a reverse engineering report to imitate, I stumbled upon these lovely malware analysis writeups. They have screenshots and everything so might be good for reference.
https://github.com/itaymigdal/malware-analysis-writeups
 
This seems decent formatting wise. https://vaktibabat.github.io/posts/Analyzing_A_Trojan_Horse/
TürkiyeBernd2026-06-25 17:04:12 · 3wNo. 362118reply
I can imagine how much easier it's now to get into reverse engineering or get things done with tools like claude code.
MoscowBernd2026-06-25 19:13:35 · 3wNo. 362119reply
Absolutely tbh
If it weren't for llm's I'd spend much more time trying to figure out what is going on
CanadaBernd2026-06-26 01:47:25 · 3wNo. 362133reply
Still just Junk
UkraineBernd2026-06-26 21:16:43 · 3wNo. 362200reply
If buying isn't owning then pirating isn't stealing.
MoscowBernd2026-06-30 14:19:23 · 2wNo. 362374reply
Pheww, okay, so I spent the entire day digging around with the debugger and ghidra and whatnot and it caused a headache so strong you wouldn't believe it. Picrelated: my honest reaction
The problem I was trying to solve right now was trying to figure out how to enable unicode in the game. I want to use cyrillic + extended alphabet (some languages use this)
assembly&x32dbg are so hard for me to navigate now it's unreal
In the end I finally found the parser function and figured it actually reads the file by 1 byte at a time. I did not find the parser for unicode (not sure if it exists yet)
So... Basically we can only use symbols from 00 to FF now. Which is 256 symbols. Which is why it crashes when we convert translationkit.txt to utf.
What's interesting is the russian version of petz is not in unicode it's just ANSI with windows 1251 or something, I don't know the specifics, this is just how it is.
 
SO I guess we just gotta do codepage remapping now. (basically replace one letter with another) I always knew this was a thing but I really believed I could just easily enable unicode here lol. I cant even begin to imagine how arabs deal with all this localization bullshit.
 
Fuck the police
United KingdomACABBernd2026-06-30 14:49:44 · 2wNo. 362377reply
All Cops are Bastards.
MoscowBernd2026-07-01 11:58:38 · 2wNo. 362465reply
First, a cool story: www.youtube.com/watch?v=JjFBaGr1xgM
A hacker reverse engineered gta5's poor loading times. The reason was that during online load the game read json for shop items, but it did it really poorly - it loaded the file again and again each read. Rockstar eventually reached out to him and granted a bounty of 10,000$. Very cool.
 
As for my project, I made some progress today. I am going to try to change the game via DLL's, ship it with a modified font and all that. I made my first ever DLL and managed to inject it, but now the hardest part begins, how the fuck do I plunge in my edited font there. Like it's probably not enough to load it so???... Honestly I expected a localization project to be much, much easier.
 
Edit: I have also been tracking down the text pipeline, yes. It's very elaborate for a simple kiddie game, but I suppose I expect no less from the team that pioneered that weird ballz artstyle of theirs. I actually love it. I think engineering wise petz 5 is quite cool, (hell according to other modders it has some sort of genetics system) it's just that it's a bit empty content wise.
MoscowBernd2026-07-10 11:45:36 · 7dNo. 362977reply
Current progress
Feels like magic's
replaced font to impact
I STILL don't quite understand what is going on. I wanted to write a report but this would be too mentally taxing
 
Also there's a problem
Sometimes the hook function (where I replace the font) does not run at all... some caching issue perhaps?
MoscowBernd2026-07-10 17:09:18 · 7dNo. 362991reply
How the Russian version is localized: it straight up uses entirely different versions of fonts, specifically Arial -> Arial_Cyr
Now, I was confused by this at first because you can't just replace a string that's too short.
So, I guess the natural assumption is this is a different build? (meaning the source code was directly modified..)
I was so mystified how they did it at first, like were they reverse engineering, but probably no.
 
I did try searching for empty 00 spaces but couldn't find them.
Also I hear apparently you can add additional PE sections with data? big if true.
Honestly I don't really get direct exe patching yet so I'd rather stick with my dll now.
MoscowBernd2026-07-10 17:53:03 · 7dNo. 362992reply
MoscowBernd2026-07-11 08:22:34 · 6dNo. 363055reply
Not sure how much /reverseengineering/ this is at this point, but I'm gonna add some more details about what I did yesterday.
Originally, my goal was to translate the game to a language that uses cyrillic and 4 extra letters (therefore, 8 extra symbols)
I decided to mod the original English build.
Now, Petz can only scan 1 byte at a time as I saw from researching the function that reads translationkit.exe. It processes text as 1 byte at a time. Therefore, we cannot use unicode. Seems like the program is using ANSI.
But, Windows ANSI code page has a lot of extra symbols, not just the alphabet and the numbers. (pic1) It has 256 symbols I'm pretty sure.
I decided to replace 0x80-0x88 symbols with the ones I need. Where? In a .ttf font.
But this means I would have to type these symbols to make them show up. (pic2) I guess I'll translate first and then use "search and replace". I also replaced the extended latin symbol with cyrillic.
The in-game result as follows on pic3.
Now, you can see the text is kinda fucked up, it's because ttf's have offset info for letters which I have to fucking fix now. Oh well.
I'm also a bit concerned about the exe strings but if we're using the new font it shouldn't be a problem I think... Maybe I'll skip them though idk.... or I will have to make yet another hook fuckkkkk
 
 
This also means I will have to go into detail of HOW we're going to load the .ttf into the game. I tried looking into exe editing, etc etc, but DLL seemed the easiest. But I don't understand it well enough yet so I will write a report sometime in the future.
MoscowBernd2026-07-11 09:02:12 · 6dNo. 363056reply
Interestingly, I also learned a word for a phenomen that I have known ever since I was a kid. If your first language is one that doesn't use purely Latin, or perhaps if you tried running an old Japanese program, you might have encountered it before.
 
Mojibake.
https://en.wikipedia.org/wiki/Mojibake
 
Basically back in 00s and early 10s the text would end up garbled if we used the wrong encoding page. For example, here's me changing encoding from Cyrillic to Japanese.
United KingdomBernd2026-07-11 16:27:56 · 6dNo. 363062reply
🤔
/sci/Post a Replyarrow_backarrow_upward