For loading the textures change this line (line 315)

imgWidth, imgHeight, type1, type2, type3, type4, unk00 = bs.read("2H4BI")

to this :

unk,imgWidth, imgHeight, type1, type2, type3, type4, unk00 = bs.read("I2H4BI")