def readDiff(fname):
    """Function that returns a list of changes based on a IDA dif file."""
    changes = []
    with open(fname, "r") as f:
        for line in f:
            if ':' in line:
                offset, diff = line.split(':')
                before, after = diff.lstrip().split(' ')
                after = after.rstrip()
                offset = int(offset, 16)
                before = int(before, 16)
                after  = int(after , 16)
                changes.append( (offset, before, after) )
    return changes