DBA and HBA files are texture containers. They can be found in the VOL containers.
The containers start with the sequence "\x01\x00\x28\x00", followed by a 32-bit uint detailing the size of the file minus 8 bytes (magic+flen) and a 32-bit uint telling the number of embedded files.
Then, without any further stuff, the images follow. Means: first there is the standard DBM magic sequence "\x0e\x00\x28\x00" followed by the 32-bit uint which gives the length of the image. So, take these two 32-bit uints and the appropriate number of bytes after them and write them to a .DBM file. Then over-jump a nullbyte and the next file begins.