//------------------------------------------------ //--- 010 Editor v12.0.1 Binary Template // // File: LocalisationFile.bt // Authors: LolHacksRule // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ local uint i = 0; local uint i2 = 0; typedef enum { Unhashed = 1397509955, Hashed = 1280262995, } LocType; typedef enum { SingleStringID = 1, ExtraStringID = 2, } LocFlag; typedef struct GenericStringID { string stringID; //Printf("%s\n", stringID); }; typedef struct GenericString { string str; if (magic == Unhashed) { local string StringID = strIDEntries.StringIDEntry[i].stringID; Printf("%s=", StringID); } Printf("%s\n", str); }; typedef struct StringParam { uint32 offInStrTbl; uint32 strSize; uint32 fullStrSize; //Contains string ID and string entry uint32 strSize2; //Normally +1, if is one it applies to the below values }; typedef struct HashedStringParam { if (ver == 2) { uint32 hash[2]; //? } else { uint32 hash; } uint32 offInStrTbl; if (ver == 2) { uint32 strSize; //Does not include the null byte at the end } /*else { uint32 hash2; uint32 strSize; //Normally +1, if is one it applies to the below values }*/ }; typedef struct GenericUnicodeStringID { wstring stringID; //Printf("%s\n", stringID); }; typedef struct GenericUnicodeString { wstring str; Printf("%s\n", str); }; struct LocalisationFile { LittleEndian(); LocType magic; uint32 ver; LocFlag flag; //Flag of some kind, if 2 there's another group of ints if (magic == Unhashed) { uint32 stringCnt; uint32 tournamentStringParamTblOff; //28 uint32 stringParamTableOff; //38 uint32 stringDataOff; uint32 strTblOff; uint32 strEntryTblOff; uint32 strEntryTblSize; struct StringParameters { StringParam TournamentParamEntry; for (i = 0; i < stringCnt; i++) { StringParam ParamEntry; } } strprm; struct StringTable { string locFileName; //Printf("String IDs:\n"); struct StringIDEntries { if (flag == 2) { for (i = 0; i < stringCnt+1; i++) { GenericStringID StringIDEntry; } } else { for (i = 0; i < stringCnt; i++) { GenericStringID StringIDEntry; } } } strIDEntries; //Printf("String IDs End\n\n"); Printf("[%s]\n", locFileName); struct StringEntries { for (i = 0; i < stringCnt; i++) { GenericString StringEntry; } } strEntries; //Printf("Strings End"); } strTbl; } else { if (ver == 2) { uint32 hash[2]; //? } else { uint32 hash; } uint32 zero; if (ver == 2 && flag == 2) { uint32 unk1; uint32 hashflg[2]; uint32 unk2; } uint32 locStrings1; uint32 locStringsAgain; if (locStrings1 != 0) { struct HashedStringParamEntries { if (flag == 2) { for (i = 0; i < locStrings1; i++) { HashedStringParam HashedStringEntry; } } else { for (i = 0; i < locStrings1; i++) //Change locstrings to / 2 if you don't get something { HashedStringParam HashedStringEntry; } } } hspe; if (flag == 2 && ver != 2) { uint32 unk2[4]; } struct HashedStringEntries { if (ver == 2) { for (i = 0; i < locStrings1; i++) { GenericString HashedStringEntry; } } else { for (i = 0; i < locStrings1; i++) { GenericUnicodeString HashedUnicodeStringEntry; } } } hashedStrEntries; } else { Printf("No strings!"); } } //uint32 strTblOff; } Loc;