예제 #1
0
def nameDispatch(address):
    '''Name the dispatch function at the specified address in quicktime.qts'''
    try:
        start, end = function.getRange(address)

    except ValueError:
        print '%x making a function' % address
        function.make(address)
        start, end = function.getRange(address)

    try:
        ea = FindLastAssignment(address, 'eax')
        code = getDispatchCode(ea)
    except ValueError:
        print '%08x - Unable to find dispatch code' % address
        return

    function.setName(start, 'dispatch_%08x' % code)
    function.tag(start, 'code', code)
    function.tag(start, 'group', 'dispatch')
    try:
        function.tag(start, 'realname', __quicktime.qt_fv_list[code])
    except KeyError:
        pass

    try:
        function.tag(start,
                     'address',
                     resolveDispatcher(code),
                     repeatable=True)
    except:
        pass
예제 #2
0
def nameDispatch(address):
    '''Name the dispatch function at the specified address in quicktime.qts'''
    try:
        start, end = function.getRange(address)

    except ValueError:
        print '%x making a function'% address
        function.make(address)
        start, end = function.getRange(address)

    try:
        ea = FindLastAssignment(address, 'eax')
        code = getDispatchCode(ea)
    except ValueError:
        print '%08x - Unable to find dispatch code'% address
        return

    function.setName(start, 'dispatch_%08x'% code)
    function.tag(start, 'code', code)
    function.tag(start, 'group', 'dispatch')
    try:
        function.tag(start, 'realname', __quicktime.qt_fv_list[code])
    except KeyError:
        pass

    try:
        function.tag(start, 'address', resolveDispatcher(code), repeatable=True)
    except:
        pass