Closed Kinkojiro closed 6 years ago
Can you revisit this and let me know what's been done so far in Binary Editor for this, it's been there for some time, however I am not sure if i have implemented 100% of it. I think I've done the function table.
I know this would be a pain, but if you could annotate an image and highlight the blocks of a simple class, it would be greatly appreciated, as I plan to add this to binary interpreter and hopefully binary relinker.
Right now binary interpreter reads Class backwards. so we can see the list of functions, the count, etc. However I need a more detailed document describing the layout of Class.
On EGM chat
This is the format for classes in Mass Effect, Mass Effect 2, and Mass Effect 3 for technical documentation purposes.
These are 100% identical to each other in both games.
Unreal Unique Index (Int32) SuperClass Index (Int32 ObjectReference) Unknown1 (Int32) CompilingChainNextItem (Int32 ObjectReference) IgnoreMask (UInt64) LabelOffset (Int16) [UnrealScript Block. Ends with 10 consecutive FF's. It seems there is always at least 0x6 bytes before the FF's can start. ] StateMask (Int32) Local Functions Table Size (Int32)
Class Mask (Int32) 00 (Byte) - Seems to be a spacer or alignment, however during all my scans this is always present Outerclass (Int32 ObjectReference) Implemented Interfaces Table
Components Table Count (Int32)
Unknown2 (Int32) Unknown3 (Int32) Class Defaults Reference (Int32 ObjectReference)
This is similar but not identical to the previous 2 games.
Unreal Unique Index (Int32) SuperClass Index (Int32 ObjectReference) Unknown1 (Int32) CompilingChainNextItem (Int32 ObjectReference) IgnoreMask (UInt64) LabelOffset (Int16) [UnrealScript Block. Ends with 10 consecutive FF's. It seems there is always at least 0x6 bytes before the FF's can start. ] StateMask (Int32) Local Functions Table Size (Int32)
Class Mask (Int32) Outerclass (Int32 ObjectReference) Components Table
Implemented Interfaces Table Size (Int32)
None NameReference (Int32, Int32) Unknown2 (Int32) Class Defaults Reference (Int32 ObjectReference) Full Functions Table Size (Int32)
There appears to be 8 bytes at the bottom after this that are also functions, like the size is -2 or something. I will need to look into this.
Template:
0x0 Unreal header (sequential to other headers in the class content) 0x4 Superclass
0x8 blank 0xC Object link for start of unrealscript tree 0x10 Unreal code unknown (mainly used by pawns/ai) 0x2C Local Function Table {Count [int] [Name, Object reference]} Following function table: 4 byte code unknown Core.Object Component table [this is primarily used by actors and other complex code] {Name (e.g. weapon, game etc} or None if empty Count [int] [Name, Object reference]} Following Component table: None Blank int Default__Class object Linked functions {Count [int], List of links Obj}