#NEWLINE# def __asm_to_reil( self , asm_list , address ) : #NEWLINE# #INDENT# asm = '\n' . join ( asm_list ) #NEWLINE# bytes = self . _arm_compile ( asm ) #NEWLINE# curr_addr = 0 #NEWLINE# end_addr = len ( bytes ) #NEWLINE# dis = ArmDisassembler ( ) #NEWLINE# arm_instr_list = [ ] #NEWLINE# while ( address < end_addr ) : #NEWLINE# #INDENT# ( start , end ) = ( curr_addr , min ( ( curr_addr + 16 ) , end_addr ) ) #NEWLINE# USE_ARM = 0 #NEWLINE# arm_instr = dis . disassemble ( bytes [ start : end ] , 32768 , USE_ARM ) #NEWLINE# if ( not arm_instr ) : #NEWLINE# #INDENT# raise Exception ( 'Error in capstone disassembly' ) #NEWLINE# #UNINDENT# arm_instr_list . append ( arm_instr ) #NEWLINE# curr_addr += arm_instr . size #NEWLINE# #UNINDENT# self . __set_address ( address , arm_instr_list ) #NEWLINE# reil_instrs = self . __translate ( arm_instr_list ) #NEWLINE# return reil_instrs