360trev
Full Member
Karma: +68/-2
Offline
Posts: 235
|
|
« Reply #15 on: January 08, 2011, 04:59:21 PM »
|
|
|
Q. Does this IDA Bosch ME7 plugin only support 'some' variants of Bosch ME ? Andy did quite a bit of hardcoding in that code. Must have written it fast, fast, fast. Noticed in the segments section of the C++ code it does the following (hardcoded) -without any ability to change from a config file. Same thing goes for the function signatures it finds. All of them hardcoded with no ability to extend or modify the signature names for both functions and data that it finds... Here's the CreateSegmemts() function (C++ code)... ---cut---cut---cut---cut---cut---cut if (NewBoschME7111) { result = BoschHelper::CreateC16xSmallBoschSegments(0x00000, 0x08000, "MEM_EXT", "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x08000, 0x0E000, "MEM_EXT", "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0E000, 0x0E800, "XRAM", "DATA", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0E800, 0x0EF00, "RESERVED", "BSS", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0EF00, 0x0F000, "CAN1", "DATA", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0F000, 0x0F200, "E_SFR", "DATA", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0F200, 0x0F600, "RESERVED", "BSS", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0F600, 0x0FE00, "IRAM", "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0FE00, 0x10000, "SFR", "DATA", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x01000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x02000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x03000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x04000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x05000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x06000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x07000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x08000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x09000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x0A000, 4, "CODE", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x0B000, 4, "DATA", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x0C000, 4, "DATA", 44, 45, 60, 3); result = BoschHelper::CreateC16xBoschSegments(0x0F000, 4, "RAM", 44, 45, 60, 3); } else { result = BoschHelper::CreateC16xSmallBoschSegments(0x00000, 0x08000, "MEM_EXT", "CODE", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x08000, 0x0E000, "MEM_EXT", "CODE", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0E000, 0x0E800, "XRAM", "DATA", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0E800, 0x0EF00, "RESERVED", "BSS", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0EF00, 0x0F000, "CAN1", "DATA", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0F000, 0x0F200, "E_SFR", "DATA", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0F200, 0x0F600, "RESERVED", "BSS", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0F600, 0x0FE00, "IRAM", "CODE", 0, 1, 2, 3); result = BoschHelper::CreateC16xSmallBoschSegments(0x0FE00, 0x10000, "SFR", "DATA", 0, 1, 2, 3); result = BoschHelper::CreateC16xBoschSegments(0x38000, 2, "DATA", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x80000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x81000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x82000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x83000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x84000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x85000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x86000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x87000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x88000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x89000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x8A000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x8B000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x8C000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x8D000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x8E000, 4, "CODE", 516, 517, 224, 3); result = BoschHelper::CreateC16xBoschSegments(0x8F000, 4, "CODE", 516, 517, 224, 3); }
---cut---cut---cut---cut---cut---cut and the 'MakeDiss()' function ---cut---cut---cut---cut---cut---cut char MakeDissCode(int NewBoschME7111_Mode) { char result;
if ( BoschME7111_Mode ) { result = Create_Dissassembly(0x00000, 0xA7FFF); result = Create_Dissassembly(0xC0000, 0xCDFFF); } else { result = Create_Dissassembly(0x000000, 0x0001FF); result = Create_Dissassembly(0x000700, 0x007FFF); result = Create_Dissassembly(0x800000, 0x810000); result = Create_Dissassembly(0x830000, 0x8FFF00); } return result; }
---cut---cut---cut---cut---cut---cut Perhaps I need to re-write the entire thing...
|