Flatten is a Win32 utility for extracting executable code out of Android ELF files. It operates in two distinct modes for xbl and abl.
Most ELF files have sections. Qualcomm files only have programs in the program table. Each is a chunk that will be mapped to memory. Some disassemblers can not handle these separate chunks. The point of flatten in this case is to convert the separate chunks to a contiguous binary file. First we look at what is in the file.
Some of these programs are even embedded ELF files! But let's say that we are interested in the first six programs.
Now we have a single binary file with the load address of 14015000. We can dissasemble it.
ABL files have only three programs. The third program is an embedded UEFI file system. It contains an LZMA chunk which has further UEFI structure. All we're interested in is the part of the uncompressed LZMA chunk. In most cases there is Secure Boot enabled and we have no possibility of modding the image and putting it back together. Mostly we're looking in ABL to see if there are hidden or missing fastboot commands. flatten in this case just extracts the single block of executable code without any of the MZ or PE headers.
Since there is no explicit load address, you can just decrypt it with the fictitious address of zero.
Download the executable.