parameters: ()
docstring: Rebase the file in IDA so that the in-module addresses line up
      with the traces.
docstring_summary: Rebase the file in IDA so that the in-module addresses line up
      with the traces.
docstring_tokens: Rebase the file in IDA so that the in - module addresses line up with the traces .
function: def RebaseIdaToMatchDatabase():
      """
      Rebase the file in IDA so that the in-module addresses line up
      with the traces.
      """
      ida.Wait()
      InputMD5    = ida.GetInputFileMD5()
      Module      = modules.find_one({'MD5':InputMD5})
  
      if not Module:
          raise Exception("Could not find module MD5 of input module: %s" % InputMD5)
  
      EA          = ida.ScreenEA()
      NewBase     = Module['Base']
      OldBase     = addr.Min() & ~0xffff
      if OldBase != NewBase:
          ida.rebase_program(NewBase - OldBase, 0)
          ida.Jump(EA - OldBase + NewBase)
      ida.Wait()
function_tokens: def RebaseIdaToMatchDatabase ( ) : ida . Wait ( ) InputMD5 = ida . GetInputFileMD5 ( ) Module = modules . find_one ( { 'MD5' : InputMD5 } ) if not Module : raise Exception ( "Could not find module MD5 of input module: %s" % InputMD5 ) EA = ida . ScreenEA ( ) NewBase = Module [ 'Base' ] OldBase = addr . Min ( ) & ~ 0xffff if OldBase != NewBase : ida . rebase_program ( NewBase - OldBase , 0 ) ida . Jump ( EA - OldBase + NewBase ) ida . Wait ( )