コード例 #1
0
ファイル: dump_stuff.py プロジェクト: 0xced/Miscellaneous
def uisound_get_filenames(mo, f_sym, iphone_sound_sym, testValue):
    testValues = {testValue}
    exhaustedValues = set()
    startAddr = f_sym.addr

    thread = Thread(mo)
    thread.onBranch = UISoundOnBranchHolder(mo)
    
    instrSet = f_sym.isThumb
    fnmaps = {}
    
    while True:
        valueLeft = testValues - exhaustedValues
        if not valueLeft:
            break
        anyValue = valueLeft.pop()
        exhaustedValues.add(anyValue)

        thread.memory.set(iphone_sound_sym.addr, 1)
        (phoneSound, hasPhoneSound) = uisound_get_name_for_input(mo, thread, startAddr, anyValue, testValues, instrSet)

        if hasPhoneSound:            
            thread.memory.set(iphone_sound_sym.addr, 0)
            podSound = uisound_get_name_for_input(mo, thread, startAddr, anyValue, testValues, instrSet)[0]
        else:
            podSound = '-'
            
        if hasPhoneSound:
            fnmaps[anyValue] = [phoneSound, podSound, '-']
    
    return fnmaps
コード例 #2
0
ファイル: dump_stuff.py プロジェクト: 5l1v3r1/Miscellaneous-1
def uisound_get_filenames(mo, f_sym, iphone_sound_sym, testValue):
    testValues = {testValue}
    exhaustedValues = set()
    startAddr = f_sym.addr

    thread = Thread(mo)
    thread.onBranch = UISoundOnBranchHolder(mo)

    instrSet = f_sym.isThumb
    fnmaps = {}

    while True:
        valueLeft = testValues - exhaustedValues
        if not valueLeft:
            break
        anyValue = valueLeft.pop()
        exhaustedValues.add(anyValue)

        thread.memory.set(iphone_sound_sym.addr, 1)
        (phoneSound,
         hasPhoneSound) = uisound_get_name_for_input(mo, thread, startAddr,
                                                     anyValue, testValues,
                                                     instrSet)

        if hasPhoneSound:
            thread.memory.set(iphone_sound_sym.addr, 0)
            podSound = uisound_get_name_for_input(mo, thread, startAddr,
                                                  anyValue, testValues,
                                                  instrSet)[0]
        else:
            podSound = '-'

        if hasPhoneSound:
            fnmaps[anyValue] = [phoneSound, podSound, '-']

    return fnmaps
コード例 #3
0
ファイル: dump_stuff.py プロジェクト: 5l1v3r1/Miscellaneous-1
def uisound_fill_categories(mo, cat_addr, init_sym):
    thread = Thread(mo)
    thread.instructionSet = init_sym.isThumb
    thread.onBranch = UISoundCoreMediaOnBranch(mo)

    msa = mo.symbols.any
    mem = thread.memory
    tmg = mem.get
    tms = mem.set

    novol_sym = msa('name', '_gSystemSoundsWithNoVolumeAdjustment')
    if novol_sym:
        tms(novol_sym.addr, 1)
    tms(cat_addr, 0)

    thread.pc = init_sym.addr

    while thread.pcRaw != Return:
        thread.execute()
        catdict = tmg(cat_addr)
        if catdict:
            return tmg(catdict)

    return {}
コード例 #4
0
ファイル: dump_stuff.py プロジェクト: 0xced/Miscellaneous
def uisound_fill_categories(mo, cat_addr, init_sym):
    thread = Thread(mo)
    thread.instructionSet = init_sym.isThumb
    thread.onBranch = UISoundCoreMediaOnBranch(mo)
    
    msa = mo.symbols.any
    mem = thread.memory
    tmg = mem.get
    tms = mem.set
    
    novol_sym = msa('name', '_gSystemSoundsWithNoVolumeAdjustment')
    if novol_sym:
        tms(novol_sym.addr, 1)
    tms(cat_addr, 0)

    thread.pc = init_sym.addr
    
    while thread.pcRaw != Return:
        thread.execute()
        catdict = tmg(cat_addr)
        if catdict:
            return tmg(catdict)
    
    return {}