How can I hook exe and load custom language folders?

01/23/2024 11:53 sLowNight2#1
How can I hook exe and load custom language folders?
01/23/2024 15:54 zahter55#2
Quote:
Originally Posted by sLowNight2 View Post
How can I hook exe and load custom language folders?
Reverse a multilang supported version and see how it is working.
01/24/2024 02:09 sLowNight2#3
Unfortunately, I'm not very good at using ida-style programs. Can you give more detailed information?
01/26/2024 20:29 Sector1337*#4
Quote:
Originally Posted by sLowNight2 View Post
Unfortunately, I'm not very good at using ida-style programs. Can you give more detailed information?
Then you should start learning these. The rest will follow immediately.

To create a hook, you first need to know how it works. So, if you can read it, you can reverse it.

Here are my advices for you;
You can read about threads by @[Only registered and activated users can see links. Click Here To Register...] especially for Twelvesky2, but in general reversing the right reverser that i know is @[Only registered and activated users can see links. Click Here To Register...] in that forum. Read their past comments, docs, they will absolutely teach you at least something.
01/28/2024 13:30 Mega Byte#5
The way I did it was to just over-write the text in the structures, after game loaded up the data, I was able to load a csv for example and replace the item, npc, monster, quest, skill texts etc inside their structures. It was simple but got the job done.

If you find the text in memory for what it says, you can figure out the structure or at least the location/pointer to it, and the size of structure, then its just an array you can copy the string/bytes over what is there so long as it is within the fixed size constraints of those strings.

Of course you could go another way about it, detour the code that grabs the text for a particular thing you want to translate, then return w/e string you want.

If you look for where it reads the files from disk you can find a long routine of call something, if it failed to load push an error/continue loading next thing if I recall. you can also find the filename in memory inside those functions.

If you were to detour that function you could write code to run after it runs to then replace the contents for example.

I think I did it without a detour, just waited to know what screen it was at looking at the screen pointer, then loaded the info I wanted over top of the existing loaded structs.

There are newer tools than when I started doing this like ReClass.NET [Only registered and activated users can see links. Click Here To Register...] which can help you map out structures a little bit nicer than working with the structure mapper in Cheat Engine to be sure.

Using Ida Pro or Hexrays or x86dbg [Only registered and activated users can see links. Click Here To Register...] etc is pretty technical, but if you keep at it and learn things bit by bit you can start to make sense of things and it clicks.

By decompiling the assembly into C++ or something using HexRays or Snowflake or w/e it was called, you can more easily understand what the code does in some cases, but its still a wild goose chase if you don't figure things out and name them or look for strings or debug symbols. It's a big puzzle if your looking at the code/assembler for a compiled thing as you often wont have any nicely named variables and structures can be a bit of a mess.

Try to find the parts that load the text from the *.IMG files then find a pointer for that memory location.
You could also try putting mouse over an item and using hotkeys in CE to search for
Unknown 4 byte
Mouse over item, use hot key to search for (changed value, unchanged value) move mouse off item to not select anything, search for changed value, rinse and repeat.

If the value of a hovered item is stored in a memory structure, you might find it that way.
Then you can look for what writes this value/reads this value and find the code that uses it.
But since you know the name of the item and the name of files loading that info, searching it is much much easier tbh.