Skip to content

Instantly share code, notes, and snippets.

@jam1garner
Created January 6, 2018 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jam1garner/c55bce83afeb7915b2f059bda17ea07b to your computer and use it in GitHub Desktop.
Save jam1garner/c55bce83afeb7915b2f059bda17ea07b to your computer and use it in GitHub Desktop.
LittleEndian();
struct HEADER{
char magic[0x10];
int entriesOffset<format=hex>;
int entryPoint<format=hex>;
int entryCount;
int unk;
int stringSize<format=hex>;
int stringCount;
int padding[3];
}header<bgcolor=cRed>;
FSeek(header.entriesOffset+0x30);
FSeek((0x10 - (FTell() % 0x10)) + FTell());
int scriptOffset[header.entryCount]<format=hex,bgcolor=cLtBlue>;
FSeek((-(FTell() % 0x10)) + FTell());
struct MSCSTRING{
char str[header.stringSize]<bgcolor=cGreen>;
}strings[header.stringCount];
local int i;
for(i = 0; i < header.entryCount; i++){
FSeek(scriptOffset[i] + 0x35);
byte start<bgcolor=cGreen>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment