[INFO] Structures - Printable Version +- Eliot's Forum (https://eliotvu.com/forum) +-- Forum: UE Explorer (https://eliotvu.com/forum/forumdisplay.php?fid=1) +--- Forum: Unreal File Format (https://eliotvu.com/forum/forumdisplay.php?fid=14) +--- Thread: [INFO] Structures (/showthread.php?tid=85) |
[INFO] Structures - sh!ft - 08-31-2013 Because I have no idea why Eliot chose to make a de-compiler for a multi-platform system like Unreal in a platform dependent virtual machine like dotNet... (No offense) Here are the basic C Structures to get you started. Decompiler basics use heuristics based on a Control Flow Graph (CFG) in which you attempt to deconstruct an assembly of some sort into something similar to the languages Abstract Syntax Tree (AST). So read the UnrealScript API and model a tree before you bother with actual deconstruction. It's foolish to start with deconstruction and work up to an AST. If you need help understanding such things and how you should model it, I suggest you try something like: Backus–Naur Form? Maybe? It's really up to you. Personally I use a linked list/tree format. I'm super lazy so I try not to bother with anything overly unnecessary like making helper functions, etc. For the most part my deserialize function just casts the structures to the data, and then lazy links the pointers. (Please, if you don't understand lazy linking, you shouldn't be writing a decompiler.) This is just something to get you started. I personally wrote mine in C.. Cause I really find C++ becomes far too extravagant for absolutely no reason except programmer preference half the time. Code: #pragma pack(push, 1) |