-
-
Notifications
You must be signed in to change notification settings - Fork 51
Technical Information
First of all, since bds does not export any symbols, we cannot directly call its internal functions.
Fortunately, bds provides the pdb file, which contains almost all the required symbols and their relative offsets in the file. If we want to call the functions in it, we can parse the pdb file first, get the offset of the file, and then calculate the position of the symbol in memory.
So there is a solution is to first save all the offsets corresponding to the symbols in pdb to a database file and read it at runtime to achieve the purpose of calling the bds function.
This solution does work, but unfortunately it is too complicated and there is no way to write header files directly. So I thought of another solution, which is to restore the export table from the pdb file. Despite all the difficulties, I finally wrote this converter program. That's it EatPdb project.
With this tool, the development process went smoothly immediately. Since I have a lot of Minecraft related reverse engineering experience, recovering header files is not a difficult task for me.
Of course, I also encountered some inevitable problems in the process. The first is due to the ABI requirements of win32, whose symbols include the method's visibility flag and the virtual function's flag. Then the virtual function call is not used directly according to the symbol, but based on its order in the source code. This means that I either have to write all the virtual functions; or I have to manually load the symbols to force the corresponding functions to be called. But in any case, it is always solved, even if it is more complicated to write
A. Installation:
- Windows
- GNU/Linux (Using Docker and Wine) (Recommended)
- GNU/Linux (Wine without docker) (Not Recommended)
B. Installing and using the translation resource pack (Otherwise the command help menus and responses will be gibberish)
For Advanced Users Only