Magic Duels Reversing Fun
Posted: 14 Mar 2016, 14:34
Hi there,
Today i randomly thought about Magic Duels and how it would be great to have it do what i want.
So i did the usual RE spiel,
1. open up the binary
2. see that its full of gibberish
3. dump the running process
4. Looks fine
5. Open it up in IDA
6. See that it uses LUA
7. Apply Lua flirt signatures
8. See how lua funcs are initialized
9. Rename them by script
10. Run the RTTI Scripts, see LOADS of stuff defined
Seems like this would be an easy reversing job so i check out the file formats AND WHAT DO I SEE
Theres a Duels.pdb in the Folder, i never had this before ...
So instead of meticulously defining structs, figuring out what the members do and renaming / typing them based on what i think it does i get listings like this
Today i randomly thought about Magic Duels and how it would be great to have it do what i want.
So i did the usual RE spiel,
1. open up the binary
2. see that its full of gibberish
3. dump the running process
4. Looks fine
5. Open it up in IDA
6. See that it uses LUA
7. Apply Lua flirt signatures
8. See how lua funcs are initialized
9. Rename them by script
10. Run the RTTI Scripts, see LOADS of stuff defined
Seems like this would be an easy reversing job so i check out the file formats AND WHAT DO I SEE
Theres a Duels.pdb in the Folder, i never had this before ...
So instead of meticulously defining structs, figuring out what the members do and renaming / typing them based on what i think it does i get listings like this
- Code: Select all
struct __cppobj MTG::CPlayer : CLuaClass<MTG::CPlayer>, BZ::ClearMemory
{
MTG::CDuel *mDuel;
int mGlobal_index;
unsigned int mUnique_ID;
MTG::CTeam *mTeam;
...
};