custom_data_types_and_formats

summary: custom data types & printers

description:

IDA can be extended to support certain data types that it does not know about out-of-the-box.

A ‘custom data type’ provide information about the type & size of a piece of data, while a ‘custom data format’ is in charge of formatting that data (there can be more than one format for a specific ‘custom data type’.)

level: advanced

Attributes

new_formats

f

Classes

pascal_data_type

Information about a data type

pascal_data_format

Information about a data format

simplevm_data_type

Information about a data type

simplevm_data_format

Information about a data format

makedword_data_format

Information about a data format

rsrc_string_format

Information about a data format

Functions

nw_handler(code[, old])

Module Contents

class custom_data_types_and_formats.pascal_data_type

Bases: ida_bytes.data_type_t

Information about a data type

calc_item_size(ea, maxsize)
class custom_data_types_and_formats.pascal_data_format

Bases: ida_bytes.data_format_t

Information about a data format

FORMAT_NAME = 'py_pascal_string_pstr'
printf(value, current_ea, operand_num, dtid)
class custom_data_types_and_formats.simplevm_data_type(name='py_simple_vm', value_size=1, menu_name='SimpleVM', asm_keyword=ASM_KEYWORD)

Bases: ida_bytes.data_type_t

Information about a data type

ASM_KEYWORD = 'svm_emit'
calc_item_size(ea, maxsize)
class custom_data_types_and_formats.simplevm_data_format(name='py_simple_vm_format', menu_name='SimpleVM')

Bases: ida_bytes.data_format_t

Information about a data format

INST
REGS
disasm(inst)

A simple local disassembler. In reality one can use a full-blown disassembler to render the text

printf(value, current_ea, operand_num, dtid)
class custom_data_types_and_formats.makedword_data_format

Bases: ida_bytes.data_format_t

Information about a data format

printf(value, current_ea, operand_num, dtid)
class custom_data_types_and_formats.rsrc_string_format

Bases: ida_bytes.data_format_t

Information about a data format

cache_node
get_rsrc_string(fn, id)

Simple method that loads the input file as a DLL with LOAD_LIBRARY_AS_DATAFILE flag. It then tries to LoadString()

printf(value, current_ea, operand_num, dtid)
custom_data_types_and_formats.new_formats
custom_data_types_and_formats.nw_handler(code, old=0)
custom_data_types_and_formats.f = 11