'This function grabs necessary data for the mach-o format'

def get_structure(self):

    self.binary_header = self.bin.read(4)
    if (self.binary_header == '\xca\xfe\xba\xbe'):
        print '[*]    Fat    File    detected'
        self.FAT_FILE = True
        ArchNo = struct.unpack('>I', self.bin.read(4))[0]
        for arch in range(ArchNo):
            self.fat_hdrs[arch] = self.fat_header()
        for (hdr, value) in self.fat_hdrs.iteritems():
            if (int(value['CPU    Type'], 16) in self.supported_CPU_TYPES):
                self.bin.seek(int(value['Offset'], 16), 0)
                self.mach_hdrs[hdr] = self.mach_header()
                self.load_cmds[hdr] = self.parse_loadcommands(self.mach_hdrs[hdr])
        if (self.mach_hdrs is False):
            return False
    else:
        self.bin.seek(0)
        self.mach_hdrs[0] = self.mach_header()
        self.load_cmds[0] = self.parse_loadcommands(self.mach_hdrs[0])
