XboxChaos/Assembly — pull request #124 by iBotPeaches (2013-08-27 19:09:08+00:00)
Title: Fixed #109 and fixes up BLF

Now this is my first big commit to Assembly. It could use a major code review and testing before merge. However, now that school has started my time to continue messing around with Halo is non-existent (on top of work + school). So I'm pushing this now, which I have tested personally that works on Halo 4 / Halo 3.

The problems with the previous BLF were as follows
- No support for removing exlif data
- No support for PNGs in BLF containers
- Hardcoded range removal of leading 8 bytes

So I attempted to fix this with the following.
- Adapting PureBLF to include a new ImageType field, so we can detect internal PNGs vs JPGs.
- Adding a ByteListArray class to help find patterns among bytes (to determine the PNGs/JPGs)
- Remove the header based on the Image Type using ByteListHeader locate
- Fix the injection/extraction of all game images using above utilities instead of hardcoded lengths.
- Remove any extra exlif data prior to injection of image.

Now I tested this bitch a lot locally and it worked for me. So hopefully it works for you guys. Sorry for the spacing changes, after I screwed up the spacing. I ran a commit to fix them, which also fixed random parts of the code that I didn't touch (since they weren't spaced properly).