Module index

Module ida_hexrays

Global variables

var ACFL_BLKOPT

perform interblock transformations

var ACFL_GLBDEL

perform dead code eliminition

var ACFL_GLBPROP

perform global propagation

var ACFL_GUESS

may guess calling conventions

var ACFL_LOCOPT

perform local propagation (requires ACFL_BLKOPT)

var ALLOW_UNUSED_LABELS

Unused labels are permitted.

var ANCHOR_BLKCMT

block comment (for ctree items)

var ANCHOR_CITEM

c-tree item

var ANCHOR_ITP

item type preciser

var ANCHOR_LVAR

declaration of local variable

var ANY_FPSIZE

any size of floating operand is permitted

var ANY_REGSIZE

any register size is permitted

var BLT_0WAY

does not have successors (tail is a noret function)

var BLT_1WAY

passes execution to one block (regular or goto block)

var BLT_2WAY

passes execution to two blocks (conditional jump)

var BLT_NONE

unknown block type

var BLT_NWAY

passes execution to many blocks (switch idiom)

var BLT_STOP

stops execution regularly (must be the last block)

var BLT_XTRN

external block (out of function address)

var CALC_CURLY_BRACES

print curly braces if necessary

var CFL_FINAL

call type is final, should not be changed

var CFL_HELPER

created from a decompiler helper function

var CFL_NORET

call does not return

var CFS_BOUNDS

'eamap' and 'boundaries' are ready

var CFS_LOCKED

cfunc is temporarily locked

var CFS_LVARS_HIDDEN

local variable definitions are collapsed

var CFS_TEXT

'sv' is ready (and hdrlines)

var CHF_FAKE

fake chain created by widen_chains()

var CHF_INITED

is chain initialized? (valid only after lvar allocation)

var CHF_OVER

overlapped chain

var CHF_PASSTHRU

pass-thru chain, must use the input variable to the block

var CHF_REPLACED

chain operands have been replaced?

var CHF_TERM

terminating chain; the variable does not survive across the block

var CIT_COLLAPSED

display ctree item in collapsed form

var CMAT_BUILT

just generated

var CMAT_CASTED

added necessary casts

var CMAT_CPA

corrected pointer arithmetic

var CMAT_FINAL

ready-to-use

var CMAT_NICE

nicefied expressions

var CMAT_TRANS1

applied first wave of transformations

var CMAT_TRANS2

applied second wave of transformations

var CMAT_TRANS3

applied third wave of transformations

var CMAT_ZERO

does not exist

var CMT_ALL

All comments.

var CMT_BLOCK1

Anterioir block comment.

var CMT_BLOCK2

Posterior block comment.

var CMT_FUNC

Function comment.

var CMT_LVAR

Local variable comment.

var CMT_NONE

No comment is possible.

var CMT_TAIL

Indented comment.

var CPBLK_FAST

do not update minbstkref and minbargref

var CPBLK_MINREF

update minbstkref and minbargref

var CPBLK_OPTJMP

del the jump insn at the end of the block if it becomes useless

var CV_FAST

do not maintain parent information

var CV_INSNS

visit only statements, prune all expressions do not use before the final ctree maturity because expressions may contain statements at intermediate stages (see cot_insn). Otherwise you risk missing statements embedded into expressions.

var CV_PARENTS

maintain parent information

var CV_POST

call the leave…() functions

var CV_PRUNE

this bit is set by visit…() to prune the walk

var CV_RESTART

restart enumeration at the top expr (apply_to_exprs)

var DECOMP_ALL_BLKS

generate microcode for unreachable blocks

var DECOMP_GXREFS_DEFLT

the default behavior: do not update the global xrefs cache upon decompile() call, but when the pseudocode text is generated (e.g., through cfunc_t.get_pseudocode())

var DECOMP_GXREFS_FORCE

update the global xrefs cache immediately

var DECOMP_GXREFS_NOUPD

do not update the global xrefs cache

var DECOMP_NO_CACHE

do not use decompilation cache (snippets are never cached)

var DECOMP_NO_FRAME

do not use function frame info (only snippet mode)

var DECOMP_NO_HIDE

do not close display waitbox. see close_hexrays_waitboxes()

var DECOMP_NO_WAIT

do not display waitbox

var DECOMP_NO_XREFS

Obsolete. Use DECOMP_GXREFS_NOUPD.

var DECOMP_VOID_MBA

return empty mba object (to be used with gen_microcode)

var DECOMP_WARNINGS

display warnings in the output window

var EQ_CMPDEST

compare instruction destinations

var EQ_IGNCODE

ignore instruction opcodes

var EQ_IGNSIZE

ignore source operand sizes

var EQ_OPTINSN

optimize mop_d operands

var EXFL_ALL

all currently defined bits

var EXFL_ALONE

standalone helper

var EXFL_CPADONE

pointer arithmetic correction done

var EXFL_CSTR

string literal

var EXFL_FPOP

floating point operation

var EXFL_JUMPOUT

jump out-of-function

var EXFL_LVALUE

expression is lvalue even if it doesn't look like it

var EXFL_PARTIAL

type of the expression is considered partial

var EXFL_UNDEF

expression uses undefined value

var EXFL_VFTABLE

is ptr to vftable (used for cot_memptr, cot_memref)

var FCI_DEAD

some return registers were determined dead

var FCI_EXPLOCS

all arglocs are specified explicitly

var FCI_FINAL

call type is final, should not be changed

var FCI_HASCALL

A function is an synthetic helper combined from several instructions and at least one of them was a call to a real functions

var FCI_HASFMT

A variadic function with recognized printf- or scanf-style format string

var FCI_NORET

call does not return

var FCI_NOSIDE

call does not have side effects

var FCI_PROP

call has been propagated

var FCI_PURE

pure function

var FCI_SPLOK

spoiled/visible_memory lists have been optimized. for some functions we can reduce them as soon as information about the arguments becomes available. in order not to try optimize them again we use this bit.

var FD_BACKWARD

search direction

var FD_DEF

look for definition

var FD_DIRTY

ignore possible implicit definitions by function calls and indirect memory access

var FD_FORWARD

search direction

var FD_USE

look for use

var FORBID_UNUSED_LABELS

Unused labels cause interr.

var GCA_ALLOC

enumerate only allocated chains

var GCA_EMPTY

include empty chains

var GCA_NALLOC

enumerate only non-allocated chains

var GCA_OFIRST

consider only chains of the first block

var GCA_OLAST

consider only chains of the last block

var GCA_SPEC

include chains for special registers

var GCO_DEF

is destination operand?

var GCO_REG

is register? otherwise a stack variable

var GCO_STK

a stack variable

var GCO_USE

is source operand?

var GC_ASR

all the above and assertions

var GC_DIRTY_ALL

bitmask to represent all chains

var GC_END

number of chain types

var GC_REGS_AND_STKVARS

registers and stkvars (restricted memory only)

var GC_XDSU

only registers calculated with FULL_XDSU

var GLN_ALL

get both

var GLN_CURRENT

get label of the current item

var GLN_GOTO_TARGET

get goto target

var INLINE_DONTCOPY

Do not reuse old inlined copy even if it exists.

var INLINE_EXTFRAME

Inlined function has its own (external) frame.

var IPROP_ASSERT

assertion: usually mov #val, op. assertions are used to help the optimizer. assertions are ignored when generating ctree

var IPROP_CLNPOP

the purpose of the instruction is to clean stack (e.g. "pop ecx" is often used for that)

var IPROP_COMBINED

insn has been modified because of a partial reference

var IPROP_DONT_COMB

may not combine this instruction with others

var IPROP_DONT_PROP

may not propagate

var IPROP_EXTSTX

this is m_ext propagated into m_stx

var IPROP_FARCALL

call of a far function using push cs/call sequence

var IPROP_FPINSN

floating point insn

var IPROP_IGNLOWSRC

low part of the instruction source operand has been created artificially (this bit is used only for 'and x, 80…')

var IPROP_INV_JX

inverted conditional jump

var IPROP_MBARRIER

this instruction acts as a memory barrier (instructions accessing memory may not be reordered past it)

var IPROP_MULTI_MOV

bits that can be set by plugins:

the minsn was generated as part of insn that moves multiple registers (example: STM on ARM may transfer multiple registers)

var IPROP_OPTIONAL

optional instruction

var IPROP_PERSIST

persistent insn; they are not destroyed

var IPROP_SPLIT

the instruction has been split:

var IPROP_SPLIT1

into 1 byte

var IPROP_SPLIT2

into 2 bytes

var IPROP_SPLIT4

into 4 bytes

var IPROP_SPLIT8

into 8 bytes

var IPROP_TAILCALL

tail call

var IPROP_UNMERGED

'goto' instruction was transformed info 'call'

var IPROP_UNPAIRED

instruction is a result of del_dest_pairs() transformation

var IPROP_WAS_NORET

was noret icall

var IPROP_WILDMATCH

match multiple insns

var ITP_ARG1

, (64 entries are reserved for 64 call arguments)

var ITP_ASM

__asm-line

var ITP_BLOCK1

opening block comment. this comment is printed before the item (other comments are indented and printed after the item)

var ITP_BLOCK2

closing block comment.

var ITP_BRACE2

)

var ITP_CASE

bit for switch cases

var ITP_COLON

: (label)

var ITP_CURLY1

{

var ITP_CURLY2

}

var ITP_DO

do-line

var ITP_ELSE

else-line

var ITP_EMPTY

nothing

var ITP_SEMI

semicolon

var ITP_SIGN

if this bit is set too, then we have a negative case value

var ITP_TRY

C++ try statement.

var LOCOPT_ALL

redo optimization for all blocks. if this bit is not set, only dirty blocks will be optimized

var LOCOPT_REFINE

refine return type, ok to fail

var LOCOPT_REFINE2

refine return type, try harder

var LVINF_KEEP

preserve saved user settings regardless of vars for example, if a var loses all its user-defined attributes or even gets destroyed, keep its lvar_saved_info_t. this is used for ephemeral variables that get destroyed by macro recognition.

var LVINF_NOMAP

forbid automatic mapping of the variable

var LVINF_NOPTR

variable type should not be a pointer

var LVINF_SPLIT

split allocation of a new variable. forces the decompiler to create a new variable at ll.defea

var LVINF_UNUSED

unused argument, corresponds to CVAR_UNUSED

var MBA2_ARGIDX_OK

may verify input argument list?

var MBA2_ARGIDX_SORTED

args finally sorted according to ABI (e.g. reverse stkarg order in Borland)

var MBA2_CODE16_BIT

the code16 bit got removed

var MBA2_DONT_VERIFY

Do not verify microcode. This flag is recomended to be set only when debugging decompiler plugins

var MBA2_HAS_OUTLINES

calls to outlined code have been inlined

var MBA2_IS_CTR

is constructor?

var MBA2_IS_DTR

is destructor?

var MBA2_LVARNAMES_OK

may verify lvar_names?

var MBA2_LVARS_RENAMED

accept empty names now?

var MBA2_NO_DUP_CALLS

forbid multiple calls with the same ea

var MBA2_NO_DUP_LVARS

forbid multiple lvars with the same ea

var MBA2_NO_FRAME

do not use function frame info (only snippet mode)

var MBA2_OVER_CHAINS

has overlapped chains?

var MBA2_PROP_COMPLEX

allow propagation of more complex variable definitions

var MBA2_STACK_RETVAL

the return value is on the stack

var MBA2_UNDEF_RETVAR

return value is undefined

var MBA2_VALRNG_DONE

calculated valranges?

var MBA_ASRPROP

assertion have been propagated

var MBA_ASRTOK

assertions have been generated

var MBA_CALLS

callinfo has been built

var MBA_CHVARS

can verify chain varnums

var MBA_CMBBLK

request to combine blocks

var MBA_CMNSTK

stkvars+stkargs should be considered as one area

var MBA_COLGDL

display graph after each reduction

var MBA_DELPAIRS

pairs have been deleted once

var MBA_GLBOPT

microcode has been optimized globally

var MBA_INSGDL

display instruction in graphs

var MBA_LOADED

loaded gdl, no instructions (debugging)

var MBA_LVARS0

lvar pre-allocation has been performed

var MBA_LVARS1

lvar real allocation has been performed

var MBA_NICE

apply transformations to c code

var MBA_NOFUNC

function is not present, addresses might be wrong

var MBA_NUMADDR

display definition addresses for numbers

var MBA_PASSREGS

has mcallinfo_t::pass_regs

var MBA_PATTERN

microcode pattern, callinfo is present

var MBA_PRCDEFS

use precise defeas for chain-allocated lvars

var MBA_PREOPT

preoptimization stage complete

var MBA_REFINE

may refine return value size

var MBA_RETFP

function returns floating point value

var MBA_RETREF

return type has been refined

var MBA_SAVRST

save-restore analysis has been performed

var MBA_SHORT

use short display

var MBA_SPLINFO

(final_type ? idb_spoiled : spoiled_regs) is valid

var MBA_THUNK

thunk function

var MBA_VALNUM

display value numbers

var MBA_WINGR32

use wingraph32

var MBL_BACKPROP

performed backprop_cc

var MBL_CALL

call information has been built

var MBL_COMB

needs "combine" pass

var MBL_DEAD

needs "eliminate deads" pass

var MBL_DMT64

needs "demote 64bits"

var MBL_DSLOT

block for delay slot

var MBL_EXTFRAME

an inlined block with an external frame

var MBL_FAKE

fake block

var MBL_GOTO

this block is a goto target

var MBL_INCONST

inconsistent lists: we are building them

var MBL_INLINED

block was inlined, not originally part of mbr

var MBL_KEEP

do not remove even if unreachable

var MBL_LIST

use/def lists are ready (not dirty)

var MBL_NONFAKE

regular block

var MBL_NORET

dead end block: doesn't return execution control

var MBL_PRIV

private block - no instructions except the specified are accepted (used in patterns)

var MBL_PROP

needs 'propagation' pass

var MBL_PUSH

needs "convert push/pop instructions"

var MBL_TCAL

aritifical call block for tail calls

var MBL_VALRANGES

should optimize using value ranges

var MERR_BADARCH

current architecture is not supported

var MERR_BADBLK

bad block found

var MERR_BADCALL

could not determine call arguments

var MERR_BADFRAME

function frame is wrong

var MERR_BADIDB

inconsistent database information

var MERR_BADRANGES

bad input ranges

var MERR_BADSP

positive sp value has been found

var MERR_BITNESS

16-bit functions cannot be decompiled

var MERR_BLOCK

no error, switch to new block

var MERR_BUSY

already decompiling a function

var MERR_CANCELED

decompilation has been cancelled

var MERR_CLOUD

cloud: s

var MERR_COMPLEX

too complex function

var MERR_DSLOT

bad instruction in the delay slot

var MERR_EXCEPTION

exception analysis failed

var MERR_EXTERN

special segments cannot be decompiled

var MERR_FARPTR

far memory model is supported only for pc

var MERR_FUNCSIZE

too big function

var MERR_HUGESTACK

stack frame is too big

var MERR_INSN

cannot convert to microcode

var MERR_INTERR

internal error

var MERR_LICENSE

no license available

var MERR_LOOP

internal code: redo last loop (never reported)

var MERR_LVARS

local variable allocation failed

var MERR_MEM

not enough memory

var MERR_OK

ok

var MERR_ONLY32

only 32-bit functions can be decompiled for the current database

var MERR_ONLY64

only 64-bit functions can be decompiled for the current database

var MERR_OVERLAP

variables would overlap: s

var MERR_PARTINIT

partially initialized variable s

var MERR_PROLOG

prolog analysis failed

var MERR_RECDEPTH

max recursion depth reached during lvar allocation

var MERR_REDO

redecompilation has been requested

var MERR_SIZEOF

wrong basic type sizes in compiler settings

var MERR_STOP

no error, stop the analysis

var MERR_SWITCH

wrong switch idiom

var MERR_UNKTYPE

undefined type s (currently unused error code)

var MLI_CLR_FLAGS

clear LVINF_… bits

var MLI_CMT

apply lvar comment

var MLI_NAME

apply lvar name

var MLI_SET_FLAGS

set LVINF_… bits

var MLI_TYPE

apply lvar type

var MMAT_CALLS

detected call arguments. see also hxe_calls_done

var MMAT_GENERATED

generated microcode

var MMAT_GLBOPT1

performed the first pass of global optimization

var MMAT_GLBOPT2

most global optimization passes are done

var MMAT_GLBOPT3

completed all global optimization. microcode is fixed now.

var MMAT_LOCOPT

local optimization of each basic block is complete. control flow graph is ready too.

var MMAT_LVARS

allocated local variables

var MMAT_PREOPTIMIZED

preoptimized pass is complete

var MMAT_ZERO

microcode does not exist

var MMIDX_ARGS

stack: regular stack arguments

var MMIDX_GLBHIGH

global memory: high part

var MMIDX_GLBLOW

global memory: low part

var MMIDX_LVARS

stack: local variables

var MMIDX_RETADDR

stack: return address

var MMIDX_SHADOW

stack: shadow arguments

var NALT_VD

this index is not used by ida

var NF_BINVDONE

temporary internal bit: inverting bits is done

var NF_BITNOT

The user asked to invert bits of the constant.

var NF_FIXED

number format has been defined by the user

var NF_NEGATE

The user asked to negate the constant.

var NF_NEGDONE

temporary internal bit: negation has been performed

var NF_VALID

internal bit: stroff or enum is valid for enums: this bit is set immediately for stroffs: this bit is set at the end of decompilation

var NOSIZE

wrong or unexisting operand size

var NO_CURLY_BRACES

don't print curly braces

var NO_SIDEFF

change operand size but ignore side effects if you decide to keep the changed operand, handle_new_size() must be called

var ONLY_SIDEFF

only handle side effects

var OPF_NEW_WINDOW

open new window

var OPF_NO_WAIT

do not display waitbox if decompilation happens

var OPF_REUSE

reuse existing window

var OPF_REUSE_ACTIVE

reuse existing window, only if the currently active widget is a pseudocode view

var OPROP_CCFLAGS

mop_n: a pc-relative value mop_a: an address obtained from a relocation else: value of a condition code register (like mr_cc)

var OPROP_FLOAT

possibly floating value

var OPROP_IMPDONE

imported operand (a pointer) has been dereferenced

var OPROP_LOWADDR

a low address offset

var OPROP_UDEFVAL

uses undefined value

var OPROP_UDT

a struct or union

var OPTI_ADDREXPRS

optimize all address expressions (&x+N; &x-&y)

var OPTI_COMBINSNS

may combine insns (only for optimize_insn)

var OPTI_MINSTKREF

may update minstkref

var OPTI_NO_LDXOPT

the function is called after the propagation attempt, we do not optimize low/high(ldx) in this case

var OPTI_NO_VALRNG

forbid using valranges

var RETRIEVE_ALWAYS

Retrieve comment even if it has been used.

var RETRIEVE_ONCE

Retrieve comment if it has not been used yet.

var ROLE_3WAYCMP0

3-way compare helper, returns -1/0/1

var ROLE_3WAYCMP1

3-way compare helper, returns 0/1/2

var ROLE_ABS

integer absolute value

var ROLE_ALLOCA

alloca() function

var ROLE_BITTEST

[lock] bt

var ROLE_BITTESTANDCOMPLEMENT

[lock] btc

var ROLE_BITTESTANDRESET

[lock] btr

var ROLE_BITTESTANDSET

[lock] bts

var ROLE_BSWAP

bswap() function (any size)

var ROLE_BUG

BUG() helper macro: never returns, causes exception.

var ROLE_CFSUB3

carry flag after subtract with carry

var ROLE_CONTAINING_RECORD

CONTAINING_RECORD() macro.

var ROLE_EMPTY

empty, does not do anything (maybe spoils regs)

var ROLE_FASTFAIL

__fastfail()

var ROLE_IS_MUL_OK

is_mul_ok

var ROLE_MEMCPY

memcpy(void dst, const void src, size_t count);

var ROLE_MEMSET

memset(void *dst, uchar value, size_t count);

var ROLE_MEMSET32

memset32(void *dst, uint32 value, size_t count);

var ROLE_MEMSET64

memset64(void *dst, uint64 value, size_t count);

var ROLE_OFSUB3

overflow flag after subtract with carry

var ROLE_PRESENT

present() function (used in patterns)

var ROLE_READFLAGS

__readeflags, __readcallersflags

var ROLE_ROL

rotate left

var ROLE_ROR

rotate right

var ROLE_SATURATED_MUL

saturated_mul

var ROLE_SSE_CMP4

e.g. _mm_cmpgt_ss

var ROLE_SSE_CMP8

e.g. _mm_cmpgt_sd

var ROLE_STRCAT

strcat(char dst, const char src);

var ROLE_STRCPY

strcpy(char dst, const char src);

var ROLE_STRLEN

strlen(const char *src);

var ROLE_TAIL

char tail(const char str);

var ROLE_UNK

unknown function role

var ROLE_VA_ARG

va_arg() macro

var ROLE_VA_COPY

va_copy() function

var ROLE_VA_END

va_end() function

var ROLE_VA_START

va_start() function

var ROLE_WCSCAT

wchar_t wcscat(wchar_t dst, const wchar_t *src)

var ROLE_WCSCPY

wchar_t wcscpy(wchar_t dst, const wchar_t *src);

var ROLE_WCSLEN

size_t wcslen(const wchar_t *s)

var ROLE_WMEMCPY

wchar_t wmemcpy(wchar_t dst, const wchar_t *src, size_t n)

var ROLE_WMEMSET

wchar_t wmemset(wchar_t dst, wchar_t wc, size_t n)

var SHINS_LDXEA

display address of ldx expressions (not used)

var SHINS_NUMADDR

display definition addresses for numbers

var SHINS_SHORT

do not display use-def chains and other attrs

var SHINS_VALNUM

display value numbers

var ULV_PRECISE_DEFEA

Use precise defea's for lvar locations.

var USE_CURLY_BRACES

print curly braces without any checks

var USE_KEYBOARD

Keyboard.

var USE_MOUSE

Mouse.

var VDI_EXPR

c-tree item

var VDI_FUNC

the function itself (the very first line with the function prototype)

var VDI_LVAR

declaration of local variable

var VDI_NONE

undefined

var VDI_TAIL

cursor is at (beyond) the line end (commentable line)

var VDRUN_APPEND

Create a new file or append to existing file.

var VDRUN_CMDLINE

Called from ida's command line.

var VDRUN_LUMINA

Use lumina server.

var VDRUN_MAYSTOP

The user can cancel decompilation.

var VDRUN_NEWFILE

Create a new file or overwrite existing file.

var VDRUN_ONLYNEW

Fail if output file already exists.

var VDRUN_SENDIDB

Send problematic databases to hex-rays.com.

var VDRUN_SILENT

Silent decompilation.

var VDRUN_STATS

Print statistics into vd_stats.txt.

var VDUI_VALID

is valid?

var VDUI_VISIBLE

is visible?

var VR_AT_END

get value ranges after the instruction or at the block end, just after the last instruction (if M is nullptr)

var VR_AT_START

get value ranges before the instruction or at the block start (if M is nullptr)

var VR_EXACT

find exact match. if not set, the returned valrng size will be >= vivl.size

var WARN_ADDR_OUTARGS

6 cannot handle address arithmetics in outgoing argument area of stack frame - unused

var WARN_ARRAY_INARG

21 array has been used for an input argument

var WARN_BAD_CALL_SP

38 bad sp value at call

var WARN_BAD_FIELD_TYPE

23 incorrect structure member type for s::s, ignored

var WARN_BAD_INSN

49 bad instruction

var WARN_BAD_MAPDST

48 too short map destination 's' for variable 's'

var WARN_BAD_PURGED

12 inconsistent function type and number of purged bytes

var WARN_BAD_RETVAR

25 wrong return variable

var WARN_BAD_SHADOW

45 ignored the value written to the shadow area of the succeeding call

var WARN_BAD_SP

40 positive sp value a has been found

var WARN_BAD_STD_TYPE

37 corrupted or unexisting local type 's'

var WARN_BAD_STKPNT

41 wrong sp change point

var WARN_BAD_STROFF

33 user specified stroff has not been processed: s

var WARN_BAD_VALRNG

44 values range analysis failed

var WARN_BAD_VARSIZE

34 inconsistent variable size for 's'

var WARN_CBUILD_LOOPS

13 too many cbuild loops

var WARN_CR_BADOFF

32 CONTAINING_RECORD: too small offset d for struct 's'

var WARN_CR_NOFIELD

31 CONTAINING_RECORD: no field 's' in struct 's' at d

var WARN_DEP_UNK_CALLS

7 found interdependent unknown calls

var WARN_EXP_LINVAR

10 failed to expand a linear variable

var WARN_FIXED_INSN

29 fixed broken insn

var WARN_FRAG_LVAR

26 fragmented variable at s may be wrong

var WARN_GUESSED_TYPE

9 using guessed type s;

var WARN_HUGE_STKOFF

27 exceedingly huge offset into the stack frame

var WARN_ILL_ELLIPSIS

8 erroneously detected ellipsis type has been ignored

var WARN_ILL_FPU_STACK

18 inconsistent fpu stack

var WARN_ILL_FUNCTYPE

2 invalid function type 's' has been ignored

var WARN_ILL_PURGED

1 odd caller purged bytes d, correcting

var WARN_JUMPOUT

43 control flows out of bounds

var WARN_MAX

may be used in notes as a placeholder when the warning id is not available

var WARN_MAX_ARGS

22 too many input arguments, some ignored

var WARN_MISSED_SWITCH

39 wrong markup of switch jump, skipped it

var WARN_MUST_RET_FP

17 function return type is incorrect (must be floating point)

var WARN_NO_SAVE_REST

14 could not find valid save-restore pair for s

var WARN_ODD_ABI

50 encountered odd instruction for the current ABI

var WARN_ODD_ADDR_USE

16 odd use of a variable address

var WARN_ODD_INPUT_REG

15 odd input register s

var WARN_OPT_USELESS_JCND

54 simplified comparisons for 's': s became s

var WARN_OPT_VALRNG

46 conditional instruction was optimized away because s

var WARN_OPT_VALRNG2

52 mask 0xX is shortened because s <= 0xX"

var WARN_OPT_VALRNG3

53 masking with 0XX was optimized away because s <= 0xX

var WARN_RET_LOCREF

47 returning address of temporary local variable 's'

var WARN_SELFREF_PROP

19 self-referencing variable has been detected

var WARN_SUBFRAME_OVERFLOW

55 call arguments overflow the function chunk frame

var WARN_UNALIGNED_ARG

36 unaligned function argument 's'

var WARN_UNBALANCED_STACK

51 unbalanced stack, ignored a potential tail call

var WARN_UNDEF_LVAR

42 variable 's' is possibly undefined

var WARN_UNINITED_REG

28 reference to an uninitialized register has been removed: s

var WARN_UNSUPP_REG

35 unsupported processor register 's'

var WARN_VARARG_MANY

5 too many varargs, some ignored

var WARN_VARARG_NOSTK

4 call vararg without local stack

var WARN_VARARG_REGS

0 cannot handle register arguments in vararg function, discarded them

var WARN_VARARG_TCAL

3 cannot handle tail call to vararg

var WARN_WIDEN_CHAINS

11 failed to widen chains

var WARN_WOULD_OVERLAP

20 variables would overlap: s

var WARN_WRITE_CONST

24 write access to const memory at a has been detected

var WARN_WRONG_VA_OFF

30 wrong offset of va_list variable

var WITH_SIDEFF

change operand size and handle side effects

var cit_asm

asm-statement

var cit_block

block-statement: { … }

var cit_break

break-statement

var cit_continue

continue-statement

var cit_do

do-statement

var cit_empty

instruction types start here

var cit_expr

expression-statement: expr;

var cit_for

for-statement

var cit_goto

goto-statement

var cit_if

if-statement

var cit_return

return-statement

var cit_switch

switch-statement

var cit_throw

C++ throw-statement.

var cit_try

C++ try-statement.

var cit_while

while-statement

var cot_add

x + y

var cot_asg

x = y

var cot_asgadd

x += y

var cot_asgband

x &= y

var cot_asgbor

x |= y

var cot_asgmul

x *= y

var cot_asgsdiv

x /= y signed

var cot_asgshl

x <<= y

var cot_asgsmod

x %= y signed

var cot_asgsshr

x >>= y signed

var cot_asgsub

x -= y

var cot_asgudiv

x /= y unsigned

var cot_asgumod

x %= y unsigned

var cot_asgushr

x >>= y unsigned

var cot_asgxor

x ^= y

var cot_band

x & y

var cot_bnot

~x

var cot_bor

x | y

var cot_call

x(…)

var cot_cast

(type)x

var cot_comma

x, y

var cot_eq

x == y int or fpu (see EXFL_FPOP)

var cot_fadd

x + y fp

var cot_fdiv

x / y fp

var cot_fmul

x * y fp

var cot_fneg

-x fp

var cot_fnum

fpc

var cot_fsub

x - y fp

var cot_helper

arbitrary name

var cot_idx

x[y]

var cot_insn

instruction in expression, internal representation only

var cot_land

x && y

var cot_lnot

!x

var cot_lor

x || y

var cot_memptr

x->m, access size in 'ptrsize'

var cot_memref

x.m

var cot_mul

x * y

var cot_ne

x != y int or fpu (see EXFL_FPOP)

var cot_neg

-x

var cot_num

n

var cot_obj

obj_ea

var cot_postdec

x-

var cot_postinc

x++

var cot_predec

-x

var cot_preinc

++x

var cot_ptr

*x, access size in 'ptrsize'

var cot_ref

&x

var cot_sdiv

x / y signed

var cot_sge

x >= y signed or fpu (see EXFL_FPOP)

var cot_sgt

x > y signed or fpu (see EXFL_FPOP)

var cot_shl

x << y

var cot_sizeof

sizeof(x)

var cot_sle

x <= y signed or fpu (see EXFL_FPOP)

var cot_slt

x < y signed or fpu (see EXFL_FPOP)

var cot_smod

x % y signed

var cot_sshr

x >> y signed

var cot_str

string constant (user representation)

var cot_sub

x - y

var cot_tern

x ? y : z

var cot_type

arbitrary type

var cot_udiv

x / y unsigned

var cot_uge

x >= y unsigned

var cot_ugt

x > y unsigned

var cot_ule

x <= y unsigned

var cot_ult

x < y unsigned

var cot_umod

x % y unsigned

var cot_ushr

x >> y unsigned

var cot_var

v

var cot_xor

x ^ y

var hxe_begin_inlining

Starting to inline outlined functions. @param cdg: (codegen_t *) @param decomp_flags: (int) @return: Microcode error codes code This is an opportunity to inline other ranges.

var hxe_build_callinfo

Analyzing a call instruction. @param blk: (mblock_t ) blk->tail is the call. @param type: (tinfo_t ) buffer for the output type. @param callinfo: (mcallinfo_t **) prepared callinfo. The plugin should either specify the function type, either allocate and return a new mcallinfo_t object.

var hxe_callinfo_built

A call instruction has been anallyzed. @param blk: (mblock_t *) blk->tail is the call.

var hxe_calls_done

All calls have been analyzed. @param mba: (mba_t *) This event is generated immediately after analyzing all calls, before any optimizitions, call unmerging and block merging.

var hxe_close_pseudocode

Pseudocode view is being closed. @param vu: (vdui_t *)

var hxe_cmt_changed

Comment got changed. @param cfunc: (cfunc_t ) @param loc: (const treeloc_t ) @param cmt: (const char *)

var hxe_collect_warnings

Collect warning messages from plugins. These warnings will be displayed at the function header, after the user-defined comments. @param warnings: (qstrvec_t ) @param cfunc: (cfunc_t )

var hxe_combine

Trying to combine instructions of basic block. @param blk: (mblock_t ) @param insn: (minsn_t ) Should return: 1 if combined the current instruction with a preceding one -1 if the instruction should not be combined 0 else

var hxe_create_hint

Create a hint for the current item. @see: ui_get_custom_viewer_hint @param vu: (vdui_t ) @param hint: (qstring ) @param important_lines: (int *) Possible return values: @retval 0: continue collecting hints with other subscribers @retval 1: stop collecting hints

var hxe_curpos

Current cursor position has been changed. (for example, by left-clicking or using keyboard) @param vu: (vdui_t *)

var hxe_double_click

Mouse double click. @param vu: (vdui_t *) @param shift_state: (int) Should return: 1 if the event has been handled

var hxe_flowchart

Flowchart has been generated. @param fc: (qflow_chart_t ) @param mba: (mba_t )

var hxe_func_printed

Function text has been generated. Plugins may modify the text in cfunc_t::sv. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items. @param cfunc: (cfunc_t *)

var hxe_glbopt

Global optimization has been finished. If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization. @param mba: (mba_t *) @return: Microcode error codes code

var hxe_inlined_func

A set of ranges got inlined. @param cdg: (codegen_t ) @param blk: (int) the block containing call/jump to inline @param mbr: (mba_ranges_t ) the range to inline @param i1: (int) blknum of the first inlined block @param i2: (int) blknum of the last inlined block (excluded)

var hxe_inlining_func

A set of ranges is going to be inlined. @param cdg: (codegen_t ) @param blk: (int) the block containing call/jump to inline @param mbr: (mba_ranges_t ) the range to inline

var hxe_interr

Internal error has occurred. @param errcode: (int )

var hxe_keyboard

Keyboard has been hit. @param vu: (vdui_t *) @param key_code: (int) VK_… @param shift_state: (int) Should return: 1 if the event has been handled

var hxe_locopt

Basic block level optimization has been finished. @param mba: (mba_t *) @return: Microcode error codes code

var hxe_maturity

Ctree maturity level is being changed. @param cfunc: (cfunc_t *) @param new_maturity: (ctree_maturity_t)

var hxe_microcode

Microcode has been generated. @param mba: (mba_t *) @return: Microcode error codes code

var hxe_open_pseudocode

New pseudocode view has been opened. @param vu: (vdui_t *)

var hxe_populating_popup

Populating popup menu. We can add menu items now. @param widget: (TWidget ) @param popup_handle: (TPopupMenu ) @param vu: (vdui_t *)

var hxe_pre_structural

Structure analysis is starting. @param ct: (control_graph_t ) in/out: control graph @param cfunc: (cfunc_t ) in: the current function @param g: (const simple_graph_t *) in: control flow graph @return: Microcode error codes code; MERR_BLOCK means that the analysis has been performed by a plugin

var hxe_prealloc

Local variables: preallocation step begins. @param mba: (mba_t *) This event may occur several times. Should return: 1 if modified microcode Negative values are Microcode error codes error codes

var hxe_preoptimized

Microcode has been preoptimized. @param mba: (mba_t *) @return: Microcode error codes code

var hxe_print_func

Printing ctree and generating text. @param cfunc: (cfunc_t ) @param vp: (vc_printer_t ) Returns: 1 if text has been generated by the plugin It is forbidden to modify ctree at this event.

var hxe_prolog

Prolog analysis has been finished. @param mba: (mba_t ) @param fc: (qflow_chart_t ) @param reachable_blocks: (bitset_t *) @param decomp_flags: (int) @return: Microcode error codes code This event is generated for each inlined range as well.

var hxe_refresh_pseudocode

Existing pseudocode text has been refreshed. Adding/removing pseudocode lines is forbidden in this event. @param vu: (vdui_t *) See also hxe_text_ready, which happens earlier

var hxe_resolve_stkaddrs

The optimizer is about to resolve stack addresses. @param mba: (mba_t *)

var hxe_right_click

Mouse right click. Use hxe_populating_popup instead, in case you want to add items in the popup menu. @param vu: (vdui_t *)

var hxe_stkpnts

SP change points have been calculated. @param mba: (mba_t ) @param stkpnts: (stkpnts_t ) @return: Microcode error codes code This event is generated for each inlined range as well.

var hxe_structural

Structural analysis has been finished. @param ct: (control_graph_t *)

var hxe_switch_pseudocode

Existing pseudocode view has been reloaded with a new function. Its text has not been refreshed yet, only cfunc and mba pointers are ready. @param vu: (vdui_t *)

var hxe_text_ready

Decompiled text is ready. @param vu: (vdui_t *) This event can be used to modify the output text (sv). Obsolete. Please use hxe_func_printed instead.

var lxe_lvar_cmt_changed

Local variable comment got changed. @param vu: (vdui_t ) @param v: (lvar_t ) @param cmt: (const char *) Please note that it is possible to read/write user settings for lvars directly from the idb.

var lxe_lvar_mapping_changed

Local variable mapping got changed. @param vu: (vdui_t ) @param from: (lvar_t ) @param to: (lvar_t *) Please note that it is possible to read/write user settings for lvars directly from the idb.

var lxe_lvar_name_changed

Local variable got renamed. @param vu: (vdui_t ) @param v: (lvar_t ) @param name: (const char *) @param is_user_name: (bool) Please note that it is possible to read/write user settings for lvars directly from the idb.

var lxe_lvar_type_changed

Local variable type got changed. @param vu: (vdui_t ) @param v: (lvar_t ) @param tinfo: (const tinfo_t *) Please note that it is possible to read/write user settings for lvars directly from the idb.

var mop_S

local stack variable (they exist until MMAT_LVARS)

var mop_a

mop_addr_t: address of operand (mop_l, mop_v, mop_S, mop_r)

var mop_b

micro basic block (mblock_t)

var mop_c

mcases

var mop_d

result of another instruction

var mop_f

list of arguments

var mop_fn

floating point constant

var mop_h

helper function

var mop_l

local variable

var mop_n

immediate number constant

var mop_p

operand pair

var mop_r

register (they exist until MMAT_LVARS)

var mop_sc

scattered

var mop_str

immediate string constant (user representation)

var mop_v

global variable

var mop_z

none

Functions

def accepts_small_udts(op: ctype_t)

accepts_small_udts(op) -> bool Is the operator allowed on small structure or union?

@param op: (C++: ctype_t) enum ctype_t

def accepts_udts(op: ctype_t)

accepts_udts(op) -> bool

@param op: enum ctype_t

def arglocs_overlap(loc1: vdloc_t, w1: size_t, loc2: vdloc_t, w2: size_t)

arglocs_overlap(loc1, w1, loc2, w2) -> bool Do two arglocs overlap?

@param loc1: (C++: const vdloc_t &) vdloc_t const & @param w1: (C++: size_t) @param loc2: (C++: const vdloc_t &) vdloc_t const & @param w2: (C++: size_t)

def asgop(cop: ctype_t)

asgop(cop) -> ctype_t Convert plain operator into assignment operator. For example, cot_add returns cot_asgadd.

@param cop: (C++: ctype_t) enum ctype_t

def asgop_revert(cop: ctype_t)

asgop_revert(cop) -> ctype_t Convert assignment operator into plain operator. For example, cot_asgadd returns cot_add

@param cop: (C++: ctype_t) enum ctype_t @return: cot_empty is the input operator is not an assignment operator.

def block_chains_begin(set: block_chains_t) ‑> block_chains_iterator_t

block_chains_begin(set) -> block_chains_iterator_t Get iterator pointing to the beginning of block_chains_t.

@param set: (C++: const block_chains_t *) block_chains_t const *

def block_chains_clear(set: block_chains_t)

block_chains_clear(set) Clear block_chains_t.

@param set: (C++: block_chains_t *)

def block_chains_end(set: block_chains_t) ‑> block_chains_iterator_t

block_chains_end(set) -> block_chains_iterator_t Get iterator pointing to the end of block_chains_t.

@param set: (C++: const block_chains_t *) block_chains_t const *

def block_chains_erase(set: block_chains_t, p: block_chains_iterator_t)

block_chains_erase(set, p) Erase current element from block_chains_t.

@param set: (C++: block_chains_t *) @param p: (C++: block_chains_iterator_t)

def block_chains_find(set: block_chains_t, val: chain_t) ‑> block_chains_iterator_t

block_chains_find(set, val) -> block_chains_iterator_t Find the specified key in set block_chains_t.

@param set: (C++: const block_chains_t *) block_chains_t const * @param val: (C++: const chain_t &) chain_t const &

def block_chains_free(set: block_chains_t)

block_chains_free(set) Delete block_chains_t instance.

@param set: (C++: block_chains_t *)

def block_chains_get(p: block_chains_iterator_t)

block_chains_get(p) -> chain_t Get reference to the current set value.

@param p: (C++: block_chains_iterator_t)

def block_chains_insert(set: block_chains_t, val: chain_t) ‑> block_chains_iterator_t

block_chains_insert(set, val) -> block_chains_iterator_t Insert new (chain_t) into set block_chains_t.

@param set: (C++: block_chains_t *) @param val: (C++: const chain_t &) chain_t const &

def block_chains_new()

block_chains_new() -> block_chains_t Create a new block_chains_t instance.

def block_chains_next(p: block_chains_iterator_t) ‑> block_chains_iterator_t

block_chains_next(p) -> block_chains_iterator_t Move to the next element.

@param p: (C++: block_chains_iterator_t)

def block_chains_prev(p: block_chains_iterator_t) ‑> block_chains_iterator_t

block_chains_prev(p) -> block_chains_iterator_t Move to the previous element.

@param p: (C++: block_chains_iterator_t)

def block_chains_size(set: block_chains_t)

block_chains_size(set) -> size_t Get size of block_chains_t.

@param set: (C++: block_chains_t *)

def boundaries_begin(map: boundaries_t) ‑> boundaries_iterator_t

boundaries_begin(map) -> boundaries_iterator_t Get iterator pointing to the beginning of boundaries_t.

@param map: (C++: const boundaries_t *) boundaries_t const *

def boundaries_clear(map: boundaries_t)

boundaries_clear(map) Clear boundaries_t.

@param map: (C++: boundaries_t *)

def boundaries_end(map: boundaries_t) ‑> boundaries_iterator_t

boundaries_end(map) -> boundaries_iterator_t Get iterator pointing to the end of boundaries_t.

@param map: (C++: const boundaries_t *) boundaries_t const *

def boundaries_erase(map: boundaries_t, p: boundaries_iterator_t)

boundaries_erase(map, p) Erase current element from boundaries_t.

@param map: (C++: boundaries_t *) @param p: (C++: boundaries_iterator_t)

def boundaries_find(map: boundaries_t, key: cinsn_t) ‑> boundaries_iterator_t

boundaries_find(map, key) -> boundaries_iterator_t Find the specified key in boundaries_t.

@param map: (C++: const boundaries_t ) boundaries_t const * @param key: (C++: const cinsn_t &) cinsn_t const *

def boundaries_first(p: boundaries_iterator_t)

boundaries_first(p) -> cinsn_t Get reference to the current map key.

@param p: (C++: boundaries_iterator_t)

def boundaries_free(map: boundaries_t)

boundaries_free(map) Delete boundaries_t instance.

@param map: (C++: boundaries_t *)

def boundaries_insert(map: boundaries_t, key: cinsn_t, val: rangeset_t)

boundaries_insert(map, key, val) -> boundaries_iterator_t Insert new (cinsn_t *, rangeset_t) pair into boundaries_t.

@param map: (C++: boundaries_t ) @param key: (C++: const cinsn_t &) cinsn_t const * @param val: (C++: const rangeset_t &) rangeset_t const &

def boundaries_new()

boundaries_new() -> boundaries_t Create a new boundaries_t instance.

def boundaries_next(p: boundaries_iterator_t) ‑> boundaries_iterator_t

boundaries_next(p) -> boundaries_iterator_t Move to the next element.

@param p: (C++: boundaries_iterator_t)

def boundaries_prev(p: boundaries_iterator_t) ‑> boundaries_iterator_t

boundaries_prev(p) -> boundaries_iterator_t Move to the previous element.

@param p: (C++: boundaries_iterator_t)

def boundaries_second(p: boundaries_iterator_t)

boundaries_second(p) -> rangeset_t Get reference to the current map value.

@param p: (C++: boundaries_iterator_t)

def boundaries_size(map: boundaries_t)

boundaries_size(map) -> size_t Get size of boundaries_t.

@param map: (C++: boundaries_t *)

def call_helper(rettype, args, *rest)

Create a helper call.

def cexpr_operands(self)

return a dictionary with the operands of a cexpr_t.

def cfunc_type(self)

Get the function's return type tinfo_t object.

def change_hexrays_config(directive: char const *)

change_hexrays_config(directive) -> bool Parse DIRECTIVE and update the current configuration variables. For the syntax see hexrays.cfg

@param directive: (C++: const char *) char const *

def cinsn_details(self)

return the details pointer for the cinsn_t object depending on the value of its op member. this is one of the cblock_t, cif_t, etc. objects.

def citem_to_specific_type(self)

cast the citem_t object to its more specific type, either cexpr_t or cinsn_t.

def clear_cached_cfuncs()

clear_cached_cfuncs() Flush all cached decompilation results.

def close_hexrays_waitbox()

close_hexrays_waitbox() Close the waitbox displayed by the decompiler. Useful if DECOMP_NO_HIDE was used during decompilation.

def close_pseudocode(f: TWidget *)

close_pseudocode(f) -> bool Close pseudocode window.

@param f: (C++: TWidget *) pointer to window @return: false if failed

def convert_to_user_call(udc: udcall_t, cdg: codegen_t)

convert_to_user_call(udc, cdg) -> merror_t try to generate user-defined call for an instruction

@param udc: (C++: const udcall_t &) udcall_t const & @param cdg: (C++: codegen_t &) @return: Microcode error codes code: MERR_OK - user-defined call generated else - error (MERR_INSN == inacceptable udc.tif)

def create_cfunc(mba: mba_t) ‑> cfuncptr_t

create_cfunc(mba) -> cfuncptr_t Create a new cfunc_t object.

@param mba: (C++: mba_t *) microcode object. After creating the cfunc object it takes the ownership of MBA.

def create_empty_mba(mbr: mba_ranges_t, hf: hexrays_failure_t = None)

create_empty_mba(mbr, hf=None) -> mba_t Create an empty microcode object.

@param mbr: (C++: const mba_ranges_t &) mba_ranges_t const & @param hf: (C++: hexrays_failure_t *)

def create_field_name(*args)

create_field_name(type, offset=BADADDR) -> qstring

@param type: tinfo_t const & @param offset: uval_t

def create_helper(*args)

Create a helper object..

def create_typedef(*args)

create_typedef(name) -> tinfo_t Create a reference to an ordinal type.

@param name: char const *

@return: type which refers to the specified ordinal. For example, if n is 1, the type info which refers to ordinal type 1 is created. create_typedef(n) -> tinfo_t

@param n: int

def debug_hexrays_ctree(level: int, msg: char const *)

debug_hexrays_ctree(level, msg)

@param level: int @param msg: char const *

def decompile(ea, hf=None, flags=0)

Decompile a function.

@param ea an address belonging to the function, or an ida_funcs.func_t object @param hf extended error information (if failed) @param flags decomp_flags bitwise combination of DECOMP_… bits @return the decompilation result (a cfunc_t wrapper), or None

def decompile_func(pfn: func_t *, hf: hexrays_failure_t = None, decomp_flags: int = 0)

decompile_func(pfn, hf=None, decomp_flags=0) -> cfuncptr_t Decompile a function. Multiple decompilations of the same function return the same object.

@param pfn: (C++: func_t ) pointer to function to decompile @param hf: (C++: hexrays_failure_t ) extended error information (if failed) @param decomp_flags: (C++: int) bitwise combination of decompile() flags… bits @return: pointer to the decompilation result (a reference counted pointer). nullptr if failed.

def decompile_many(outfile: char const *, funcaddrs: uint64vec_t, flags: int)

decompile_many(outfile, funcaddrs, flags) -> bool Batch decompilation. Decompile all or the specified functions

@param outfile: (C++: const char ) name of the output file @param funcaddrs: (C++: const eavec_t ) list of functions to decompile. If nullptr or empty, then decompile all nonlib functions @param flags: (C++: int) Batch decompilation bits @return: true if no internal error occurred and the user has not cancelled decompilation

def dereference(e, ptrsize, is_float=False)

Dereference a pointer. This function dereferences a pointer expression. It performs the following conversion: "ptr" => "*ptr" It can handle discrepancies in the pointer type and the access size.

@return: dereferenced expression

def dstr(tif: tinfo_t)

dstr(tif) -> char const * Print the specified type info. This function can be used from a debugger by typing "tif->dstr()"

@param tif: (C++: const tinfo_t *) tinfo_t const *

def dummy_ptrtype(ptrsize: int, isfp: bool)

dummy_ptrtype(ptrsize, isfp) -> tinfo_t Generate a dummy pointer type

@param ptrsize: (C++: int) size of pointed object @param isfp: (C++: bool) is floating point object?

def eamap_begin(map: eamap_t) ‑> eamap_iterator_t

eamap_begin(map) -> eamap_iterator_t Get iterator pointing to the beginning of eamap_t.

@param map: (C++: const eamap_t *) eamap_t const *

def eamap_clear(map: eamap_t)

eamap_clear(map) Clear eamap_t.

@param map: (C++: eamap_t *)

def eamap_end(map: eamap_t) ‑> eamap_iterator_t

eamap_end(map) -> eamap_iterator_t Get iterator pointing to the end of eamap_t.

@param map: (C++: const eamap_t *) eamap_t const *

def eamap_erase(map: eamap_t, p: eamap_iterator_t)

eamap_erase(map, p) Erase current element from eamap_t.

@param map: (C++: eamap_t *) @param p: (C++: eamap_iterator_t)

def eamap_find(map: eamap_t, key: ea_t const &)

eamap_find(map, key) -> eamap_iterator_t Find the specified key in eamap_t.

@param map: (C++: const eamap_t *) eamap_t const * @param key: (C++: const ea_t &) ea_t const &

def eamap_first(p: eamap_iterator_t)

eamap_first(p) -> ea_t const & Get reference to the current map key.

@param p: (C++: eamap_iterator_t)

def eamap_free(map: eamap_t)

eamap_free(map) Delete eamap_t instance.

@param map: (C++: eamap_t *)

def eamap_insert(map: eamap_t, key: ea_t const &, val: cinsnptrvec_t)

eamap_insert(map, key, val) -> eamap_iterator_t Insert new (ea_t, cinsnptrvec_t) pair into eamap_t.

@param map: (C++: eamap_t *) @param key: (C++: const ea_t &) ea_t const & @param val: (C++: const cinsnptrvec_t &) cinsnptrvec_t const &

def eamap_new()

eamap_new() -> eamap_t Create a new eamap_t instance.

def eamap_next(p: eamap_iterator_t) ‑> eamap_iterator_t

eamap_next(p) -> eamap_iterator_t Move to the next element.

@param p: (C++: eamap_iterator_t)

def eamap_prev(p: eamap_iterator_t) ‑> eamap_iterator_t

eamap_prev(p) -> eamap_iterator_t Move to the previous element.

@param p: (C++: eamap_iterator_t)

def eamap_second(p: eamap_iterator_t)

eamap_second(p) -> cinsnptrvec_t Get reference to the current map value.

@param p: (C++: eamap_iterator_t)

def eamap_size(map: eamap_t)

eamap_size(map) -> size_t Get size of eamap_t.

@param map: (C++: eamap_t *)

def gen_microcode(mbr: mba_ranges_t, hf: hexrays_failure_t = None, retlist: mlist_t = None, decomp_flags: int = 0, reqmat: mba_maturity_t = 7)

gen_microcode(mbr, hf=None, retlist=None, decomp_flags=0, reqmat=MMAT_GLBOPT3) -> mba_t Generate microcode of an arbitrary code snippet

@param mbr: (C++: const mba_ranges_t &) snippet ranges @param hf: (C++: hexrays_failure_t ) extended error information (if failed) @param retlist: (C++: const mlist_t ) list of registers the snippet returns @param decomp_flags: (C++: int) bitwise combination of decompile() flags… bits @param reqmat: (C++: mba_maturity_t) required microcode maturity @return: pointer to the microcode, nullptr if failed.

def get_ctype_name(op: ctype_t)

get_ctype_name(op) -> char const *

@param op: enum ctype_t

def get_current_operand(out: gco_info_t) ‑> bool

get_current_operand(out) -> bool Get the instruction operand under the cursor. This function determines the operand that is under the cursor in the active disassembly listing. If the operand refers to a register or stack variable, it returns true.

@param out: (C++: gco_info_t *) [out]: output buffer

def get_float_type(width: int)

get_float_type(width) -> tinfo_t Get a type of a floating point value with the specified width

@param width: (C++: int) width of the desired type @return: type info object

def get_hexrays_version()

get_hexrays_version() -> char const * Get decompiler version. The returned string is of the form ...

@return: pointer to version string. For example: "2.0.0.140605"

def get_int_type_by_width_and_sign(srcwidth: int, sign: type_sign_t)

get_int_type_by_width_and_sign(srcwidth, sign) -> tinfo_t Create a type info by width and sign. Returns a simple type (examples: int, short) with the given width and sign.

@param srcwidth: (C++: int) size of the type in bytes @param sign: (C++: type_sign_t) sign of the type

def get_merror_desc(code: merror_t, mba: mba_t)

get_merror_desc(code, mba) -> str Get textual description of an error code

@param code: (C++: merror_t) Microcode error codes @param mba: (C++: mba_t *) the microcode array @return: the error address

def get_mreg_name(reg: mreg_t, width: int, ud: void * = None)

get_mreg_name(reg, width, ud=None) -> int Get the microregister name.

@param reg: (C++: mreg_t) microregister number @param width: (C++: int) size of microregister in bytes. may be bigger than the real register size. @param ud: (C++: void *) reserved, must be nullptr @return: width of the printed register. this value may be less than the WIDTH argument.

def get_op_signness(op: ctype_t)

get_op_signness(op) -> type_sign_t Get operator sign. Meaningful for sign-dependent operators, like cot_sdiv.

@param op: (C++: ctype_t) enum ctype_t

def get_signed_mcode(code: mcode_t)

get_signed_mcode(code) -> mcode_t

@param code: enum mcode_t

def get_temp_regs()

get_temp_regs() -> mlist_t Get list of temporary registers. Tempregs are temporary registers that are used during code generation. They do not map to regular processor registers. They are used only to store temporary values during execution of one instruction. Tempregs may not be used to pass a value from one block to another. In other words, at the end of a block all tempregs must be dead.

def get_type(id: uval_t, tif: tinfo_t, guess: type_source_t)

get_type(id, tif, guess) -> bool Get a global type. Global types are types of addressable objects and struct/union/enum types

@param id: (C++: uval_t) address or id of the object @param tif: (C++: tinfo_t *) buffer for the answer @param guess: (C++: type_source_t) what kind of types to consider @return: success

def get_unk_type(size: int)

get_unk_type(size) -> tinfo_t Create a partial type info by width. Returns a partially defined type (examples: _DWORD, _BYTE) with the given width.

@param size: (C++: int) size of the type in bytes

def get_unsigned_mcode(code: mcode_t)

get_unsigned_mcode(code) -> mcode_t

@param code: enum mcode_t

def get_widget_vdui(f: TWidget *)

get_widget_vdui(f) -> vdui_t Get the vdui_t instance associated to the TWidget

@param f: (C++: TWidget ) pointer to window @return: a vdui_t , or nullptr

def getb_reginsn(ins: minsn_t)

getb_reginsn(ins) -> minsn_t

@param ins: minsn_t *

def getf_reginsn(ins: minsn_t)

getf_reginsn(ins) -> minsn_t

@param ins: minsn_t *

def has_cached_cfunc(ea: ea_t)

has_cached_cfunc(ea) -> bool Do we have a cached decompilation result for 'ea'?

@param ea: (C++: ea_t)

def has_mcode_seloff(op: mcode_t)

has_mcode_seloff(op) -> bool

@param op: enum mcode_t

def hexrays_alloc(size: size_t)

hexrays_alloc(size) -> void *

@param size: size_t

def hexrays_free(ptr: void *)

hexrays_free(ptr)

@param ptr: void *

def init_hexrays_plugin(flags: int = 0) ‑> bool

init_hexrays_plugin(flags=0) -> bool Check that your plugin is compatible with hex-rays decompiler. This function must be called before calling any other decompiler function.

@param flags: (C++: int) reserved, must be 0 @return: true if the decompiler exists and is compatible with your plugin

def install_hexrays_callback(callback)

Deprecated. Please use Hexrays_Hooks instead Install handler for decompiler events.

@return: false if failed

def install_microcode_filter(filter: microcode_filter_t, install: bool = True) ‑> bool

install_microcode_filter(filter, install=True) -> bool register/unregister non-standard microcode generator

@param filter: (C++: microcode_filter_t *) - microcode generator object @param install: (C++: bool) - TRUE - register the object, FALSE - unregister @return: success

def is_additive(op: ctype_t)

is_additive(op) -> bool Is additive operator?

@param op: (C++: ctype_t) enum ctype_t

def is_allowed_on_small_struni(op: ctype_t)

accepts_small_udts(op) -> bool Is the operator allowed on small structure or union?

@param op: (C++: ctype_t) enum ctype_t

def is_assignment(op: ctype_t)

is_assignment(op) -> bool Is assignment operator?

@param op: (C++: ctype_t) enum ctype_t

def is_binary(op: ctype_t)

is_binary(op) -> bool Is binary operator?

@param op: (C++: ctype_t) enum ctype_t

def is_bitop(op: ctype_t)

is_bitop(op) -> bool Is bit related operator?

@param op: (C++: ctype_t) enum ctype_t

def is_bool_type(type: tinfo_t)

is_bool_type(type) -> bool Is a boolean type?

@param type: (C++: const tinfo_t &) tinfo_t const & @return: true if the type is a boolean type

def is_break_consumer(op: ctype_t)

is_break_consumer(op) -> bool Does a break statement influence the specified statement code?

@param op: (C++: ctype_t) enum ctype_t

def is_cmpop_with_eq(cmpop: cmpop_t)

is_cmpop_with_eq(cmpop) -> bool

@param cmpop: enum cmpop_t

def is_cmpop_without_eq(cmpop: cmpop_t)

is_cmpop_without_eq(cmpop) -> bool

@param cmpop: enum cmpop_t

def is_commutative(op: ctype_t)

is_commutative(op) -> bool Is commutative operator?

@param op: (C++: ctype_t) enum ctype_t

def is_inplace_def(type: tinfo_t)

is_inplace_def(type) -> bool Is struct/union/enum definition (not declaration)?

@param type: (C++: const tinfo_t &) tinfo_t const &

def is_kreg(r: mreg_t)

is_kreg(r) -> bool Is a kernel register? Kernel registers are temporary registers that can be used freely. They may be used to store values that cross instruction or basic block boundaries. Kernel registers do not map to regular processor registers. See also mba_t::alloc_kreg()

@param r: (C++: mreg_t)

def is_logical(op: ctype_t)

is_logical(op) -> bool Is logical operator?

@param op: (C++: ctype_t) enum ctype_t

def is_loop(op: ctype_t)

is_loop(op) -> bool Is loop statement code?

@param op: (C++: ctype_t) enum ctype_t

def is_lvalue(op: ctype_t)

is_lvalue(op) -> bool Is Lvalue operator?

@param op: (C++: ctype_t) enum ctype_t

def is_may_access(maymust: maymust_t)

is_may_access(maymust) -> bool

@param maymust: maymust_t

def is_mcode_addsub(mcode: mcode_t)

is_mcode_addsub(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_call(mcode: mcode_t)

is_mcode_call(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_commutative(mcode: mcode_t)

is_mcode_commutative(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_convertible_to_jmp(mcode: mcode_t)

is_mcode_convertible_to_jmp(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_convertible_to_set(mcode: mcode_t)

is_mcode_convertible_to_set(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_divmod(op: mcode_t)

is_mcode_divmod(op) -> bool

@param op: enum mcode_t

def is_mcode_fpu(mcode: mcode_t)

is_mcode_fpu(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_j1(mcode: mcode_t)

is_mcode_j1(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_jcond(mcode: mcode_t)

is_mcode_jcond(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_propagatable(mcode: mcode_t)

is_mcode_propagatable(mcode) -> bool May opcode be propagated? Such opcodes can be used in sub-instructions (nested instructions) There is a handful of non-propagatable opcodes, like jumps, ret, nop, etc All other regular opcodes are propagatable and may appear in a nested instruction.

@param mcode: (C++: mcode_t) enum mcode_t

def is_mcode_set(mcode: mcode_t)

is_mcode_set(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_set1(mcode: mcode_t)

is_mcode_set1(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_shift(mcode: mcode_t)

is_mcode_shift(mcode) -> bool

@param mcode: enum mcode_t

def is_mcode_xdsu(mcode: mcode_t)

is_mcode_xdsu(mcode) -> bool

@param mcode: enum mcode_t

def is_multiplicative(op: ctype_t)

is_multiplicative(op) -> bool Is multiplicative operator?

@param op: (C++: ctype_t) enum ctype_t

def is_nonbool_type(type: tinfo_t)

is_nonbool_type(type) -> bool Is definitely a non-boolean type?

@param type: (C++: const tinfo_t &) tinfo_t const & @return: true if the type is a non-boolean type (non bool and well defined)

def is_paf(t: type_t)

is_paf(t) -> bool Is a pointer, array, or function type?

@param t: (C++: type_t)

def is_prepost(op: ctype_t)

is_prepost(op) -> bool Is pre/post increment/decrement operator?

@param op: (C++: ctype_t) enum ctype_t

def is_ptr_or_array(t: type_t)

is_ptr_or_array(t) -> bool Is a pointer or array type?

@param t: (C++: type_t)

def is_relational(op: ctype_t)

is_relational(op) -> bool Is comparison operator?

@param op: (C++: ctype_t) enum ctype_t

def is_signed_cmpop(cmpop: cmpop_t)

is_signed_cmpop(cmpop) -> bool

@param cmpop: enum cmpop_t

def is_signed_mcode(code: mcode_t)

is_signed_mcode(code) -> bool

@param code: enum mcode_t

def is_small_struni(tif: tinfo_t)

is_small_udt(tif) -> bool Is a small structure or union?

@param tif: (C++: const tinfo_t &) tinfo_t const & @return: true if the type is a small UDT (user defined type). Small UDTs fit into a register (or pair or registers) as a rule.

def is_small_udt(tif: tinfo_t)

is_small_udt(tif) -> bool Is a small structure or union?

@param tif: (C++: const tinfo_t &) tinfo_t const & @return: true if the type is a small UDT (user defined type). Small UDTs fit into a register (or pair or registers) as a rule.

def is_type_correct(ptr: type_t const *)

is_type_correct(ptr) -> bool Verify a type string.

@param ptr: (C++: const type_t *) type_t const * @return: true if type string is correct

def is_unary(op: ctype_t)

is_unary(op) -> bool Is unary operator?

@param op: (C++: ctype_t) enum ctype_t

def is_unsigned_cmpop(cmpop: cmpop_t)

is_unsigned_cmpop(cmpop) -> bool

@param cmpop: enum cmpop_t

def is_unsigned_mcode(code: mcode_t)

is_unsigned_mcode(code) -> bool

@param code: enum mcode_t

def jcnd2set(code: mcode_t)

jcnd2set(code) -> mcode_t

@param code: enum mcode_t

def lexcompare(a: mop_t, b: mop_t) ‑> int

lexcompare(a, b) -> int

@param a: mop_t const & @param b: mop_t const &

def lnot(e)

Logically negate the specified expression. The specified expression will be logically negated. For example, "x == y" is converted into "x != y" by this function.

@return: logically negated expression.

def locate_lvar(out: lvar_locator_t, func_ea: ea_t, varname: char const *)

locate_lvar(out, func_ea, varname) -> bool Find a variable by name.

@param out: (C++: lvar_locator_t ) output buffer for the variable locator @param func_ea: (C++: ea_t) function start address @param varname: (C++: const char ) variable name @return: success Since VARNAME is not always enough to find the variable, it may decompile the function.

def lvar_mapping_begin(map: lvar_mapping_t) ‑> lvar_mapping_iterator_t

lvar_mapping_begin(map) -> lvar_mapping_iterator_t Get iterator pointing to the beginning of lvar_mapping_t.

@param map: (C++: const lvar_mapping_t *) lvar_mapping_t const *

def lvar_mapping_clear(map: lvar_mapping_t)

lvar_mapping_clear(map) Clear lvar_mapping_t.

@param map: (C++: lvar_mapping_t *)

def lvar_mapping_end(map: lvar_mapping_t) ‑> lvar_mapping_iterator_t

lvar_mapping_end(map) -> lvar_mapping_iterator_t Get iterator pointing to the end of lvar_mapping_t.

@param map: (C++: const lvar_mapping_t *) lvar_mapping_t const *

def lvar_mapping_erase(map: lvar_mapping_t, p: lvar_mapping_iterator_t)

lvar_mapping_erase(map, p) Erase current element from lvar_mapping_t.

@param map: (C++: lvar_mapping_t *) @param p: (C++: lvar_mapping_iterator_t)

def lvar_mapping_find(map: lvar_mapping_t, key: lvar_locator_t) ‑> lvar_mapping_iterator_t

lvar_mapping_find(map, key) -> lvar_mapping_iterator_t Find the specified key in lvar_mapping_t.

@param map: (C++: const lvar_mapping_t *) lvar_mapping_t const * @param key: (C++: const lvar_locator_t &) lvar_locator_t const &

def lvar_mapping_first(p: lvar_mapping_iterator_t)

lvar_mapping_first(p) -> lvar_locator_t Get reference to the current map key.

@param p: (C++: lvar_mapping_iterator_t)

def lvar_mapping_free(map: lvar_mapping_t)

lvar_mapping_free(map) Delete lvar_mapping_t instance.

@param map: (C++: lvar_mapping_t *)

def lvar_mapping_insert(map: lvar_mapping_t, key: lvar_locator_t, val: lvar_locator_t) ‑> lvar_mapping_iterator_t

lvar_mapping_insert(map, key, val) -> lvar_mapping_iterator_t Insert new (lvar_locator_t, lvar_locator_t) pair into lvar_mapping_t.

@param map: (C++: lvar_mapping_t *) @param key: (C++: const lvar_locator_t &) lvar_locator_t const & @param val: (C++: const lvar_locator_t &) lvar_locator_t const &

def lvar_mapping_new()

lvar_mapping_new() -> lvar_mapping_t Create a new lvar_mapping_t instance.

def lvar_mapping_next(p: lvar_mapping_iterator_t) ‑> lvar_mapping_iterator_t

lvar_mapping_next(p) -> lvar_mapping_iterator_t Move to the next element.

@param p: (C++: lvar_mapping_iterator_t)

def lvar_mapping_prev(p: lvar_mapping_iterator_t) ‑> lvar_mapping_iterator_t

lvar_mapping_prev(p) -> lvar_mapping_iterator_t Move to the previous element.

@param p: (C++: lvar_mapping_iterator_t)

def lvar_mapping_second(p: lvar_mapping_iterator_t)

lvar_mapping_second(p) -> lvar_locator_t Get reference to the current map value.

@param p: (C++: lvar_mapping_iterator_t)

def lvar_mapping_size(map: lvar_mapping_t)

lvar_mapping_size(map) -> size_t Get size of lvar_mapping_t.

@param map: (C++: lvar_mapping_t *)

def make_num(*args)

Create a number expression

def make_pointer(type: tinfo_t)

make_pointer(type) -> tinfo_t Create a pointer type. This function performs the following conversion: "type" -> "type*"

@param type: (C++: const tinfo_t &) object type. @return: "type*". for example, if 'char' is passed as the argument,

def make_ref(e)

Create a reference. This function performs the following conversion: "obj" => "&obj". It can handle casts, annihilate "&*", and process other special cases.

def mark_cfunc_dirty(ea: ea_t, close_views: bool = False)

mark_cfunc_dirty(ea, close_views=False) -> bool Flush the cached decompilation results. Erases a cache entry for the specified function.

@param ea: (C++: ea_t) function to erase from the cache @param close_views: (C++: bool) close pseudocode windows that show the function @return: if a cache entry existed.

def max_vlr_svalue(size: int)

max_vlr_svalue(size) -> uvlr_t

@param size: int

def max_vlr_value(size: int)

max_vlr_value(size) -> uvlr_t

@param size: int

def mcode_modifies_d(mcode: mcode_t)

mcode_modifies_d(mcode) -> bool

@param mcode: enum mcode_t

def min_vlr_svalue(size: int)

min_vlr_svalue(size) -> uvlr_t

@param size: int

def modify_user_lvar_info(func_ea: ea_t, mli_flags: uint, info: lvar_saved_info_t)

modify_user_lvar_info(func_ea, mli_flags, info) -> bool Modify saved local variable settings of one variable.

@param func_ea: (C++: ea_t) function start address @param mli_flags: (C++: uint) bits that specify which attrs defined by INFO are to be set @param info: (C++: const lvar_saved_info_t &) local variable info attrs @return: true if modified, false if invalid MLI_FLAGS passed

def modify_user_lvars(entry_ea: ea_t, mlv: user_lvar_modifier_t)

modify_user_lvars(entry_ea, mlv) -> bool Modify saved local variable settings.

@param entry_ea: (C++: ea_t) function start address @param mlv: (C++: user_lvar_modifier_t &) local variable modifier @return: true if modified variables

def mreg2reg(reg: mreg_t, width: int)

mreg2reg(reg, width) -> int Map a microregister to a processor register.

@param reg: (C++: mreg_t) microregister number @param width: (C++: int) size of microregister in bytes @return: processor register id or -1

def must_mcode_close_block(mcode: mcode_t, including_calls: bool)

must_mcode_close_block(mcode, including_calls) -> bool Must an instruction with the given opcode be the last one in a block? Such opcodes are called closing opcodes.

@param mcode: (C++: mcode_t) instruction opcode @param including_calls: (C++: bool) should m_call/m_icall be considered as the closing opcodes? If this function returns true, the opcode cannot appear in the middle of a block. Calls are a special case: unknown calls (is_unknown_call) are considered as closing opcodes.

def negate_mcode_relation(code: mcode_t)

negate_mcode_relation(code) -> mcode_t

@param code: enum mcode_t

def negated_relation(op: ctype_t)

negated_relation(op) -> ctype_t Negate a comparison operator. For example, cot_sge becomes cot_slt.

@param op: (C++: ctype_t) enum ctype_t

def new_block()

Create a new block-statement.

def op_uses_x(op: ctype_t)

op_uses_x(op) -> bool Does operator use the 'x' field of cexpr_t?

@param op: (C++: ctype_t) enum ctype_t

def op_uses_y(op: ctype_t)

op_uses_y(op) -> bool Does operator use the 'y' field of cexpr_t?

@param op: (C++: ctype_t) enum ctype_t

def op_uses_z(op: ctype_t)

op_uses_z(op) -> bool Does operator use the 'z' field of cexpr_t?

@param op: (C++: ctype_t) enum ctype_t

def open_pseudocode(ea: ea_t, flags: int)

open_pseudocode(ea, flags) -> vdui_t Open pseudocode window. The specified function is decompiled and the pseudocode window is opened.

@param ea: (C++: ea_t) function to decompile @param flags: (C++: int) a combination of OPF_ flags @return: false if failed

def parse_user_call(udc: udcall_t, decl: char const *, silent: bool)

parse_user_call(udc, decl, silent) -> bool Convert function type declaration into internal structure

@param udc: (C++: udcall_t ) - pointer to output structure @param decl: (C++: const char ) - function type declaration @param silent: (C++: bool) - if TRUE: do not show warning in case of incorrect type @return: success

def partial_type_num(type: tinfo_t)

partial_type_num(type) -> int Calculate number of partial subtypes.

@param type: (C++: const tinfo_t &) tinfo_t const & @return: number of partial subtypes. The bigger is this number, the uglier is the type.

def print_vdloc(loc: vdloc_t, nbytes: int)

print_vdloc(loc, nbytes) -> str Print vdloc. Since vdloc does not always carry the size info, we pass it as NBYTES..

@param loc: (C++: const vdloc_t &) vdloc_t const & @param nbytes: (C++: int)

def property_op_to_typename(self)
def qswap(a: cinsn_t, b: cinsn_t)

qswap(a, b)

@param a: cinsn_t & @param b: cinsn_t &

def reg2mreg(reg: int)

reg2mreg(reg) -> mreg_t Map a processor register to a microregister.

@param reg: (C++: int) processor register number @return: microregister register id or mr_none

def remitem(e: citem_t)

remitem(e)

@param e: citem_t const *

def remove_hexrays_callback(callback)

Deprecated. Please use Hexrays_Hooks instead Uninstall handler for decompiler events.

@return: number of uninstalled handlers.

def rename_lvar(func_ea: ea_t, oldname: char const *, newname: char const *)

rename_lvar(func_ea, oldname, newname) -> bool Rename a local variable.

@param func_ea: (C++: ea_t) function start address @param oldname: (C++: const char ) old name of the variable @param newname: (C++: const char ) new name of the variable @return: success This is a convenience function. For bulk renaming consider using modify_user_lvars.

def restore_user_cmts(func_ea: ea_t)

restore_user_cmts(func_ea) -> user_cmts_t Restore user defined comments from the database.

@param func_ea: (C++: ea_t) the entry address of the function @return: collection of user defined comments. The returned object must be deleted by the caller using delete_user_cmts()

def restore_user_defined_calls(udcalls: udcall_map_t *, func_ea: ea_t)

restore_user_defined_calls(udcalls, func_ea) -> bool Restore user defined function calls from the database.

@param udcalls: (C++: udcall_map_t *) ptr to output buffer @param func_ea: (C++: ea_t) entry address of the function @return: success

def restore_user_iflags(func_ea: ea_t)

restore_user_iflags(func_ea) -> user_iflags_t Restore user defined citem iflags from the database.

@param func_ea: (C++: ea_t) the entry address of the function @return: collection of user defined iflags. The returned object must be deleted by the caller using delete_user_iflags()

def restore_user_labels(func_ea: ea_t, func: cfunc_t = None)

restore_user_labels(func_ea, func=None) -> user_labels_t Restore user defined labels from the database.

@param func_ea: (C++: ea_t) the entry address of the function, ignored if FUNC != nullptr @param func: (C++: const cfunc_t *) pointer to current function @return: collection of user defined labels. The returned object must be deleted by the caller using delete_user_labels()

def restore_user_lvar_settings(lvinf: lvar_uservec_t, func_ea: ea_t)

restore_user_lvar_settings(lvinf, func_ea) -> bool Restore user defined local variable settings in the database.

@param lvinf: (C++: lvar_uservec_t *) ptr to output buffer @param func_ea: (C++: ea_t) entry address of the function @return: success

def restore_user_numforms(func_ea: ea_t)

restore_user_numforms(func_ea) -> user_numforms_t Restore user defined number formats from the database.

@param func_ea: (C++: ea_t) the entry address of the function @return: collection of user defined number formats. The returned object must be deleted by the caller using delete_user_numforms()

def restore_user_unions(func_ea: ea_t)

restore_user_unions(func_ea) -> user_unions_t Restore user defined union field selections from the database.

@param func_ea: (C++: ea_t) the entry address of the function @return: collection of union field selections The returned object must be deleted by the caller using delete_user_unions()

def save_user_cmts(func_ea: ea_t, user_cmts: user_cmts_t)

save_user_cmts(func_ea, user_cmts) Save user defined comments into the database.

@param func_ea: (C++: ea_t) the entry address of the function @param user_cmts: (C++: const user_cmts_t *) collection of user defined comments

def save_user_defined_calls(func_ea: ea_t, udcalls: udcall_map_t const &)

save_user_defined_calls(func_ea, udcalls) Save user defined local function calls into the database.

@param func_ea: (C++: ea_t) entry address of the function @param udcalls: (C++: const udcall_map_t &) user-specified info about user defined function calls

def save_user_iflags(func_ea: ea_t, iflags: user_iflags_t)

save_user_iflags(func_ea, iflags) Save user defined citem iflags into the database.

@param func_ea: (C++: ea_t) the entry address of the function @param iflags: (C++: const user_iflags_t *) collection of user defined citem iflags

def save_user_labels(func_ea: ea_t, user_labels: user_labels_t, func: cfunc_t = None)

save_user_labels(func_ea, user_labels, func=None) Save user defined labels into the database.

@param func_ea: (C++: ea_t) the entry address of the function, ignored if FUNC != nullptr @param user_labels: (C++: const user_labels_t ) collection of user defined labels @param func: (C++: const cfunc_t ) pointer to current function, if FUNC != nullptr, then save labels using a more stable method that preserves them even when the decompiler output drastically changes

def save_user_lvar_settings(func_ea: ea_t, lvinf: lvar_uservec_t)

save_user_lvar_settings(func_ea, lvinf) Save user defined local variable settings into the database.

@param func_ea: (C++: ea_t) entry address of the function @param lvinf: (C++: const lvar_uservec_t &) user-specified info about local variables

def save_user_numforms(func_ea: ea_t, numforms: user_numforms_t)

save_user_numforms(func_ea, numforms) Save user defined number formats into the database.

@param func_ea: (C++: ea_t) the entry address of the function @param numforms: (C++: const user_numforms_t *) collection of user defined comments

def save_user_unions(func_ea: ea_t, unions: user_unions_t)

save_user_unions(func_ea, unions) Save user defined union field selections into the database.

@param func_ea: (C++: ea_t) the entry address of the function @param unions: (C++: const user_unions_t *) collection of union field selections

def select_udt_by_offset(udts: qvector< tinfo_t > const *, ops: ui_stroff_ops_t, applicator: ui_stroff_applicator_t)

select_udt_by_offset(udts, ops, applicator) -> int Select UDT

@param udts: (C++: const qvector< tinfo_t > *) list of UDT tinfo_t for the selection, if nullptr or empty then UDTs from the "Local types" will be used @param ops: (C++: const ui_stroff_ops_t &) operands @param applicator: (C++: ui_stroff_applicator_t &) callback will be called to apply the selection for every operand

def send_database(err: hexrays_failure_t, silent: bool)

send_database(err, silent) Send the database to Hex-Rays. This function sends the current database to the Hex-Rays server. The database is sent in the compressed form over an encrypted (SSL) connection.

@param err: (C++: const hexrays_failure_t &) failure description object. Empty hexrays_failure_t object can be used if error information is not available. @param silent: (C++: bool) if false, a dialog box will be displayed before sending the database.

def set2jcnd(code: mcode_t)

set2jcnd(code) -> mcode_t

@param code: enum mcode_t

def set_type(id: uval_t, tif: tinfo_t, source: type_source_t, force: bool = False)

set_type(id, tif, source, force=False) -> bool Set a global type.

@param id: (C++: uval_t) address or id of the object @param tif: (C++: const tinfo_t &) new type info @param source: (C++: type_source_t) where the type comes from @param force: (C++: bool) true means to set the type as is, false means to merge the new type with the possibly existing old type info. @return: success

def swap_mcode_relation(code: mcode_t)

swap_mcode_relation(code) -> mcode_t

@param code: enum mcode_t

def swapped_relation(op: ctype_t)

swapped_relation(op) -> ctype_t Swap a comparison operator. For example, cot_sge becomes cot_sle.

@param op: (C++: ctype_t) enum ctype_t

def term_hexrays_plugin()

term_hexrays_plugin() Stop working with hex-rays decompiler.

def udcall_map_begin(map: udcall_map_t const *)

udcall_map_begin(map) -> udcall_map_iterator_t Get iterator pointing to the beginning of udcall_map_t.

@param map: (C++: const udcall_map_t *) udcall_map_t const *

def udcall_map_clear(map: udcall_map_t *)

udcall_map_clear(map) Clear udcall_map_t.

@param map: (C++: udcall_map_t *)

def udcall_map_end(map: udcall_map_t const *)

udcall_map_end(map) -> udcall_map_iterator_t Get iterator pointing to the end of udcall_map_t.

@param map: (C++: const udcall_map_t *) udcall_map_t const *

def udcall_map_erase(map: udcall_map_t *, p: udcall_map_iterator_t)

udcall_map_erase(map, p) Erase current element from udcall_map_t.

@param map: (C++: udcall_map_t *) @param p: (C++: udcall_map_iterator_t)

def udcall_map_find(map: udcall_map_t const *, key: ea_t const &)

udcall_map_find(map, key) -> udcall_map_iterator_t Find the specified key in udcall_map_t.

@param map: (C++: const udcall_map_t *) udcall_map_t const * @param key: (C++: const ea_t &) ea_t const &

def udcall_map_first(p: udcall_map_iterator_t)

udcall_map_first(p) -> ea_t const & Get reference to the current map key.

@param p: (C++: udcall_map_iterator_t)

def udcall_map_free(map: udcall_map_t *)

udcall_map_free(map) Delete udcall_map_t instance.

@param map: (C++: udcall_map_t *)

def udcall_map_insert(map: udcall_map_t *, key: ea_t const &, val: udcall_t)

udcall_map_insert(map, key, val) -> udcall_map_iterator_t Insert new (ea_t, udcall_t) pair into udcall_map_t.

@param map: (C++: udcall_map_t *) @param key: (C++: const ea_t &) ea_t const & @param val: (C++: const udcall_t &) udcall_t const &

def udcall_map_new()

udcall_map_new() -> udcall_map_t * Create a new udcall_map_t instance.

def udcall_map_next(p: udcall_map_iterator_t) ‑> udcall_map_iterator_t

udcall_map_next(p) -> udcall_map_iterator_t Move to the next element.

@param p: (C++: udcall_map_iterator_t)

def udcall_map_prev(p: udcall_map_iterator_t) ‑> udcall_map_iterator_t

udcall_map_prev(p) -> udcall_map_iterator_t Move to the previous element.

@param p: (C++: udcall_map_iterator_t)

def udcall_map_second(p: udcall_map_iterator_t)

udcall_map_second(p) -> udcall_t Get reference to the current map value.

@param p: (C++: udcall_map_iterator_t)

def udcall_map_size(map: udcall_map_t *)

udcall_map_size(map) -> size_t Get size of udcall_map_t.

@param map: (C++: udcall_map_t *)

def user_cmts_begin(map: user_cmts_t) ‑> user_cmts_iterator_t

user_cmts_begin(map) -> user_cmts_iterator_t Get iterator pointing to the beginning of user_cmts_t.

@param map: (C++: const user_cmts_t *) user_cmts_t const *

def user_cmts_clear(map: user_cmts_t)

user_cmts_clear(map) Clear user_cmts_t.

@param map: (C++: user_cmts_t *)

def user_cmts_end(map: user_cmts_t) ‑> user_cmts_iterator_t

user_cmts_end(map) -> user_cmts_iterator_t Get iterator pointing to the end of user_cmts_t.

@param map: (C++: const user_cmts_t *) user_cmts_t const *

def user_cmts_erase(map: user_cmts_t, p: user_cmts_iterator_t)

user_cmts_erase(map, p) Erase current element from user_cmts_t.

@param map: (C++: user_cmts_t *) @param p: (C++: user_cmts_iterator_t)

def user_cmts_find(map: user_cmts_t, key: treeloc_t) ‑> user_cmts_iterator_t

user_cmts_find(map, key) -> user_cmts_iterator_t Find the specified key in user_cmts_t.

@param map: (C++: const user_cmts_t *) user_cmts_t const * @param key: (C++: const treeloc_t &) treeloc_t const &

def user_cmts_first(p: user_cmts_iterator_t)

user_cmts_first(p) -> treeloc_t Get reference to the current map key.

@param p: (C++: user_cmts_iterator_t)

def user_cmts_free(map: user_cmts_t)

user_cmts_free(map) Delete user_cmts_t instance.

@param map: (C++: user_cmts_t *)

def user_cmts_insert(map: user_cmts_t, key: treeloc_t, val: citem_cmt_t) ‑> user_cmts_iterator_t

user_cmts_insert(map, key, val) -> user_cmts_iterator_t Insert new (treeloc_t, citem_cmt_t) pair into user_cmts_t.

@param map: (C++: user_cmts_t *) @param key: (C++: const treeloc_t &) treeloc_t const & @param val: (C++: const citem_cmt_t &) citem_cmt_t const &

def user_cmts_new()

user_cmts_new() -> user_cmts_t Create a new user_cmts_t instance.

def user_cmts_next(p: user_cmts_iterator_t) ‑> user_cmts_iterator_t

user_cmts_next(p) -> user_cmts_iterator_t Move to the next element.

@param p: (C++: user_cmts_iterator_t)

def user_cmts_prev(p: user_cmts_iterator_t) ‑> user_cmts_iterator_t

user_cmts_prev(p) -> user_cmts_iterator_t Move to the previous element.

@param p: (C++: user_cmts_iterator_t)

def user_cmts_second(p: user_cmts_iterator_t)

user_cmts_second(p) -> citem_cmt_t Get reference to the current map value.

@param p: (C++: user_cmts_iterator_t)

def user_cmts_size(map: user_cmts_t)

user_cmts_size(map) -> size_t Get size of user_cmts_t.

@param map: (C++: user_cmts_t *)

def user_iflags_begin(map: user_iflags_t) ‑> user_iflags_iterator_t

user_iflags_begin(map) -> user_iflags_iterator_t Get iterator pointing to the beginning of user_iflags_t.

@param map: (C++: const user_iflags_t *) user_iflags_t const *

def user_iflags_clear(map: user_iflags_t)

user_iflags_clear(map) Clear user_iflags_t.

@param map: (C++: user_iflags_t *)

def user_iflags_end(map: user_iflags_t) ‑> user_iflags_iterator_t

user_iflags_end(map) -> user_iflags_iterator_t Get iterator pointing to the end of user_iflags_t.

@param map: (C++: const user_iflags_t *) user_iflags_t const *

def user_iflags_erase(map: user_iflags_t, p: user_iflags_iterator_t)

user_iflags_erase(map, p) Erase current element from user_iflags_t.

@param map: (C++: user_iflags_t *) @param p: (C++: user_iflags_iterator_t)

def user_iflags_find(map: user_iflags_t, key: citem_locator_t) ‑> user_iflags_iterator_t

user_iflags_find(map, key) -> user_iflags_iterator_t Find the specified key in user_iflags_t.

@param map: (C++: const user_iflags_t *) user_iflags_t const * @param key: (C++: const citem_locator_t &) citem_locator_t const &

def user_iflags_first(p: user_iflags_iterator_t)

user_iflags_first(p) -> citem_locator_t Get reference to the current map key.

@param p: (C++: user_iflags_iterator_t)

def user_iflags_free(map: user_iflags_t)

user_iflags_free(map) Delete user_iflags_t instance.

@param map: (C++: user_iflags_t *)

def user_iflags_insert(map: user_iflags_t, key: citem_locator_t, val: int32 const &)

user_iflags_insert(map, key, val) -> user_iflags_iterator_t Insert new (citem_locator_t, int32) pair into user_iflags_t.

@param map: (C++: user_iflags_t *) @param key: (C++: const citem_locator_t &) citem_locator_t const & @param val: (C++: const int32 &) int32 const &

def user_iflags_new()

user_iflags_new() -> user_iflags_t Create a new user_iflags_t instance.

def user_iflags_next(p: user_iflags_iterator_t) ‑> user_iflags_iterator_t

user_iflags_next(p) -> user_iflags_iterator_t Move to the next element.

@param p: (C++: user_iflags_iterator_t)

def user_iflags_prev(p: user_iflags_iterator_t) ‑> user_iflags_iterator_t

user_iflags_prev(p) -> user_iflags_iterator_t Move to the previous element.

@param p: (C++: user_iflags_iterator_t)

def user_iflags_second(p: user_iflags_iterator_t)

user_iflags_second(p) -> int32 const & Get reference to the current map value.

@param p: (C++: user_iflags_iterator_t)

def user_iflags_size(map: user_iflags_t)

user_iflags_size(map) -> size_t Get size of user_iflags_t.

@param map: (C++: user_iflags_t *)

def user_labels_begin(map: user_labels_t) ‑> user_labels_iterator_t

user_labels_begin(map) -> user_labels_iterator_t Get iterator pointing to the beginning of user_labels_t.

@param map: (C++: const user_labels_t *) user_labels_t const *

def user_labels_clear(map: user_labels_t)

user_labels_clear(map) Clear user_labels_t.

@param map: (C++: user_labels_t *)

def user_labels_end(map: user_labels_t) ‑> user_labels_iterator_t

user_labels_end(map) -> user_labels_iterator_t Get iterator pointing to the end of user_labels_t.

@param map: (C++: const user_labels_t *) user_labels_t const *

def user_labels_erase(map: user_labels_t, p: user_labels_iterator_t)

user_labels_erase(map, p) Erase current element from user_labels_t.

@param map: (C++: user_labels_t *) @param p: (C++: user_labels_iterator_t)

def user_labels_find(map: user_labels_t, key: int const &)

user_labels_find(map, key) -> user_labels_iterator_t Find the specified key in user_labels_t.

@param map: (C++: const user_labels_t *) user_labels_t const * @param key: (C++: const int &) int const &

def user_labels_first(p: user_labels_iterator_t)

user_labels_first(p) -> int const & Get reference to the current map key.

@param p: (C++: user_labels_iterator_t)

def user_labels_free(map: user_labels_t)

user_labels_free(map) Delete user_labels_t instance.

@param map: (C++: user_labels_t *)

def user_labels_insert(map: user_labels_t, key: int const &, val: qstring const &)

user_labels_insert(map, key, val) -> user_labels_iterator_t Insert new (int, qstring) pair into user_labels_t.

@param map: (C++: user_labels_t *) @param key: (C++: const int &) int const & @param val: (C++: const qstring &) qstring const &

def user_labels_new()

user_labels_new() -> user_labels_t Create a new user_labels_t instance.

def user_labels_next(p: user_labels_iterator_t) ‑> user_labels_iterator_t

user_labels_next(p) -> user_labels_iterator_t Move to the next element.

@param p: (C++: user_labels_iterator_t)

def user_labels_prev(p: user_labels_iterator_t) ‑> user_labels_iterator_t

user_labels_prev(p) -> user_labels_iterator_t Move to the previous element.

@param p: (C++: user_labels_iterator_t)

def user_labels_second(p: user_labels_iterator_t)

user_labels_second(p) -> qstring & Get reference to the current map value.

@param p: (C++: user_labels_iterator_t)

def user_labels_size(map: user_labels_t)

user_labels_size(map) -> size_t Get size of user_labels_t.

@param map: (C++: user_labels_t *)

def user_numforms_begin(map: user_numforms_t) ‑> user_numforms_iterator_t

user_numforms_begin(map) -> user_numforms_iterator_t Get iterator pointing to the beginning of user_numforms_t.

@param map: (C++: const user_numforms_t *) user_numforms_t const *

def user_numforms_clear(map: user_numforms_t)

user_numforms_clear(map) Clear user_numforms_t.

@param map: (C++: user_numforms_t *)

def user_numforms_end(map: user_numforms_t) ‑> user_numforms_iterator_t

user_numforms_end(map) -> user_numforms_iterator_t Get iterator pointing to the end of user_numforms_t.

@param map: (C++: const user_numforms_t *) user_numforms_t const *

def user_numforms_erase(map: user_numforms_t, p: user_numforms_iterator_t)

user_numforms_erase(map, p) Erase current element from user_numforms_t.

@param map: (C++: user_numforms_t *) @param p: (C++: user_numforms_iterator_t)

def user_numforms_find(map: user_numforms_t, key: operand_locator_t) ‑> user_numforms_iterator_t

user_numforms_find(map, key) -> user_numforms_iterator_t Find the specified key in user_numforms_t.

@param map: (C++: const user_numforms_t *) user_numforms_t const * @param key: (C++: const operand_locator_t &) operand_locator_t const &

def user_numforms_first(p: user_numforms_iterator_t)

user_numforms_first(p) -> operand_locator_t Get reference to the current map key.

@param p: (C++: user_numforms_iterator_t)

def user_numforms_free(map: user_numforms_t)

user_numforms_free(map) Delete user_numforms_t instance.

@param map: (C++: user_numforms_t *)

def user_numforms_insert(map: user_numforms_t, key: operand_locator_t, val: number_format_t) ‑> user_numforms_iterator_t

user_numforms_insert(map, key, val) -> user_numforms_iterator_t Insert new (operand_locator_t, number_format_t) pair into user_numforms_t.

@param map: (C++: user_numforms_t *) @param key: (C++: const operand_locator_t &) operand_locator_t const & @param val: (C++: const number_format_t &) number_format_t const &

def user_numforms_new()

user_numforms_new() -> user_numforms_t Create a new user_numforms_t instance.

def user_numforms_next(p: user_numforms_iterator_t) ‑> user_numforms_iterator_t

user_numforms_next(p) -> user_numforms_iterator_t Move to the next element.

@param p: (C++: user_numforms_iterator_t)

def user_numforms_prev(p: user_numforms_iterator_t) ‑> user_numforms_iterator_t

user_numforms_prev(p) -> user_numforms_iterator_t Move to the previous element.

@param p: (C++: user_numforms_iterator_t)

def user_numforms_second(p: user_numforms_iterator_t)

user_numforms_second(p) -> number_format_t Get reference to the current map value.

@param p: (C++: user_numforms_iterator_t)

def user_numforms_size(map: user_numforms_t)

user_numforms_size(map) -> size_t Get size of user_numforms_t.

@param map: (C++: user_numforms_t *)

def user_unions_begin(map: user_unions_t) ‑> user_unions_iterator_t

user_unions_begin(map) -> user_unions_iterator_t Get iterator pointing to the beginning of user_unions_t.

@param map: (C++: const user_unions_t *) user_unions_t const *

def user_unions_clear(map: user_unions_t)

user_unions_clear(map) Clear user_unions_t.

@param map: (C++: user_unions_t *)

def user_unions_end(map: user_unions_t) ‑> user_unions_iterator_t

user_unions_end(map) -> user_unions_iterator_t Get iterator pointing to the end of user_unions_t.

@param map: (C++: const user_unions_t *) user_unions_t const *

def user_unions_erase(map: user_unions_t, p: user_unions_iterator_t)

user_unions_erase(map, p) Erase current element from user_unions_t.

@param map: (C++: user_unions_t *) @param p: (C++: user_unions_iterator_t)

def user_unions_find(map: user_unions_t, key: ea_t const &)

user_unions_find(map, key) -> user_unions_iterator_t Find the specified key in user_unions_t.

@param map: (C++: const user_unions_t *) user_unions_t const * @param key: (C++: const ea_t &) ea_t const &

def user_unions_first(p: user_unions_iterator_t)

user_unions_first(p) -> ea_t const & Get reference to the current map key.

@param p: (C++: user_unions_iterator_t)

def user_unions_free(map: user_unions_t)

user_unions_free(map) Delete user_unions_t instance.

@param map: (C++: user_unions_t *)

def user_unions_insert(map: user_unions_t, key: ea_t const &, val: intvec_t)

user_unions_insert(map, key, val) -> user_unions_iterator_t Insert new (ea_t, intvec_t) pair into user_unions_t.

@param map: (C++: user_unions_t *) @param key: (C++: const ea_t &) ea_t const & @param val: (C++: const intvec_t &) intvec_t const &

def user_unions_new()

user_unions_new() -> user_unions_t Create a new user_unions_t instance.

def user_unions_next(p: user_unions_iterator_t) ‑> user_unions_iterator_t

user_unions_next(p) -> user_unions_iterator_t Move to the next element.

@param p: (C++: user_unions_iterator_t)

def user_unions_prev(p: user_unions_iterator_t) ‑> user_unions_iterator_t

user_unions_prev(p) -> user_unions_iterator_t Move to the previous element.

@param p: (C++: user_unions_iterator_t)

def user_unions_second(p: user_unions_iterator_t)

user_unions_second(p) -> intvec_t Get reference to the current map value.

@param p: (C++: user_unions_iterator_t)

def user_unions_size(map: user_unions_t)

user_unions_size(map) -> size_t Get size of user_unions_t.

@param map: (C++: user_unions_t *)

Classes

class DecompilationFailure (*args, **kwargs)

Common base class for all non-exit exceptions.

Ancestors

  • builtins.Exception
  • builtins.BaseException
class Hexrays_Hooks

Proxy of C++ Hexrays_Hooks class.

init(self, _flags=0, _hkcb_flags=0x0001) -> Hexrays_Hooks

@param _flags: uint32 @param _hkcb_flags: uint32

Subclasses

  • ida_hexrays.__cbhooks_t

Instance variables

var thisown

The membership flag

Methods

def begin_inlining(self, cdg: codegen_t, decomp_flags: int) ‑> int

begin_inlining(self, cdg, decomp_flags) -> int Starting to inline outlined functions.

@param cdg: (codegen_t *) @param decomp_flags: (int) @return: Microcode error codes code This is an opportunity to inline other ranges.

def build_callinfo(self, blk: mblock_t, type: tinfo_t)

build_callinfo(self, blk, type) -> PyObject * Analyzing a call instruction.

@param blk: (mblock_t ) blk->tail is the call. @param type: (tinfo_t ) buffer for the output type.

def callinfo_built(self, blk: mblock_t) ‑> int

callinfo_built(self, blk) -> int A call instruction has been anallyzed.

@param blk: (mblock_t *) blk->tail is the call.

def calls_done(self, mba: mba_t) ‑> int

calls_done(self, mba) -> int All calls have been analyzed.

@param mba: (mba_t *) This event is generated immediately after analyzing all calls, before any optimizitions, call unmerging and block merging.

def close_pseudocode(self, vu: vdui_t) ‑> int

close_pseudocode(self, vu) -> int Pseudocode view is being closed.

@param vu: (vdui_t *)

def cmt_changed(self, cfunc: cfunc_t, loc: treeloc_t, cmt: char const *)

cmt_changed(self, cfunc, loc, cmt) -> int Comment got changed.

@param cfunc: (cfunc_t ) @param loc: (const treeloc_t ) @param cmt: (const char *)

def collect_warnings(self, warnings: qstrvec_t *, cfunc: cfunc_t)

collect_warnings(self, warnings, cfunc) -> int Collect warning messages from plugins. These warnings will be displayed at the function header, after the user-defined comments.

@param warnings: (qstrvec_t ) @param cfunc: (cfunc_t )

def combine(self, blk: mblock_t, insn: minsn_t) ‑> int

combine(self, blk, insn) -> int Trying to combine instructions of basic block.

@param blk: (mblock_t ) @param insn: (minsn_t ) Should return: 1 if combined the current instruction with a preceding one -1 if the instruction should not be combined 0 else

def create_hint(self, vu: vdui_t)

create_hint(self, vu) -> PyObject * Create a hint for the current item. @see: ui_get_custom_viewer_hint

@param vu: (vdui_t *) @retval 0: continue collecting hints with other subscribers @retval 1: stop collecting hints

def curpos(self, vu: vdui_t) ‑> int

curpos(self, vu) -> int Current cursor position has been changed. (for example, by left-clicking or using keyboard)

@param vu: (vdui_t *)

def double_click(self, vu: vdui_t, shift_state: int) ‑> int

double_click(self, vu, shift_state) -> int Mouse double click.

@param vu: (vdui_t *) @param shift_state: (int) Should return: 1 if the event has been handled

def flowchart(self, fc: qflow_chart_t, mba: mba_t)

flowchart(self, fc, mba) -> int Flowchart has been generated.

@param fc: (qflow_chart_t ) @param mba: (mba_t )

def func_printed(self, cfunc: cfunc_t) ‑> int

func_printed(self, cfunc) -> int Function text has been generated. Plugins may modify the text in cfunc_t::sv. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items.

@param cfunc: (cfunc_t *)

def glbopt(self, mba: mba_t) ‑> int

glbopt(self, mba) -> int Global optimization has been finished. If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization.

@param mba: (mba_t *) @return: Microcode error codes code

def hook(self) ‑> bool

hook(self) -> bool

def inlined_func(self, cdg: codegen_t, blk: int, mbr: mba_ranges_t, i1: int, i2: int) ‑> int

inlined_func(self, cdg, blk, mbr, i1, i2) -> int A set of ranges got inlined.

@param cdg: (codegen_t ) @param blk: (int) the block containing call/jump to inline @param mbr: (mba_ranges_t ) the range to inline @param i1: (int) blknum of the first inlined block @param i2: (int) blknum of the last inlined block (excluded)

def inlining_func(self, cdg: codegen_t, blk: int, mbr: mba_ranges_t) ‑> int

inlining_func(self, cdg, blk, mbr) -> int A set of ranges is going to be inlined.

@param cdg: (codegen_t ) @param blk: (int) the block containing call/jump to inline @param mbr: (mba_ranges_t ) the range to inline

def interr(self, errcode: int) ‑> int

interr(self, errcode) -> int Internal error has occurred.

@param errcode: (int )

def keyboard(self, vu: vdui_t, key_code: int, shift_state: int) ‑> int

keyboard(self, vu, key_code, shift_state) -> int Keyboard has been hit.

@param vu: (vdui_t *) @param key_code: (int) VK_… @param shift_state: (int) Should return: 1 if the event has been handled

def locopt(self, mba: mba_t) ‑> int

locopt(self, mba) -> int Basic block level optimization has been finished.

@param mba: (mba_t *) @return: Microcode error codes code

def lvar_cmt_changed(self, vu: vdui_t, v: lvar_t, cmt: char const *)

lvar_cmt_changed(self, vu, v, cmt) -> int Local variable comment got changed.

@param vu: (vdui_t ) @param v: (lvar_t ) @param cmt: (const char *) Please note that it is possible to read/write user settings for lvars directly from the idb.

def lvar_mapping_changed(self, vu: vdui_t, frm: lvar_t, to: lvar_t) ‑> int

lvar_mapping_changed(self, vu, frm, to) -> int Local variable mapping got changed.

@param vu: (vdui_t ) @param from: lvar_t * @param to: (lvar_t ) Please note that it is possible to read/write user settings for lvars directly from the idb.

def lvar_name_changed(self, vu: vdui_t, v: lvar_t, name: char const *, is_user_name: bool)

lvar_name_changed(self, vu, v, name, is_user_name) -> int Local variable got renamed.

@param vu: (vdui_t ) @param v: (lvar_t ) @param name: (const char *) @param is_user_name: (bool) Please note that it is possible to read/write user settings for lvars directly from the idb.

def lvar_type_changed(self, vu: vdui_t, v: lvar_t, tinfo: tinfo_t)

lvar_type_changed(self, vu, v, tinfo) -> int Local variable type got changed.

@param vu: (vdui_t ) @param v: (lvar_t ) @param tinfo: (const tinfo_t *) Please note that it is possible to read/write user settings for lvars directly from the idb.

def maturity(self, cfunc: cfunc_t, new_maturity: ctree_maturity_t)

maturity(self, cfunc, new_maturity) -> int Ctree maturity level is being changed.

@param cfunc: (cfunc_t *) @param new_maturity: (ctree_maturity_t)

def microcode(self, mba: mba_t) ‑> int

microcode(self, mba) -> int Microcode has been generated.

@param mba: (mba_t *) @return: Microcode error codes code

def open_pseudocode(self, vu: vdui_t) ‑> int

open_pseudocode(self, vu) -> int New pseudocode view has been opened.

@param vu: (vdui_t *)

def populating_popup(self, widget: TWidget *, popup_handle: TPopupMenu *, vu: vdui_t)

populating_popup(self, widget, popup_handle, vu) -> int Populating popup menu. We can add menu items now.

@param widget: (TWidget ) @param popup_handle: (TPopupMenu ) @param vu: (vdui_t *)

def pre_structural(self, ct: control_graph_t *, cfunc: cfunc_t, g: simple_graph_t)

pre_structural(self, ct, cfunc, g) -> int Structure analysis is starting.

@param ct: (control_graph_t ) in/out: control graph @param cfunc: (cfunc_t ) in: the current function @param g: (const simple_graph_t *) in: control flow graph @return: Microcode error codes code; MERR_BLOCK means that the analysis has been performed by a plugin

def prealloc(self, mba: mba_t) ‑> int

prealloc(self, mba) -> int Local variables: preallocation step begins.

@param mba: (mba_t *) This event may occur several times. Should return: 1 if modified microcode Negative values are Microcode error codes error codes

def preoptimized(self, mba: mba_t) ‑> int

preoptimized(self, mba) -> int Microcode has been preoptimized.

@param mba: (mba_t *) @return: Microcode error codes code

def print_func(self, cfunc: cfunc_t, vp: vc_printer_t) ‑> int

print_func(self, cfunc, vp) -> int Printing ctree and generating text.

@param cfunc: (cfunc_t ) @param vp: (vc_printer_t ) Returns: 1 if text has been generated by the plugin It is forbidden to modify ctree at this event.

def prolog(self, mba: mba_t, fc: qflow_chart_t, reachable_blocks: bitset_t, decomp_flags: int)

prolog(self, mba, fc, reachable_blocks, decomp_flags) -> int Prolog analysis has been finished.

@param mba: (mba_t ) @param fc: (qflow_chart_t ) @param reachable_blocks: (bitset_t *) @param decomp_flags: (int) @return: Microcode error codes code This event is generated for each inlined range as well.

def refresh_pseudocode(self, vu: vdui_t) ‑> int

refresh_pseudocode(self, vu) -> int Existing pseudocode text has been refreshed. Adding/removing pseudocode lines is forbidden in this event.

@param vu: (vdui_t *) See also hxe_text_ready, which happens earlier

def resolve_stkaddrs(self, mba: mba_t) ‑> int

resolve_stkaddrs(self, mba) -> int The optimizer is about to resolve stack addresses.

@param mba: (mba_t *)

def right_click(self, vu: vdui_t) ‑> int

right_click(self, vu) -> int Mouse right click. Use hxe_populating_popup instead, in case you want to add items in the popup menu.

@param vu: (vdui_t *)

def stkpnts(self, mba: mba_t, _sps: stkpnts_t *)

stkpnts(self, mba, _sps) -> int SP change points have been calculated.

@param mba: (mba_t *) @param _sps: stkpnts_t * @return: Microcode error codes code This event is generated for each inlined range as well.

def structural(self, ct: control_graph_t *)

structural(self, ct) -> int Structural analysis has been finished.

@param ct: (control_graph_t *)

def switch_pseudocode(self, vu: vdui_t) ‑> int

switch_pseudocode(self, vu) -> int Existing pseudocode view has been reloaded with a new function. Its text has not been refreshed yet, only cfunc and mba pointers are ready.

@param vu: (vdui_t *)

def text_ready(self, vu: vdui_t) ‑> int

text_ready(self, vu) -> int Decompiled text is ready.

@param vu: (vdui_t *) This event can be used to modify the output text (sv). Obsolete. Please use hxe_func_printed instead.

def unhook(self) ‑> bool

unhook(self) -> bool

class array_of_bitsets (*args)

Proxy of C++ qvector< bitset_t > class.

init(self) -> array_of_bitsets init(self, x) -> array_of_bitsets

@param x: qvector< bitset_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: bitset_t) ‑> bool

add_unique(self, x) -> bool

@param x: bitset_t const &

def at(self, _idx: size_t)

at(self, _idx) -> bitset_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> bitset_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> bitset_t

def erase(self, *args)

erase(self, it) -> bitset_t

@param it: qvector< bitset_t >::iterator

erase(self, first, last) -> bitset_t

@param first: qvector< bitset_t >::iterator @param last: qvector< bitset_t >::iterator

def extract(self)

extract(self) -> bitset_t

def find(self, *args)

find(self, x) -> bitset_t

@param x: bitset_t const &

def front(self)
def grow(self, *args)

grow(self, x=bitset_t())

@param x: bitset_t const &

def has(self, x: bitset_t) ‑> bool

has(self, x) -> bool

@param x: bitset_t const &

def inject(self, s: bitset_t, len: size_t)

inject(self, s, len)

@param s: bitset_t * @param len: size_t

def insert(self, it: bitset_t, x: bitset_t)

insert(self, it, x) -> bitset_t

@param it: qvector< bitset_t >::iterator @param x: bitset_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: bitset_t const &

push_back(self) -> bitset_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: bitset_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: array_of_bitsets)

swap(self, r)

@param r: qvector< bitset_t > &

def truncate(self)

truncate(self)

class array_of_ivlsets (*args)

Proxy of C++ qvector< ivlset_t > class.

init(self) -> array_of_ivlsets init(self, x) -> array_of_ivlsets

@param x: qvector< ivlset_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: ivlset_t) ‑> bool

add_unique(self, x) -> bool

@param x: ivlset_t const &

def at(self, _idx: size_t)

at(self, _idx) -> ivlset_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> ivlset_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> ivlset_t

def erase(self, *args)

erase(self, it) -> ivlset_t

@param it: qvector< ivlset_t >::iterator

erase(self, first, last) -> ivlset_t

@param first: qvector< ivlset_t >::iterator @param last: qvector< ivlset_t >::iterator

def extract(self)

extract(self) -> ivlset_t

def find(self, *args)

find(self, x) -> ivlset_t

@param x: ivlset_t const &

def front(self)
def grow(self, *args)

grow(self, x=ivlset_t())

@param x: ivlset_t const &

def has(self, x: ivlset_t) ‑> bool

has(self, x) -> bool

@param x: ivlset_t const &

def inject(self, s: ivlset_t, len: size_t)

inject(self, s, len)

@param s: ivlset_t * @param len: size_t

def insert(self, it: ivlset_t, x: ivlset_t)

insert(self, it, x) -> ivlset_t

@param it: qvector< ivlset_t >::iterator @param x: ivlset_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: ivlset_t const &

push_back(self) -> ivlset_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: ivlset_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: array_of_ivlsets)

swap(self, r)

@param r: qvector< ivlset_t > &

def truncate(self)

truncate(self)

class bit_bound_t (n: int = 0, s: int = 0)

Proxy of C++ bit_bound_t class.

init(self, n=0, s=0) -> bit_bound_t

@param n: int @param s: int

Instance variables

var nbits : int16

nbits

var sbits : int16

sbits

var thisown

The membership flag

class bitset_t (*args)

Proxy of C++ bitset_t class.

init(self) -> bitset_t init(self, m) -> bitset_t

@param m: bitset_t const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def add(self, *args) ‑> bool

add(self, bit) -> bool

@param bit: int

add(self, bit, width) -> bool

@param bit: int @param width: int

add(self, ml) -> bool

@param ml: bitset_t const &

def back(self) ‑> int

back(self) -> int

def begin(self)

begin(self) -> iterator

def clear(self)

clear(self)

def compare(self, r: bitset_t) ‑> int

compare(self, r) -> int

@param r: bitset_t const &

def copy(self, m: bitset_t)

copy(self, m) -> bitset_t

@param m: bitset_t const &

def count(self, *args) ‑> int

count(self) -> int count(self, bit) -> int

@param bit: int

def cut_at(self, maxbit: int) ‑> bool

cut_at(self, maxbit) -> bool

@param maxbit: int

def dstr(self)

dstr(self) -> char const *

def empty(self) ‑> bool

empty(self) -> bool

def end(self)

end(self) -> iterator

def fill_with_ones(self, maxbit: int)

fill_with_ones(self, maxbit)

@param maxbit: int

def front(self) ‑> int

front(self) -> int

def has(self, bit: int) ‑> bool

has(self, bit) -> bool

@param bit: int

def has_all(self, bit: int, width: int) ‑> bool

has_all(self, bit, width) -> bool

@param bit: int @param width: int

def has_any(self, bit: int, width: int) ‑> bool

has_any(self, bit, width) -> bool

@param bit: int @param width: int

def has_common(self, ml: bitset_t) ‑> bool

has_common(self, ml) -> bool

@param ml: bitset_t const &

def inc(self, p: iterator, n: int = 1)

inc(self, p, n=1)

@param p: bitset_t::iterator & @param n: int

def includes(self, ml: bitset_t) ‑> bool

includes(self, ml) -> bool

@param ml: bitset_t const &

def intersect(self, ml: bitset_t) ‑> bool

intersect(self, ml) -> bool

@param ml: bitset_t const &

def is_subset_of(self, ml: bitset_t) ‑> bool

is_subset_of(self, ml) -> bool

@param ml: bitset_t const &

def itat(self, n: int)

itat(self, n) -> iterator

@param n: int

def itv(self, it: iterator) ‑> int

itv(self, it) -> int

@param it: bitset_t::const_iterator

def last(self) ‑> int

last(self) -> int

def shift_down(self, shift: int)

shift_down(self, shift)

@param shift: int

def sub(self, *args) ‑> bool

sub(self, bit) -> bool

@param bit: int

sub(self, bit, width) -> bool

@param bit: int @param width: int

sub(self, ml) -> bool

@param ml: bitset_t const &

def swap(self, r: bitset_t)

swap(self, r)

@param r: bitset_t &

class block_chains_iterator_t

Proxy of C++ block_chains_iterator_t class.

init(self) -> block_chains_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class block_chains_t

Proxy of C++ block_chains_t class.

init(self) -> block_chains_t

Instance variables

var thisown

The membership flag

Methods

def dstr(self)

dstr(self) -> char const *

def get_chain(self, *args)

get_chain(self, k, width=1) -> chain_t

@param k: voff_t const & @param width: int

get_chain(self, ch) -> chain_t

@param ch: chain_t const &

def get_reg_chain(self, *args)

get_reg_chain(self, reg, width=1) -> chain_t

@param reg: mreg_t @param width: int

def get_stk_chain(self, *args)

get_stk_chain(self, off, width=1) -> chain_t

@param off: sval_t @param width: int

class block_chains_vec_t (*args)

Proxy of C++ qvector< block_chains_t > class.

init(self) -> block_chains_vec_t init(self, x) -> block_chains_vec_t

@param x: qvector< block_chains_t > const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def at(self, _idx: size_t)

at(self, _idx) -> block_chains_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> block_chains_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> block_chains_t

def erase(self, *args)

erase(self, it) -> block_chains_t

@param it: qvector< block_chains_t >::iterator

erase(self, first, last) -> block_chains_t

@param first: qvector< block_chains_t >::iterator @param last: qvector< block_chains_t >::iterator

def extract(self)

extract(self) -> block_chains_t

def front(self)
def grow(self, *args)

grow(self, x=block_chains_t())

@param x: block_chains_t const &

def inject(self, s: block_chains_t, len: size_t)

inject(self, s, len)

@param s: block_chains_t * @param len: size_t

def insert(self, it: block_chains_t, x: block_chains_t)

insert(self, it, x) -> block_chains_t

@param it: qvector< block_chains_t >::iterator @param x: block_chains_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: block_chains_t const &

push_back(self) -> block_chains_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: block_chains_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: block_chains_vec_t)

swap(self, r)

@param r: qvector< block_chains_t > &

def truncate(self)

truncate(self)

class boundaries_iterator_t

Proxy of C++ boundaries_iterator_t class.

init(self) -> boundaries_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class boundaries_t

Proxy of C++ std::map< cinsn_t *,rangeset_t > class.

init(self) -> boundaries_t

Class variables

var keytype

Proxy of C++ cinsn_t class.

var valuetype

Proxy of C++ rangeset_t class.

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: cinsn_t)

at(self, _Keyval) -> rangeset_t

@param _Keyval: cinsn_t *const &

def begin(self, *args)
def clear(self)
def copy(self)
def end(self, *args)
def erase(self, *args)
def find(self, *args)
def first(self, *args)
def get(self, key, default=None)
def has_key(self, key)
def insert(self, *args)
def items(self)
def iteritems(self)
def iterkeys(self)
def itervalues(self)
def keys(self)
def next(self, *args)
def pop(self, key)

Sets the value associated with the provided key.

def popitem(self)

Sets the value associated with the provided key.

def second(self, *args)
def setdefault(self, key, default=None)

Sets the value associated with the provided key.

def size(self, *args)
def values(self)
class carg_t

Proxy of C++ carg_t class.

init(self) -> carg_t

Ancestors

Instance variables

var formal_type : tinfo_t

formal parameter type (if known)

var is_vararg : bool

is a vararg (matches …)

Methods

def compare(self, r: carg_t) ‑> int

compare(self, r) -> int

@param r: carg_t const &

def consume_cexpr(self, e: cexpr_t)

consume_cexpr(self, e)

@param e: cexpr_t *

Inherited members

class carglist_t (*args)

Proxy of C++ carglist_t class.

init(self) -> carglist_t init(self, ftype, fl=0) -> carglist_t

@param ftype: tinfo_t const & @param fl: int

Ancestors

Instance variables

var flags : int

call flags

var functype : tinfo_t

function object type

Methods

def compare(self, r: carglist_t) ‑> int

compare(self, r) -> int

@param r: carglist_t const &

Inherited members

class casm_t (*args)

Proxy of C++ casm_t class.

init(self, ea) -> casm_t

@param ea: ea_t

init(self, r) -> casm_t

@param r: casm_t const &

Ancestors

Methods

def compare(self, r: casm_t) ‑> int

compare(self, r) -> int

@param r: casm_t const &

def one_insn(self) ‑> bool

one_insn(self) -> bool

Inherited members

class catchexpr_t

Proxy of C++ catchexpr_t class.

init(self) -> catchexpr_t

Instance variables

var fake_type : qstring

if not empty, type of the caught object. ideally, obj.type should be enough. however, in some cases the detailed type info is not available.

var obj : cexpr_t

the caught object. if obj.op==cot_empty, no object. ideally, obj.op==cot_var

var thisown

The membership flag

Methods

def compare(self, r: catchexpr_t) ‑> int

compare(self, r) -> int

@param r: catchexpr_t const &

def is_catch_all(self) ‑> bool

is_catch_all(self) -> bool

def swap(self, r: catchexpr_t)

swap(self, r)

@param r: catchexpr_t &

class cblock_pos_t

Proxy of C++ cblock_pos_t class.

init(self) -> cblock_pos_t

Instance variables

var blk : cblock_t *

blk

var p : cblock_t::iterator

p

var thisown

The membership flag

Methods

def insn(self)

insn(self) -> cinsn_t

def is_first_insn(self) ‑> bool

is_first_insn(self) -> bool

def prev_insn(self)

prev_insn(self) -> cinsn_t

class cblock_posvec_t (*args)

Proxy of C++ qvector< cblock_pos_t > class.

init(self) -> cblock_posvec_t init(self, x) -> cblock_posvec_t

@param x: qvector< cblock_pos_t > const &

Instance variables

var thisown

The membership flag

Methods

def at(self, _idx: size_t)

at(self, _idx) -> cblock_pos_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> cblock_pos_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> cblock_pos_t

def erase(self, *args)

erase(self, it) -> cblock_pos_t

@param it: qvector< cblock_pos_t >::iterator

erase(self, first, last) -> cblock_pos_t

@param first: qvector< cblock_pos_t >::iterator @param last: qvector< cblock_pos_t >::iterator

def extract(self)

extract(self) -> cblock_pos_t

def front(self)
def grow(self, *args)

grow(self, x=cblock_pos_t())

@param x: cblock_pos_t const &

def inject(self, s: cblock_pos_t, len: size_t)

inject(self, s, len)

@param s: cblock_pos_t * @param len: size_t

def insert(self, it: cblock_pos_t, x: cblock_pos_t)

insert(self, it, x) -> cblock_pos_t

@param it: qvector< cblock_pos_t >::iterator @param x: cblock_pos_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: cblock_pos_t const &

push_back(self) -> cblock_pos_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: cblock_pos_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: cblock_posvec_t)

swap(self, r)

@param r: qvector< cblock_pos_t > &

def truncate(self)

truncate(self)

class cblock_t

Proxy of C++ cblock_t class.

init(self) -> cblock_t

Ancestors

Subclasses

Methods

def compare(self, r: cblock_t) ‑> int

compare(self, r) -> int

@param r: cblock_t const &

Inherited members

class ccase_t

Proxy of C++ ccase_t class.

init(self) -> ccase_t

Ancestors

Instance variables

var values : uint64vec_t

List of case values. if empty, then 'default' case

Methods

def compare(self, r: ccase_t) ‑> int

compare(self, r) -> int

@param r: ccase_t const &

def size(self)

size(self) -> size_t

def value(self, i: int)

value(self, i) -> uint64 const &

@param i: int

Inherited members

class ccases_t

Proxy of C++ ccases_t class.

init(self) -> ccases_t

Ancestors

Methods

def compare(self, r: ccases_t) ‑> int

compare(self, r) -> int

@param r: ccases_t const &

Inherited members

class ccatch_t (*args, **kwargs)

Proxy of C++ ccatch_t class.

init(self) -> cblock_t

Ancestors

Instance variables

var exprs : catchexprs_t

exprs

Methods

def compare(self, r: ccatch_t) ‑> int

compare(self, r) -> int

@param r: ccatch_t const &

def is_catch_all(self) ‑> bool

is_catch_all(self) -> bool

def swap(self, r: ccatch_t)

swap(self, r)

@param r: ccatch_t &

Inherited members

class cdg_insn_iterator_t (*args)

Proxy of C++ cdg_insn_iterator_t class.

init(self, mba_) -> cdg_insn_iterator_t

@param mba_: mba_t const *

init(self, r) -> cdg_insn_iterator_t

@param r: cdg_insn_iterator_t const &

Instance variables

var dslot : ea_t

dslot

var dslot_insn : insn_t

dslot_insn

var ea : ea_t

ea

var end : ea_t

end

var is_likely_dslot : bool

is_likely_dslot

var mba : mba_t const *

mba

var severed_branch : ea_t

severed_branch

var thisown

The membership flag

Methods

def dslot_with_xrefs(self) ‑> bool

dslot_with_xrefs(self) -> bool

def has_dslot(self) ‑> bool

has_dslot(self) -> bool

def is_severed_dslot(self) ‑> bool

is_severed_dslot(self) -> bool

def next(self, ins: insn_t *)

next(self, ins) -> merror_t

@param ins: insn_t *

def ok(self) ‑> bool

ok(self) -> bool

def start(self, rng: range_t)

start(self, rng)

@param rng: range_t const &

class cdo_t

Proxy of C++ cdo_t class.

init(self) -> cdo_t

Ancestors

Methods

def compare(self, r: cdo_t) ‑> int

compare(self, r) -> int

@param r: cdo_t const &

Inherited members

class ceinsn_t

Proxy of C++ ceinsn_t class.

init(self) -> ceinsn_t

Subclasses

Instance variables

var expr : cexpr_t

Expression of the statement.

var thisown

The membership flag

class cexpr_t (*args)

Proxy of C++ cexpr_t class.

init(self) -> cexpr_t init(self, cexpr_op, _x, _y=None, _z=None) -> cexpr_t

@param cexpr_op: enum ctype_t @param _x: cexpr_t * @param _y: cexpr_t * @param _z: cexpr_t *

init(self, r) -> cexpr_t

@param r: cexpr_t const &

Ancestors

Subclasses

Class variables

var op_to_typename

Instance variables

var a

argument list (used for cot_call)

var exflags : uint32

Expression attributes

var fpc

used for cot_fnum

var helper

helper name (used for cot_helper)

var insn

an embedded statement, they are prohibited at the final maturity stage (CMAT_FINAL)

var m

member offset (used for cot_memptr, cot_memref) for unions, the member number

var n

used for cot_num

var obj_ea

used for cot_obj

var operands

return a dictionary with the operands of a cexpr_t.

var opname
var ptrsize

memory access size (used for cot_ptr, cot_memptr)

var refwidth

how many bytes are accessed? (-1: none)

var string

utf8 string constant, user representation (used for cot_str)

var type : tinfo_t

expression type. must be carefully maintained

var v

used for cot_var

var x

the first operand of the expression

var y

the second operand of the expression

var z

the third operand of the expression

Methods

def assign(self, r: cexpr_t)

assign(self, r) -> cexpr_t

@param r: cexpr_t const &

def calc_type(self, recursive: bool)

calc_type(self, recursive) Calculate the type of the expression. Use this function to calculate the expression type when a new expression is built

@param recursive: (C++: bool) if true, types of all children expression will be calculated before calculating our type

def cleanup(self)

cleanup(self) Cleanup the expression. This function properly deletes all children and sets the item type to cot_empty.

def compare(self, r: cexpr_t) ‑> int

compare(self, r) -> int

@param r: cexpr_t const &

def contains_comma(self, times: int = 1) ‑> bool

contains_comma(self, times=1) -> bool Does the expression contain a comma operator?

@param times: (C++: int)

def contains_comma_or_insn_or_label(self, maxcommas: int = 1) ‑> bool

contains_comma_or_insn_or_label(self, maxcommas=1) -> bool Does the expression contain a comma operator or an embedded statement operator or a label?

@param maxcommas: (C++: int)

def contains_insn(self, times: int = 1) ‑> bool

contains_insn(self, times=1) -> bool Does the expression contain an embedded statement operator?

@param times: (C++: int)

def contains_insn_or_label(self) ‑> bool

contains_insn_or_label(self) -> bool Does the expression contain an embedded statement operator or a label?

def contains_operator(self, needed_op: ctype_t, times: int = 1)

contains_operator(self, needed_op, times=1) -> bool Check if the expression contains the specified operator.

@param needed_op: (C++: ctype_t) operator code to search for @param times: (C++: int) how many times the operator code should be present @return: true if the expression has at least TIMES children with NEEDED_OP

def cpadone(self) ‑> bool

cpadone(self) -> bool Pointer arithmetic correction done for this expression?

def dstr(self)

dstr(self) -> char const *

def equal_effect(self, r: cexpr_t) ‑> bool

equal_effect(self, r) -> bool Compare two expressions. This function tries to compare two expressions in an 'intelligent' manner. For example, it knows about commutitive operators and can ignore useless casts.

@param r: (C++: const cexpr_t &) the expression to compare against the current expression @return: true expressions can be considered equal

def find_num_op(self, *args)

find_num_op(self) -> cexpr_t

def find_op(self, *args)

find_op(self, _op) -> cexpr_t

@param _op: enum ctype_t

def get_1num_op(self, o1: cexpr_t **, o2: cexpr_t **)

get_1num_op(self, o1, o2) -> bool

@param o1: cexpr_t ** @param o2: cexpr_t **

def get_const_value(self) ‑> bool

get_const_value(self) -> bool Get expression value.

@return: true if the expression is a number.

def get_high_nbit_bound(self) ‑> bit_bound_t

get_high_nbit_bound(self) -> bit_bound_t Get max number of bits that can really be used by the expression. For example, x % 16 can yield only 4 non-zero bits, higher bits are zero

def get_low_nbit_bound(self) ‑> int

get_low_nbit_bound(self) -> int Get min number of bits that are certainly required to represent the expression. For example, constant 16 always uses 5 bits: 10000.

def get_ptr_or_array(self)

get_ptr_or_array(self) -> cexpr_t Find pointer or array child.

def get_type_sign(self)

get_type_sign(self) -> type_sign_t Get expression sign.

def get_v(self)

get_v(self) -> var_ref_t

def has_side_effects(self) ‑> bool

has_side_effects(self) -> bool Check if the expression has side effects. Calls, pre/post inc/dec, and assignments have side effects.

def is_call_arg_of(self, parent: citem_t) ‑> bool

is_call_arg_of(self, parent) -> bool Is call argument?

@param parent: (C++: const citem_t *) citem_t const * @return: true if our expression is a call argument of the specified parent expression.

def is_call_object_of(self, parent: citem_t) ‑> bool

is_call_object_of(self, parent) -> bool Is call object?

@param parent: (C++: const citem_t *) citem_t const * @return: true if our expression is the call object of the specified parent expression.

def is_child_of(self, parent: citem_t) ‑> bool

is_child_of(self, parent) -> bool Verify if the specified item is our parent.

@param parent: (C++: const citem_t *) possible parent item @return: true if the specified item is our parent

def is_const_value(self, _v: uint64)

is_const_value(self, _v) -> bool Check if the expression is a number with the specified value.

@param _v: (C++: uint64)

def is_cstr(self) ‑> bool

is_cstr(self) -> bool

def is_fpop(self) ‑> bool

is_fpop(self) -> bool

def is_jumpout(self) ‑> bool

is_jumpout(self) -> bool

def is_negative_const(self) ‑> bool

is_negative_const(self) -> bool Check if the expression is a negative number.

def is_nice_cond(self) ‑> bool

is_nice_cond(self) -> bool Is nice condition?. Nice condition is a nice expression of the boolean type.

def is_nice_expr(self) ‑> bool

is_nice_expr(self) -> bool Is nice expression? Nice expressions do not contain comma operators, embedded statements, or labels.

def is_non_negative_const(self) ‑> bool

is_non_negative_const(self) -> bool Check if the expression is a non-negative number.

def is_non_zero_const(self) ‑> bool

is_non_zero_const(self) -> bool Check if the expression is a non-zero number.

def is_odd_lvalue(self) ‑> bool

is_odd_lvalue(self) -> bool

def is_type_signed(self) ‑> bool

is_type_signed(self) -> bool Is expression signed?

def is_type_unsigned(self) ‑> bool

is_type_unsigned(self) -> bool Is expression unsigned?

def is_undef_val(self) ‑> bool

is_undef_val(self) -> bool

def is_vftable(self) ‑> bool

is_vftable(self) -> bool

def is_zero_const(self) ‑> bool

is_zero_const(self) -> bool Check if the expression is a zero.

def maybe_ptr(self) ‑> bool

maybe_ptr(self) -> bool May the expression be a pointer?

def numval(self)

numval(self) -> uint64 Get numeric value of the expression. This function can be called only on cot_num expressions!

def print1(self, func: cfunc_t)

print1(self, func) Print expression into one line.

@param func: (C++: const cfunc_t *) parent function. This argument is used to find out the referenced variable names.

def put_number(self, *args)

put_number(self, func, value, nbytes, sign=no_sign) Assign a number to the expression.

@param func: (C++: cfunc_t *) current function @param value: (C++: uint64) number value @param nbytes: (C++: int) size of the number in bytes @param sign: (C++: type_sign_t) number sign

def requires_lvalue(self, child: cexpr_t) ‑> bool

requires_lvalue(self, child) -> bool Check if the expression requires an lvalue.

@param child: (C++: const cexpr_t *) The function will check if this child of our expression must be an lvalue. @return: true if child must be an lvalue.

def set_cpadone(self)

set_cpadone(self)

def set_v(self, v: var_ref_t)

set_v(self, v)

@param v: var_ref_t const *

def set_vftable(self)

set_vftable(self)

def swap(self, r: cexpr_t)

swap(self, r)

@param r: cexpr_t &

def theother(self, *args)

theother(self, what) -> cexpr_t

@param what: cexpr_t const *

Inherited members

class cfor_t

Proxy of C++ cfor_t class.

init(self) -> cfor_t

Ancestors

Instance variables

var init : cexpr_t

Initialization expression.

var step : cexpr_t

Step expression.

Methods

def compare(self, r: cfor_t) ‑> int

compare(self, r) -> int

@param r: cfor_t const &

Inherited members

class cfunc_parentee_t (f: cfunc_t, post: bool = False)

Proxy of C++ cfunc_parentee_t class.

init(self, f, post=False) -> cfunc_parentee_t

@param f: cfunc_t * @param post: bool

Ancestors

Instance variables

var func : cfunc_t *

Pointer to current function.

Methods

def calc_rvalue_type(self, target: tinfo_t, e: cexpr_t)

calc_rvalue_type(self, target, e) -> bool Calculate rvalue type. This function tries to determine the type of the specified item based on its context. For example, if the current expression is the right side of an assignment operator, the type of its left side will be returned. This function can be used to determine the 'best' type of the specified expression.

@param target: (C++: tinfo_t ) 'best' type of the expression will be returned here @param e: (C++: const cexpr_t ) expression to determine the desired type @return: false if failed

Inherited members

class cfunc_t (*args, **kwargs)

Proxy of C++ cfunc_t class.

Instance variables

var argidx : intvec_t &

list of arguments (indexes into vars)

var arguments
var body : cinsn_t

function body, must be a block

var boundaries : boundaries_t &

get_boundaries(self) -> boundaries_t Get pointer to map of instruction boundaries. This function initializes the boundary map if not done yet.

var eamap : eamap_t &

get_eamap(self) -> eamap_t Get pointer to ea->insn map. This function initializes eamap if not done yet.

var entry_ea : ea_t

function entry address

var hdrlines : int

number of lines in the declaration area

var lvars : lvars_t *

get_lvars(self) -> lvars_t Get vector of local variables.

@return: pointer to the vector of local variables. If you modify this vector, the ctree must be regenerated in order to have correct cast operators. Use build_c_tree() for that. Removing lvars should be done carefully: all references in ctree and microcode must be corrected after that.

var maturity : ctree_maturity_t

maturity level

var mba : mba_t *

underlying microcode

var numforms : user_numforms_t *

user-defined number formats.

var pseudocode : strvec_t const &

get_pseudocode(self) -> strvec_t Get pointer to decompilation output: the pseudocode. This function generates pseudocode if not done yet.

var refcnt : int

reference count to this object. use cfuncptr_t

var statebits : int

current cfunc_t state. see cfunc state bits

var thisown

The membership flag

var treeitems : citem_pointers_t

vector of pointers to citem_t objects (nodes constituting the ctree)

var type

Get the function's return type tinfo_t object.

var user_cmts : user_cmts_t *

user-defined comments.

var user_iflags : user_iflags_t *

user-defined item flags ctree item iflags bits

var user_labels : user_labels_t *

user-defined labels.

var user_unions : user_unions_t *

user-defined union field selections.

var warnings : hexwarns_t &

get_warnings(self) -> hexwarns_t Get information about decompilation warnings.

@return: reference to the vector of warnings

Methods

def build_c_tree(self)

build_c_tree(self) Generate the function body. This function (re)generates the function body from the underlying microcode.

def del_orphan_cmts(self) ‑> int

del_orphan_cmts(self) -> int Delete all orphan comments. The save_user_cmts() function must be called after this call.

def find_item_coords(self, *args)

find_item_coords(self, item, px, py) -> bool

@param item: citem_t const * @param px: int * @param py: int *

find_item_coords(self, item) -> PyObject *

@param item: citem_t const *

def find_label(self, label: int)

find_label(self, label) -> citem_t Find the label.

@param label: (C++: int) @return: pointer to the ctree item with the specified label number.

def gather_derefs(self, ci: ctree_item_t, udm: udt_type_data_t = None)

gather_derefs(self, ci, udm=None) -> bool

@param ci: ctree_item_t const & @param udm: udt_type_data_t *

def get_boundaries(self)

get_boundaries(self) -> boundaries_t Get pointer to map of instruction boundaries. This function initializes the boundary map if not done yet.

def get_eamap(self)

get_eamap(self) -> eamap_t Get pointer to ea->insn map. This function initializes eamap if not done yet.

def get_func_type(self, type: tinfo_t)

get_func_type(self, type) -> bool Get the function type.

@param type: (C++: tinfo_t *) variable where the function type is returned @return: false if failure

def get_line_item(self, line: char const *, x: int, is_ctree_line: bool, phead: ctree_item_t, pitem: ctree_item_t, ptail: ctree_item_t)

get_line_item(self, line, x, is_ctree_line, phead, pitem, ptail) -> bool Get ctree item for the specified cursor position.

@param line: (C++: const char ) line of decompilation text (element of sv) @param x: (C++: int) x cursor coordinate in the line @param is_ctree_line: (C++: bool) does the line belong to statement area? (if not, it is assumed to belong to the declaration area) @param phead: (C++: ctree_item_t ) ptr to the first item on the line (used to attach block comments). May be nullptr @param pitem: (C++: ctree_item_t ) ptr to the current item. May be nullptr @param ptail: (C++: ctree_item_t ) ptr to the last item on the line (used to attach indented comments). May be nullptr @see: vdui_t::get_current_item() @return: false if failed to get the current item

def get_lvars(self)

get_lvars(self) -> lvars_t Get vector of local variables.

@return: pointer to the vector of local variables. If you modify this vector, the ctree must be regenerated in order to have correct cast operators. Use build_c_tree() for that. Removing lvars should be done carefully: all references in ctree and microcode must be corrected after that.

def get_pseudocode(self)

get_pseudocode(self) -> strvec_t Get pointer to decompilation output: the pseudocode. This function generates pseudocode if not done yet.

def get_stkoff_delta(self)

get_stkoff_delta(self) -> sval_t Get stack offset delta. The local variable stack offsets retrieved by v.location.stkoff() should be adjusted before being used as stack frame offsets in IDA.

@return: the delta to apply. example: ida_stkoff = v.location.stkoff() - f->get_stkoff_delta()

def get_user_cmt(self, loc: treeloc_t, rt: cmt_retrieval_type_t)

get_user_cmt(self, loc, rt) -> char const * Retrieve a user defined comment.

@param loc: (C++: const treeloc_t &) ctree location @param rt: (C++: cmt_retrieval_type_t) should already retrieved comments retrieved again? @return: pointer to the comment string or nullptr

def get_user_iflags(self, loc: citem_locator_t)

get_user_iflags(self, loc) -> int32 Retrieve citem iflags.

@param loc: (C++: const citem_locator_t &) citem locator @return: ctree item iflags bits or 0

def get_user_union_selection(self, ea: ea_t, path: intvec_t)

get_user_union_selection(self, ea, path) -> bool Retrieve a user defined union field selection.

@param ea: (C++: ea_t) address @param path: (C++: intvec_t *) out: path describing the union selection. @return: pointer to the path or nullptr

def get_warnings(self)

get_warnings(self) -> hexwarns_t Get information about decompilation warnings.

@return: reference to the vector of warnings

def has_orphan_cmts(self) ‑> bool

has_orphan_cmts(self) -> bool Check if there are orphan comments.

def locked(self) ‑> bool

locked(self) -> bool

def print_dcl(self)

print_dcl(self) Print function prototype.

def print_func(self, vp: vc_printer_t)

print_func(self, vp) Print function text.

@param vp: (C++: vc_printer_t &) printer helper class to receive the generated text.

def refresh_func_ctext(self)

refresh_func_ctext(self) Refresh ctext after a ctree modification. This function informs the decompiler that ctree (body) have been modified and ctext (sv) does not correspond to it anymore. It also refreshes the pseudocode windows if there is any.

def release(self)

release(self)

def remove_unused_labels(self)

remove_unused_labels(self) Remove unused labels. This function checks what labels are really used by the function and removes the unused ones. You must call it after deleting a goto statement.

def save_user_cmts(self)

save_user_cmts(self) Save user-defined comments into the database.

def save_user_iflags(self)

save_user_iflags(self) Save user-defined iflags into the database.

def save_user_labels(self)

save_user_labels(self) Save user-defined labels into the database.

def save_user_numforms(self)

save_user_numforms(self) Save user-defined number formats into the database.

def save_user_unions(self)

save_user_unions(self) Save user-defined union field selections into the database.

def set_user_cmt(self, loc: treeloc_t, cmt: char const *)

set_user_cmt(self, loc, cmt) Set a user defined comment. This function stores the specified comment in the cfunc_t structure. The save_user_cmts() function must be called after it.

@param loc: (C++: const treeloc_t &) ctree location @param cmt: (C++: const char *) new comment. if empty or nullptr, then an existing comment is deleted.

def set_user_iflags(self, loc: citem_locator_t, iflags: int32)

set_user_iflags(self, loc, iflags) Set citem iflags.

@param loc: (C++: const citem_locator_t &) citem locator @param iflags: (C++: int32) new iflags

def set_user_union_selection(self, ea: ea_t, path: intvec_t)

set_user_union_selection(self, ea, path) Set a union field selection. The save_user_unions() function must be called after calling this function.

@param ea: (C++: ea_t) address @param path: (C++: const intvec_t &) in: path describing the union selection.

def verify(self, aul: allow_unused_labels_t, even_without_debugger: bool)

verify(self, aul, even_without_debugger) Verify the ctree. This function verifies the ctree. If the ctree is malformed, an internal error is generated. Use it to verify the ctree after your modifications.

@param aul: (C++: allow_unused_labels_t) Are unused labels acceptable? @param even_without_debugger: (C++: bool) if false and there is no debugger, the verification will be skipped

class cfuncptr_t (*args)

Proxy of C++ qrefcnt_t< cfunc_t > class.

init(self, p) -> cfuncptr_t

@param p: cfunc_t *

init(self, r) -> cfuncptr_t

@param r: qrefcnt_t< cfunc_t > const &

Instance variables

var argidx : intvec_t &

argidx

var arguments
var body : cinsn_t

body

var boundaries
var eamap
var entry_ea : ea_t

entry_ea

var hdrlines : int

hdrlines

var lvars
var maturity : ctree_maturity_t

maturity

var mba : mba_t *

mba

var numforms : user_numforms_t *

numforms

var pseudocode
var refcnt : int

refcnt

var statebits : int

statebits

var thisown

The membership flag

var treeitems : citem_pointers_t

treeitems

var type
var user_cmts : user_cmts_t *

user_cmts

var user_iflags : user_iflags_t *

user_iflags

var user_labels : user_labels_t *

user_labels

var user_unions : user_unions_t *

user_unions

var warnings

Methods

def build_c_tree(self)

build_c_tree(self)

def del_orphan_cmts(self) ‑> int

del_orphan_cmts(self) -> int

def find_item_coords(self, *args)

find_item_coords(self, item, px, py) -> bool

@param item: citem_t const * @param px: int * @param py: int *

find_item_coords(self, item) -> (int, int), bool

@param item: citem_t const *

def find_label(self, label: int)

find_label(self, label) -> citem_t

@param label: int

def gather_derefs(self, ci: ctree_item_t, udm: udt_type_data_t = None)

gather_derefs(self, ci, udm=None) -> bool

@param ci: ctree_item_t const & @param udm: udt_type_data_t *

def get_boundaries(self)

get_boundaries(self) -> boundaries_t

def get_eamap(self)

get_eamap(self) -> eamap_t

def get_func_type(self, type: tinfo_t)

get_func_type(self, type) -> bool

@param type: tinfo_t *

def get_line_item(self, line: char const *, x: int, is_ctree_line: bool, phead: ctree_item_t, pitem: ctree_item_t, ptail: ctree_item_t)

get_line_item(self, line, x, is_ctree_line, phead, pitem, ptail) -> bool

@param line: char const * @param x: int @param is_ctree_line: bool @param phead: ctree_item_t * @param pitem: ctree_item_t * @param ptail: ctree_item_t *

def get_lvars(self)

get_lvars(self) -> lvars_t

def get_pseudocode(self)

get_pseudocode(self) -> strvec_t

def get_stkoff_delta(self)

get_stkoff_delta(self) -> sval_t

def get_user_cmt(self, loc: treeloc_t, rt: cmt_retrieval_type_t)

get_user_cmt(self, loc, rt) -> char const *

@param loc: treeloc_t const & @param rt: enum cmt_retrieval_type_t

def get_user_iflags(self, loc: citem_locator_t)

get_user_iflags(self, loc) -> int32

@param loc: citem_locator_t const &

def get_user_union_selection(self, ea: ea_t, path: intvec_t)

get_user_union_selection(self, ea, path) -> bool

@param ea: ea_t @param path: intvec_t *

def get_warnings(self)

get_warnings(self) -> hexwarns_t

def has_orphan_cmts(self) ‑> bool

has_orphan_cmts(self) -> bool

def locked(self) ‑> bool

locked(self) -> bool

def print_dcl(self)

print_dcl(self)

def print_func(self, vp: vc_printer_t)

print_func(self, vp)

@param vp: vc_printer_t &

def refresh_func_ctext(self)

refresh_func_ctext(self)

def release(self)

release(self)

def remove_unused_labels(self)

remove_unused_labels(self)

def reset(self)

reset(self)

def save_user_cmts(self)

save_user_cmts(self)

def save_user_iflags(self)

save_user_iflags(self)

def save_user_labels(self)

save_user_labels(self)

def save_user_numforms(self)

save_user_numforms(self)

def save_user_unions(self)

save_user_unions(self)

def set_user_cmt(self, loc: treeloc_t, cmt: char const *)

set_user_cmt(self, loc, cmt)

@param loc: treeloc_t const & @param cmt: char const *

def set_user_iflags(self, loc: citem_locator_t, iflags: int32)

set_user_iflags(self, loc, iflags)

@param loc: citem_locator_t const & @param iflags: int32

def set_user_union_selection(self, ea: ea_t, path: intvec_t)

set_user_union_selection(self, ea, path)

@param ea: ea_t @param path: intvec_t const &

def verify(self, aul: allow_unused_labels_t, even_without_debugger: bool)

verify(self, aul, even_without_debugger)

@param aul: enum allow_unused_labels_t @param even_without_debugger: bool

class cgoto_t

Proxy of C++ cgoto_t class.

init(self) -> cgoto_t

Instance variables

var label_num : int

Target label number.

var thisown

The membership flag

Methods

def compare(self, r: cgoto_t) ‑> int

compare(self, r) -> int

@param r: cgoto_t const &

class chain_keeper_t (_gc: graph_chains_t)

Proxy of C++ chain_keeper_t class.

init(self, _gc) -> chain_keeper_t

@param _gc: graph_chains_t *

Instance variables

var thisown

The membership flag

Methods

def back(self)

back(self) -> block_chains_t

def for_all_chains(self, cv: chain_visitor_t, gca: int) ‑> int

for_all_chains(self, cv, gca) -> int

@param cv: chain_visitor_t & @param gca: int

def front(self)

front(self) -> block_chains_t

class chain_t (*args)

Proxy of C++ chain_t class.

init(self) -> chain_t init(self, t, off, w=1, v=-1) -> chain_t

@param t: mopt_t @param off: sval_t @param w: int @param v: int

init(self, _k, w=1) -> chain_t

@param _k: voff_t const & @param w: int

Ancestors

Instance variables

var flags : uchar

combination Chain properties bits

var varnum : int

allocated variable index (-1 - not allocated yet)

var width : int

size of the value in bytes

Methods

def append_list(self, mba: mba_t, list: mlist_t)

append_list(self, mba, list) Append the contents of the chain to the specified list of locations.

@param mba: (C++: const mba_t ) mba_t const * @param list: (C++: mlist_t )

def clear_varnum(self)

clear_varnum(self)

def dstr(self)

dstr(self) -> char const *

def endoff(self)

endoff(self) -> voff_t

def get_reg(self)

get_reg(self) -> mreg_t

def get_stkoff(self)

get_stkoff(self) -> sval_t

def includes(self, r: chain_t) ‑> bool

includes(self, r) -> bool

@param r: chain_t const &

def is_fake(self) ‑> bool

is_fake(self) -> bool

def is_inited(self) ‑> bool

is_inited(self) -> bool

def is_overlapped(self) ‑> bool

is_overlapped(self) -> bool

def is_passreg(self) ‑> bool

is_passreg(self) -> bool

def is_reg(self) ‑> bool

is_reg(self) -> bool

def is_replaced(self) ‑> bool

is_replaced(self) -> bool

def is_stkoff(self) ‑> bool

is_stkoff(self) -> bool

def is_term(self) ‑> bool

is_term(self) -> bool

def key(self)

key(self) -> voff_t

def overlap(self, r: chain_t) ‑> bool

overlap(self, r) -> bool

@param r: chain_t const &

def set_inited(self, b: bool)

set_inited(self, b)

@param b: bool

def set_overlapped(self, b: bool)

set_overlapped(self, b)

@param b: bool

def set_replaced(self, b: bool)

set_replaced(self, b)

@param b: bool

def set_term(self, b: bool)

set_term(self, b)

@param b: bool

def set_value(self, r: chain_t)

set_value(self, r)

@param r: chain_t const &

Inherited members

class chain_visitor_t

Proxy of C++ chain_visitor_t class.

init(self) -> chain_visitor_t

@param self: PyObject *

Instance variables

var parent : block_chains_t *

parent of the current chain

var thisown

The membership flag

Methods

def visit_chain(self, nblock: int, ch: chain_t) ‑> int

visit_chain(self, nblock, ch) -> int

@param nblock: int @param ch: chain_t &

class cif_t (*args)

Proxy of C++ cif_t class.

init(self) -> cif_t init(self, r) -> cif_t

@param r: cif_t const &

Ancestors

Instance variables

var ielse : cinsn_t *

Else-branch of the if-statement. May be nullptr.

var ithen : cinsn_t *

Then-branch of the if-statement.

Methods

def assign(self, r: cif_t)

assign(self, r) -> cif_t

@param r: cif_t const &

def cleanup(self)

cleanup(self)

def compare(self, r: cif_t) ‑> int

compare(self, r) -> int

@param r: cif_t const &

Inherited members

class cinsn_list_t (*args)

Proxy of C++ qlist< cinsn_t > class.

init(self) -> cinsn_list_t init(self, x) -> cinsn_list_t

@param x: qlist< cinsn_t > const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def at(self, index)
def back(self)
def begin(self) ‑> cinsn_list_t_iterator

begin(self) -> cinsn_list_t_iterator

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self) ‑> cinsn_list_t_iterator

end(self) -> cinsn_list_t_iterator

def erase(self, p: cinsn_list_t_iterator)

erase(self, p)

@param p: cinsn_list_t_iterator

def find(self, item)
def front(self)
def index(self, item)
def insert(self, *args) ‑> cinsn_list_t_iterator

insert(self, i, v)

@param i: size_t @param v: cinsn_t const &

insert(self, p, x) -> cinsn_list_t_iterator

@param p: cinsn_list_t_iterator @param x: cinsn_t const &

def pop_back(self)

pop_back(self)

def pop_front(self)

pop_front(self)

def push_back(self, *args)

push_back(self, x)

@param x: cinsn_t const &

push_back(self) -> cinsn_t

def push_front(self, x: cinsn_t)

push_front(self, x)

@param x: cinsn_t const &

def rbegin(self, *args)

rbegin(self) -> qlist< cinsn_t >::reverse_iterator rbegin(self) -> qlist< cinsn_t >::const_reverse_iterator

def remove(self, v: cinsn_t) ‑> bool

remove(self, v) -> bool

@param v: cinsn_t const &

def rend(self, *args)

rend(self) -> qlist< cinsn_t >::reverse_iterator rend(self) -> qlist< cinsn_t >::const_reverse_iterator

def size(self)

size(self) -> size_t

def splice(self, pos: qlist< cinsn_t >::iterator, other: cinsn_list_t, first: qlist< cinsn_t >::iterator, last: qlist< cinsn_t >::iterator)

splice(self, pos, other, first, last)

@param pos: qlist< cinsn_t >::iterator @param other: qlist< cinsn_t > & @param first: qlist< cinsn_t >::iterator @param last: qlist< cinsn_t >::iterator

def swap(self, x: cinsn_list_t)

swap(self, x)

@param x: qlist< cinsn_t > &

class cinsn_list_t_iterator

Proxy of C++ cinsn_list_t_iterator class.

init(self) -> cinsn_list_t_iterator

Instance variables

var cur : cinsn_t const &

cur

var thisown

The membership flag

Methods

def next(self)

next(self)

class cinsn_t (*args)

Proxy of C++ cinsn_t class.

init(self) -> cinsn_t init(self, r) -> cinsn_t

@param r: cinsn_t const &

Ancestors

Subclasses

Class variables

var op_to_typename

Static methods

def insn_is_epilog(insn: cinsn_t) ‑> bool

insn_is_epilog(insn) -> bool

@param insn: cinsn_t const *

Instance variables

var casm

details of asm-statement

var cblock

details of block-statement

var cdo

details of do-statement

var cexpr

details of expression-statement

var cfor

details of for-statement

var cgoto

details of goto-statement

var cif

details of if-statement

var creturn

details of return-statement

var cswitch

details of switch-statement

var cthrow : cthrow_t *

details of throw-statement

var ctry : ctry_t *

details of try-statement

var cwhile

details of while-statement

var details

return the details pointer for the cinsn_t object depending on the value of its op member. this is one of the cblock_t, cif_t, etc. objects.

var opname

Methods

def assign(self, r: cinsn_t)

assign(self, r) -> cinsn_t

@param r: cinsn_t const &

def cleanup(self)

cleanup(self) Cleanup the statement. This function properly deletes all children and sets the item type to cit_empty.

def collect_free_breaks(self, breaks: cinsnptrvec_t) ‑> bool

collect_free_breaks(self, breaks) -> bool Collect free break statements. This function finds all free break statements within the current statement. A break statement is free if it does not have a loop or switch parent that that is also within the current statement.

@param breaks: (C++: cinsnptrvec_t *) pointer to the variable where the vector of all found free break statements is returned. This argument can be nullptr. @return: true if some free break statements have been found

def collect_free_continues(self, continues: cinsnptrvec_t) ‑> bool

collect_free_continues(self, continues) -> bool Collect free continue statements. This function finds all free continue statements within the current statement. A continue statement is free if it does not have a loop parent that that is also within the current statement.

@param continues: (C++: cinsnptrvec_t *) pointer to the variable where the vector of all found free continue statements is returned. This argument can be nullptr. @return: true if some free continue statements have been found

def compare(self, r: cinsn_t) ‑> int

compare(self, r) -> int

@param r: cinsn_t const &

def contains_free_break(self) ‑> bool

contains_free_break(self) -> bool Check if the statement has free break statements.

def contains_free_continue(self) ‑> bool

contains_free_continue(self) -> bool Check if the statement has free continue statements.

def contains_insn(self, type: ctype_t, times: int = 1)

contains_insn(self, type, times=1) -> bool Check if the statement contains a statement of the specified type.

@param type: (C++: ctype_t) statement opcode to look for @param times: (C++: int) how many times TYPE should be present @return: true if the statement has at least TIMES children with opcode == TYPE

def create_if(self, cnd: cexpr_t)

create_if(self, cnd) -> cif_t Create a new if-statement. The current statement must be a block. The new statement will be appended to it.

@param cnd: (C++: cexpr_t *) if condition. It will be deleted after being copied.

def dstr(self)

dstr(self) -> char const *

def is_epilog(self)
def is_ordinary_flow(self) ‑> bool

is_ordinary_flow(self) -> bool Check if the statement passes execution to the next statement.

@return: false if the statement breaks the control flow (like goto, return, etc)

def new_insn(self, insn_ea: ea_t)

new_insn(self, insn_ea) -> cinsn_t Create a new statement. The current statement must be a block. The new statement will be appended to it.

@param insn_ea: (C++: ea_t) statement address

def print1(self, func: cfunc_t)

print1(self, func) Print the statement into one line. Currently this function is not available.

@param func: (C++: const cfunc_t *) parent function. This argument is used to find out the referenced variable names.

def swap(self, r: cinsn_t)

swap(self, r)

@param r: cinsn_t &

def zero(self)

zero(self) Overwrite with zeroes without cleaning memory or deleting children.

Inherited members

class cinsnptrvec_t (*args)

Proxy of C++ qvector< cinsn_t * > class.

init(self) -> cinsnptrvec_t init(self, x) -> cinsnptrvec_t

@param x: qvector< cinsn_t * > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: cinsn_t) ‑> bool

add_unique(self, x) -> bool

@param x: cinsn_t *const &

def append(self, *args)

push_back(self, x)

@param x: cinsn_t *const &

push_back(self) -> cinsn_t *&

def at(self, i: size_t)

getitem(self, i) -> cinsn_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> qvector< cinsn_t * >::iterator begin(self) -> qvector< cinsn_t * >::const_iterator

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> qvector< cinsn_t * >::iterator end(self) -> qvector< cinsn_t * >::const_iterator

def erase(self, *args)

erase(self, it) -> qvector< cinsn_t * >::iterator

@param it: qvector< cinsn_t * >::iterator

erase(self, first, last) -> qvector< cinsn_t * >::iterator

@param first: qvector< cinsn_t * >::iterator @param last: qvector< cinsn_t * >::iterator

def extract(self)

extract(self) -> cinsn_t **

def find(self, *args)

find(self, x) -> qvector< cinsn_t * >::iterator

@param x: cinsn_t *const &

find(self, x) -> qvector< cinsn_t * >::const_iterator

@param x: cinsn_t *const &

def front(self)
def has(self, x: cinsn_t) ‑> bool

has(self, x) -> bool

@param x: cinsn_t *const &

def inject(self, s: cinsn_t **, len: size_t)

inject(self, s, len)

@param s: cinsn_t ** @param len: size_t

def insert(self, it: qvector< cinsn_t * >::iterator, x: cinsn_t)

insert(self, it, x) -> qvector< cinsn_t * >::iterator

@param it: qvector< cinsn_t * >::iterator @param x: cinsn_t *const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: cinsn_t *const &

push_back(self) -> cinsn_t *&

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: cinsn_t *const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: cinsnptrvec_t)

swap(self, r)

@param r: qvector< cinsn_t * > &

def truncate(self)

truncate(self)

class citem_cmt_t (*args)

Proxy of C++ citem_cmt_t class.

init(self) -> citem_cmt_t init(self, s) -> citem_cmt_t

@param s: char const *

Instance variables

var thisown

The membership flag

var used : bool

the comment has been retrieved?

Methods

def c_str(self)

c_str(self) -> char const *

class citem_locator_t (*args)

Proxy of C++ citem_locator_t class.

init(self, _ea, _op) -> citem_locator_t

@param _ea: ea_t @param _op: enum ctype_t

init(self, i) -> citem_locator_t

@param i: citem_t const *

Instance variables

var ea : ea_t

citem address

var op : ctype_t

citem operation

var thisown

The membership flag

Methods

def compare(self, r: citem_locator_t) ‑> int

compare(self, r) -> int

@param r: citem_locator_t const &

class citem_t (o: ctype_t = 0)

Proxy of C++ citem_t class.

init(self, o=cot_empty) -> citem_t

@param o: enum ctype_t

Subclasses

Instance variables

var cexpr : cexpr_t *const

cexpr

var cinsn : cinsn_t *const

cinsn

var ea : ea_t

address that corresponds to the item. may be BADADDR

var index : int

an index in cfunc_t::treeitems. meaningful only after print_func()

var label_num : int

label number. -1 means no label. items of the expression types (cot_…) should not have labels at the final maturity level, but at the intermediate levels any ctree item may have a label. Labels must be unique. Usually they correspond to the basic block numbers.

var meminfo
var obj_id : PyObject *

_obj_id(self) -> PyObject *

var op : ctype_t

item type

var thisown

The membership flag

var to_specific_type

cast the citem_t object to its more specific type, either cexpr_t or cinsn_t.

Methods

def contains_expr(self, e: cexpr_t) ‑> bool

contains_expr(self, e) -> bool Does the item contain an expression?

@param e: (C++: const cexpr_t *) cexpr_t const *

def contains_label(self) ‑> bool

contains_label(self) -> bool Does the item contain a label?

def find_closest_addr(self, _ea: ea_t)

find_closest_addr(self, _ea) -> citem_t

@param _ea: ea_t

def find_parent_of(self, *args)

find_parent_of(self, sitem) -> citem_t

@param sitem: citem_t const *

find_parent_of(self, item) -> citem_t

@param item: citem_t const *

def is_expr(self) ‑> bool

is_expr(self) -> bool Is an expression?

def print1(self, func: cfunc_t)

print1(self, func) Print item into one line.

@param func: (C++: const cfunc_t *) parent function. This argument is used to find out the referenced variable names. @return: length of the generated text.

def replace_by(self, o)
def swap(self, r: citem_t)

swap(self, r) Swap two citem_t.

@param r: (C++: citem_t &)

class cloop_t (*args)

Proxy of C++ cloop_t class.

init(self, b=None) -> cloop_t

@param b: cinsn_t *

init(self, r) -> cloop_t

@param r: cloop_t const &

Ancestors

Subclasses

Instance variables

var body : cinsn_t *

body

Methods

def assign(self, r: cloop_t)

assign(self, r) -> cloop_t

@param r: cloop_t const &

def cleanup(self)

cleanup(self)

Inherited members

class cnumber_t

Proxy of C++ cnumber_t class.

init(self, _opnum=0) -> cnumber_t

@param _opnum: int

Instance variables

var nf : number_format_t

how to represent it

var thisown

The membership flag

Methods

def assign(self, v: uint64, nbytes: int, sign: type_sign_t)

assign(self, v, nbytes, sign) Assign new value

@param v: (C++: uint64) new value @param nbytes: (C++: int) size of the new value in bytes @param sign: (C++: type_sign_t) sign of the value

def compare(self, r: cnumber_t) ‑> int

compare(self, r) -> int

@param r: cnumber_t const &

def value(self, type: tinfo_t)

value(self, type) -> uint64 Get value. This function will properly extend the number sign to 64bits depending on the type sign.

@param type: (C++: const tinfo_t &) tinfo_t const &

class codegen_t (*args, **kwargs)

Proxy of C++ codegen_t class.

Instance variables

var ignore_micro : char

ignore_micro

var ii : cdg_insn_iterator_t

ii

var insn : insn_t

insn

var mb : mblock_t *

mb

var mba : mba_t *

mba

var thisown

The membership flag

Methods

def analyze_prolog(self, fc: qflow_chart_t, reachable: bitset_t)

analyze_prolog(self, fc, reachable) -> merror_t Analyze prolog/epilog of the function to decompile. If prolog is found, allocate and fill 'mba->pi' structure.

@param fc: (C++: const class qflow_chart_t &) flow chart @param reachable: (C++: const class bitset_t &) bitmap of reachable blocks @return: error code

def clear(self)

clear(self)

def emit(self, *args)

emit(self, code, width, l, r, d, offsize) -> minsn_t Emit one microinstruction. This variant accepts pointers to operands. It is more difficult to use but permits to create virtually any instruction. Operands may be nullptr when it makes sense.

@param code: (C++: mcode_t) enum mcode_t @param width: int @param l: (C++: const mop_t ) uval_t @param r: (C++: const mop_t ) uval_t @param d: (C++: const mop_t *) uval_t @param offsize: int

emit(self, code, l, r, d) -> minsn_t

@param code: enum mcode_t @param l: mop_t const * @param r: mop_t const * @param d: mop_t const *

def emit_micro_mvm(self, code: mcode_t, dtype: op_dtype_t, l: uval_t, r: uval_t, d: uval_t, offsize: int)

emit_micro_mvm(self, code, dtype, l, r, d, offsize) -> minsn_t Emit one microinstruction. This variant takes a data type not a size.

@param code: (C++: mcode_t) enum mcode_t @param dtype: (C++: op_dtype_t) @param l: (C++: uval_t) @param r: (C++: uval_t) @param d: (C++: uval_t) @param offsize: (C++: int)

def gen_micro(self)

gen_micro(self) -> merror_t Generate microcode for one instruction. The instruction is in INSN

@return: MERR_OK - all ok MERR_BLOCK - all ok, need to switch to new block MERR_BADBLK - delete current block and continue other error codes are fatal

def load_effective_address(self, n: int, flags: int = 0)

load_effective_address(self, n, flags=0) -> mreg_t Generate microcode to calculate the address of a memory operand.

@param n: (C++: int) - number of INSN operand @param flags: (C++: int) - reserved for future use @return: register containing the operand address. mr_none - failed (not a memory operand)

def load_operand(self, opnum: int, flags: int = 0)

load_operand(self, opnum, flags=0) -> mreg_t Generate microcode to load one operand.

@param opnum: (C++: int) number of INSN operand @param flags: (C++: int) reserved for future use @return: register containing the operand.

def microgen_completed(self)

microgen_completed(self) This method is called when the microcode generation is done.

def prepare_gen_micro(self)

prepare_gen_micro(self) -> merror_t Setup internal data to handle new instruction. This method should be called before calling gen_micro(). Usually gen_micro() is called by the decompiler. You have to call this function explicitly only if you yourself call gen_micro(). The instruction is in INSN

@return: MERR_OK - all ok other error codes are fatal

def store_operand(self, n: int, mop: mop_t, flags: int = 0, outins: minsn_t ** = None)

store_operand(self, n, mop, flags=0, outins=None) -> bool Generate microcode to store an operand. In case of success an arbitrary number of instructions can be generated (and even no instruction if the source and target are the same)

@param n: (C++: int) - number of target INSN operand @param mop: (C++: const mop_t &) - operand to be stored @param flags: (C++: int) - reserved for future use @param outins: (C++: minsn_t **) - (OUT) the last generated instruction @return: success

class creturn_t

Proxy of C++ creturn_t class.

init(self) -> creturn_t

Ancestors

Methods

def compare(self, r: creturn_t) ‑> int

compare(self, r) -> int

@param r: creturn_t const &

Inherited members

class cswitch_t

Proxy of C++ cswitch_t class.

init(self) -> cswitch_t

Ancestors

Instance variables

var cases : ccases_t

Switch cases: values and instructions.

var mvnf : cnumber_t

Maximal switch value and number format.

Methods

def compare(self, r: cswitch_t) ‑> int

compare(self, r) -> int

@param r: cswitch_t const &

Inherited members

class ctext_position_t

Proxy of C++ ctext_position_t class.

init(self, _lnnum=-1, _x=0, _y=0) -> ctext_position_t

@param _lnnum: int @param _x: int @param _y: int

Subclasses

Instance variables

var lnnum : int

Line number.

var thisown

The membership flag

var x : int

x coordinate of the cursor within the window

var y : int

y coordinate of the cursor within the window

Methods

def compare(self, r: ctext_position_t) ‑> int

compare(self, r) -> int

@param r: ctext_position_t const &

def in_ctree(self, hdrlines: int) ‑> bool

in_ctree(self, hdrlines) -> bool Is the cursor in the variable/type declaration area?

@param hdrlines: (C++: int) Number of lines of the declaration area

class cthrow_t

Proxy of C++ cthrow_t class.

init(self) -> cthrow_t

Ancestors

Methods

def compare(self, r: cthrow_t) ‑> int

compare(self, r) -> int

@param r: cthrow_t const &

Inherited members

class ctree_anchor_t

Proxy of C++ ctree_anchor_t class.

init(self) -> ctree_anchor_t

Instance variables

var thisown

The membership flag

var value : uval_t

value

Methods

def get_index(self) ‑> int

get_index(self) -> int

def get_itp(self)

get_itp(self) -> item_preciser_t

def is_blkcmt_anchor(self) ‑> bool

is_blkcmt_anchor(self) -> bool

def is_citem_anchor(self) ‑> bool

is_citem_anchor(self) -> bool

def is_itp_anchor(self) ‑> bool

is_itp_anchor(self) -> bool

def is_lvar_anchor(self) ‑> bool

is_lvar_anchor(self) -> bool

def is_valid_anchor(self) ‑> bool

is_valid_anchor(self) -> bool

class ctree_item_t

Proxy of C++ ctree_item_t class.

init(self) -> ctree_item_t

Instance variables

var citype : cursor_item_type_t

Item type.

var e

VDI_EXPR: Expression.

var f

VDI_FUNC: Function.

var i

VDI_EXPR: Statement.

var it
var l

VDI_LVAR: Local variable.

var loc : treeloc_t *const

VDI_TAIL: Line tail.

var thisown

The membership flag

Methods

def dstr(self)

dstr(self) -> char const *

def get_ea(self)

get_ea(self) -> ea_t Get address of the current item. Each ctree item has an address.

@return: BADADDR if failed

def get_edm(self, parent: tinfo_t)

get_edm(self, parent) -> int Get type of an enum member. If the current item is a symbolic constant, this function will return information about it.

@param parent: (C++: tinfo_t *) pointer to buffer for the enum type. @return: member index or -1 if failed

def get_label_num(self, gln_flags: int) ‑> int

get_label_num(self, gln_flags) -> int Get label number of the current item.

@param gln_flags: (C++: int) Combination of get_label_num control bits @return: -1 if failed or no label

def get_lvar(self)

get_lvar(self) -> lvar_t Get pointer to local variable. If the current item is a local variable, this function will return pointer to its definition.

@return: nullptr if failed

def get_udm(self, udm: udm_t = None, parent: tinfo_t = None, p_offset: uint64 * = None)

get_udm(self, udm=None, parent=None, p_offset=None) -> int Get type of a structure field. If the current item is a structure/union field, this function will return information about it.

@param udm: (C++: udm_t ) pointer to buffer for the udt member info. @param parent: (C++: tinfo_t ) pointer to buffer for the struct/union type. @param p_offset: (C++: uint64 *) pointer to the offset in bits inside udt. @return: member index or -1 if failed Both output parameters can be nullptr.

def is_citem(self) ‑> bool

is_citem(self) -> bool Is the current item is a ctree item?

class ctree_items_t (*args)

Proxy of C++ qvector< citem_t * > class.

init(self) -> ctree_items_t init(self, x) -> ctree_items_t

@param x: qvector< citem_t * > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: citem_t) ‑> bool

add_unique(self, x) -> bool

@param x: citem_t *const &

def append(self, *args)

push_back(self, x)

@param x: citem_t *const &

push_back(self) -> citem_t *&

def at(self, i: size_t)

getitem(self, i) -> citem_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> qvector< citem_t * >::iterator begin(self) -> qvector< citem_t * >::const_iterator

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> qvector< citem_t * >::iterator end(self) -> qvector< citem_t * >::const_iterator

def erase(self, *args)

erase(self, it) -> qvector< citem_t * >::iterator

@param it: qvector< citem_t * >::iterator

erase(self, first, last) -> qvector< citem_t * >::iterator

@param first: qvector< citem_t * >::iterator @param last: qvector< citem_t * >::iterator

def extract(self)

extract(self) -> citem_t **

def find(self, *args)

find(self, x) -> qvector< citem_t * >::iterator

@param x: citem_t *const &

find(self, x) -> qvector< citem_t * >::const_iterator

@param x: citem_t *const &

def front(self)
def has(self, x: citem_t) ‑> bool

has(self, x) -> bool

@param x: citem_t *const &

def inject(self, s: citem_t **, len: size_t)

inject(self, s, len)

@param s: citem_t ** @param len: size_t

def insert(self, it: qvector< citem_t * >::iterator, x: citem_t)

insert(self, it, x) -> qvector< citem_t * >::iterator

@param it: qvector< citem_t * >::iterator @param x: citem_t *const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: citem_t *const &

push_back(self) -> citem_t *&

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: citem_t *const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: ctree_items_t)

swap(self, r)

@param r: qvector< citem_t * > &

def truncate(self)

truncate(self)

class ctree_parentee_t (post: bool = False)

Proxy of C++ ctree_parentee_t class.

init(self, post=False) -> ctree_parentee_t

@param post: bool

Ancestors

Subclasses

Methods

def recalc_parent_types(self) ‑> bool

recalc_parent_types(self) -> bool Recalculate type of parent nodes. If a node type has been changed, the visitor must recalculate all parent types, otherwise the ctree becomes inconsistent. If during this recalculation a parent node is added/deleted, this function returns true. In this case the traversal must be stopped because the information about parent nodes is stale.

@return: false-ok to continue the traversal, true-must stop.

Inherited members

class ctree_visitor_t (_flags: int)

Proxy of C++ ctree_visitor_t class.

init(self, _flags) -> ctree_visitor_t

@param _flags: int

Subclasses

Instance variables

var bposvec : cblock_posvec_t

Vector of block positions. Only cit_block and cit_try parents have the corresponding element in this vector.

var cv_flags : int

Ctree visitor property bits

var parents : parents_t

Vector of parents of the current item.

var thisown

The membership flag

Methods

def apply_to(self, item: citem_t, parent: citem_t) ‑> int

apply_to(self, item, parent) -> int Traverse ctree. The traversal will start at the specified item and continue until of one the visit_…() functions return a non-zero value.

@param item: (C++: citem_t ) root of the ctree to traverse @param parent: (C++: citem_t ) parent of the specified item. can be specified as nullptr. @return: 0 or a non-zero value returned by a visit_…() function

def apply_to_exprs(self, item: citem_t, parent: citem_t) ‑> int

apply_to_exprs(self, item, parent) -> int Traverse only expressions. The traversal will start at the specified item and continue until of one the visit_…() functions return a non-zero value.

@param item: (C++: citem_t ) root of the ctree to traverse @param parent: (C++: citem_t ) parent of the specified item. can be specified as nullptr. @return: 0 or a non-zero value returned by a visit_…() function

def clr_prune(self)

clr_prune(self) Do not prune children. This is an internal function, no need to call it.

def clr_restart(self)

clr_restart(self) Do not restart. This is an internal function, no need to call it.

def is_postorder(self) ‑> bool

is_postorder(self) -> bool Should the leave…() functions be called?

def leave_expr(self, arg0: cexpr_t) ‑> int

leave_expr(self, arg0) -> int Visit an expression after having visited its children. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs post-order traserval, i.e. an item is visited after its children.

@param arg0: cexpr_t * @return: 0 to continue the traversal, nonzero to stop.

def leave_insn(self, arg0: cinsn_t) ‑> int

leave_insn(self, arg0) -> int Visit a statement after having visited its children. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs post-order traserval, i.e. an item is visited after its children.

@param arg0: cinsn_t * @return: 0 to continue the traversal, nonzero to stop.

def maintain_parents(self) ‑> bool

maintain_parents(self) -> bool Should the parent information by maintained?

def must_prune(self) ‑> bool

must_prune(self) -> bool Should the traversal skip the children of the current item?

def must_restart(self) ‑> bool

must_restart(self) -> bool Should the traversal restart?

def only_insns(self) ‑> bool

only_insns(self) -> bool Should all expressions be automatically pruned?

def parent_expr(self)

parent_expr(self) -> cexpr_t Get parent of the current item as an expression.

def parent_insn(self)

parent_insn(self) -> cinsn_t Get parent of the current item as a statement.

def prune_now(self)

prune_now(self) Prune children. This function may be called by a visitor() to skip all children of the current item.

def set_restart(self)

set_restart(self) Restart the travesal. Meaningful only in apply_to_exprs()

def visit_expr(self, arg0: cexpr_t) ‑> int

visit_expr(self, arg0) -> int Visit an expression. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children.

@param arg0: cexpr_t * @return: 0 to continue the traversal, nonzero to stop.

def visit_insn(self, arg0: cinsn_t) ‑> int

visit_insn(self, arg0) -> int Visit a statement. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children.

@param arg0: cinsn_t * @return: 0 to continue the traversal, nonzero to stop.

class ctry_t (*args, **kwargs)

Proxy of C++ ctry_t class.

init(self) -> cblock_t

Ancestors

Instance variables

var catchs : ccatchvec_t

"catch all", if present, must be the last element. wind-statements must have "catch all" and nothing else.

var is_wind : bool

Is C++ wind statement? (not part of the C++ language) MSVC generates code like the following to keep track of constructed objects and destroy them upon an exception. Example:

/ an object is constructed at this point * / __wind { / some other code that may throw an exception * / } __unwind { / this code is executed only if there was an exception * / / in the __wind block. normally here we destroy the object * / * / after that the exception is passed to the * / / exception handler, regular control flow is interrupted here. * / } / regular logic continues here, if there were no exceptions * / /* also the object's destructor is called * /

var new_state : size_t

new state number (internal, MSVC related)

var old_state : size_t

old state number (internal, MSVC related)

Methods

def compare(self, r: ctry_t) ‑> int

compare(self, r) -> int

@param r: ctry_t const &

Inherited members

class cwhile_t

Proxy of C++ cwhile_t class.

init(self) -> cwhile_t

Ancestors

Methods

def compare(self, r: cwhile_t) ‑> int

compare(self, r) -> int

@param r: cwhile_t const &

Inherited members

class eamap_iterator_t

Proxy of C++ eamap_iterator_t class.

init(self) -> eamap_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class eamap_t

Proxy of C++ std::map< ea_t,cinsnptrvec_t > class.

init(self) -> eamap_t

Class variables

var keytype

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

>>> int('0b100', base=0)
4
var valuetype

Proxy of C++ qvector< cinsn_t * > class.

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: unsigned long long const &)

at(self, _Keyval) -> cinsnptrvec_t

@param _Keyval: unsigned long long const &

def begin(self, *args)
def clear(self)
def copy(self)
def end(self, *args)
def erase(self, *args)
def find(self, *args)
def first(self, *args)
def get(self, key, default=None)
def has_key(self, key)
def insert(self, *args)
def items(self)
def iteritems(self)
def iterkeys(self)
def itervalues(self)
def keys(self)
def next(self, *args)
def pop(self, key)

Sets the value associated with the provided key.

def popitem(self)

Sets the value associated with the provided key.

def second(self, *args)
def setdefault(self, key, default=None)

Sets the value associated with the provided key.

def size(self, *args)
def values(self)
class fnumber_t

Proxy of C++ fnumber_t class.

init(self) -> fnumber_t

Instance variables

var fnum : fpvalue_t

Internal representation of the number.

var nbytes : int

Original size of the constant in bytes.

var thisown

The membership flag

Methods

def calc_max_exp(self) ‑> int

calc_max_exp(self) -> int

def compare(self, r: fnumber_t) ‑> int

compare(self, r) -> int

@param r: fnumber_t const &

def dereference_const_uint16(self)

dereference_const_uint16(self) -> uint16 const *

def dereference_uint16(self)

dereference_uint16(self) -> uint16 *

def is_nan(self) ‑> bool

is_nan(self) -> bool

class gco_info_t

Proxy of C++ gco_info_t class.

init(self) -> gco_info_t

Instance variables

var flags : int

flags

var name : qstring

register or stkvar name

var regnum : int

if register, the register id

var size : int

operand size

var stkoff : sval_t

if stkvar, stack offset

var thisown

The membership flag

Methods

def append_to_list(self, list: mlist_t, mba: mba_t) ‑> bool

append_to_list(self, list, mba) -> bool Append operand info to LIST. This function converts IDA register number or stack offset to a decompiler list.

@param list: (C++: mlist_t ) list to append to @param mba: (C++: const mba_t ) microcode object

def cvt_to_ivl(self) ‑> vivl_t

cvt_to_ivl(self) -> vivl_t Convert operand info to VIVL. The returned VIVL can be used, for example, in a call of get_valranges().

def is_def(self) ‑> bool

is_def(self) -> bool

def is_reg(self) ‑> bool

is_reg(self) -> bool

def is_use(self) ‑> bool

is_use(self) -> bool

class graph_chains_t

Proxy of C++ graph_chains_t class.

init(self) -> graph_chains_t

Ancestors

Methods

def acquire(self)

acquire(self) Lock the chains.

def for_all_chains(self, cv: chain_visitor_t, gca_flags: int) ‑> int

for_all_chains(self, cv, gca_flags) -> int Visit all chains

@param cv: (C++: chain_visitor_t &) chain visitor @param gca_flags: (C++: int) combination of GCA_ bits

def is_locked(self) ‑> bool

is_locked(self) -> bool Are the chains locked? It is a good idea to lock the chains before using them. This ensures that they won't be recalculated and reallocated during the use. See the chain_keeper_t class for that.

def release(self)

release(self) Unlock the chains.

def swap(self, r: graph_chains_t)

swap(self, r)

@param r: graph_chains_t &

Inherited members

class hexrays_failure_t (*args)

Proxy of C++ hexrays_failure_t class.

init(self) -> hexrays_failure_t init(self, c, ea, buf=None) -> hexrays_failure_t

@param c: enum merror_t @param ea: ea_t @param buf: char const *

init(self, c, ea, buf) -> hexrays_failure_t

@param c: enum merror_t @param ea: ea_t @param buf: qstring const &

Instance variables

var code : merror_t

Microcode error codes

var errea : ea_t

associated address

var str : qstring

string information

var thisown

The membership flag

Methods

def desc(self)

desc(self) -> qstring

class hexwarn_t

Proxy of C++ hexwarn_t class.

init(self) -> hexwarn_t

Instance variables

var ea : ea_t

Address where the warning occurred.

var id : warnid_t

Warning id.

var text : qstring

Fully formatted text of the warning.

var thisown

The membership flag

Methods

def compare(self, r: hexwarn_t) ‑> int

compare(self, r) -> int

@param r: hexwarn_t const &

class hexwarns_t (*args)

Proxy of C++ qvector< hexwarn_t > class.

init(self) -> hexwarns_t init(self, x) -> hexwarns_t

@param x: qvector< hexwarn_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: hexwarn_t) ‑> bool

add_unique(self, x) -> bool

@param x: hexwarn_t const &

def append(self, *args)

push_back(self, x)

@param x: hexwarn_t const &

push_back(self) -> hexwarn_t

def at(self, i: size_t)

getitem(self, i) -> hexwarn_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> hexwarn_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> hexwarn_t

def erase(self, *args)

erase(self, it) -> hexwarn_t

@param it: qvector< hexwarn_t >::iterator

erase(self, first, last) -> hexwarn_t

@param first: qvector< hexwarn_t >::iterator @param last: qvector< hexwarn_t >::iterator

def extract(self)

extract(self) -> hexwarn_t

def find(self, *args)

find(self, x) -> hexwarn_t

@param x: hexwarn_t const &

def front(self)
def grow(self, *args)

grow(self, x=hexwarn_t())

@param x: hexwarn_t const &

def has(self, x: hexwarn_t) ‑> bool

has(self, x) -> bool

@param x: hexwarn_t const &

def inject(self, s: hexwarn_t, len: size_t)

inject(self, s, len)

@param s: hexwarn_t * @param len: size_t

def insert(self, it: hexwarn_t, x: hexwarn_t)

insert(self, it, x) -> hexwarn_t

@param it: qvector< hexwarn_t >::iterator @param x: hexwarn_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: hexwarn_t const &

push_back(self) -> hexwarn_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: hexwarn_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: hexwarns_t)

swap(self, r)

@param r: qvector< hexwarn_t > &

def truncate(self)

truncate(self)

class history_item_t (*args)

Proxy of C++ history_item_t class.

init(self, fea=BADADDR, cea=BADADDR, _lnnum=-1, _x=0, _y=0) -> history_item_t

@param fea: ea_t @param cea: ea_t @param _lnnum: int @param _x: int @param _y: int

init(self, fea, cea, p) -> history_item_t

@param fea: ea_t @param cea: ea_t @param p: ctext_position_t const &

Ancestors

Instance variables

var curr_ea : ea_t

Current address.

var end : ea_t

BADADDR-decompile a function; otherwise end of the range.

var func_ea : ea_t

The entry address of the decompiled function.

Inherited members

class history_t

Proxy of C++ qstack< history_item_t > class.

init(self) -> history_t

Ancestors

Methods

def append(self, *args)

push_back(self, x)

@param x: history_item_t const &

push_back(self) -> history_item_t

def at(self, i: size_t)

getitem(self, i) -> history_item_t

@param i: size_t

def pop(self) ‑> history_item_t

pop(self) -> history_item_t

def push(self, v: history_item_t)

push(self, v)

@param v: history_item_t const &

def top(self, *args)

top(self) -> history_item_t

Inherited members

class iterator (n: int = -1)

Proxy of C++ bitset_t::iterator class.

init(self, n=-1) -> iterator

@param n: int

Instance variables

var thisown

The membership flag

class ivl_t

Proxy of C++ ivl_t class.

init(self, _off=0, _size=0) -> ivl_t

@param _off: uval_t @param _size: uval_t

Ancestors

Methods

def clear(self)

clear(self)

def compare(self, r: ivl_t) ‑> int

compare(self, r) -> int

@param r: ivl_t const &

def contains(self, off2: uval_t)

contains(self, off2) -> bool

@param off2: uval_t

def dstr(self)

dstr(self) -> char const *

def empty(self) ‑> bool

empty(self) -> bool

def extend_to_cover(self, r: ivl_t) ‑> bool

extend_to_cover(self, r) -> bool

@param r: ivl_t const &

def includes(self, ivl: ivl_t) ‑> bool

includes(self, ivl) -> bool

@param ivl: ivl_t const &

def intersect(self, r: ivl_t)

intersect(self, r)

@param r: ivl_t const &

def overlap(self, ivl: ivl_t) ‑> bool

overlap(self, ivl) -> bool

@param ivl: ivl_t const &

Inherited members

class ivl_with_name_t

Proxy of C++ ivl_with_name_t class.

init(self) -> ivl_with_name_t

Instance variables

var ivl : ivl_t

ivl

var part : char const *

part

var thisown

The membership flag

var whole : char const *

whole

class ivlset_t (*args)

Proxy of C++ ivlset_t class.

init(self) -> ivlset_t init(self, ivl) -> ivlset_t

@param ivl: ivl_t const &

Ancestors

Methods

def add(self, *args) ‑> bool

add(self, ivl) -> bool

@param ivl: ivl_t const &

add(self, ea, size) -> bool

@param ea: ea_t @param size: asize_t

add(self, ivs) -> bool

@param ivs: ivlset_t const &

def addmasked(self, ivs: ivlset_t, mask: ivl_t) ‑> bool

addmasked(self, ivs, mask) -> bool

@param ivs: ivlset_t const & @param mask: ivl_t const &

def compare(self, r: ivlset_t) ‑> int

compare(self, r) -> int

@param r: ivlset_t const &

def contains(self, off: uval_t)

contains(self, off) -> bool

@param off: uval_t

def count(self)

count(self) -> asize_t

def dstr(self)

dstr(self) -> char const *

def has_common(self, *args) ‑> bool

has_common(self, ivl, strict=False) -> bool

@param ivl: ivl_t const & @param strict: bool

has_common(self, ivs) -> bool

@param ivs: ivlset_t const &

def includes(self, ivs: ivlset_t) ‑> bool

includes(self, ivs) -> bool

@param ivs: ivlset_t const &

def intersect(self, ivs: ivlset_t) ‑> bool

intersect(self, ivs) -> bool

@param ivs: ivlset_t const &

def sub(self, *args) ‑> bool

sub(self, ivl) -> bool

@param ivl: ivl_t const &

sub(self, ea, size) -> bool

@param ea: ea_t @param size: asize_t

sub(self, ivs) -> bool

@param ivs: ivlset_t const &

Inherited members

class lvar_locator_t (*args)

Proxy of C++ lvar_locator_t class.

init(self) -> lvar_locator_t init(self, loc, ea) -> lvar_locator_t

@param loc: vdloc_t const & @param ea: ea_t

Subclasses

Instance variables

var defea : ea_t

Definition address. Usually, this is the address of the instruction that initializes the variable. In some cases it can be a fictional address.

var location : vdloc_t

Variable location.

var thisown

The membership flag

Methods

def compare(self, r: lvar_locator_t) ‑> int

compare(self, r) -> int

@param r: lvar_locator_t const &

def get_reg1(self)

get_reg1(self) -> mreg_t Get the register number of the variable.

def get_reg2(self)

get_reg2(self) -> mreg_t Get the number of the second register (works only for ALOC_REG2 lvars)

def get_scattered(self, *args)

get_scattered(self) -> scattered_aloc_t

def get_stkoff(self)

get_stkoff(self) -> sval_t Get offset of the varialbe in the stack frame.

@return: a non-negative value for stack variables. The value is an offset from the bottom of the stack frame in terms of vd-offsets. negative values mean error (not a stack variable)

def is_reg1(self) ‑> bool

is_reg1(self) -> bool Is variable located on one register?

def is_reg2(self) ‑> bool

is_reg2(self) -> bool Is variable located on two registers?

def is_reg_var(self) ‑> bool

is_reg_var(self) -> bool Is variable located on register(s)?

def is_scattered(self) ‑> bool

is_scattered(self) -> bool Is variable scattered?

def is_stk_var(self) ‑> bool

is_stk_var(self) -> bool Is variable located on the stack?

class lvar_mapping_iterator_t

Proxy of C++ lvar_mapping_iterator_t class.

init(self) -> lvar_mapping_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class lvar_mapping_t

Proxy of C++ std::map< lvar_locator_t,lvar_locator_t > class.

init(self) -> lvar_mapping_t

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: lvar_locator_t)

at(self, _Keyval) -> lvar_locator_t

@param _Keyval: lvar_locator_t const &

def size(self)

size(self) -> size_t

class lvar_ref_t (*args)

Proxy of C++ lvar_ref_t class.

init(self, m, i, o=0) -> lvar_ref_t

@param m: mba_t * @param i: int @param o: sval_t

init(self, r) -> lvar_ref_t

@param r: lvar_ref_t const &

Instance variables

var idx : int

index into mba->vars

var mba : mba_t *const

Pointer to the parent mba_t object. Since we need to access the 'mba->vars' array in order to retrieve the referenced variable, we keep a pointer to mba_t here. Note: this means this class and consequently mop_t, minsn_t, mblock_t are specific to a mba_t object and cannot migrate between them. fortunately this is not something we need to do. second, lvar_ref_t's appear only after MMAT_LVARS.

var off : sval_t

offset from the beginning of the variable

var thisown

The membership flag

Methods

def compare(self, r: lvar_ref_t) ‑> int

compare(self, r) -> int

@param r: lvar_ref_t const &

def swap(self, r: lvar_ref_t)

swap(self, r)

@param r: lvar_ref_t &

def var(self)

var(self) -> lvar_t Retrieve the referenced variable.

class lvar_saved_info_t

Proxy of C++ lvar_saved_info_t class.

init(self) -> lvar_saved_info_t

Instance variables

var cmt : qstring

Comment.

var flags : int

saved user lvar info property bits

var ll : lvar_locator_t

Variable locator.

var name : qstring

Name.

var size : ssize_t

Type size (if not initialized then -1)

var thisown

The membership flag

var type : tinfo_t

Type.

Methods

def clear_keep(self)

clear_keep(self)

def clr_nomap_lvar(self)

clr_nomap_lvar(self)

def clr_noptr_lvar(self)

clr_noptr_lvar(self)

def clr_split_lvar(self)

clr_split_lvar(self)

def clr_unused_lvar(self)

clr_unused_lvar(self)

def has_info(self) ‑> bool

has_info(self) -> bool

def is_kept(self) ‑> bool

is_kept(self) -> bool

def is_nomap_lvar(self) ‑> bool

is_nomap_lvar(self) -> bool

def is_noptr_lvar(self) ‑> bool

is_noptr_lvar(self) -> bool

def is_split_lvar(self) ‑> bool

is_split_lvar(self) -> bool

def is_unused_lvar(self) ‑> bool

is_unused_lvar(self) -> bool

def set_keep(self)

set_keep(self)

def set_nomap_lvar(self)

set_nomap_lvar(self)

def set_noptr_lvar(self)

set_noptr_lvar(self)

def set_split_lvar(self)

set_split_lvar(self)

def set_unused_lvar(self)

set_unused_lvar(self)

class lvar_saved_infos_t (*args)

Proxy of C++ qvector< lvar_saved_info_t > class.

init(self) -> lvar_saved_infos_t init(self, x) -> lvar_saved_infos_t

@param x: qvector< lvar_saved_info_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: lvar_saved_info_t) ‑> bool

add_unique(self, x) -> bool

@param x: lvar_saved_info_t const &

def append(self, *args)

push_back(self, x)

@param x: lvar_saved_info_t const &

push_back(self) -> lvar_saved_info_t

def at(self, i: size_t)

getitem(self, i) -> lvar_saved_info_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> lvar_saved_info_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> lvar_saved_info_t

def erase(self, *args)

erase(self, it) -> lvar_saved_info_t

@param it: qvector< lvar_saved_info_t >::iterator

erase(self, first, last) -> lvar_saved_info_t

@param first: qvector< lvar_saved_info_t >::iterator @param last: qvector< lvar_saved_info_t >::iterator

def extract(self)

extract(self) -> lvar_saved_info_t

def find(self, *args)

find(self, x) -> lvar_saved_info_t

@param x: lvar_saved_info_t const &

def front(self)
def grow(self, *args)

grow(self, x=lvar_saved_info_t())

@param x: lvar_saved_info_t const &

def has(self, x: lvar_saved_info_t) ‑> bool

has(self, x) -> bool

@param x: lvar_saved_info_t const &

def inject(self, s: lvar_saved_info_t, len: size_t)

inject(self, s, len)

@param s: lvar_saved_info_t * @param len: size_t

def insert(self, it: lvar_saved_info_t, x: lvar_saved_info_t)

insert(self, it, x) -> lvar_saved_info_t

@param it: qvector< lvar_saved_info_t >::iterator @param x: lvar_saved_info_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: lvar_saved_info_t const &

push_back(self) -> lvar_saved_info_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: lvar_saved_info_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: lvar_saved_infos_t)

swap(self, r)

@param r: qvector< lvar_saved_info_t > &

def truncate(self)

truncate(self)

class lvar_t (*args, **kwargs)

Proxy of C++ lvar_t class.

init(self) -> lvar_locator_t init(self, loc, ea) -> lvar_locator_t

@param loc: vdloc_t const & @param ea: ea_t

Ancestors

Instance variables

var cmt : qstring

variable comment string

var defblk : int

first block defining the variable. 0 for args, -1 if unknown

var divisor : uint64

max known divisor of the variable

var has_nice_name : bool

has_nice_name(self) -> bool Does the variable have a nice name?

var has_user_info : bool

has_user_info(self) -> bool Has any user-defined information?

var has_user_name : bool

has_user_name(self) -> bool Has user-defined name?

var has_user_type : bool

has_user_type(self) -> bool Has user-defined type?

var is_arg_var : bool

is_arg_var(self) -> bool Is the function argument?

var is_fake_var : bool

is_fake_var(self) -> bool Is fake return variable?

var is_floating_var : bool

is_floating_var(self) -> bool Used by a fpu insn?

var is_mapdst_var : bool

is_mapdst_var(self) -> bool Other variable(s) map to this var?

var is_overlapped_var : bool

is_overlapped_var(self) -> bool Is overlapped variable?

var is_result_var : bool

is_result_var(self) -> bool Is the function result?

var is_spoiled_var : bool

is_spoiled_var(self) -> bool Is spoiled var? (meaningful only during lvar allocation)

var is_unknown_width : bool

is_unknown_width(self) -> bool Do we know the width of the variable?

var mreg_done : bool

mreg_done(self) -> bool Have corresponding microregs been replaced by references to this variable?

var name : qstring

variable name. use mba_t::set_nice_lvar_name() and mba_t::set_user_lvar_name() to modify it

var tif : tinfo_t

variable type

var typed : bool

typed(self) -> bool Has the variable a type?

var used : bool

used(self) -> bool Is the variable used in the code?

var width : int

variable size in bytes

Methods

def accepts_type(self, t: tinfo_t, may_change_thisarg: bool = False)

accepts_type(self, t, may_change_thisarg=False) -> bool Check if the variable accept the specified type. Some types are forbidden (void, function types, wrong arrays, etc)

@param t: (C++: const tinfo_t &) tinfo_t const & @param may_change_thisarg: (C++: bool)

def append_list(self, mba: mba_t, lst: mlist_t, pad_if_scattered: bool = False)

append_list(self, mba, lst, pad_if_scattered=False) Append local variable to mlist.

@param mba: (C++: const mba_t ) ptr to the current mba_t @param lst: (C++: mlist_t ) list to append to @param pad_if_scattered: (C++: bool) if true, append padding bytes in case of scattered lvar

def clear_used(self)

clear_used(self)

def clr_arg_var(self)

clr_arg_var(self)

def clr_automapped(self)

clr_automapped(self)

def clr_decl_unused(self)

clr_decl_unused(self)

def clr_dummy_arg(self)

clr_dummy_arg(self)

def clr_fake_var(self)

clr_fake_var(self)

def clr_floating_var(self)

clr_floating_var(self)

def clr_mapdst_var(self)

clr_mapdst_var(self)

def clr_mreg_done(self)

clr_mreg_done(self)

def clr_noptr_var(self)

clr_noptr_var(self)

def clr_notarg(self)

clr_notarg(self)

def clr_overlapped_var(self)

clr_overlapped_var(self)

def clr_scattered_arg(self)

clr_scattered_arg(self)

def clr_shared(self)

clr_shared(self)

def clr_split_var(self)

clr_split_var(self)

def clr_spoiled_var(self)

clr_spoiled_var(self)

def clr_thisarg(self)

clr_thisarg(self)

def clr_unknown_width(self)

clr_unknown_width(self)

def clr_used_byref(self)

clr_used_byref(self)

def clr_user_info(self)

clr_user_info(self)

def clr_user_name(self)

clr_user_name(self)

def clr_user_type(self)

clr_user_type(self)

def has_common(self, v: lvar_t) ‑> bool

has_common(self, v) -> bool Do variables overlap?

@param v: (C++: const lvar_t &) lvar_t const &

def has_common_bit(self, loc: vdloc_t, width2: asize_t)

has_common_bit(self, loc, width2) -> bool Does the variable overlap with the specified location?

@param loc: (C++: const vdloc_t &) vdloc_t const & @param width2: (C++: asize_t)

def has_regname(self) ‑> bool

has_regname(self) -> bool Has a register name? (like _RAX)

def in_asm(self) ‑> bool

in_asm(self) -> bool Is variable used in an instruction translated into __asm?

def is_aliasable(self, mba: mba_t) ‑> bool

is_aliasable(self, mba) -> bool Is the variable aliasable?

@param mba: (C++: const mba_t *) ptr to the current mba_t Aliasable variables may be modified indirectly (through a pointer)

def is_automapped(self) ‑> bool

is_automapped(self) -> bool Was the variable automatically mapped to another variable?

def is_decl_unused(self) ‑> bool

is_decl_unused(self) -> bool Was declared as __unused by the user? See CVAR_UNUSED.

def is_dummy_arg(self) ‑> bool

is_dummy_arg(self) -> bool Is a dummy argument (added to fill a hole in the argument list)

def is_noptr_var(self) ‑> bool

is_noptr_var(self) -> bool Variable type should not be a pointer.

def is_notarg(self) ‑> bool

is_notarg(self) -> bool Is a local variable? (local variable cannot be an input argument)

def is_shared(self) ‑> bool

is_shared(self) -> bool Is lvar mapped to several chains.

def is_split_var(self) ‑> bool

is_split_var(self) -> bool Is a split variable?

def is_thisarg(self) ‑> bool

is_thisarg(self) -> bool Is 'this' argument of a C++ member function?

def is_used_byref(self) ‑> bool

is_used_byref(self) -> bool Was the address of the variable taken?

def set_arg_var(self)

set_arg_var(self)

def set_automapped(self)

set_automapped(self)

def set_decl_unused(self)

set_decl_unused(self)

def set_dummy_arg(self)

set_dummy_arg(self)

def set_fake_var(self)

set_fake_var(self)

def set_final_lvar_type(self, t: tinfo_t)

set_final_lvar_type(self, t) Set final variable type.

@param t: (C++: const tinfo_t &) tinfo_t const &

def set_floating_var(self)

set_floating_var(self)

def set_lvar_type(self, t: tinfo_t, may_fail: bool = False)

set_lvar_type(self, t, may_fail=False) -> bool Set variable type Note: this function does not modify the idb, only the lvar instance in the memory. For permanent changes see modify_user_lvars() Also, the variable type is not considered as final by the decompiler and may be modified later by the type derivation. In some cases set_final_var_type() may work better, but it does not do persistent changes to the database neither.

@param t: (C++: const tinfo_t &) new type @param may_fail: (C++: bool) if false and type is bad, interr @return: success

def set_mapdst_var(self)

set_mapdst_var(self)

def set_mreg_done(self)

set_mreg_done(self)

def set_non_typed(self)

set_non_typed(self)

def set_noptr_var(self)

set_noptr_var(self)

def set_notarg(self)

set_notarg(self)

def set_overlapped_var(self)

set_overlapped_var(self)

def set_scattered_arg(self)

set_scattered_arg(self)

def set_shared(self)

set_shared(self)

def set_split_var(self)

set_split_var(self)

def set_spoiled_var(self)

set_spoiled_var(self)

def set_thisarg(self)

set_thisarg(self)

def set_typed(self)

set_typed(self)

def set_unknown_width(self)

set_unknown_width(self)

def set_used(self)

set_used(self)

def set_used_byref(self)

set_used_byref(self)

def set_user_name(self)

set_user_name(self)

def set_user_type(self)

set_user_type(self)

def set_width(self, w: int, svw_flags: int = 0) ‑> bool

set_width(self, w, svw_flags=0) -> bool Change the variable width. We call the variable size 'width', it is represents the number of bytes. This function may change the variable type using set_lvar_type().

@param w: (C++: int) new width @param svw_flags: (C++: int) combination of SVW_… bits @return: success

def type(self, *args)

type(self) -> tinfo_t

def was_scattered_arg(self) ‑> bool

was_scattered_arg(self) -> bool Was lvar transformed from a scattered argument?

Inherited members

class lvar_uservec_t

Proxy of C++ lvar_uservec_t class.

init(self) -> lvar_uservec_t

Instance variables

var lmaps : lvar_mapping_t

Local variable mapping (used for merging variables)

var lvvec : lvar_saved_infos_t

User-specified names, types, comments for lvars. Variables without user- specified info are not present in this vector.

var stkoff_delta : uval_t

Delta to add to IDA stack offset to calculate Hex-Rays stack offsets. Should be set by the caller before calling save_user_lvar_settings();

var thisown

The membership flag

var ulv_flags : int

Various flags. Possible values are from lvar_uservec_t property bits.

Methods

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def find_info(self, vloc: lvar_locator_t)

find_info(self, vloc) -> lvar_saved_info_t find saved user settings for given var

@param vloc: (C++: const lvar_locator_t &) lvar_locator_t const &

def keep_info(self, v: lvar_t)

keep_info(self, v) Preserve user settings for given var.

@param v: (C++: const lvar_t &) lvar_t const &

def swap(self, r: lvar_uservec_t)

swap(self, r)

@param r: lvar_uservec_t &

class lvars_t

Proxy of C++ lvars_t class.

init(self) -> lvars_t

Ancestors

Methods

def find(self, ll: lvar_locator_t)

find(self, ll) -> lvar_t Find a variable at the specified location.

@param ll: (C++: const lvar_locator_t &) variable location @return: pointer to variable or nullptr

def find_input_lvar(self, argloc: vdloc_t, _size: int) ‑> int

find_input_lvar(self, argloc, _size) -> int Find an input variable at the specified location.

@param argloc: (C++: const vdloc_t &) variable location @param _size: (C++: int) variable size in bytes @return: -1 if failed, otherwise an index into 'vars'

def find_input_reg(self, reg: int) ‑> int

find_input_reg(self, reg, _size=1) -> int Find an input register variable.

@param reg: (C++: int) register to find @param _size: (C++: int) variable size in bytes @return: -1 if failed, otherwise an index into 'vars'

def find_lvar(self, location: vdloc_t, width: int, defblk: int = -1) ‑> int

find_lvar(self, location, width, defblk=-1) -> int Find a variable at the specified location.

@param location: (C++: const vdloc_t &) variable location @param width: (C++: int) variable size in bytes @param defblk: (C++: int) definition block of the lvar. -1 means any block @return: -1 if failed, otherwise an index into 'vars'

def find_stkvar(self, spoff: sval_t, width: int)

find_stkvar(self, spoff, width) -> int Find a stack variable at the specified location.

@param spoff: (C++: sval_t) offset from the minimal sp @param width: (C++: int) variable size in bytes @return: -1 if failed, otherwise an index into 'vars'

Inherited members

class mba_range_iterator_t

Proxy of C++ mba_range_iterator_t class.

init(self) -> mba_range_iterator_t

Instance variables

var fii : func_tail_iterator_t

fii

var rii : range_chunk_iterator_t

rii

var thisown

The membership flag

Methods

def chunk(self)

chunk(self) -> range_t

def is_snippet(self) ‑> bool

is_snippet(self) -> bool

def next(self) ‑> bool

next(self) -> bool

def set(self, mbr: mba_ranges_t) ‑> bool

set(self, mbr) -> bool

@param mbr: mba_ranges_t const &

class mba_ranges_t (*args)

Proxy of C++ mba_ranges_t class.

init(self, _pfn=None) -> mba_ranges_t

@param _pfn: func_t *

init(self, r) -> mba_ranges_t

@param r: rangevec_t const &

Instance variables

var pfn : func_t *

function to decompile. if not null, then function mode.

var ranges : rangevec_t

snippet mode: ranges to decompile. function mode: list of outlined ranges

var thisown

The membership flag

Methods

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def is_fragmented(self) ‑> bool

is_fragmented(self) -> bool

def is_snippet(self) ‑> bool

is_snippet(self) -> bool

def start(self)

start(self) -> ea_t

class mba_t (*args, **kwargs)

Proxy of C++ mba_t class.

Static methods

def deserialize(bytes: uchar const *)

deserialize(bytes) -> mba_t Deserialize a byte sequence into mbl array.

@param bytes: (C++: const uchar *) pointer to the beginning of the byte sequence. @return: new mbl array

Instance variables

var aliased_memory : ivlset_t

aliased_memory+restricted_memory=ALLMEM

var argidx : intvec_t

input arguments (indexes into 'vars')

var blocks : mblock_t *

double linked list of blocks

var cc : cm_t

calling convention

var consumed_argregs : rlist_t

registers converted into stack arguments, should not be used as arguments

var entry_ea : ea_t

entry_ea

var error_ea : ea_t

during microcode generation holds ins.ea

var error_strarg : qstring

error_strarg

var final_type : bool

is the function type final? (specified by the user)

var first_epilog_ea : ea_t

first_epilog_ea

var fpd : sval_t

frame pointer delta

var frregs : sval_t

size of saved registers range in the stack frame

var frsize : sval_t

size of local stkvars range in the stack frame

var fti_flags : int

FTI_… constants for the current function.

var fullsize : sval_t

Full stack size including incoming args.

var gotoff_stkvars : ivlset_t

stkvars that hold .got offsets. considered to be unaliasable

var idb_node
var idb_spoiled : reginfovec_t

MBA_SPLINFO && final_type: info in ida format.

var idb_type : tinfo_t

function type as retrieved from the database

var inargoff : sval_t

offset of the first stack argument; after fix_scattered_movs() INARGOFF may be less than STACKSIZE

var label : qstring

name of the function or pattern (colored)

var last_prolog_ea : ea_t

last_prolog_ea

var maturity : mba_maturity_t

current maturity level

var mbr : mba_ranges_t

mbr

var minargref : sval_t

The lowest stack argument location whose address was taken This location and locations above it can be aliased It controls locations >= inargoff-shadow_args

var minstkref : sval_t

The lowest stack location whose address was taken.

var minstkref_ea : ea_t

address with lowest minstkref (for debugging)

var natural : mblock_t **

natural order of blocks

var nodel_memory : mlist_t

global dead elimination may not delete references to this area

var notes : hexwarns_t

notes

var npurged : int

-1 - unknown

var occurred_warns : uchar [32]

occurred_warns

var pfn_flags : int

copy of func_t::flags

var qty : int

number of basic blocks

var reqmat : mba_maturity_t

required maturity level

var restricted_memory : ivlset_t

restricted_memory

var retsize : int

size of return address in the stack frame

var retvaridx : int

index of variable holding the return value -1 means none

var shadow_args : int

size of shadow argument area

var spd_adjust : sval_t

If sp>0, the max positive sp value.

var spoiled_list : mlist_t

MBA_SPLINFO && !final_type: info in vd format.

var stacksize : sval_t

The maximal size of the function stack including bytes allocated for outgoing call arguments (up to retaddr)

var std_ivls : ivl_with_name_t [6]

we treat memory as consisting of 6 parts see memreg_index_t

var thisown

The membership flag

var tmpstk_size : sval_t

size of the temporary stack part (which dynamically changes with push/pops)

var vars : lvars_t

local variables

Methods

def alloc_fict_ea(self, real_ea: ea_t)

alloc_fict_ea(self, real_ea) -> ea_t Allocate a fictional address. This function can be used to allocate a new unique address for a new instruction, if re-using any existing address leads to conflicts. For example, if the last instruction of the function modifies R0 and falls through to the next function, it will be a tail call: LDM R0!, {R4,R7} end of the function start of another function In this case R0 generates two different lvars at the same address: * one modified by LDM * another that represents the return value from the tail call Another example: a third-party plugin makes a copy of an instruction. This may lead to the generation of two variables at the same address. Example 3: fictional addresses can be used for new instructions created while modifying the microcode. This function can be used to allocate a new unique address for a new instruction or a variable. The fictional address is selected from an unallocated address range.

@param real_ea: (C++: ea_t) real instruction address (BADADDR is ok too) @return: a unique fictional address

def alloc_kreg(self, size: size_t, check_size: bool = True)

alloc_kreg(self, size, check_size=True) -> mreg_t Allocate a kernel register.

@param size: (C++: size_t) size of the register in bytes @param check_size: (C++: bool) if true, only the sizes that correspond to a size of a basic type will be accepted. @return: allocated register. mr_none means failure.

def alloc_lvars(self)

alloc_lvars(self) Allocate local variables. Must be called only immediately after optimize_global(), with no modifications to the microcode. Converts registers, stack variables, and similar operands into mop_l. This call will not fail because all necessary checks were performed in optimize_global(). After this call the microcode reaches its final state.

def analyze_calls(self, acflags: int) ‑> int

analyze_calls(self, acflags) -> int Analyze calls and determine calling conventions.

@param acflags: (C++: int) permitted actions that are necessary for successful detection of calling conventions. See Bits for analyze_calls() @return: number of calls. -1 means error.

def arg(self, *args)

arg(self, n) -> lvar_t

@param n: int

def argbase(self)

argbase(self) -> sval_t

def argidx_ok(self) ‑> bool

argidx_ok(self) -> bool

def argidx_sorted(self) ‑> bool

argidx_sorted(self) -> bool

def bad_call_sp_detected(self) ‑> bool

bad_call_sp_detected(self) -> bool

def build_graph(self)

build_graph(self) -> merror_t Build control flow graph. This function may be called only once. It calculates the type of each basic block and the adjacency list. optimize_local() calls this function if necessary. You need to call this function only before MMAT_LOCOPT.

@return: error code

def calc_shins_flags(self) ‑> int

calc_shins_flags(self) -> int

def callinfo_built(self) ‑> bool

callinfo_built(self) -> bool

def chain_varnums_ok(self) ‑> bool

chain_varnums_ok(self) -> bool

def clr_cdtr(self)

clr_cdtr(self)

def clr_mba_flags(self, f: int)

clr_mba_flags(self, f)

@param f: int

def clr_mba_flags2(self, f: int)

clr_mba_flags2(self, f)

@param f: int

def code16_bit_removed(self) ‑> bool

code16_bit_removed(self) -> bool

def common_stkvars_stkargs(self) ‑> bool

common_stkvars_stkargs(self) -> bool

def copy_block(self, blk: mblock_t, new_serial: int, cpblk_flags: int = 3)

copy_block(self, blk, new_serial, cpblk_flags=3) -> mblock_t Make a copy of a block. This function makes a simple copy of the block. It does not fix the predecessor and successor lists, they must be fixed if necessary.

@param blk: (C++: mblock_t *) block to copy @param new_serial: (C++: int) position of the copied block @param cpblk_flags: (C++: int) combination of Batch decompilation bits… bits @return: pointer to the new copy

def create_helper_call(self, ea: ea_t, helper: char const *, rettype: tinfo_t = None, callargs: mcallargs_t = None, out: mop_t = None)

create_helper_call(self, ea, helper, rettype=None, callargs=None, out=None) -> minsn_t Create a call of a helper function.

@param ea: (C++: ea_t) The desired address of the instruction @param helper: (C++: const char ) The helper name @param rettype: (C++: const tinfo_t ) The return type (nullptr or empty type means 'void') @param callargs: (C++: const mcallargs_t ) The helper arguments (nullptr-no arguments) @param out: (C++: const mop_t ) The operand where the call result should be stored. If this argument is not nullptr, "mov helper_call(), out" will be generated. Otherwise "call helper()" will be generated. Note: the size of this operand must be equal to the RETTYPE size @return: pointer to the created instruction or nullptr if error

def deleted_pairs(self) ‑> bool

deleted_pairs(self) -> bool

def display_numaddrs(self) ‑> bool

display_numaddrs(self) -> bool

def display_valnums(self) ‑> bool

display_valnums(self) -> bool

def dump(self)

dump(self) Dump microcode to a file. The file will be created in the directory pointed by IDA_DUMPDIR envvar. Dump will be created only if IDA is run under debugger.

def dump_mba(self, _verify: bool, title: char const *)

dump_mba(self, _verify, title)

@param _verify: bool @param title: char const *

def find_mop(self, ctx: op_parent_info_t, ea: ea_t, is_dest: bool, list: mlist_t)

find_mop(self, ctx, ea, is_dest, list) -> mop_t Find an operand in the microcode. This function tries to find the operand that matches LIST. Any operand that overlaps with LIST is considered as a match.

@param ctx: (C++: op_parent_info_t *) context information for the result @param ea: (C++: ea_t) desired address of the operand. BADADDR means to accept any address. @param is_dest: (C++: bool) search for destination operand? this argument may be ignored if the exact match could not be found @param list: (C++: const mlist_t &) list of locations the correspond to the operand @return: pointer to the operand or nullptr.

def for_all_insns(self, mv: minsn_visitor_t) ‑> int

for_all_insns(self, mv) -> int Visit all instructions. This function visits all instruction and subinstructions.

@param mv: (C++: minsn_visitor_t &) instruction visitor @return: non-zero value returned by mv.visit_mop() or zero

def for_all_ops(self, mv: mop_visitor_t) ‑> int

for_all_ops(self, mv) -> int Visit all operands of all instructions.

@param mv: (C++: mop_visitor_t &) operand visitor @return: non-zero value returned by mv.visit_mop() or zero

def for_all_topinsns(self, mv: minsn_visitor_t) ‑> int

for_all_topinsns(self, mv) -> int Visit all top level instructions.

@param mv: (C++: minsn_visitor_t &) instruction visitor @return: non-zero value returned by mv.visit_mop() or zero

def free_kreg(self, reg: mreg_t, size: size_t)

free_kreg(self, reg, size) Free a kernel register. If wrong arguments are passed, this function will generate an internal error.

@param reg: (C++: mreg_t) a previously allocated kernel register @param size: (C++: size_t) size of the register in bytes

def generated_asserts(self) ‑> bool

generated_asserts(self) -> bool

def get_args_region(self)

get_args_region(self) -> ivl_t

def get_curfunc(self)

get_curfunc(self) -> func_t *

def get_func_output_lists(self, *args)

get_func_output_lists(self, return_regs, spoiled, type, call_ea=BADADDR, tail_call=False) Prepare the lists of registers & memory that are defined/killed by a function

@param return_regs: (C++: mlist_t ) defined regs to return (eax,edx) @param spoiled: (C++: mlist_t ) spoiled regs (flags,ecx,mem) @param type: (C++: const tinfo_t &) the function type @param call_ea: (C++: ea_t) the call insn address (if known) @param tail_call: (C++: bool) is it the tail call?

def get_graph(self)

get_graph(self) -> mbl_graph_t Get control graph. Call build_graph() if you need the graph before MMAT_LOCOPT.

def get_ida_argloc(self, v: lvar_t)

get_ida_argloc(self, v) -> argloc_t

@param v: lvar_t const &

def get_lvars_region(self)

get_lvars_region(self) -> ivl_t

def get_mba_flags(self) ‑> int

get_mba_flags(self) -> int

def get_mba_flags2(self) ‑> int

get_mba_flags2(self) -> int

def get_mblock(self, *args)

get_mblock(self, n) -> mblock_t

@param n: uint

def get_shadow_region(self)

get_shadow_region(self) -> ivl_t

def get_stack_region(self) ‑> ivl_t

get_stack_region(self) -> ivl_t

def get_std_region(self, idx: memreg_index_t)

get_std_region(self, idx) -> ivl_t Get information about various memory regions. We map the stack frame to the global memory, to some unused range.

@param idx: (C++: memreg_index_t) enum memreg_index_t

def graph_insns(self) ‑> bool

graph_insns(self) -> bool

def has_bad_sp(self) ‑> bool

has_bad_sp(self) -> bool

def has_outlines(self) ‑> bool

has_outlines(self) -> bool

def has_over_chains(self) ‑> bool

has_over_chains(self) -> bool

def has_passregs(self) ‑> bool

has_passregs(self) -> bool

def has_stack_retval(self) ‑> bool

has_stack_retval(self) -> bool

def idaloc2vd(self, loc: argloc_t, width: int)

idaloc2vd(self, loc, width) -> vdloc_t

@param loc: argloc_t const & @param width: int

def inline_func(self, cdg: codegen_t, blknum: int, ranges: mba_ranges_t, decomp_flags: int = 0, inline_flags: int = 0)

inline_func(self, cdg, blknum, ranges, decomp_flags=0, inline_flags=0) -> merror_t Inline a range. Currently only functions are supported, not arbitrary ranges. This function may be called only during the initial microcode generation phase.

@param cdg: (C++: codegen_t &) the codegenerator object @param blknum: (C++: int) the block contaning the call/jump instruction to inline @param ranges: (C++: mba_ranges_t &) the set of ranges to inline @param decomp_flags: (C++: int) combination of decompile() flags bits @param inline_flags: (C++: int) combination of inline_func() flags bits @return: error code

def insert_block(self, bblk: int)

insert_block(self, bblk) -> mblock_t Insert a block in the middle of the mbl array. The very first block of microcode must be empty, it is the entry block. The very last block of microcode must be BLT_STOP, it is the exit block. Therefore inserting a new block before the entry point or after the exit block is not a good idea.

@param bblk: (C++: int) the new block will be inserted before BBLK @return: ptr to the new block

def is_cdtr(self) ‑> bool

is_cdtr(self) -> bool

def is_ctr(self) ‑> bool

is_ctr(self) -> bool

def is_dtr(self) ‑> bool

is_dtr(self) -> bool

def is_pattern(self) ‑> bool

is_pattern(self) -> bool

def is_snippet(self) ‑> bool

is_snippet(self) -> bool

def is_stkarg(self, v: lvar_t) ‑> bool

is_stkarg(self, v) -> bool

@param v: lvar_t const &

def is_thunk(self) ‑> bool

is_thunk(self) -> bool

def loaded_gdl(self) ‑> bool

loaded_gdl(self) -> bool

def locate_stkpnt(self, ea: ea_t)

locate_stkpnt(self, ea) -> stkpnt_t const *

@param ea: ea_t

def lvar_names_ok(self) ‑> bool

lvar_names_ok(self) -> bool

def lvars_allocated(self) ‑> bool

lvars_allocated(self) -> bool

def lvars_renamed(self) ‑> bool

lvars_renamed(self) -> bool

def map_fict_ea(self, fict_ea: ea_t)

map_fict_ea(self, fict_ea) -> ea_t Resolve a fictional address. This function provides a reverse of the mapping made by alloc_fict_ea().

@param fict_ea: (C++: ea_t) fictional definition address @return: the real instruction address

def mark_chains_dirty(self)

mark_chains_dirty(self) Mark the microcode use-def chains dirty. Call this function is any inter-block data dependencies got changed because of your modifications to the microcode. Failing to do so may cause an internal error.

def may_refine_rettype(self) ‑> bool

may_refine_rettype(self) -> bool

def merge_blocks(self) ‑> bool

merge_blocks(self) -> bool Merge blocks. This function merges blocks constituting linear flow. It calls remove_empty_and_unreachable_blocks() as well.

@return: true if changed any blocks

def optimize_global(self)

optimize_global(self) -> merror_t Optimize microcode globally. This function applies various optimization methods until we reach the fixed point. After that it preallocates lvars unless reqmat forbids it.

@return: error code

def optimize_local(self, locopt_bits: int) ‑> int

optimize_local(self, locopt_bits) -> int Optimize each basic block locally

@param locopt_bits: (C++: int) combination of Bits for optimize_local() bits @return: number of changes. 0 means nothing changed This function is called by the decompiler, usually there is no need to call it explicitly.

def optimized(self) ‑> bool

optimized(self) -> bool

def precise_defeas(self) ‑> bool

precise_defeas(self) -> bool

def prop_complex(self) ‑> bool

prop_complex(self) -> bool

def propagated_asserts(self) ‑> bool

propagated_asserts(self) -> bool

def really_alloc(self) ‑> bool

really_alloc(self) -> bool

def regargs_is_not_aligned(self) ‑> bool

regargs_is_not_aligned(self) -> bool

def remove_block(self, blk: mblock_t) ‑> bool

remove_block(self, blk) -> bool Delete a block.

@param blk: (C++: mblock_t *) block to delete @return: true if at least one of the other blocks became empty or unreachable

def remove_blocks(self, start_blk: int, end_blk: int) ‑> bool

remove_blocks(self, start_blk, end_blk) -> bool

@param start_blk: int @param end_blk: int

def remove_empty_and_unreachable_blocks(self) ‑> bool

remove_empty_and_unreachable_blocks(self) -> bool Delete all empty and unreachable blocks. Blocks marked with MBL_KEEP won't be deleted.

def returns_fpval(self) ‑> bool

returns_fpval(self) -> bool

def rtype_refined(self) ‑> bool

rtype_refined(self) -> bool

def save_snapshot(self, description: char const *)

save_snapshot(self, description) Create and save microcode snapshot.

@param description: (C++: const char *) char const *

def saverest_done(self) ‑> bool

saverest_done(self) -> bool

def serialize(self)

serialize(self) Serialize mbl array into a sequence of bytes.

def set_lvar_name(self, v: lvar_t, name: char const *, flagbits: int)

set_lvar_name(self, v, name, flagbits) -> bool

@param v: lvar_t & @param name: char const * @param flagbits: int

def set_maturity(self, mat: mba_maturity_t)

set_maturity(self, mat) -> bool Set maturity level.

@param mat: (C++: mba_maturity_t) new maturity level @return: true if it is time to stop analysis Plugins may use this function to skip some parts of the analysis. The maturity level cannot be decreased.

def set_mba_flags(self, f: int)

set_mba_flags(self, f)

@param f: int

def set_mba_flags2(self, f: int)

set_mba_flags2(self, f)

@param f: int

def set_nice_lvar_name(self, v: lvar_t, name: char const *)

set_nice_lvar_name(self, v, name) -> bool

@param v: lvar_t & @param name: char const *

def set_user_lvar_name(self, v: lvar_t, name: char const *)

set_user_lvar_name(self, v, name) -> bool

@param v: lvar_t & @param name: char const *

def short_display(self) ‑> bool

short_display(self) -> bool

def should_beautify(self) ‑> bool

should_beautify(self) -> bool

def show_reduction(self) ‑> bool

show_reduction(self) -> bool

def split_block(self, blk: mblock_t, start_insn: minsn_t)

split_block(self, blk, start_insn) -> mblock_t Split a block: insert a new one after the block, move some instructions to new block

@param blk: (C++: mblock_t ) block to be split @param start_insn: (C++: minsn_t ) all instructions to be moved to new block: starting with this one up to the end @return: ptr to the new block

def stkoff_ida2vd(self, off: sval_t)

stkoff_ida2vd(self, off) -> sval_t

@param off: sval_t

def stkoff_vd2ida(self, off: sval_t)

stkoff_vd2ida(self, off) -> sval_t

@param off: sval_t

def term(self)

term(self)

def use_frame(self) ‑> bool

use_frame(self) -> bool

def use_wingraph32(self) ‑> bool

use_wingraph32(self) -> bool

def valranges_done(self) ‑> bool

valranges_done(self) -> bool

def vd2idaloc(self, *args)

vd2idaloc(self, loc, width, spd) -> argloc_t

@param loc: vdloc_t const & @param width: int @param spd: sval_t

vd2idaloc(self, loc, width) -> argloc_t

@param loc: vdloc_t const & @param width: int

def verify(self, always: bool)

verify(self, always) Verify microcode consistency.

@param always: (C++: bool) if false, the check will be performed only if ida runs under debugger If any inconsistency is discovered, an internal error will be generated. We strongly recommend you to call this function before returing control to the decompiler from your callbacks, in the case if you modified the microcode. If the microcode is inconsistent, this function will generate an internal error. We provide the source code of this function in the plugins/hexrays_sdk/verifier directory for your reference.

def write_to_const_detected(self) ‑> bool

write_to_const_detected(self) -> bool

class mbl_array_t (*args, **kwargs)

Proxy of C++ mba_t class.

Static methods

def deserialize(bytes: uchar const *)

deserialize(bytes) -> mba_t Deserialize a byte sequence into mbl array.

@param bytes: (C++: const uchar *) pointer to the beginning of the byte sequence. @return: new mbl array

Instance variables

var aliased_memory : ivlset_t

aliased_memory+restricted_memory=ALLMEM

var argidx : intvec_t

input arguments (indexes into 'vars')

var blocks : mblock_t *

double linked list of blocks

var cc : cm_t

calling convention

var consumed_argregs : rlist_t

registers converted into stack arguments, should not be used as arguments

var entry_ea : ea_t

entry_ea

var error_ea : ea_t

during microcode generation holds ins.ea

var error_strarg : qstring

error_strarg

var final_type : bool

is the function type final? (specified by the user)

var first_epilog_ea : ea_t

first_epilog_ea

var fpd : sval_t

frame pointer delta

var frregs : sval_t

size of saved registers range in the stack frame

var frsize : sval_t

size of local stkvars range in the stack frame

var fti_flags : int

FTI_… constants for the current function.

var fullsize : sval_t

Full stack size including incoming args.

var gotoff_stkvars : ivlset_t

stkvars that hold .got offsets. considered to be unaliasable

var idb_node
var idb_spoiled : reginfovec_t

MBA_SPLINFO && final_type: info in ida format.

var idb_type : tinfo_t

function type as retrieved from the database

var inargoff : sval_t

offset of the first stack argument; after fix_scattered_movs() INARGOFF may be less than STACKSIZE

var label : qstring

name of the function or pattern (colored)

var last_prolog_ea : ea_t

last_prolog_ea

var maturity : mba_maturity_t

current maturity level

var mbr : mba_ranges_t

mbr

var minargref : sval_t

The lowest stack argument location whose address was taken This location and locations above it can be aliased It controls locations >= inargoff-shadow_args

var minstkref : sval_t

The lowest stack location whose address was taken.

var minstkref_ea : ea_t

address with lowest minstkref (for debugging)

var natural : mblock_t **

natural order of blocks

var nodel_memory : mlist_t

global dead elimination may not delete references to this area

var notes : hexwarns_t

notes

var npurged : int

-1 - unknown

var occurred_warns : uchar [32]

occurred_warns

var pfn_flags : int

copy of func_t::flags

var qty : int

number of basic blocks

var reqmat : mba_maturity_t

required maturity level

var restricted_memory : ivlset_t

restricted_memory

var retsize : int

size of return address in the stack frame

var retvaridx : int

index of variable holding the return value -1 means none

var shadow_args : int

size of shadow argument area

var spd_adjust : sval_t

If sp>0, the max positive sp value.

var spoiled_list : mlist_t

MBA_SPLINFO && !final_type: info in vd format.

var stacksize : sval_t

The maximal size of the function stack including bytes allocated for outgoing call arguments (up to retaddr)

var std_ivls : ivl_with_name_t [6]

we treat memory as consisting of 6 parts see memreg_index_t

var thisown

The membership flag

var tmpstk_size : sval_t

size of the temporary stack part (which dynamically changes with push/pops)

var vars : lvars_t

local variables

Methods

def alloc_fict_ea(self, real_ea: ea_t)

alloc_fict_ea(self, real_ea) -> ea_t Allocate a fictional address. This function can be used to allocate a new unique address for a new instruction, if re-using any existing address leads to conflicts. For example, if the last instruction of the function modifies R0 and falls through to the next function, it will be a tail call: LDM R0!, {R4,R7} end of the function start of another function In this case R0 generates two different lvars at the same address: * one modified by LDM * another that represents the return value from the tail call Another example: a third-party plugin makes a copy of an instruction. This may lead to the generation of two variables at the same address. Example 3: fictional addresses can be used for new instructions created while modifying the microcode. This function can be used to allocate a new unique address for a new instruction or a variable. The fictional address is selected from an unallocated address range.

@param real_ea: (C++: ea_t) real instruction address (BADADDR is ok too) @return: a unique fictional address

def alloc_kreg(self, size: size_t, check_size: bool = True)

alloc_kreg(self, size, check_size=True) -> mreg_t Allocate a kernel register.

@param size: (C++: size_t) size of the register in bytes @param check_size: (C++: bool) if true, only the sizes that correspond to a size of a basic type will be accepted. @return: allocated register. mr_none means failure.

def alloc_lvars(self)

alloc_lvars(self) Allocate local variables. Must be called only immediately after optimize_global(), with no modifications to the microcode. Converts registers, stack variables, and similar operands into mop_l. This call will not fail because all necessary checks were performed in optimize_global(). After this call the microcode reaches its final state.

def analyze_calls(self, acflags: int) ‑> int

analyze_calls(self, acflags) -> int Analyze calls and determine calling conventions.

@param acflags: (C++: int) permitted actions that are necessary for successful detection of calling conventions. See Bits for analyze_calls() @return: number of calls. -1 means error.

def arg(self, *args)

arg(self, n) -> lvar_t

@param n: int

def argbase(self)

argbase(self) -> sval_t

def argidx_ok(self) ‑> bool

argidx_ok(self) -> bool

def argidx_sorted(self) ‑> bool

argidx_sorted(self) -> bool

def bad_call_sp_detected(self) ‑> bool

bad_call_sp_detected(self) -> bool

def build_graph(self)

build_graph(self) -> merror_t Build control flow graph. This function may be called only once. It calculates the type of each basic block and the adjacency list. optimize_local() calls this function if necessary. You need to call this function only before MMAT_LOCOPT.

@return: error code

def calc_shins_flags(self) ‑> int

calc_shins_flags(self) -> int

def callinfo_built(self) ‑> bool

callinfo_built(self) -> bool

def chain_varnums_ok(self) ‑> bool

chain_varnums_ok(self) -> bool

def clr_cdtr(self)

clr_cdtr(self)

def clr_mba_flags(self, f: int)

clr_mba_flags(self, f)

@param f: int

def clr_mba_flags2(self, f: int)

clr_mba_flags2(self, f)

@param f: int

def code16_bit_removed(self) ‑> bool

code16_bit_removed(self) -> bool

def common_stkvars_stkargs(self) ‑> bool

common_stkvars_stkargs(self) -> bool

def copy_block(self, blk: mblock_t, new_serial: int, cpblk_flags: int = 3)

copy_block(self, blk, new_serial, cpblk_flags=3) -> mblock_t Make a copy of a block. This function makes a simple copy of the block. It does not fix the predecessor and successor lists, they must be fixed if necessary.

@param blk: (C++: mblock_t *) block to copy @param new_serial: (C++: int) position of the copied block @param cpblk_flags: (C++: int) combination of Batch decompilation bits… bits @return: pointer to the new copy

def create_helper_call(self, ea: ea_t, helper: char const *, rettype: tinfo_t = None, callargs: mcallargs_t = None, out: mop_t = None)

create_helper_call(self, ea, helper, rettype=None, callargs=None, out=None) -> minsn_t Create a call of a helper function.

@param ea: (C++: ea_t) The desired address of the instruction @param helper: (C++: const char ) The helper name @param rettype: (C++: const tinfo_t ) The return type (nullptr or empty type means 'void') @param callargs: (C++: const mcallargs_t ) The helper arguments (nullptr-no arguments) @param out: (C++: const mop_t ) The operand where the call result should be stored. If this argument is not nullptr, "mov helper_call(), out" will be generated. Otherwise "call helper()" will be generated. Note: the size of this operand must be equal to the RETTYPE size @return: pointer to the created instruction or nullptr if error

def deleted_pairs(self) ‑> bool

deleted_pairs(self) -> bool

def display_numaddrs(self) ‑> bool

display_numaddrs(self) -> bool

def display_valnums(self) ‑> bool

display_valnums(self) -> bool

def dump(self)

dump(self) Dump microcode to a file. The file will be created in the directory pointed by IDA_DUMPDIR envvar. Dump will be created only if IDA is run under debugger.

def dump_mba(self, _verify: bool, title: char const *)

dump_mba(self, _verify, title)

@param _verify: bool @param title: char const *

def find_mop(self, ctx: op_parent_info_t, ea: ea_t, is_dest: bool, list: mlist_t)

find_mop(self, ctx, ea, is_dest, list) -> mop_t Find an operand in the microcode. This function tries to find the operand that matches LIST. Any operand that overlaps with LIST is considered as a match.

@param ctx: (C++: op_parent_info_t *) context information for the result @param ea: (C++: ea_t) desired address of the operand. BADADDR means to accept any address. @param is_dest: (C++: bool) search for destination operand? this argument may be ignored if the exact match could not be found @param list: (C++: const mlist_t &) list of locations the correspond to the operand @return: pointer to the operand or nullptr.

def for_all_insns(self, mv: minsn_visitor_t) ‑> int

for_all_insns(self, mv) -> int Visit all instructions. This function visits all instruction and subinstructions.

@param mv: (C++: minsn_visitor_t &) instruction visitor @return: non-zero value returned by mv.visit_mop() or zero

def for_all_ops(self, mv: mop_visitor_t) ‑> int

for_all_ops(self, mv) -> int Visit all operands of all instructions.

@param mv: (C++: mop_visitor_t &) operand visitor @return: non-zero value returned by mv.visit_mop() or zero

def for_all_topinsns(self, mv: minsn_visitor_t) ‑> int

for_all_topinsns(self, mv) -> int Visit all top level instructions.

@param mv: (C++: minsn_visitor_t &) instruction visitor @return: non-zero value returned by mv.visit_mop() or zero

def free_kreg(self, reg: mreg_t, size: size_t)

free_kreg(self, reg, size) Free a kernel register. If wrong arguments are passed, this function will generate an internal error.

@param reg: (C++: mreg_t) a previously allocated kernel register @param size: (C++: size_t) size of the register in bytes

def generated_asserts(self) ‑> bool

generated_asserts(self) -> bool

def get_args_region(self)

get_args_region(self) -> ivl_t

def get_curfunc(self)

get_curfunc(self) -> func_t *

def get_func_output_lists(self, *args)

get_func_output_lists(self, return_regs, spoiled, type, call_ea=BADADDR, tail_call=False) Prepare the lists of registers & memory that are defined/killed by a function

@param return_regs: (C++: mlist_t ) defined regs to return (eax,edx) @param spoiled: (C++: mlist_t ) spoiled regs (flags,ecx,mem) @param type: (C++: const tinfo_t &) the function type @param call_ea: (C++: ea_t) the call insn address (if known) @param tail_call: (C++: bool) is it the tail call?

def get_graph(self)

get_graph(self) -> mbl_graph_t Get control graph. Call build_graph() if you need the graph before MMAT_LOCOPT.

def get_ida_argloc(self, v: lvar_t)

get_ida_argloc(self, v) -> argloc_t

@param v: lvar_t const &

def get_lvars_region(self)

get_lvars_region(self) -> ivl_t

def get_mba_flags(self) ‑> int

get_mba_flags(self) -> int

def get_mba_flags2(self) ‑> int

get_mba_flags2(self) -> int

def get_mblock(self, *args)

get_mblock(self, n) -> mblock_t

@param n: uint

def get_shadow_region(self)

get_shadow_region(self) -> ivl_t

def get_stack_region(self) ‑> ivl_t

get_stack_region(self) -> ivl_t

def get_std_region(self, idx: memreg_index_t)

get_std_region(self, idx) -> ivl_t Get information about various memory regions. We map the stack frame to the global memory, to some unused range.

@param idx: (C++: memreg_index_t) enum memreg_index_t

def graph_insns(self) ‑> bool

graph_insns(self) -> bool

def has_bad_sp(self) ‑> bool

has_bad_sp(self) -> bool

def has_outlines(self) ‑> bool

has_outlines(self) -> bool

def has_over_chains(self) ‑> bool

has_over_chains(self) -> bool

def has_passregs(self) ‑> bool

has_passregs(self) -> bool

def has_stack_retval(self) ‑> bool

has_stack_retval(self) -> bool

def idaloc2vd(self, loc: argloc_t, width: int)

idaloc2vd(self, loc, width) -> vdloc_t

@param loc: argloc_t const & @param width: int

def inline_func(self, cdg: codegen_t, blknum: int, ranges: mba_ranges_t, decomp_flags: int = 0, inline_flags: int = 0)

inline_func(self, cdg, blknum, ranges, decomp_flags=0, inline_flags=0) -> merror_t Inline a range. Currently only functions are supported, not arbitrary ranges. This function may be called only during the initial microcode generation phase.

@param cdg: (C++: codegen_t &) the codegenerator object @param blknum: (C++: int) the block contaning the call/jump instruction to inline @param ranges: (C++: mba_ranges_t &) the set of ranges to inline @param decomp_flags: (C++: int) combination of decompile() flags bits @param inline_flags: (C++: int) combination of inline_func() flags bits @return: error code

def insert_block(self, bblk: int)

insert_block(self, bblk) -> mblock_t Insert a block in the middle of the mbl array. The very first block of microcode must be empty, it is the entry block. The very last block of microcode must be BLT_STOP, it is the exit block. Therefore inserting a new block before the entry point or after the exit block is not a good idea.

@param bblk: (C++: int) the new block will be inserted before BBLK @return: ptr to the new block

def is_cdtr(self) ‑> bool

is_cdtr(self) -> bool

def is_ctr(self) ‑> bool

is_ctr(self) -> bool

def is_dtr(self) ‑> bool

is_dtr(self) -> bool

def is_pattern(self) ‑> bool

is_pattern(self) -> bool

def is_snippet(self) ‑> bool

is_snippet(self) -> bool

def is_stkarg(self, v: lvar_t) ‑> bool

is_stkarg(self, v) -> bool

@param v: lvar_t const &

def is_thunk(self) ‑> bool

is_thunk(self) -> bool

def loaded_gdl(self) ‑> bool

loaded_gdl(self) -> bool

def locate_stkpnt(self, ea: ea_t)

locate_stkpnt(self, ea) -> stkpnt_t const *

@param ea: ea_t

def lvar_names_ok(self) ‑> bool

lvar_names_ok(self) -> bool

def lvars_allocated(self) ‑> bool

lvars_allocated(self) -> bool

def lvars_renamed(self) ‑> bool

lvars_renamed(self) -> bool

def map_fict_ea(self, fict_ea: ea_t)

map_fict_ea(self, fict_ea) -> ea_t Resolve a fictional address. This function provides a reverse of the mapping made by alloc_fict_ea().

@param fict_ea: (C++: ea_t) fictional definition address @return: the real instruction address

def mark_chains_dirty(self)

mark_chains_dirty(self) Mark the microcode use-def chains dirty. Call this function is any inter-block data dependencies got changed because of your modifications to the microcode. Failing to do so may cause an internal error.

def may_refine_rettype(self) ‑> bool

may_refine_rettype(self) -> bool

def merge_blocks(self) ‑> bool

merge_blocks(self) -> bool Merge blocks. This function merges blocks constituting linear flow. It calls remove_empty_and_unreachable_blocks() as well.

@return: true if changed any blocks

def optimize_global(self)

optimize_global(self) -> merror_t Optimize microcode globally. This function applies various optimization methods until we reach the fixed point. After that it preallocates lvars unless reqmat forbids it.

@return: error code

def optimize_local(self, locopt_bits: int) ‑> int

optimize_local(self, locopt_bits) -> int Optimize each basic block locally

@param locopt_bits: (C++: int) combination of Bits for optimize_local() bits @return: number of changes. 0 means nothing changed This function is called by the decompiler, usually there is no need to call it explicitly.

def optimized(self) ‑> bool

optimized(self) -> bool

def precise_defeas(self) ‑> bool

precise_defeas(self) -> bool

def prop_complex(self) ‑> bool

prop_complex(self) -> bool

def propagated_asserts(self) ‑> bool

propagated_asserts(self) -> bool

def really_alloc(self) ‑> bool

really_alloc(self) -> bool

def regargs_is_not_aligned(self) ‑> bool

regargs_is_not_aligned(self) -> bool

def remove_block(self, blk: mblock_t) ‑> bool

remove_block(self, blk) -> bool Delete a block.

@param blk: (C++: mblock_t *) block to delete @return: true if at least one of the other blocks became empty or unreachable

def remove_blocks(self, start_blk: int, end_blk: int) ‑> bool

remove_blocks(self, start_blk, end_blk) -> bool

@param start_blk: int @param end_blk: int

def remove_empty_and_unreachable_blocks(self) ‑> bool

remove_empty_and_unreachable_blocks(self) -> bool Delete all empty and unreachable blocks. Blocks marked with MBL_KEEP won't be deleted.

def returns_fpval(self) ‑> bool

returns_fpval(self) -> bool

def rtype_refined(self) ‑> bool

rtype_refined(self) -> bool

def save_snapshot(self, description: char const *)

save_snapshot(self, description) Create and save microcode snapshot.

@param description: (C++: const char *) char const *

def saverest_done(self) ‑> bool

saverest_done(self) -> bool

def serialize(self)

serialize(self) Serialize mbl array into a sequence of bytes.

def set_lvar_name(self, v: lvar_t, name: char const *, flagbits: int)

set_lvar_name(self, v, name, flagbits) -> bool

@param v: lvar_t & @param name: char const * @param flagbits: int

def set_maturity(self, mat: mba_maturity_t)

set_maturity(self, mat) -> bool Set maturity level.

@param mat: (C++: mba_maturity_t) new maturity level @return: true if it is time to stop analysis Plugins may use this function to skip some parts of the analysis. The maturity level cannot be decreased.

def set_mba_flags(self, f: int)

set_mba_flags(self, f)

@param f: int

def set_mba_flags2(self, f: int)

set_mba_flags2(self, f)

@param f: int

def set_nice_lvar_name(self, v: lvar_t, name: char const *)

set_nice_lvar_name(self, v, name) -> bool

@param v: lvar_t & @param name: char const *

def set_user_lvar_name(self, v: lvar_t, name: char const *)

set_user_lvar_name(self, v, name) -> bool

@param v: lvar_t & @param name: char const *

def short_display(self) ‑> bool

short_display(self) -> bool

def should_beautify(self) ‑> bool

should_beautify(self) -> bool

def show_reduction(self) ‑> bool

show_reduction(self) -> bool

def split_block(self, blk: mblock_t, start_insn: minsn_t)

split_block(self, blk, start_insn) -> mblock_t Split a block: insert a new one after the block, move some instructions to new block

@param blk: (C++: mblock_t ) block to be split @param start_insn: (C++: minsn_t ) all instructions to be moved to new block: starting with this one up to the end @return: ptr to the new block

def stkoff_ida2vd(self, off: sval_t)

stkoff_ida2vd(self, off) -> sval_t

@param off: sval_t

def stkoff_vd2ida(self, off: sval_t)

stkoff_vd2ida(self, off) -> sval_t

@param off: sval_t

def term(self)

term(self)

def use_frame(self) ‑> bool

use_frame(self) -> bool

def use_wingraph32(self) ‑> bool

use_wingraph32(self) -> bool

def valranges_done(self) ‑> bool

valranges_done(self) -> bool

def vd2idaloc(self, *args)

vd2idaloc(self, loc, width, spd) -> argloc_t

@param loc: vdloc_t const & @param width: int @param spd: sval_t

vd2idaloc(self, loc, width) -> argloc_t

@param loc: vdloc_t const & @param width: int

def verify(self, always: bool)

verify(self, always) Verify microcode consistency.

@param always: (C++: bool) if false, the check will be performed only if ida runs under debugger If any inconsistency is discovered, an internal error will be generated. We strongly recommend you to call this function before returing control to the decompiler from your callbacks, in the case if you modified the microcode. If the microcode is inconsistent, this function will generate an internal error. We provide the source code of this function in the plugins/hexrays_sdk/verifier directory for your reference.

def write_to_const_detected(self) ‑> bool

write_to_const_detected(self) -> bool

class mbl_graph_t (*args, **kwargs)

Proxy of C++ mbl_graph_t class.

init(self) -> gdl_graph_t

@param self: PyObject *

Ancestors

Methods

def get_chain_stamp(self) ‑> int

get_chain_stamp(self) -> int

def get_du(self, gctype: gctype_t)

get_du(self, gctype) -> graph_chains_t Get def-use chains.

@param gctype: (C++: gctype_t) enum gctype_t

def get_mblock(self, n: int)

get_mblock(self, n) -> mblock_t

@param n: int

def get_ud(self, gctype: gctype_t)

get_ud(self, gctype) -> graph_chains_t Get use-def chains.

@param gctype: (C++: gctype_t) enum gctype_t

def is_du_chain_dirty(self, gctype: gctype_t)

is_du_chain_dirty(self, gctype) -> bool Is the def-use chain of the specified kind dirty?

@param gctype: (C++: gctype_t) enum gctype_t

def is_redefined_globally(self, *args) ‑> bool

is_redefined_globally(self, list, b1, b2, m1, m2, maymust=MAY_ACCESS) -> bool Is LIST redefined in the graph?

@param list: (C++: const mlist_t &) mlist_t const & @param b1: (C++: int) @param b2: (C++: int) @param m1: (C++: const minsn_t ) minsn_t const * @param m2: (C++: const minsn_t ) minsn_t const * @param maymust: (C++: maymust_t)

def is_ud_chain_dirty(self, gctype: gctype_t)

is_ud_chain_dirty(self, gctype) -> bool Is the use-def chain of the specified kind dirty?

@param gctype: (C++: gctype_t) enum gctype_t

def is_used_globally(self, *args) ‑> bool

is_used_globally(self, list, b1, b2, m1, m2, maymust=MAY_ACCESS) -> bool Is LIST used in the graph?

@param list: (C++: const mlist_t &) mlist_t const & @param b1: (C++: int) @param b2: (C++: int) @param m1: (C++: const minsn_t ) minsn_t const * @param m2: (C++: const minsn_t ) minsn_t const * @param maymust: (C++: maymust_t)

Inherited members

class mblock_t (*args, **kwargs)

Proxy of C++ mblock_t class.

Instance variables

var dead_at_start : mlist_t

data that is dead at the block entry

var dnu : mlist_t

data that is defined but not used in the block

var end : ea_t

end address note: we cannot rely on start/end addresses very much because instructions are propagated between blocks

var flags : uint32

combination of Basic block properties bits

var head : minsn_t *

pointer to the first instruction of the block

var maxbsp : sval_t

maximal sp value in the block (0…stacksize)

var maybdef : mlist_t

data that may be defined by the block

var maybuse : mlist_t

data that may be used by the block

var mba : mba_t *

the parent micro block array

var minbargref : sval_t

the same for arguments

var minbstkref : sval_t

lowest stack location accessible with indirect addressing (offset from the stack bottom) initially it is 0 (not computed)

var mustbdef : mlist_t

data that must be defined by the block

var mustbuse : mlist_t

data that must be used by the block

var nextb : mblock_t *

next block in the doubly linked list

var predset : intvec_t

control flow graph: list of our predecessors use npred() and pred() to access it

var prevb : mblock_t *

previous block in the doubly linked list

var serial : int

block number

var start : ea_t

start address

var succset : intvec_t

control flow graph: list of our successors use nsucc() and succ() to access it

var tail : minsn_t *

pointer to the last instruction of the block

var thisown

The membership flag

var type : mblock_type_t

block type (BLT_NONE - not computed yet)

Methods

def append_def_list(self, list: mlist_t, op: mop_t, maymust: maymust_t)

append_def_list(self, list, op, maymust) Append def-list of an operand. This function calculates list of locations that may or must be modified by the operand and appends it to LIST.

@param list: (C++: mlist_t *) ptr to the output buffer. we will append to it. @param op: (C++: const mop_t &) operand to calculate the def list of @param maymust: (C++: maymust_t) should we calculate 'may-def' or 'must-def' list? see maymust_t for more details.

def append_use_list(self, *args)

append_use_list(self, list, op, maymust, mask=bitrange_t(0, USHRT_MAX)) Append use-list of an operand. This function calculates list of locations that may or must be used by the operand and appends it to LIST.

@param list: (C++: mlist_t *) ptr to the output buffer. we will append to it. @param op: (C++: const mop_t &) operand to calculate the use list of @param maymust: (C++: maymust_t) should we calculate 'may-use' or 'must-use' list? see maymust_t for more details. @param mask: (C++: bitrange_t) if only part of the operand should be considered, a bitmask can be used to specify which part. example: op=AX,mask=0xFF means that we will consider only AL.

def build_def_list(self, ins: minsn_t, maymust: maymust_t)

build_def_list(self, ins, maymust) -> mlist_t Build def-list of an instruction. This function calculates list of locations that may or must be modified by the instruction. Examples: "stx ebx.4, ds.2, eax.4", may-list: all aliasable memory "stx ebx.4, ds.2, eax.4", must-list: empty Since STX uses EAX for indirect access, it may modify any aliasable memory. On the other hand, we cannot tell for sure which memory cells will be modified, this is why the must-list is empty.

@param ins: (C++: const minsn_t &) instruction to calculate the def list of @param maymust: (C++: maymust_t) should we calculate 'may-def' or 'must-def' list? see maymust_t for more details. @return: the calculated def-list

def build_lists(self, kill_deads: bool) ‑> int

build_lists(self, kill_deads) -> int Build def-use lists and eliminate deads.

@param kill_deads: (C++: bool) do delete dead instructions? @return: the number of eliminated instructions Better mblock_t::call make_lists_ready() rather than this function.

def build_use_list(self, ins: minsn_t, maymust: maymust_t)

build_use_list(self, ins, maymust) -> mlist_t Build use-list of an instruction. This function calculates list of locations that may or must be used by the instruction. Examples: "ldx ds.2, eax.4, ebx.4", may-list: all aliasable memory "ldx ds.2, eax.4, ebx.4", must-list: empty Since LDX uses EAX for indirect access, it may access any aliasable memory. On the other hand, we cannot tell for sure which memory cells will be accessed, this is why the must-list is empty.

@param ins: (C++: const minsn_t &) instruction to calculate the use list of @param maymust: (C++: maymust_t) should we calculate 'may-use' or 'must-use' list? see maymust_t for more details. @return: the calculated use-list

def dump(self)

dump(self) Dump block info. This function is useful for debugging, see mba_t::dump for info

def dump_block(self, title: char const *)

dump_block(self, title)

@param title: char const *

def empty(self) ‑> bool

empty(self) -> bool

def find_access(self, op: mop_t, parent: minsn_t **, mend: minsn_t, fdflags: int)

find_access(self, op, parent, mend, fdflags) -> minsn_t Find the instruction that accesses the specified operand. This function search inside one block.

@param op: (C++: const mop_t &) operand to search for @param parent: (C++: minsn_t ) ptr to ptr to a top level instruction. denotes the beginning of the search range. @param mend: (C++: const minsn_t ) end instruction of the range (must be a top level insn) mend is excluded from the range. it can be specified as nullptr. parent and mend must belong to the same block. @param fdflags: (C++: int) combination of bits for mblock_t::find_access bits @return: the instruction that accesses the operand. this instruction may be a sub-instruction. to find out the top level instruction, check out p_i1. nullptr means 'not found'.

def find_def(self, op: mop_t, p_i1: minsn_t **, i2: minsn_t, fdflags: int)

find_def(self, op, p_i1, i2, fdflags) -> minsn_t

@param op: mop_t const & @param p_i1: minsn_t ** @param i2: minsn_t const * @param fdflags: int

def find_first_use(self, *args)

find_first_use(self, list, i1, i2, maymust=MAY_ACCESS) -> minsn_t

@param list: mlist_t * @param i1: minsn_t * @param i2: minsn_t const * @param maymust: maymust_t

def find_redefinition(self, *args)

find_redefinition(self, list, i1, i2, maymust=MAY_ACCESS) -> minsn_t

@param list: mlist_t const & @param i1: minsn_t * @param i2: minsn_t const * @param maymust: maymust_t

def find_use(self, op: mop_t, p_i1: minsn_t **, i2: minsn_t, fdflags: int)

find_use(self, op, p_i1, i2, fdflags) -> minsn_t

@param op: mop_t const & @param p_i1: minsn_t ** @param i2: minsn_t const * @param fdflags: int

def for_all_insns(self, mv: minsn_visitor_t) ‑> int

for_all_insns(self, mv) -> int Visit all instructions. This function visits subinstructions too.

@param mv: (C++: minsn_visitor_t &) instruction visitor @return: zero or the value returned by mv.visit_insn() See also mba_t::for_all_topinsns()

def for_all_ops(self, mv: mop_visitor_t) ‑> int

for_all_ops(self, mv) -> int Visit all operands. This function visit subinstruction operands too.

@param mv: (C++: mop_visitor_t &) operand visitor @return: zero or the value returned by mv.visit_mop()

def for_all_uses(self, list: mlist_t, i1: minsn_t, i2: minsn_t, mmv: mlist_mop_visitor_t) ‑> int

for_all_uses(self, list, i1, i2, mmv) -> int Visit all operands that use LIST.

@param list: (C++: mlist_t ) ptr to the list of locations. it may be modified: parts that get redefined by the instructions in [i1,i2) will be deleted. @param i1: (C++: minsn_t ) starting instruction. must be a top level insn. @param i2: (C++: minsn_t *) ending instruction (excluded). must be a top level insn. @param mmv: (C++: mlist_mop_visitor_t &) operand visitor @return: zero or the value returned by mmv.visit_mop()

def get_reginsn_qty(self)

get_reginsn_qty(self) -> size_t Calculate number of regular instructions in the block. Assertions are skipped by this function.

@return: Number of non-assertion instructions in the block.

def get_valranges(self, *args) ‑> bool

get_valranges(self, res, vivl, vrflags) -> bool Find possible values for an instruction.

@param res: (C++: valrng_t *) set of value ranges @param vivl: (C++: const vivl_t &) what to search for @param vrflags: (C++: int) combination of bits for get_valranges bits get_valranges(self, res, vivl, m, vrflags) -> bool

@param res: valrng_t * @param vivl: vivl_t const & @param m: minsn_t const * @param vrflags: int

def insert_into_block(self, nm: minsn_t, om: minsn_t)

insert_into_block(self, nm, om) -> minsn_t Insert instruction into the doubly linked list

@param nm: (C++: minsn_t ) new instruction @param om: (C++: minsn_t ) existing instruction, part of the doubly linked list if nullptr, then the instruction will be inserted at the beginning of the list NM will be inserted immediately after OM @return: pointer to NM

def is_branch(self) ‑> bool

is_branch(self) -> bool

def is_call_block(self) ‑> bool

is_call_block(self) -> bool

def is_nway(self) ‑> bool

is_nway(self) -> bool

def is_redefined(self, *args) ‑> bool

is_redefined(self, list, i1, i2, maymust=MAY_ACCESS) -> bool Is the list redefined by the specified instructions?

@param list: (C++: const mlist_t &) list of locations to check. @param i1: (C++: const minsn_t ) starting instruction of the range (must be a top level insn) @param i2: (C++: const minsn_t ) end instruction of the range (must be a top level insn) i2 is excluded from the range. it can be specified as nullptr. i1 and i2 must belong to the same block. @param maymust: (C++: maymust_t) should we search in 'may-access' or 'must-access' mode?

def is_rhs_redefined(self, ins: minsn_t, i1: minsn_t, i2: minsn_t) ‑> bool

is_rhs_redefined(self, ins, i1, i2) -> bool Is the right hand side of the instruction redefined the insn range? "right hand side" corresponds to the source operands of the instruction.

@param ins: (C++: const minsn_t ) instruction to consider @param i1: (C++: const minsn_t ) starting instruction of the range (must be a top level insn) @param i2: (C++: const minsn_t *) end instruction of the range (must be a top level insn) i2 is excluded from the range. it can be specified as nullptr. i1 and i2 must belong to the same block.

def is_simple_goto_block(self) ‑> bool

is_simple_goto_block(self) -> bool

def is_simple_jcnd_block(self) ‑> bool

is_simple_jcnd_block(self) -> bool

def is_unknown_call(self) ‑> bool

is_unknown_call(self) -> bool

def is_used(self, *args) ‑> bool

is_used(self, list, i1, i2, maymust=MAY_ACCESS) -> bool Is the list used by the specified instruction range?

@param list: (C++: mlist_t ) list of locations. LIST may be modified by the function: redefined locations will be removed from it. @param i1: (C++: const minsn_t ) starting instruction of the range (must be a top level insn) @param i2: (C++: const minsn_t *) end instruction of the range (must be a top level insn) i2 is excluded from the range. it can be specified as nullptr. i1 and i2 must belong to the same block. @param maymust: (C++: maymust_t) should we search in 'may-access' or 'must-access' mode?

def lists_dirty(self) ‑> bool

lists_dirty(self) -> bool

def lists_ready(self) ‑> bool

lists_ready(self) -> bool

def make_lists_ready(self) ‑> int

make_lists_ready(self) -> int

def make_nop(self, m: minsn_t)

make_nop(self, m) Erase the instruction (convert it to nop) and mark the lists dirty. This is the recommended function to use because it also marks the block use-def lists dirty.

@param m: (C++: minsn_t *)

def mark_lists_dirty(self)

mark_lists_dirty(self)

def needs_propagation(self) ‑> bool

needs_propagation(self) -> bool

def npred(self) ‑> int

npred(self) -> int Get number of block predecessors.

def nsucc(self) ‑> int

nsucc(self) -> int Get number of block successors.

def optimize_block(self) ‑> int

optimize_block(self) -> int Optimize a basic block. Usually there is no need to call this function explicitly because the decompiler will call it itself if optinsn_t::func or optblock_t::func return non-zero.

@return: number of changes made to the block

def optimize_insn(self, *args) ‑> int

optimize_insn(self, m, optflags=0x0002|0x0004) -> int Optimize one instruction in the context of the block.

@param m: (C++: minsn_t *) pointer to a top level instruction @param optflags: (C++: int) combination of optimization flags bits @return: number of changes made to the block This function may change other instructions in the block too. However, it will not destroy top level instructions (it may convert them to nop's). This function performs only intrablock modifications. See also minsn_t::optimize_solo()

def optimize_useless_jump(self) ‑> int

optimize_useless_jump(self) -> int Remove a jump at the end of the block if it is useless. This function preserves any side effects when removing a useless jump. Both conditional and unconditional jumps are handled (and jtbl too). This function deletes useless jumps, not only replaces them with a nop. (please note that \optimize_insn does not handle useless jumps).

@return: number of changes made to the block

def pred(self, n: int) ‑> int

pred(self, n) -> int

@param n: int

def preds(self)

Iterates the list of predecessor blocks

def remove_from_block(self, m: minsn_t)

remove_from_block(self, m) -> minsn_t Remove instruction from the doubly linked list

@param m: (C++: minsn_t *) instruction to remove The removed instruction is not deleted, the caller gets its ownership @return: pointer to the next instruction

def request_demote64(self)

request_demote64(self)

def request_propagation(self)

request_propagation(self)

def succ(self, n: int) ‑> int

succ(self, n) -> int

@param n: int

def succs(self)

Iterates the list of successor blocks

class mcallarg_t (*args)

Proxy of C++ mcallarg_t class.

init(self) -> mcallarg_t init(self, rarg) -> mcallarg_t

@param rarg: mop_t const &

Ancestors

Instance variables

var argloc : argloc_t

ida argloc

var ea : ea_t

address where the argument was initialized. BADADDR means unknown.

var flags : uint32

FAI_…

var name : qstring

formal argument name

var type : tinfo_t

formal argument type

Methods

def copy_mop(self, op: mop_t)

copy_mop(self, op)

@param op: mop_t const &

def make_int(self, val: int, val_ea: ea_t, opno: int = 0)

make_int(self, val, val_ea, opno=0)

@param val: int @param val_ea: ea_t @param opno: int

def make_uint(self, val: int, val_ea: ea_t, opno: int = 0)

make_uint(self, val, val_ea, opno=0)

@param val: int @param val_ea: ea_t @param opno: int

def set_regarg(self, *args)

set_regarg(self, mr, sz, tif)

@param mr: mreg_t @param sz: int @param tif: tinfo_t const &

set_regarg(self, mr, tif)

@param mr: mreg_t @param tif: tinfo_t const &

set_regarg(self, mr, dt, sign=type_unsigned)

@param mr: mreg_t @param dt: char @param sign: type_sign_t

Inherited members

class mcallargs_t (*args)

Proxy of C++ qvector< mcallarg_t > class.

init(self) -> mcallargs_t init(self, x) -> mcallargs_t

@param x: qvector< mcallarg_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: mcallarg_t) ‑> bool

add_unique(self, x) -> bool

@param x: mcallarg_t const &

def at(self, _idx: size_t)

at(self, _idx) -> mcallarg_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> mcallarg_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> mcallarg_t

def erase(self, *args)

erase(self, it) -> mcallarg_t

@param it: qvector< mcallarg_t >::iterator

erase(self, first, last) -> mcallarg_t

@param first: qvector< mcallarg_t >::iterator @param last: qvector< mcallarg_t >::iterator

def extract(self)

extract(self) -> mcallarg_t

def find(self, *args)

find(self, x) -> mcallarg_t

@param x: mcallarg_t const &

def front(self)
def grow(self, *args)

grow(self, x=mcallarg_t())

@param x: mcallarg_t const &

def has(self, x: mcallarg_t) ‑> bool

has(self, x) -> bool

@param x: mcallarg_t const &

def inject(self, s: mcallarg_t, len: size_t)

inject(self, s, len)

@param s: mcallarg_t * @param len: size_t

def insert(self, it: mcallarg_t, x: mcallarg_t)

insert(self, it, x) -> mcallarg_t

@param it: qvector< mcallarg_t >::iterator @param x: mcallarg_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: mcallarg_t const &

push_back(self) -> mcallarg_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: mcallarg_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: mcallargs_t)

swap(self, r)

@param r: qvector< mcallarg_t > &

def truncate(self)

truncate(self)

class mcallinfo_t (*args)

Proxy of C++ mcallinfo_t class.

init(self, _callee=BADADDR, _sargs=0) -> mcallinfo_t

@param _callee: ea_t @param _sargs: int

Instance variables

var args : mcallargs_t

call arguments

var call_spd : int

sp value at call insn

var callee : ea_t

address of the called function, if known

var cc : cm_t

calling convention

var dead_regs : mlist_t

registers defined by the function but never used. upon propagation we do the following: * dead_regs += return_regs * retregs.clear() since the call is propagated

var flags : int

combination of Call properties… bits

var fti_attrs : type_attrs_t

extended function attributes

var pass_regs : mlist_t

passthrough registers: registers that depend on input values (subset of spoiled)

var retregs : mopvec_t

return register(s) (e.g., AX, AX:DX, etc.) this vector is built from return_regs

var return_argloc : argloc_t

location of the returned value

var return_regs : mlist_t

list of values returned by the function

var return_type : tinfo_t

type of the returned value

var role : funcrole_t

function role

var solid_args : int

number of solid args. there may be variadic args in addtion

var spoiled : mlist_t

list of spoiled locations (includes return_regs)

var stkargs_top : int

first offset past stack arguments

var thisown

The membership flag

var visible_memory : ivlset_t

what memory is visible to the call?

Methods

def dstr(self)

dstr(self) -> char const *

def get_type(self)

get_type(self) -> tinfo_t

def is_vararg(self) ‑> bool

is_vararg(self) -> bool

def lexcompare(self, f: mcallinfo_t) ‑> int

lexcompare(self, f) -> int

@param f: mcallinfo_t const &

def set_type(self, type: tinfo_t)

set_type(self, type) -> bool

@param type: tinfo_t const &

class mcases_t

Proxy of C++ mcases_t class.

init(self) -> mcases_t

Instance variables

var targets : intvec_t

target block numbers

var thisown

The membership flag

var values : casevec_t

expression values for each target

Methods

def compare(self, r: mcases_t) ‑> int

compare(self, r) -> int

@param r: mcases_t const &

def dstr(self)

dstr(self) -> char const *

def empty(self) ‑> bool

empty(self) -> bool

def resize(self, s: int)

resize(self, s)

@param s: int

def size(self)

size(self) -> size_t

def swap(self, r: mcases_t)

swap(self, r)

@param r: mcases_t &

class microcode_filter_t

Proxy of C++ microcode_filter_t class.

init(self) -> microcode_filter_t

@param self: PyObject *

Subclasses

Instance variables

var thisown

The membership flag

Methods

def apply(self, cdg: codegen_t)

apply(self, cdg) -> merror_t generate microcode for an instruction

@param cdg: (C++: codegen_t &) @return: MERR_… code: MERR_OK - user-defined microcode generated, go to the next instruction MERR_INSN - not generated - the caller should try the standard way else - error

def match(self, cdg: codegen_t) ‑> bool

match(self, cdg) -> bool check if the filter object is to be applied

@param cdg: (C++: codegen_t &) @return: success

class minsn_t (*args)

Proxy of C++ minsn_t class.

init(self, _ea) -> minsn_t

@param _ea: ea_t

init(self, m) -> minsn_t

@param m: minsn_t const &

Instance variables

var d : mop_t

destination operand

var ea : ea_t

instruction address

var iprops : int

combination of instruction property bits bits

var l : mop_t

left operand

var meminfo
var next : minsn_t *

next insn in doubly linked list. check also nexti()

var obj_id : PyObject *

_obj_id(self) -> PyObject *

var opcode : mcode_t

instruction opcode

var prev : minsn_t *

prev insn in doubly linked list. check also previ()

var r : mop_t

right operand

var thisown

The membership flag

Methods

def clr_assert(self)

clr_assert(self)

def clr_combinable(self)

clr_combinable(self)

def clr_combined(self)

clr_combined(self)

def clr_fpinsn(self)

clr_fpinsn(self)

def clr_ignlowsrc(self)

clr_ignlowsrc(self)

def clr_multimov(self)

clr_multimov(self)

def clr_noret_icall(self)

clr_noret_icall(self)

def clr_propagatable(self)

clr_propagatable(self)

def clr_tailcall(self)

clr_tailcall(self)

def contains_call(self, with_helpers: bool = False) ‑> bool

contains_call(self, with_helpers=False) -> bool Does the instruction contain a call?

@param with_helpers: (C++: bool)

def contains_opcode(self, mcode: mcode_t)

contains_opcode(self, mcode) -> bool Does the instruction have the specified opcode? This function searches subinstructions as well.

@param mcode: (C++: mcode_t) opcode to search for.

def deserialize(self, bytes: uchar const *, format_version: int)

deserialize(self, bytes, format_version) -> bool Deserialize an instruction

@param bytes: (C++: const uchar *) pointer to serialized data @param format_version: (C++: int) serialization format version. this value is returned by minsn_t::serialize() @return: success

def dstr(self)

dstr(self) -> char const * Get displayable text without tags in a static buffer.

def equal_insns(self, m: minsn_t, eqflags: int) ‑> bool

equal_insns(self, m, eqflags) -> bool Compare instructions. This is the main comparison function for instructions.

@param m: (C++: const minsn_t &) instruction to compare with @param eqflags: (C++: int) combination of comparison bits bits

def find_call(self, with_helpers: bool = False)

find_call(self, with_helpers=False) -> minsn_t Find a call instruction. Check for the current instruction and its subinstructions.

@param with_helpers: (C++: bool) consider helper calls as well?

def find_ins_op(self, op: mcode_t = 0)

find_ins_op(self, op=m_nop) -> minsn_t

@param op: enum mcode_t

def find_num_op(self)

find_num_op(self) -> mop_t

def find_opcode(self, *args)

find_opcode(self, mcode) -> minsn_t

@param mcode: enum mcode_t

def for_all_insns(self, mv: minsn_visitor_t) ‑> int

for_all_insns(self, mv) -> int Visit all instructions. This function visits the instruction itself and all its subinstructions.

@param mv: (C++: minsn_visitor_t &) instruction visitor @return: non-zero value returned by mv.visit_mop() or zero

def for_all_ops(self, mv: mop_visitor_t) ‑> int

for_all_ops(self, mv) -> int Visit all instruction operands. This function visits subinstruction operands as well.

@param mv: (C++: mop_visitor_t &) operand visitor @return: non-zero value returned by mv.visit_mop() or zero

def get_role(self)

get_role(self) -> funcrole_t Get the function role of a call.

def get_split_size(self) ‑> int

get_split_size(self) -> int

def has_side_effects(self, include_ldx_and_divs: bool = False) ‑> bool

has_side_effects(self, include_ldx_and_divs=False) -> bool Does the instruction have a side effect?

@param include_ldx_and_divs: (C++: bool) consider ldx/div/mod as having side effects? stx is always considered as having side effects. Apart from ldx/std only call may have side effects.

def is_after(self, m: minsn_t) ‑> bool

is_after(self, m) -> bool Is the instruction after the specified one?

@param m: (C++: const minsn_t *) the instruction to compare against in the list

def is_alloca(self) ‑> bool

is_alloca(self) -> bool

def is_assert(self) ‑> bool

is_assert(self) -> bool

def is_between(self, m1: minsn_t, m2: minsn_t) ‑> bool

is_between(self, m1, m2) -> bool Is the instruction in the specified range of instructions?

@param m1: (C++: const minsn_t ) beginning of the range in the doubly linked list @param m2: (C++: const minsn_t ) end of the range in the doubly linked list (excluded, may be nullptr) This function assumes that m1 and m2 belong to the same basic block and they are top level instructions.

def is_bswap(self) ‑> bool

is_bswap(self) -> bool

def is_cleaning_pop(self) ‑> bool

is_cleaning_pop(self) -> bool

def is_combinable(self) ‑> bool

is_combinable(self) -> bool

def is_combined(self) ‑> bool

is_combined(self) -> bool

def is_extstx(self) ‑> bool

is_extstx(self) -> bool

def is_farcall(self) ‑> bool

is_farcall(self) -> bool

def is_fpinsn(self) ‑> bool

is_fpinsn(self) -> bool

def is_helper(self, name: char const *)

is_helper(self, name) -> bool Is a helper call with the specified name? Helper calls usually have well-known function names (see Well known function names) but they may have any other name. The decompiler does not assume any special meaning for non-well-known names.

@param name: (C++: const char *) char const *

def is_ignlowsrc(self) ‑> bool

is_ignlowsrc(self) -> bool

def is_inverted_jx(self) ‑> bool

is_inverted_jx(self) -> bool

def is_like_move(self) ‑> bool

is_like_move(self) -> bool

def is_mbarrier(self) ‑> bool

is_mbarrier(self) -> bool

def is_memcpy(self) ‑> bool

is_memcpy(self) -> bool

def is_memset(self) ‑> bool

is_memset(self) -> bool

def is_mov(self) ‑> bool

is_mov(self) -> bool

def is_multimov(self) ‑> bool

is_multimov(self) -> bool

def is_noret_call(self, flags: int = 0) ‑> bool

is_noret_call(self, flags=0) -> bool Is a non-returing call?

@param flags: (C++: int) combination of NORET_… bits

def is_optional(self) ‑> bool

is_optional(self) -> bool

def is_persistent(self) ‑> bool

is_persistent(self) -> bool

def is_propagatable(self) ‑> bool

is_propagatable(self) -> bool

def is_readflags(self) ‑> bool

is_readflags(self) -> bool

def is_tailcall(self) ‑> bool

is_tailcall(self) -> bool

def is_unknown_call(self) ‑> bool

is_unknown_call(self) -> bool Is an unknown call? Unknown calls are calls without the argument list (mcallinfo_t). Usually the argument lists are determined by mba_t::analyze_calls(). Unknown calls exist until the MMAT_CALLS maturity level. See also mblock_t::is_call_block

def is_wild_match(self) ‑> bool

is_wild_match(self) -> bool

def lexcompare(self, ri: minsn_t) ‑> int

lexcompare(self, ri) -> int

@param ri: minsn_t const &

def may_use_aliased_memory(self) ‑> bool

may_use_aliased_memory(self) -> bool Is it possible for the instruction to use aliased memory?

def modifies_d(self) ‑> bool

modifies_d(self) -> bool Does the instruction modify its 'd' operand? Some instructions (e.g. m_stx) do not modify the 'd' operand.

def modifies_pair_mop(self) ‑> bool

modifies_pair_mop(self) -> bool

def optimize_solo(self, optflags: int = 0) ‑> int

optimize_solo(self, optflags=0) -> int Optimize one instruction without context. This function does not have access to the instruction context (the previous and next instructions in the list, the block number, etc). It performs only basic optimizations that are available without this info.

@param optflags: (C++: int) combination of optimization flags bits @return: number of changes, 0-unchanged See also mblock_t::optimize_insn()

def optimize_subtree(self, blk: mblock_t, top: minsn_t, parent: minsn_t, converted_call: ea_t *, optflags: int = 2)

optimize_subtree(self, blk, top, parent, converted_call, optflags=0x0002) -> int Optimize instruction in its context. Do not use this function, use mblock_t::optimize()

@param blk: (C++: mblock_t ) @param top: (C++: minsn_t ) @param parent: (C++: minsn_t ) @param converted_call: (C++: ea_t ) @param optflags: (C++: int)

def replace_by(self, o)
def serialize(self, b: bytevec_t *)

serialize(self, b) -> int Serialize an instruction

@param b: (C++: bytevec_t *) the output buffer @return: the serialization format that was used to store info

def set_assert(self)

set_assert(self)

def set_cleaning_pop(self)

set_cleaning_pop(self)

def set_combinable(self)

set_combinable(self)

def set_extstx(self)

set_extstx(self)

def set_farcall(self)

set_farcall(self)

def set_fpinsn(self)

set_fpinsn(self)

def set_ignlowsrc(self)

set_ignlowsrc(self)

def set_inverted_jx(self)

set_inverted_jx(self)

def set_mbarrier(self)

set_mbarrier(self)

def set_multimov(self)

set_multimov(self)

def set_noret_icall(self)

set_noret_icall(self)

def set_optional(self)

set_optional(self)

def set_persistent(self)

set_persistent(self)

def set_split_size(self, s: int)

set_split_size(self, s)

@param s: int

def set_tailcall(self)

set_tailcall(self)

def set_unmerged(self)

set_unmerged(self)

def set_wild_match(self)

set_wild_match(self)

def setaddr(self, new_ea: ea_t)

setaddr(self, new_ea) Change the instruction address. This function modifies subinstructions as well.

@param new_ea: (C++: ea_t)

def swap(self, m: minsn_t)

swap(self, m) Swap two instructions. The prev/next fields are not modified by this function because it would corrupt the doubly linked list.

@param m: (C++: minsn_t &)

def was_noret_icall(self) ‑> bool

was_noret_icall(self) -> bool

def was_split(self) ‑> bool

was_split(self) -> bool

def was_unmerged(self) ‑> bool

was_unmerged(self) -> bool

def was_unpaired(self) ‑> bool

was_unpaired(self) -> bool

class minsn_visitor_t

Proxy of C++ minsn_visitor_t class.

init(self, _mba=None, _blk=None, _topins=None) -> minsn_visitor_t

@param _mba: mba_t * @param _blk: mblock_t * @param _topins: minsn_t *

Ancestors

Methods

def visit_minsn(self) ‑> int

visit_minsn(self) -> int

Inherited members

class mlist_mop_visitor_t

Proxy of C++ mlist_mop_visitor_t class.

init(self) -> mlist_mop_visitor_t

@param self: PyObject *

Instance variables

var changed : bool

changed

var curins : minsn_t *

curins

var list : mlist_t *

list

var prune : bool

Should skip sub-operands of the current operand? visit_mop() may set 'prune=true' for that.

var thisown

The membership flag

var topins : minsn_t *

topins

Methods

def visit_mop(self, op: mop_t) ‑> int

visit_mop(self, op) -> int

@param op: mop_t *

class mlist_t (*args)

Proxy of C++ mlist_t class.

init(self) -> mlist_t init(self, ivl) -> mlist_t

@param ivl: ivl_t const &

init(self, r, size) -> mlist_t

@param r: mreg_t @param size: int

Instance variables

var mem : ivlset_t

mem

var reg : rlist_t

reg

var thisown

The membership flag

Methods

def add(self, *args) ‑> bool

add(self, r, size) -> bool

@param r: mreg_t @param size: int

add(self, r) -> bool

@param r: rlist_t const &

add(self, ivl) -> bool

@param ivl: ivl_t const &

add(self, lst) -> bool

@param lst: mlist_t const &

def addmem(self, ea: ea_t, size: asize_t)

addmem(self, ea, size) -> bool

@param ea: ea_t @param size: asize_t

def clear(self)

clear(self)

def compare(self, r: mlist_t) ‑> int

compare(self, r) -> int

@param r: mlist_t const &

def count(self)

count(self) -> asize_t

def dstr(self)

dstr(self) -> char const *

def empty(self) ‑> bool

empty(self) -> bool

def has(self, r: mreg_t)

has(self, r) -> bool

@param r: mreg_t

def has_all(self, r: mreg_t, size: int)

has_all(self, r, size) -> bool

@param r: mreg_t @param size: int

def has_any(self, r: mreg_t, size: int)

has_any(self, r, size) -> bool

@param r: mreg_t @param size: int

def has_common(self, lst: mlist_t) ‑> bool

has_common(self, lst) -> bool

@param lst: mlist_t const &

def has_memory(self) ‑> bool

has_memory(self) -> bool

def includes(self, lst: mlist_t) ‑> bool

includes(self, lst) -> bool

@param lst: mlist_t const &

def intersect(self, lst: mlist_t) ‑> bool

intersect(self, lst) -> bool

@param lst: mlist_t const &

def is_subset_of(self, lst: mlist_t) ‑> bool

is_subset_of(self, lst) -> bool

@param lst: mlist_t const &

def sub(self, *args) ‑> bool

sub(self, r, size) -> bool

@param r: mreg_t @param size: int

sub(self, ivl) -> bool

@param ivl: ivl_t const &

sub(self, lst) -> bool

@param lst: mlist_t const &

def swap(self, r: mlist_t)

swap(self, r)

@param r: mlist_t &

class mnumber_t (*args)

Proxy of C++ mnumber_t class.

init(self, v, _ea=BADADDR, n=0) -> mnumber_t

@param v: uint64 @param _ea: ea_t @param n: int

Ancestors

Instance variables

var org_value : uint64

org_value

var value : uint64

value

Methods

def compare(self, r: mnumber_t) ‑> int

compare(self, r) -> int

@param r: mnumber_t const &

def update_value(self, val64: uint64)

update_value(self, val64)

@param val64: uint64

Inherited members

class mop_addr_t (*args)

Proxy of C++ mop_addr_t class.

init(self) -> mop_addr_t init(self, ra) -> mop_addr_t

@param ra: mop_addr_t const &

init(self, ra, isz, osz) -> mop_addr_t

@param ra: mop_t const & @param isz: int @param osz: int

Ancestors

Instance variables

var insize : int

insize

var outsize : int

outsize

Methods

def lexcompare(self, ra: mop_addr_t) ‑> int

lexcompare(self, ra) -> int

@param ra: mop_addr_t const &

Inherited members

class mop_pair_t

Proxy of C++ mop_pair_t class.

init(self) -> mop_pair_t

Instance variables

var hop : mop_t

high operand

var lop : mop_t

low operand

var thisown

The membership flag

class mop_t (*args)

Proxy of C++ mop_t class.

init(self) -> mop_t init(self, rop) -> mop_t

@param rop: mop_t const &

init(self, _r, _s) -> mop_t

@param _r: mreg_t @param _s: int

Subclasses

Instance variables

var a
var b
var c
var cstr
var d
var f
var fpc
var g
var helper
var l
var meminfo
var nnn
var obj_id : PyObject *

_obj_id(self) -> PyObject *

var oprops : uint8

Operand properties.

var pair
var r
var s
var scif
var size : int

Operand size. Usually it is 1,2,4,8 or NOSIZE but for UDTs other sizes are permitted

var t : mopt_t

Operand type.

var thisown

The membership flag

var valnum : uint16

Value number. Zero means unknown. Operands with the same value number are equal.

Methods

def apply_ld_mcode(self, mcode: mcode_t, ea: ea_t, newsize: int)

apply_ld_mcode(self, mcode, ea, newsize) Apply a unary opcode to the operand.

@param mcode: (C++: mcode_t) opcode to apply. it must accept 'l' and 'd' operands but not 'r'. @param ea: (C++: ea_t) value of minsn_t::ea for the newly created insruction @param newsize: (C++: int) new operand size Example: apply_ld_mcode(m_low) will convert op => low(op)

def apply_xds(self, ea: ea_t, newsize: int)

apply_xds(self, ea, newsize)

@param ea: ea_t @param newsize: int

def apply_xdu(self, ea: ea_t, newsize: int)

apply_xdu(self, ea, newsize)

@param ea: ea_t @param newsize: int

def assign(self, rop: mop_t)

assign(self, rop) -> mop_t

@param rop: mop_t const &

def change_size(self, nsize: int, sideff: side_effect_t = 1)

change_size(self, nsize, sideff=WITH_SIDEFF) -> bool Change the operand size. Examples: change_size(AL.1, 2) -> AX.2 change_size(qword_00000008.8, 4) -> dword_00000008.4 change_size(xdu.8(op.4), 4) -> op.4 change_size(#0x12345678.4, 1) -> #0x78.1

@param nsize: (C++: int) new operand size @param sideff: (C++: side_effect_t) may modify the database because of the size change? @return: success

def create_from_insn(self, m: minsn_t)

create_from_insn(self, m) Create operand from an instruction. This function creates a nested instruction that can be used as an operand. Example: if m="add x,y,z", our operand will be (t=mop_d,d=m). The destination operand of 'add' (z) is lost.

@param m: (C++: const minsn_t *) instruction to embed into operand. may not be nullptr.

def create_from_ivlset(self, mba: mba_t, ivs: ivlset_t, fullsize: sval_t)

create_from_ivlset(self, mba, ivs, fullsize) -> bool Create operand from ivlset_t. Example: if IVS contains [glbvar..glbvar+4), our operand will be (t=mop_v, g=&glbvar, size=4)

@param mba: (C++: mba_t *) pointer to microcode @param ivs: (C++: const ivlset_t &) set of memory intervals @param fullsize: (C++: sval_t) mba->fullsize @return: success

def create_from_mlist(self, mba: mba_t, lst: mlist_t, fullsize: sval_t)

create_from_mlist(self, mba, lst, fullsize) -> bool Create operand from mlist_t. Example: if LST contains 4 bits for R0.4, our operand will be (t=mop_r, r=R0, size=4)

@param mba: (C++: mba_t *) pointer to microcode @param lst: (C++: const mlist_t &) list of locations @param fullsize: (C++: sval_t) mba->fullsize @return: success

def create_from_scattered_vdloc(self, mba: mba_t, name: char const *, type: tinfo_t, loc: vdloc_t)

create_from_scattered_vdloc(self, mba, name, type, loc) Create operand from scattered vdloc_t. Example: if LOC is (ALOC_DIST, {EAX.4, EDX.4}) and TYPE is _LARGE_INTEGER, our operand will be (t=mop_sc, scif={EAX.4, EDX.4})

@param mba: (C++: mba_t ) pointer to microcode @param name: (C++: const char ) name of the operand, if available @param type: (C++: tinfo_t) type of the operand, must be present @param loc: (C++: const vdloc_t &) a scattered location @return: success

def create_from_vdloc(self, mba: mba_t, loc: vdloc_t, _size: int)

create_from_vdloc(self, mba, loc, _size) Create operand from vdloc_t. Example: if LOC contains (type=ALOC_REG1, r=R0), our operand will be (t=mop_r, r=R0, size=_SIZE)

@param mba: (C++: mba_t *) pointer to microcode @param loc: (C++: const vdloc_t &) location @param _size: (C++: int) operand size Note: this function cannot handle scattered locations. @return: success

def double_size(self, sideff: side_effect_t = 1)

double_size(self, sideff=WITH_SIDEFF) -> bool

@param sideff: enum side_effect_t

def dstr(self)

dstr(self) -> char const *

def empty(self) ‑> bool

empty(self) -> bool

def equal_mops(self, rop: mop_t, eqflags: int) ‑> bool

equal_mops(self, rop, eqflags) -> bool Compare operands. This is the main comparison function for operands.

@param rop: (C++: const mop_t &) operand to compare with @param eqflags: (C++: int) combination of comparison bits bits

def erase(self)

erase(self)

def erase_but_keep_size(self)

erase_but_keep_size(self)

def for_all_ops(self, mv: mop_visitor_t, type: tinfo_t = None, is_target: bool = False)

for_all_ops(self, mv, type=None, is_target=False) -> int Visit the operand and all its sub-operands. This function visits the current operand as well.

@param mv: (C++: mop_visitor_t &) visitor object @param type: (C++: const tinfo_t *) operand type @param is_target: (C++: bool) is a destination operand?

def for_all_scattered_submops(self, sv: scif_visitor_t) ‑> int

for_all_scattered_submops(self, sv) -> int Visit all sub-operands of a scattered operand. This function does not visit the current operand, only its sub-operands. All sub-operands are synthetic and are destroyed after the visitor. This function works only with scattered operands.

@param sv: (C++: scif_visitor_t &) visitor object

def get_insn(self, *args)

get_insn(self, code) -> minsn_t

@param code: enum mcode_t

def get_stkoff(self, p_off: sval_t *)

get_stkoff(self, p_off) -> bool Get the referenced stack offset. This function can also handle mop_sc if it is entirely mapped into a continuous stack region.

@param p_off: (C++: sval_t *) the output buffer @return: success

def get_stkvar(self, udm: udm_t = None, p_off: uval_t * = None)

get_stkvar(self, udm=None, p_off=None) -> ssize_t Retrieve the referenced stack variable.

@param udm: (C++: udm_t ) stkvar, may be nullptr @param p_off: (C++: uval_t ) if specified, will hold IDA stkoff after the call. @return: index of stkvar in the frame or -1

def has_side_effects(self, include_ldx_and_divs: bool = False) ‑> bool

has_side_effects(self, include_ldx_and_divs=False) -> bool Has any side effects?

@param include_ldx_and_divs: (C++: bool) consider ldx/div/mod as having side effects?

def is01(self) ‑> bool

is01(self) -> bool Are the possible values of the operand only 0 and 1? This function returns true for 0/1 constants, bit registers, the result of 'set' insns, etc.

def is_arglist(self) ‑> bool

is_arglist(self) -> bool Is a list of arguments?

def is_bit_reg(self, *args) ‑> bool

is_bit_reg(self, reg) -> bool Is a bit register? This includes condition codes and eventually other bit registers

@param reg: (C++: mreg_t)

is_bit_reg(self) -> bool

def is_cc(self) ‑> bool

is_cc(self) -> bool Is a condition code?

def is_ccflags(self) ‑> bool

is_ccflags(self) -> bool

def is_constant(self, is_signed: bool = True) ‑> bool

is_constant(self, is_signed=True) -> bool Retrieve value of a constant integer operand.

@param is_signed: (C++: bool) should treat the value as signed @return: true if the operand is mop_n

def is_equal_to(self, n: uint64, is_signed: bool = True)

is_equal_to(self, n, is_signed=True) -> bool

@param n: uint64 @param is_signed: bool

def is_extended_from(self, nbytes: int, is_signed: bool) ‑> bool

is_extended_from(self, nbytes, is_signed) -> bool Does the high part of the operand consist of zero or sign bytes?

@param nbytes: (C++: int) @param is_signed: (C++: bool)

def is_glbaddr(self, *args) ‑> bool

is_glbaddr(self) -> bool Is address of the specified global memory cell? is_glbaddr(self, ea) -> bool

@param ea: ea_t

def is_glbaddr_from_fixup(self) ‑> bool

is_glbaddr_from_fixup(self) -> bool

def is_impptr_done(self) ‑> bool

is_impptr_done(self) -> bool

def is_insn(self, *args) ‑> bool

is_insn(self) -> bool Is a sub-instruction with the specified opcode? is_insn(self, code) -> bool

@param code: enum mcode_t

def is_kreg(self) ‑> bool

is_kreg(self) -> bool Is a kernel register?

def is_lowaddr(self) ‑> bool

is_lowaddr(self) -> bool

def is_mob(self, serial: int) ‑> bool

is_mob(self, serial) -> bool Is a block reference to the specified block?

@param serial: (C++: int)

def is_negative_constant(self) ‑> bool

is_negative_constant(self) -> bool

def is_one(self) ‑> bool

is_one(self) -> bool

def is_pcval(self) ‑> bool

is_pcval(self) -> bool

def is_positive_constant(self) ‑> bool

is_positive_constant(self) -> bool

def is_reg(self, *args) ‑> bool

is_reg(self) -> bool Is the specified register of the specified size? is_reg(self, _r) -> bool

@param _r: mreg_t

is_reg(self, _r, _size) -> bool

@param _r: mreg_t @param _size: int

def is_scattered(self) ‑> bool

is_scattered(self) -> bool Is a scattered operand?

def is_sign_extended_from(self, nbytes: int) ‑> bool

is_sign_extended_from(self, nbytes) -> bool Does the high part of the operand consist of the sign bytes?

@param nbytes: (C++: int) number of bytes that were sign extended. the remaining size- nbytes high bytes must be sign bytes Example: is_sign_extended_from(xds.4(op.1), 1) -> true because the high 3 bytes are certainly sign bits

def is_stkaddr(self) ‑> bool

is_stkaddr(self) -> bool Is address of a stack variable?

def is_udt(self) ‑> bool

is_udt(self) -> bool

def is_undef_val(self) ‑> bool

is_undef_val(self) -> bool

def is_zero(self) ‑> bool

is_zero(self) -> bool

def is_zero_extended_from(self, nbytes: int) ‑> bool

is_zero_extended_from(self, nbytes) -> bool Does the high part of the operand consist of zero bytes?

@param nbytes: (C++: int) number of bytes that were zero extended. the remaining size- nbytes high bytes must be zero Example: is_zero_extended_from(xdu.8(op.1), 2) -> true because the high 6 bytes are certainly zero

def lexcompare(self, rop: mop_t) ‑> int

lexcompare(self, rop) -> int

@param rop: mop_t const &

def make_blkref(self, blknum: int)

make_blkref(self, blknum) Create a global variable operand.

@param blknum: (C++: int)

def make_first_half(self, width: int) ‑> bool

make_first_half(self, width) -> bool Make the first part of the operand. This function does not care about the memory endianness

@param width: (C++: int) the desired size of the operand part in bytes @return: success

def make_fpnum(self, bytes: void const *)

make_fpnum(self, bytes) -> bool Create a floating point constant operand.

@param bytes: (C++: const void *) pointer to the floating point value as used by the current processor (e.g. for x86 it must be in IEEE 754) @return: success

def make_gvar(self, ea: ea_t)

make_gvar(self, ea) Create a global variable operand.

@param ea: (C++: ea_t)

def make_helper(self, name: char const *)

make_helper(self, name) Create a helper operand. A helper operand usually keeps a built-in function name like "va_start" It is essentially just an arbitrary identifier without any additional info.

@param name: (C++: const char *) char const *

def make_high_half(self, width: int) ‑> bool

make_high_half(self, width) -> bool Make the high part of the operand. This function takes into account the memory endianness (byte sex)

@param width: (C++: int) the desired size of the operand part in bytes @return: success

def make_insn(self, ins: minsn_t)

make_insn(self, ins) Create a nested instruction.

@param ins: (C++: minsn_t *)

def make_low_half(self, width: int) ‑> bool

make_low_half(self, width) -> bool Make the low part of the operand. This function takes into account the memory endianness (byte sex)

@param width: (C++: int) the desired size of the operand part in bytes @return: success

def make_number(self, *args)

make_number(self, _value, _size, _ea=BADADDR, opnum=0) Create an integer constant operand.

@param _value: (C++: uint64) value to store in the operand @param _size: (C++: int) size of the value in bytes (1,2,4,8) @param _ea: (C++: ea_t) address of the processor instruction that made the value @param opnum: (C++: int) operand number of the processor instruction

def make_reg(self, *args)

make_reg(self, reg)

@param reg: mreg_t

make_reg(self, reg, _size)

@param reg: mreg_t @param _size: int

def make_reg_pair(self, loreg: int, hireg: int, halfsize: int)

make_reg_pair(self, loreg, hireg, halfsize) Create pair of registers.

@param loreg: (C++: int) register holding the low part of the value @param hireg: (C++: int) register holding the high part of the value @param halfsize: (C++: int) the size of each of loreg/hireg

def make_second_half(self, width: int) ‑> bool

make_second_half(self, width) -> bool Make the second part of the operand. This function does not care about the memory endianness

@param width: (C++: int) the desired size of the operand part in bytes @return: success

def make_stkvar(self, mba: mba_t, off: sval_t)

make_stkvar(self, mba, off)

@param mba: mba_t * @param off: sval_t

def may_use_aliased_memory(self) ‑> bool

may_use_aliased_memory(self) -> bool Is it possible for the operand to use aliased memory?

def preserve_side_effects(self, blk: mblock_t, top: minsn_t, moved_calls: bool * = None)

preserve_side_effects(self, blk, top, moved_calls=None) -> bool Move subinstructions with side effects out of the operand. If we decide to delete an instruction operand, it is a good idea to call this function. Alternatively we should skip such operands by calling mop_t::has_side_effects() For example, if we transform: jnz x, x, @blk => goto @blk then we must call this function before deleting the X operands.

@param blk: (C++: mblock_t ) current block @param top: (C++: minsn_t ) top level instruction that contains our operand @param moved_calls: (C++: bool *) pointer to the boolean that will track if all side effects get handled correctly. must be false initially. @return: false failed to preserve a side effect, it is not safe to delete the operand true no side effects or successfully preserved them

def probably_floating(self) ‑> bool

probably_floating(self) -> bool

def replace_by(self, o)
def set_impptr_done(self)

set_impptr_done(self)

def set_lowaddr(self)

set_lowaddr(self)

def set_udt(self)

set_udt(self)

def set_undef_val(self)

set_undef_val(self)

def shift_mop(self, offset: int) ‑> bool

shift_mop(self, offset) -> bool Shift the operand. This function shifts only the beginning of the operand. The operand size will be changed. Examples: shift_mop(AH.1, -1) -> AX.2 shift_mop(qword_00000008.8, 4) -> dword_0000000C.4 shift_mop(xdu.8(op.4), 4) ->

0.4 shift_mop(#0x12345678.4, 3) -> #12.1

@param offset: (C++: int) shift count (the number of bytes to shift) @return: success

def signed_value(self)

signed_value(self) -> int64

def swap(self, rop: mop_t)

swap(self, rop)

@param rop: mop_t &

def unsigned_value(self)

unsigned_value(self) -> uint64

def update_numop_value(self, val: uint64)

update_numop_value(self, val)

@param val: uint64

def value(self, is_signed: bool)

value(self, is_signed) -> uint64 Retrieve value of a constant integer operand. These functions can be called only for mop_n operands. See is_constant() that can be called on any operand.

@param is_signed: (C++: bool)

def zero(self)

zero(self)

class mop_visitor_t

Proxy of C++ mop_visitor_t class.

init(self, _mba=None, _blk=None, _topins=None) -> mop_visitor_t

@param _mba: mba_t * @param _blk: mblock_t * @param _topins: minsn_t *

Ancestors

Instance variables

var prune : bool

Should skip sub-operands of the current operand? visit_mop() may set 'prune=true' for that.

Methods

def visit_mop(self, op: mop_t, type: tinfo_t, is_target: bool)

visit_mop(self, op, type, is_target) -> int

@param op: mop_t * @param type: tinfo_t const * @param is_target: bool

Inherited members

class mopvec_t (*args)

Proxy of C++ qvector< mop_t > class.

init(self) -> mopvec_t init(self, x) -> mopvec_t

@param x: qvector< mop_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: mop_t) ‑> bool

add_unique(self, x) -> bool

@param x: mop_t const &

def at(self, _idx: size_t)

at(self, _idx) -> mop_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> mop_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> mop_t

def erase(self, *args)

erase(self, it) -> mop_t

@param it: qvector< mop_t >::iterator

erase(self, first, last) -> mop_t

@param first: qvector< mop_t >::iterator @param last: qvector< mop_t >::iterator

def extract(self)

extract(self) -> mop_t

def find(self, *args)

find(self, x) -> mop_t

@param x: mop_t const &

def front(self)
def grow(self, *args)

grow(self, x=mop_t())

@param x: mop_t const &

def has(self, x: mop_t) ‑> bool

has(self, x) -> bool

@param x: mop_t const &

def inject(self, s: mop_t, len: size_t)

inject(self, s, len)

@param s: mop_t * @param len: size_t

def insert(self, it: mop_t, x: mop_t)

insert(self, it, x) -> mop_t

@param it: qvector< mop_t >::iterator @param x: mop_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: mop_t const &

push_back(self) -> mop_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: mop_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: mopvec_t)

swap(self, r)

@param r: qvector< mop_t > &

def truncate(self)

truncate(self)

class number_format_t

Proxy of C++ number_format_t class.

init(self, _opnum=0) -> number_format_t

@param _opnum: int

Instance variables

var flags : flags64_t

ida flags, which describe number radix, enum, etc

var flags32 : flags_t

low 32bit of flags (for compatibility)

var opnum : char

operand number: 0..UA_MAXOP

var org_nbytes : char

original number size in bytes

var props : char

properties: combination of NF_ bits (Number format property bits)

var serial : uchar

for enums: constant serial number

var thisown

The membership flag

var type_name : qstring

for stroffs: structure for offsetof() for enums: enum name

Methods

def get_radix(self) ‑> int

get_radix(self) -> int Get number radix

@return: 2,8,10, or 16

def has_unmutable_type(self) ‑> bool

has_unmutable_type(self) -> bool

def is_char(self) ‑> bool

is_char(self) -> bool Is a character constant?

def is_dec(self) ‑> bool

is_dec(self) -> bool Is a decimal number?

def is_enum(self) ‑> bool

is_enum(self) -> bool Is a symbolic constant?

def is_fixed(self) ‑> bool

is_fixed(self) -> bool Is number representation fixed? Fixed representation cannot be modified by the decompiler

def is_hex(self) ‑> bool

is_hex(self) -> bool Is a hexadecimal number?

def is_numop(self) ‑> bool

is_numop(self) -> bool Is a number?

def is_oct(self) ‑> bool

is_oct(self) -> bool Is a octal number?

def is_stroff(self) ‑> bool

is_stroff(self) -> bool Is a structure field offset?

def needs_to_be_inverted(self) ‑> bool

needs_to_be_inverted(self) -> bool Does the number need to be negated or bitwise negated? Returns true if the user requested a negation but it is not done yet

class op_parent_info_t

Proxy of C++ op_parent_info_t class.

init(self, _mba=None, _blk=None, _topins=None) -> op_parent_info_t

@param _mba: mba_t * @param _blk: mblock_t * @param _topins: minsn_t *

Subclasses

Instance variables

var blk : mblock_t *

blk

var curins : minsn_t *

curins

var mba : mba_t *

mba

var thisown

The membership flag

var topins : minsn_t *

topins

class operand_locator_t (_ea: ea_t, _opnum: int)

Proxy of C++ operand_locator_t class.

init(self, _ea, _opnum) -> operand_locator_t

@param _ea: ea_t @param _opnum: int

Subclasses

Instance variables

var ea : ea_t

address of the original processor instruction

var opnum : int

operand number in the instruction

var thisown

The membership flag

Methods

def compare(self, r: operand_locator_t) ‑> int

compare(self, r) -> int

@param r: operand_locator_t const &

class optblock_t

Proxy of C++ optblock_t class.

init(self) -> optblock_t

@param self: PyObject *

Instance variables

var thisown

The membership flag

Methods

def func(self, blk: mblock_t) ‑> int

func(self, blk) -> int Optimize a block. This function usually performs the optimizations that require analyzing the entire block and/or its neighbors. For example it can recognize patterns and perform conversions like: b0: b0: … … jnz x, 0, @b2 => jnz x, 0, @b2 b1: b1: add x, 0, y mov x, y … …

@param blk: (C++: mblock_t *) Basic block to optimize as a whole. @return: number of changes made to the block. See also mark_lists_dirty.

def install(self)

install(self)

def remove(self) ‑> bool

remove(self) -> bool

class optinsn_t

Proxy of C++ optinsn_t class.

init(self) -> optinsn_t

@param self: PyObject *

Instance variables

var thisown

The membership flag

Methods

def func(self, blk: mblock_t, ins: minsn_t, optflags: int) ‑> int

func(self, blk, ins, optflags) -> int Optimize an instruction.

@param blk: (C++: mblock_t ) current basic block. maybe nullptr, which means that the instruction must be optimized without context @param ins: (C++: minsn_t ) instruction to optimize; it is always a top-level instruction. the callback may not delete the instruction but may convert it into nop (see mblock_t::make_nop). to optimize sub-instructions, visit them using minsn_visitor_t. sub-instructions may not be converted into nop but can be converted to "mov x,x". for example: add x,0,x => mov x,x this callback may change other instructions in the block, but should do this with care, e.g. to no break the propagation algorithm if called with OPTI_NO_LDXOPT. @param optflags: (C++: int) combination of optimization flags bits @return: number of changes made to the instruction. if after this call the instruction's use/def lists have changed, you must mark the block level lists as dirty (see mark_lists_dirty)

def install(self)

install(self)

def remove(self) ‑> bool

remove(self) -> bool

class qstring_printer_t (f: cfunc_t, tags: bool)

Proxy of C++ qstring_printer_t class.

init(self, f, tags) -> qstring_printer_t

@param f: cfunc_t const * @param tags: bool

Ancestors

Instance variables

var s

Reference to the output string

var with_tags : bool

Generate output with color tags.

Methods

def get_s(self)

get_s(self) -> qstring

Inherited members

class qvector_carg_t (*args)

Proxy of C++ qvector< carg_t > class.

init(self) -> qvector_carg_t init(self, x) -> qvector_carg_t

@param x: qvector< carg_t > const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: carg_t) ‑> bool

add_unique(self, x) -> bool

@param x: carg_t const &

def append(self, *args)

push_back(self, x)

@param x: carg_t const &

push_back(self) -> carg_t

def at(self, i: size_t)

getitem(self, i) -> carg_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> carg_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> carg_t

def erase(self, *args)

erase(self, it) -> carg_t

@param it: qvector< carg_t >::iterator

erase(self, first, last) -> carg_t

@param first: qvector< carg_t >::iterator @param last: qvector< carg_t >::iterator

def extract(self)

extract(self) -> carg_t

def find(self, *args)

find(self, x) -> carg_t

@param x: carg_t const &

def front(self)
def grow(self, *args)

grow(self, x=carg_t())

@param x: carg_t const &

def has(self, x: carg_t) ‑> bool

has(self, x) -> bool

@param x: carg_t const &

def inject(self, s: carg_t, len: size_t)

inject(self, s, len)

@param s: carg_t * @param len: size_t

def insert(self, it: carg_t, x: carg_t)

insert(self, it, x) -> carg_t

@param it: qvector< carg_t >::iterator @param x: carg_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: carg_t const &

push_back(self) -> carg_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: carg_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: qvector_carg_t)

swap(self, r)

@param r: qvector< carg_t > &

def truncate(self)

truncate(self)

class qvector_catchexprs_t (*args)

Proxy of C++ qvector< catchexpr_t > class.

init(self) -> qvector_catchexprs_t init(self, x) -> qvector_catchexprs_t

@param x: qvector< catchexpr_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: catchexpr_t) ‑> bool

add_unique(self, x) -> bool

@param x: catchexpr_t const &

def at(self, _idx: size_t)

at(self, _idx) -> catchexpr_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> catchexpr_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> catchexpr_t

def erase(self, *args)

erase(self, it) -> catchexpr_t

@param it: qvector< catchexpr_t >::iterator

erase(self, first, last) -> catchexpr_t

@param first: qvector< catchexpr_t >::iterator @param last: qvector< catchexpr_t >::iterator

def extract(self)

extract(self) -> catchexpr_t

def find(self, *args)

find(self, x) -> catchexpr_t

@param x: catchexpr_t const &

def front(self)
def grow(self, *args)

grow(self, x=catchexpr_t())

@param x: catchexpr_t const &

def has(self, x: catchexpr_t) ‑> bool

has(self, x) -> bool

@param x: catchexpr_t const &

def inject(self, s: catchexpr_t, len: size_t)

inject(self, s, len)

@param s: catchexpr_t * @param len: size_t

def insert(self, it: catchexpr_t, x: catchexpr_t)

insert(self, it, x) -> catchexpr_t

@param it: qvector< catchexpr_t >::iterator @param x: catchexpr_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: catchexpr_t const &

push_back(self) -> catchexpr_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: catchexpr_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: qvector_catchexprs_t)

swap(self, r)

@param r: qvector< catchexpr_t > &

def truncate(self)

truncate(self)

class qvector_ccase_t (*args)

Proxy of C++ qvector< ccase_t > class.

init(self) -> qvector_ccase_t init(self, x) -> qvector_ccase_t

@param x: qvector< ccase_t > const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: ccase_t) ‑> bool

add_unique(self, x) -> bool

@param x: ccase_t const &

def append(self, *args)

push_back(self, x)

@param x: ccase_t const &

push_back(self) -> ccase_t

def at(self, i: size_t)

getitem(self, i) -> ccase_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> ccase_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> ccase_t

def erase(self, *args)

erase(self, it) -> ccase_t

@param it: qvector< ccase_t >::iterator

erase(self, first, last) -> ccase_t

@param first: qvector< ccase_t >::iterator @param last: qvector< ccase_t >::iterator

def extract(self)

extract(self) -> ccase_t

def find(self, *args)

find(self, x) -> ccase_t

@param x: ccase_t const &

def front(self)
def grow(self, *args)

grow(self, x=ccase_t())

@param x: ccase_t const &

def has(self, x: ccase_t) ‑> bool

has(self, x) -> bool

@param x: ccase_t const &

def inject(self, s: ccase_t, len: size_t)

inject(self, s, len)

@param s: ccase_t * @param len: size_t

def insert(self, it: ccase_t, x: ccase_t)

insert(self, it, x) -> ccase_t

@param it: qvector< ccase_t >::iterator @param x: ccase_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: ccase_t const &

push_back(self) -> ccase_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: ccase_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: qvector_ccase_t)

swap(self, r)

@param r: qvector< ccase_t > &

def truncate(self)

truncate(self)

class qvector_ccatchvec_t (*args)

Proxy of C++ qvector< ccatch_t > class.

init(self) -> qvector_ccatchvec_t init(self, x) -> qvector_ccatchvec_t

@param x: qvector< ccatch_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: ccatch_t) ‑> bool

add_unique(self, x) -> bool

@param x: ccatch_t const &

def at(self, _idx: size_t)

at(self, _idx) -> ccatch_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> ccatch_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> ccatch_t

def erase(self, *args)

erase(self, it) -> ccatch_t

@param it: qvector< ccatch_t >::iterator

erase(self, first, last) -> ccatch_t

@param first: qvector< ccatch_t >::iterator @param last: qvector< ccatch_t >::iterator

def extract(self)

extract(self) -> ccatch_t

def find(self, *args)

find(self, x) -> ccatch_t

@param x: ccatch_t const &

def front(self)
def grow(self, *args)

grow(self, x=ccatch_t())

@param x: ccatch_t const &

def has(self, x: ccatch_t) ‑> bool

has(self, x) -> bool

@param x: ccatch_t const &

def inject(self, s: ccatch_t, len: size_t)

inject(self, s, len)

@param s: ccatch_t * @param len: size_t

def insert(self, it: ccatch_t, x: ccatch_t)

insert(self, it, x) -> ccatch_t

@param it: qvector< ccatch_t >::iterator @param x: ccatch_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: ccatch_t const &

push_back(self) -> ccatch_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: ccatch_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: qvector_ccatchvec_t)

swap(self, r)

@param r: qvector< ccatch_t > &

def truncate(self)

truncate(self)

class qvector_history_t (*args)

Proxy of C++ qvector< history_item_t > class.

init(self) -> qvector_history_t init(self, x) -> qvector_history_t

@param x: qvector< history_item_t > const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: history_item_t) ‑> bool

add_unique(self, x) -> bool

@param x: history_item_t const &

def at(self, _idx: size_t)

at(self, _idx) -> history_item_t

@param _idx: size_t

def back(self)
def begin(self, *args)

begin(self) -> history_item_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> history_item_t

def erase(self, *args)

erase(self, it) -> history_item_t

@param it: qvector< history_item_t >::iterator

erase(self, first, last) -> history_item_t

@param first: qvector< history_item_t >::iterator @param last: qvector< history_item_t >::iterator

def extract(self)

extract(self) -> history_item_t

def find(self, *args)

find(self, x) -> history_item_t

@param x: history_item_t const &

def front(self)
def grow(self, *args)

grow(self, x=history_item_t())

@param x: history_item_t const &

def has(self, x: history_item_t) ‑> bool

has(self, x) -> bool

@param x: history_item_t const &

def inject(self, s: history_item_t, len: size_t)

inject(self, s, len)

@param s: history_item_t * @param len: size_t

def insert(self, it: history_item_t, x: history_item_t)

insert(self, it, x) -> history_item_t

@param it: qvector< history_item_t >::iterator @param x: history_item_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: history_item_t const &

push_back(self) -> history_item_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: history_item_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: qvector_history_t)

swap(self, r)

@param r: qvector< history_item_t > &

def truncate(self)

truncate(self)

class qvector_lvar_t (*args)

Proxy of C++ qvector< lvar_t > class.

init(self) -> qvector_lvar_t init(self, x) -> qvector_lvar_t

@param x: qvector< lvar_t > const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: lvar_t) ‑> bool

add_unique(self, x) -> bool

@param x: lvar_t const &

def append(self, *args)

push_back(self, x)

@param x: lvar_t const &

push_back(self) -> lvar_t

def at(self, i: size_t)

getitem(self, i) -> lvar_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> lvar_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> lvar_t

def erase(self, *args)

erase(self, it) -> lvar_t

@param it: qvector< lvar_t >::iterator

erase(self, first, last) -> lvar_t

@param first: qvector< lvar_t >::iterator @param last: qvector< lvar_t >::iterator

def extract(self)

extract(self) -> lvar_t

def find(self, *args)

find(self, x) -> lvar_t

@param x: lvar_t const &

def front(self)
def grow(self, *args)

grow(self, x=lvar_t())

@param x: lvar_t const &

def has(self, x: lvar_t) ‑> bool

has(self, x) -> bool

@param x: lvar_t const &

def inject(self, s: lvar_t, len: size_t)

inject(self, s, len)

@param s: lvar_t * @param len: size_t

def insert(self, it: lvar_t, x: lvar_t)

insert(self, it, x) -> lvar_t

@param it: qvector< lvar_t >::iterator @param x: lvar_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: lvar_t const &

push_back(self) -> lvar_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: lvar_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: qvector_lvar_t)

swap(self, r)

@param r: qvector< lvar_t > &

def truncate(self)

truncate(self)

class rlist_t (*args)

Proxy of C++ rlist_t class.

init(self) -> rlist_t init(self, m) -> rlist_t

@param m: rlist_t const &

init(self, reg, width) -> rlist_t

@param reg: mreg_t @param width: int

Ancestors

Inherited members

class scif_t (_mba: mba_t, tif: tinfo_t, n: qstring * = None)

Proxy of C++ scif_t class.

init(self, _mba, tif, n=None) -> scif_t

@param _mba: mba_t * @param tif: tinfo_t * @param n: qstring *

Ancestors

Instance variables

var mba : mba_t *

Pointer to the parent mba_t object. Some operations may convert a scattered operand into something simpler, (a stack operand, for example). We will need to create stkvar_ref_t at that moment, this is why we need this pointer. See notes for lvar_ref_t::mba.

var name : qstring

Usually scattered operands are created from a function prototype, which has the name information. We preserve it and use it to name the corresponding local variable.

var type : tinfo_t

Scattered operands always have type info assigned to them because without it we won't be able to manipulte them.

Inherited members

class scif_visitor_t

Proxy of C++ scif_visitor_t class.

init(self) -> scif_visitor_t

@param self: PyObject *

Instance variables

var thisown

The membership flag

Methods

def visit_scif_mop(self, r: mop_t, off: int) ‑> int

visit_scif_mop(self, r, off) -> int

@param r: mop_t const & @param off: int

class simple_graph_t (*args, **kwargs)

Proxy of C++ simple_graph_t class.

init(self) -> gdl_graph_t

@param self: PyObject *

Ancestors

Subclasses

Instance variables

var colored_gdl_edges : bool

colored_gdl_edges

var title : qstring

title

Methods

def begin(self)

begin(self) -> simple_graph_t::iterator

def compute_dominators(self, domin: array_of_node_bitset_t &, post: bool = False)

compute_dominators(self, domin, post=False)

@param domin: array_of_node_bitset_t & @param post: bool

def compute_immediate_dominators(self, domin: array_of_node_bitset_t const &, idomin: intvec_t, post: bool = False)

compute_immediate_dominators(self, domin, idomin, post=False)

@param domin: array_of_node_bitset_t const & @param idomin: intvec_t & @param post: bool

def depth_first_postorder(self, post: node_ordering_t)

depth_first_postorder(self, post) -> int

@param post: node_ordering_t *

def depth_first_preorder(self, pre: node_ordering_t)

depth_first_preorder(self, pre) -> int

@param pre: node_ordering_t *

def end(self)

end(self) -> simple_graph_t::iterator

def goup(self, node: int) ‑> int

goup(self, node) -> int

@param node: int

def inc(self, p: simple_graph_t::iterator &, n: int = 1)

inc(self, p, n=1)

@param p: simple_graph_t::iterator & @param n: int

Inherited members

class stkvar_ref_t (m: mba_t, o: sval_t)

Proxy of C++ stkvar_ref_t class.

init(self, m, o) -> stkvar_ref_t

@param m: mba_t * @param o: sval_t

Instance variables

var mba : mba_t *const

Pointer to the parent mba_t object. We need it in order to retrieve the referenced stack variable. See notes for lvar_ref_t::mba.

var off : sval_t

Offset to the stack variable from the bottom of the stack frame. It is called 'decompiler stkoff' and it is different from IDA stkoff. See a note and a picture about 'decompiler stkoff' below.

var thisown

The membership flag

Methods

def compare(self, r: stkvar_ref_t) ‑> int

compare(self, r) -> int

@param r: stkvar_ref_t const &

def get_stkvar(self, udm: udm_t = None, p_off: uval_t * = None)

get_stkvar(self, udm=None, p_off=None) -> ssize_t Retrieve the referenced stack variable.

@param udm: (C++: udm_t ) stkvar, may be nullptr @param p_off: (C++: uval_t ) if specified, will hold IDA stkoff after the call. @return: index of stkvar in the frame or -1

def swap(self, r: stkvar_ref_t)

swap(self, r)

@param r: stkvar_ref_t &

class treeloc_t

Proxy of C++ treeloc_t class.

init(self) -> treeloc_t

Instance variables

var ea : ea_t

ea

var itp : item_preciser_t

itp

var thisown

The membership flag

class udc_filter_t

Proxy of C++ udc_filter_t class.

init(self) -> udc_filter_t

@param self: PyObject *

Ancestors

Methods

def cleanup(self)

cleanup(self) Cleanup the filter This function properly clears type information associated to this filter.

def empty(self) ‑> bool

empty(self) -> bool

def init(self, decl: char const *)

init(self, decl) -> bool

@param decl: char const *

def install(self)

install(self)

def match(self, cdg: codegen_t) ‑> bool

match(self, cdg) -> bool return true if the filter object should be applied to given instruction

@param cdg: (C++: codegen_t &)

def remove(self) ‑> bool

remove(self) -> bool

Inherited members

class udcall_map_iterator_t

Proxy of C++ udcall_map_iterator_t class.

init(self) -> udcall_map_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class udcall_t

Proxy of C++ udcall_t class.

init(self) -> udcall_t

Instance variables

var name : qstring

name

var thisown

The membership flag

var tif : tinfo_t

tif

Methods

def compare(self, r: udcall_t) ‑> int

compare(self, r) -> int

@param r: udcall_t const &

def empty(self) ‑> bool

empty(self) -> bool

class ui_stroff_applicator_t

Proxy of C++ ui_stroff_applicator_t class.

init(self) -> ui_stroff_applicator_t

@param self: PyObject *

Instance variables

var thisown

The membership flag

Methods

def apply(self, opnum: size_t, path: intvec_t, top_tif: tinfo_t, spath: char const *)

apply(self, opnum, path, top_tif, spath) -> bool

@param opnum: (C++: size_t) operand ordinal number, see below @param path: (C++: const intvec_t &) path describing the union selection, maybe empty @param top_tif: (C++: const tinfo_t &) tinfo_t of the selected toplevel UDT @param spath: (C++: const char *) selected path

class ui_stroff_op_t

Proxy of C++ ui_stroff_op_t class.

init(self) -> ui_stroff_op_t

Instance variables

var offset : uval_t

operand offset, will be used when calculating the UDT path

var text : qstring

any text for the column "Operand" of widget

var thisown

The membership flag

class ui_stroff_ops_t (*args)

Proxy of C++ qvector< ui_stroff_op_t > class.

init(self) -> ui_stroff_ops_t init(self, x) -> ui_stroff_ops_t

@param x: qvector< ui_stroff_op_t > const &

Instance variables

var thisown

The membership flag

Methods

def add_unique(self, x: ui_stroff_op_t) ‑> bool

add_unique(self, x) -> bool

@param x: ui_stroff_op_t const &

def append(self, *args)

push_back(self, x)

@param x: ui_stroff_op_t const &

push_back(self) -> ui_stroff_op_t

def at(self, i: size_t)

getitem(self, i) -> ui_stroff_op_t

@param i: size_t

def back(self)
def begin(self, *args)

begin(self) -> ui_stroff_op_t

def capacity(self)

capacity(self) -> size_t

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> ui_stroff_op_t

def erase(self, *args)

erase(self, it) -> ui_stroff_op_t

@param it: qvector< ui_stroff_op_t >::iterator

erase(self, first, last) -> ui_stroff_op_t

@param first: qvector< ui_stroff_op_t >::iterator @param last: qvector< ui_stroff_op_t >::iterator

def extract(self)

extract(self) -> ui_stroff_op_t

def find(self, *args)

find(self, x) -> ui_stroff_op_t

@param x: ui_stroff_op_t const &

def front(self)
def grow(self, *args)

grow(self, x=ui_stroff_op_t())

@param x: ui_stroff_op_t const &

def has(self, x: ui_stroff_op_t) ‑> bool

has(self, x) -> bool

@param x: ui_stroff_op_t const &

def inject(self, s: ui_stroff_op_t, len: size_t)

inject(self, s, len)

@param s: ui_stroff_op_t * @param len: size_t

def insert(self, it: ui_stroff_op_t, x: ui_stroff_op_t)

insert(self, it, x) -> ui_stroff_op_t

@param it: qvector< ui_stroff_op_t >::iterator @param x: ui_stroff_op_t const &

def pop_back(self)

pop_back(self)

def push_back(self, *args)

push_back(self, x)

@param x: ui_stroff_op_t const &

push_back(self) -> ui_stroff_op_t

def qclear(self)

qclear(self)

def reserve(self, cnt: size_t)

reserve(self, cnt)

@param cnt: size_t

def resize(self, *args)

resize(self, _newsize, x)

@param _newsize: size_t @param x: ui_stroff_op_t const &

resize(self, _newsize)

@param _newsize: size_t

def size(self)

size(self) -> size_t

def swap(self, r: ui_stroff_ops_t)

swap(self, r)

@param r: qvector< ui_stroff_op_t > &

def truncate(self)

truncate(self)

class user_cmts_iterator_t

Proxy of C++ user_cmts_iterator_t class.

init(self) -> user_cmts_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class user_cmts_t

Proxy of C++ std::map< treeloc_t,citem_cmt_t > class.

init(self) -> user_cmts_t

Class variables

var keytype

Proxy of C++ treeloc_t class.

var valuetype

Proxy of C++ citem_cmt_t class.

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: treeloc_t)

at(self, _Keyval) -> citem_cmt_t

@param _Keyval: treeloc_t const &

def begin(self, *args)
def clear(self)
def copy(self)
def end(self, *args)
def erase(self, *args)
def find(self, *args)
def first(self, *args)
def get(self, key, default=None)
def has_key(self, key)
def insert(self, *args)
def items(self)
def iteritems(self)
def iterkeys(self)
def itervalues(self)
def keys(self)
def next(self, *args)
def pop(self, key)

Sets the value associated with the provided key.

def popitem(self)

Sets the value associated with the provided key.

def second(self, *args)
def setdefault(self, key, default=None)

Sets the value associated with the provided key.

def size(self, *args)
def values(self)
class user_iflags_iterator_t

Proxy of C++ user_iflags_iterator_t class.

init(self) -> user_iflags_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class user_iflags_t

Proxy of C++ std::map< citem_locator_t,int32 > class.

init(self) -> user_iflags_t

Class variables

var keytype

Proxy of C++ citem_locator_t class.

var valuetype

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

>>> int('0b100', base=0)
4

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: citem_locator_t)

at(self, _Keyval) -> int &

@param _Keyval: citem_locator_t const &

def begin(self, *args)
def clear(self)
def copy(self)
def end(self, *args)
def erase(self, *args)
def find(self, *args)
def first(self, *args)
def get(self, key, default=None)
def has_key(self, key)
def insert(self, *args)
def items(self)
def iteritems(self)
def iterkeys(self)
def itervalues(self)
def keys(self)
def next(self, *args)
def pop(self, key)

Sets the value associated with the provided key.

def popitem(self)

Sets the value associated with the provided key.

def second(self, *args)
def setdefault(self, key, default=None)

Sets the value associated with the provided key.

def size(self, *args)
def values(self)
class user_labels_iterator_t

Proxy of C++ user_labels_iterator_t class.

init(self) -> user_labels_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class user_labels_t

Proxy of C++ std::map< int,qstring > class.

init(self) -> user_labels_t

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: int const &)

at(self, _Keyval) -> _qstring< char > &

@param _Keyval: int const &

def size(self)

size(self) -> size_t

class user_lvar_modifier_t

Proxy of C++ user_lvar_modifier_t class.

init(self) -> user_lvar_modifier_t

@param self: PyObject *

Instance variables

var thisown

The membership flag

Methods

def modify_lvars(self, lvinf: lvar_uservec_t) ‑> bool

modify_lvars(self, lvinf) -> bool Modify lvar settings. Returns: true-modified

@param lvinf: (C++: lvar_uservec_t *)

class user_numforms_iterator_t

Proxy of C++ user_numforms_iterator_t class.

init(self) -> user_numforms_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class user_numforms_t

Proxy of C++ std::map< operand_locator_t,number_format_t > class.

init(self) -> user_numforms_t

Class variables

var keytype

Proxy of C++ operand_locator_t class.

var valuetype

Proxy of C++ number_format_t class.

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: operand_locator_t)

at(self, _Keyval) -> number_format_t

@param _Keyval: operand_locator_t const &

def begin(self, *args)
def clear(self)
def copy(self)
def end(self, *args)
def erase(self, *args)
def find(self, *args)
def first(self, *args)
def get(self, key, default=None)
def has_key(self, key)
def insert(self, *args)
def items(self)
def iteritems(self)
def iterkeys(self)
def itervalues(self)
def keys(self)
def next(self, *args)
def pop(self, key)

Sets the value associated with the provided key.

def popitem(self)

Sets the value associated with the provided key.

def second(self, *args)
def setdefault(self, key, default=None)

Sets the value associated with the provided key.

def size(self, *args)
def values(self)
class user_unions_iterator_t

Proxy of C++ user_unions_iterator_t class.

init(self) -> user_unions_iterator_t

Instance variables

var thisown

The membership flag

var x : iterator_word

x

class user_unions_t

Proxy of C++ std::map< ea_t,intvec_t > class.

init(self) -> user_unions_t

Class variables

var keytype
var valuetype

Proxy of C++ qvector< int > class.

Instance variables

var thisown

The membership flag

Methods

def at(self, _Keyval: unsigned long long const &)

at(self, _Keyval) -> intvec_t

@param _Keyval: unsigned long long const &

def begin(self, *args)
def clear(self)
def copy(self)
def end(self, *args)
def erase(self, *args)
def find(self, *args)
def first(self, *args)
def get(self, key, default=None)
def has_key(self, key)
def insert(self, *args)
def items(self)
def iteritems(self)
def iterkeys(self)
def itervalues(self)
def keys(self)
def next(self, *args)
def pop(self, key)

Sets the value associated with the provided key.

def popitem(self)

Sets the value associated with the provided key.

def second(self, *args)
def setdefault(self, key, default=None)

Sets the value associated with the provided key.

def size(self, *args)
def values(self)
class uval_ivl_ivlset_t (*args)

Proxy of C++ ivlset_tpl< ivl_t,uval_t > class.

init(self) -> uval_ivl_ivlset_t init(self, ivl) -> uval_ivl_ivlset_t

@param ivl: ivl_t const &

Subclasses

Instance variables

var thisown

The membership flag

Methods

def all_values(self) ‑> bool

all_values(self) -> bool

def begin(self, *args)

begin(self) -> ivlset_tpl< ivl_t,unsigned long long >::const_iterator begin(self) -> ivlset_tpl< ivl_t,unsigned long long >::iterator

def clear(self)

clear(self)

def empty(self) ‑> bool

empty(self) -> bool

def end(self, *args)

end(self) -> ivlset_tpl< ivl_t,unsigned long long >::const_iterator end(self) -> ivlset_tpl< ivl_t,unsigned long long >::iterator

def getivl(self, idx: int)

getivl(self, idx) -> ivl_t

@param idx: int

def lastivl(self)

lastivl(self) -> ivl_t

def nivls(self)

nivls(self) -> size_t

def qclear(self)

qclear(self)

def set_all_values(self)

set_all_values(self)

def single_value(self, *args) ‑> bool

single_value(self) -> bool single_value(self, v) -> bool

@param v: unsigned long long

def swap(self, r: uval_ivl_ivlset_t)

swap(self, r)

@param r: ivlset_tpl< ivl_t,uval_t > &

class uval_ivl_t (_off: unsigned long long, _size: unsigned long long)

Proxy of C++ ivl_tpl< uval_t > class.

init(self, _off, _size) -> uval_ivl_t

@param _off: unsigned long long @param _size: unsigned long long

Subclasses

Instance variables

var off : unsigned long long

off

var size : unsigned long long

size

var thisown

The membership flag

Methods

def end(self)

end(self) -> unsigned long long

def last(self)

last(self) -> unsigned long long

def valid(self) ‑> bool

valid(self) -> bool

class valrng_t (*args)

Proxy of C++ valrng_t class.

init(self, size_=MAX_VLR_SIZE) -> valrng_t

@param size_: int

init(self, r) -> valrng_t

@param r: valrng_t const &

Instance variables

var thisown

The membership flag

Methods

def all_values(self) ‑> bool

all_values(self) -> bool

def compare(self, r: valrng_t) ‑> int

compare(self, r) -> int

@param r: valrng_t const &

def cvt_to_cmp(self) ‑> bool

cvt_to_cmp(self) -> bool

def cvt_to_single_value(self) ‑> bool

cvt_to_single_value(self) -> bool

def dstr(self)

dstr(self) -> char const *

def empty(self) ‑> bool

empty(self) -> bool

def get_size(self) ‑> int

get_size(self) -> int

def has(self, v: uvlr_t)

has(self, v) -> bool

@param v: uvlr_t

def intersect_with(self, r: valrng_t) ‑> bool

intersect_with(self, r) -> bool

@param r: valrng_t const &

def inverse(self)

inverse(self)

def is_unknown(self) ‑> bool

is_unknown(self) -> bool

def max_svalue(self)

max_svalue(self) -> uvlr_t

def max_value(self)

max_value(self) -> uvlr_t

def min_svalue(self)

min_svalue(self) -> uvlr_t

def reduce_size(self, new_size: int) ‑> bool

reduce_size(self, new_size) -> bool

@param new_size: int

def set_all(self)

set_all(self)

def set_cmp(self, cmp: cmpop_t, _value: uvlr_t)

set_cmp(self, cmp, _value)

@param cmp: enum cmpop_t @param _value: uvlr_t

def set_eq(self, v: uvlr_t)

set_eq(self, v)

@param v: uvlr_t

def set_none(self)

set_none(self)

def set_unk(self)

set_unk(self)

def swap(self, r: valrng_t)

swap(self, r)

@param r: valrng_t &

def unite_with(self, r: valrng_t) ‑> bool

unite_with(self, r) -> bool

@param r: valrng_t const &

class var_ref_t

Proxy of C++ var_ref_t class.

init(self) -> var_ref_t

Instance variables

var idx : int

index into lvars_t

var mba : mba_t *

pointer to the underlying micro array

var thisown

The membership flag

Methods

def compare(self, r: var_ref_t) ‑> int

compare(self, r) -> int

@param r: var_ref_t const &

def getv(self)

getv(self) -> lvar_t

class vc_printer_t (f: cfunc_t)

Proxy of C++ vc_printer_t class.

init(self, f) -> vc_printer_t

@param f: cfunc_t const *

Ancestors

Subclasses

Instance variables

var func : cfunc_t const *

cfunc_t to generate text for

var lastchar : char

internal: last printed character

Methods

def oneliner(self) ‑> bool

oneliner(self) -> bool Are we generating one-line text representation?

@return: true if the output will occupy one line without line breaks

Inherited members

class vd_failure_t (*args)

Proxy of C++ vd_failure_t class.

init(self) -> vd_failure_t init(self, code, ea, buf=None) -> vd_failure_t

@param code: enum merror_t @param ea: ea_t @param buf: char const *

init(self, code, ea, buf) -> vd_failure_t

@param code: enum merror_t @param ea: ea_t @param buf: qstring const &

init(self, _hf) -> vd_failure_t

@param _hf: hexrays_failure_t const &

Subclasses

Instance variables

var hf : hexrays_failure_t

hf

var thisown

The membership flag

Methods

def desc(self)

desc(self) -> qstring

class vd_interr_t (ea: ea_t, buf: char const *)

Proxy of C++ vd_interr_t class.

init(self, ea, buf) -> vd_interr_t

@param ea: ea_t @param buf: char const *

Ancestors

Inherited members

class vd_printer_t

Proxy of C++ vd_printer_t class.

init(self) -> vd_printer_t

@param self: PyObject *

Subclasses

Instance variables

var hdrlines : int

number of header lines (prototype+typedef+lvars) valid at the end of print process

var thisown

The membership flag

var tmpbuf : qstring

tmpbuf

class vdloc_t

Proxy of C++ vdloc_t class.

init(self) -> vdloc_t

Ancestors

Subclasses

Methods

def compare(self, r: vdloc_t) ‑> int

compare(self, r) -> int

@param r: vdloc_t const &

def is_aliasable(self, mb: mba_t, size: int) ‑> bool

is_aliasable(self, mb, size) -> bool

@param mb: mba_t const * @param size: int

def reg1(self) ‑> int

reg1(self) -> int

def set_reg1(self, r1: int)

set_reg1(self, r1)

@param r1: int

Inherited members

class vdui_t (*args, **kwargs)

Proxy of C++ vdui_t class.

Instance variables

var cfunc : cfuncptr_t

pointer to function object

var cpos : ctext_position_t

Current ctext position.

var ct : TWidget *

pseudocode view

var flags : int

Properties of pseudocode window

var head : ctree_item_t

First ctree item on the current line (for block comments)

var item : ctree_item_t

Current ctree item.

var last_code : merror_t

result of the last user action. See Microcode error codes

var mba : mba_t *

pointer to underlying microcode

var tail : ctree_item_t

Tail ctree item on the current line (for indented comments)

var thisown

The membership flag

var toplevel : TWidget *

toplevel

var view_idx : int

pseudocode window index (0..)

Methods

def calc_cmt_type(self, lnnum: size_t, cmttype: cmt_type_t)

calc_cmt_type(self, lnnum, cmttype) -> cmt_type_t Check if the specified line can have a comment. Due to the coordinate system for comments: (\link{https://www.hex-rays.com/blog/coordinate-system-for-hex-rays}) some function lines cannot have comments. This function checks if a comment can be attached to the specified line.

@param lnnum: (C++: size_t) line number (0 based) @param cmttype: (C++: cmt_type_t) comment types to check @return: possible comment types

def clear(self)

clear(self) Clear the pseudocode window. It deletes the current function and microcode.

def collapse_item(self, hide: bool) ‑> bool

collapse_item(self, hide) -> bool Collapse/uncollapse item. This function collapses the current item.

@param hide: (C++: bool) @return: false if failed.

def collapse_lvars(self, hide: bool) ‑> bool

collapse_lvars(self, hide) -> bool Collapse/uncollapse local variable declarations.

@param hide: (C++: bool) @return: false if failed.

def ctree_to_disasm(self) ‑> bool

ctree_to_disasm(self) -> bool Jump to disassembly. This function jumps to the address in the disassembly window which corresponds to the current item. The current item is determined based on the current keyboard cursor position.

@return: false if failed

def del_orphan_cmts(self) ‑> bool

del_orphan_cmts(self) -> bool Delete all orphan comments. Delete all orphan comments and refresh the screen.

@return: true

def edit_cmt(self, loc: treeloc_t) ‑> bool

edit_cmt(self, loc) -> bool Edit an indented comment. This function displays a dialog box and allows the user to edit the comment for the specified ctree location.

@param loc: (C++: const treeloc_t &) comment location @return: false if failed or cancelled

def edit_func_cmt(self) ‑> bool

edit_func_cmt(self) -> bool Edit a function comment. This function displays a dialog box and allows the user to edit the function comment.

@return: false if failed or cancelled

def get_current_item(self, idv: input_device_t)

get_current_item(self, idv) -> bool Get current item. This function refreshes the cpos, item, tail fields.

@param idv: (C++: input_device_t) keyboard or mouse @see: cfunc_t::get_line_item() @return: false if failed

def get_current_label(self) ‑> int

get_current_label(self) -> int Get current label. If there is a label under the cursor, return its number.

@return: -1 if there is no label under the cursor. prereq: get_current_item() has been called

def get_number(self)

get_number(self) -> cnumber_t Get current number. If the current item is a number, return pointer to it.

@return: nullptr if the current item is not a number This function returns non- null for the cases of a 'switch' statement Also, if the current item is a casted number, then this function will succeed.

def in_ctree(self) ‑> bool

in_ctree(self) -> bool Is the current item a statement?

@return: false if the cursor is in the local variable/type declaration area true if the cursor is in the statement area

def invert_bits(self) ‑> bool

invert_bits(self) -> bool Bitwise negate a number. This function inverts all bits of the current number.

@return: false if failed.

def invert_sign(self) ‑> bool

invert_sign(self) -> bool Negate a number. This function negates the current number.

@return: false if failed.

def jump_enter(self, idv: input_device_t, omflags: int)

jump_enter(self, idv, omflags) -> bool Process the Enter key. This function jumps to the definition of the item under the cursor. If the current item is a function, it will be decompiled. If the current item is a global data, its disassemly text will be displayed.

@param idv: (C++: input_device_t) what cursor must be used, the keyboard or the mouse @param omflags: (C++: int) OM_NEWWIN: new pseudocode window will open, 0: reuse the existing window @return: false if failed

def locked(self) ‑> bool

locked(self) -> bool Does the pseudocode window contain valid code? We lock windows before modifying them, to avoid recursion due to the events generated by the IDA kernel. @retval true: The window is locked and may have stale info

def map_lvar(self, frm: lvar_t, to: lvar_t) ‑> bool

map_lvar(self, frm, to) -> bool Map a local variable to another. This function permanently maps one lvar to another. All occurrences of the mapped variable are replaced by the new variable

@param from: (C++: lvar_t ) the variable being mapped @param to: (C++: lvar_t ) the variable to map to. if nullptr, unmaps the variable @return: false if failed

def refresh_cpos(self, idv: input_device_t)

refresh_cpos(self, idv) -> bool Refresh the current position. This function refreshes the cpos field.

@param idv: (C++: input_device_t) keyboard or mouse @return: false if failed

def refresh_ctext(self, activate: bool = True)

refresh_ctext(self, activate=True) Refresh pseudocode window. This function refreshes the pseudocode window by regenerating its text from cfunc_t. Instead of this function use refresh_func_ctext(), which refreshes all pseudocode windows for the function. @see: refresh_view(), refresh_func_ctext()

@param activate: (C++: bool)

def refresh_view(self, redo_mba: bool)

refresh_view(self, redo_mba) Refresh pseudocode window. This is the highest level refresh function. It causes the most profound refresh possible and can lead to redecompilation of the current function. Please consider using refresh_ctext() if you need a more superficial refresh.

@param redo_mba: (C++: bool) true means to redecompile the current function false means to rebuild ctree without regenerating microcode @see: refresh_ctext()

def rename_global(self, ea: ea_t)

rename_global(self, ea) -> bool Rename global item. This function displays a dialog box and allows the user to rename a global item (data or function).

@param ea: (C++: ea_t) address of the global item @return: false if failed or cancelled

def rename_label(self, label: int) ‑> bool

rename_label(self, label) -> bool Rename a label. This function displays a dialog box and allows the user to rename a statement label.

@param label: (C++: int) label number @return: false if failed or cancelled

def rename_lvar(self, v: lvar_t, name: char const *, is_user_name: bool)

rename_lvar(self, v, name, is_user_name) -> bool Rename local variable. This function permanently renames a local variable.

@param v: (C++: lvar_t ) pointer to local variable @param name: (C++: const char ) new variable name @param is_user_name: (C++: bool) use true to save the new name into the database. use false to delete the saved name. @see: ::rename_lvar() @return: false if failed

def rename_udm(self, udt_type: tinfo_t, udm_idx: int)

rename_udm(self, udt_type, udm_idx) -> bool Rename structure field. This function displays a dialog box and allows the user to rename a structure field.

@param udt_type: (C++: tinfo_t &) structure/union type @param udm_idx: (C++: int) index of the structure/union member @return: false if failed or cancelled

def set_global_type(self, ea: ea_t)

set_global_type(self, ea) -> bool Set global item type. This function displays a dialog box and allows the user to change the type of a global item (data or function).

@param ea: (C++: ea_t) address of the global item @return: false if failed or cancelled

def set_locked(self, v: bool) ‑> bool

set_locked(self, v) -> bool

@param v: bool

def set_lvar_cmt(self, v: lvar_t, cmt: char const *)

set_lvar_cmt(self, v, cmt) -> bool Set local variable comment. This function permanently sets a variable comment.

@param v: (C++: lvar_t ) pointer to local variable @param cmt: (C++: const char ) new comment @return: false if failed

def set_lvar_type(self, v: lvar_t, type: tinfo_t)

set_lvar_type(self, v, type) -> bool Set local variable type. This function permanently sets a local variable type and clears NOPTR flag if it was set before by function 'set_noptr_lvar'

@param v: (C++: lvar_t *) pointer to local variable @param type: (C++: const tinfo_t &) new variable type @return: false if failed

def set_noptr_lvar(self, v: lvar_t) ‑> bool

set_noptr_lvar(self, v) -> bool Inform that local variable should have a non-pointer type This function permanently sets a corresponding variable flag (NOPTR) and removes type if it was set before by function 'set_lvar_type'

@param v: (C++: lvar_t *) pointer to local variable @return: false if failed

def set_num_enum(self) ‑> bool

set_num_enum(self) -> bool Convert number to symbolic constant. This function displays a dialog box and allows the user to select a symbolic constant to represent the number.

@return: false if failed or cancelled

def set_num_radix(self, base: int) ‑> bool

set_num_radix(self, base) -> bool Change number base. This function changes the current number representation.

@param base: (C++: int) number radix (10 or 16) 0 means a character constant @return: false if failed

def set_num_stroff(self) ‑> bool

set_num_stroff(self) -> bool Convert number to structure field offset. Currently not implemented.

@return: false if failed or cancelled

def set_udm_type(self, udt_type: tinfo_t, udm_idx: int)

set_udm_type(self, udt_type, udm_idx) -> bool Set structure field type. This function displays a dialog box and allows the user to change the type of a structure field.

@param udt_type: (C++: tinfo_t &) structure/union type @param udm_idx: (C++: int) index of the structure/union member @return: false if failed or cancelled

def set_valid(self, v: bool)

set_valid(self, v)

@param v: bool

def set_visible(self, v: bool)

set_visible(self, v)

@param v: bool

def split_item(self, split: bool) ‑> bool

split_item(self, split) -> bool Split/unsplit item. This function splits the current assignment expression.

@param split: (C++: bool) @return: false if failed.

def switch_to(self, f: cfuncptr_t, activate: bool)

switch_to(self, f, activate) Display the specified pseudocode. This function replaces the pseudocode window contents with the specified cfunc_t.

@param f: (C++: cfuncptr_t) pointer to the function to display. @param activate: (C++: bool) should the pseudocode window get focus?

def ui_edit_lvar_cmt(self, v: lvar_t) ‑> bool

ui_edit_lvar_cmt(self, v) -> bool Set local variable comment. This function displays a dialog box and allows the user to edit the comment of a local variable.

@param v: (C++: lvar_t *) pointer to local variable @return: false if failed or cancelled

def ui_map_lvar(self, v: lvar_t) ‑> bool

ui_map_lvar(self, v) -> bool Map a local variable to another. This function displays a variable list and allows the user to select mapping.

@param v: (C++: lvar_t *) pointer to local variable @return: false if failed or cancelled

def ui_rename_lvar(self, v: lvar_t) ‑> bool

ui_rename_lvar(self, v) -> bool Rename local variable. This function displays a dialog box and allows the user to rename a local variable.

@param v: (C++: lvar_t *) pointer to local variable @return: false if failed or cancelled

def ui_set_call_type(self, e: cexpr_t) ‑> bool

ui_set_call_type(self, e) -> bool Set type of a function call This function displays a dialog box and allows the user to change the type of a function call

@param e: (C++: const cexpr_t *) pointer to call expression @return: false if failed or cancelled

def ui_set_lvar_type(self, v: lvar_t) ‑> bool

ui_set_lvar_type(self, v) -> bool Set local variable type. This function displays a dialog box and allows the user to change the type of a local variable.

@param v: (C++: lvar_t *) pointer to local variable @return: false if failed or cancelled

def ui_unmap_lvar(self, v: lvar_t) ‑> bool

ui_unmap_lvar(self, v) -> bool Unmap a local variable. This function displays list of variables mapped to the specified variable and allows the user to select a variable to unmap.

@param v: (C++: lvar_t *) pointer to local variable @return: false if failed or cancelled

def valid(self) ‑> bool

valid(self) -> bool Does the pseudocode window contain valid code? It can become invalid if the function type gets changed in IDA.

def visible(self) ‑> bool

visible(self) -> bool Is the pseudocode window visible? if not, it might be invisible or destroyed

class vivl_t (*args)

Proxy of C++ vivl_t class.

init(self, _type=mop_z, _off=-1, _size=0) -> vivl_t

@param _type: mopt_t @param _off: sval_t @param _size: int

init(self, ch) -> vivl_t

@param ch: chain_t const &

init(self, op) -> vivl_t

@param op: mop_t const &

Ancestors

Instance variables

var size : int

Interval size in bytes.

Methods

def compare(self, r: vivl_t) ‑> int

compare(self, r) -> int

@param r: vivl_t const &

def contains(self, voff2: voff_t) ‑> bool

contains(self, voff2) -> bool Does our value interval contain the specified value offset?

@param voff2: (C++: const voff_t &) voff_t const &

def dstr(self)

dstr(self) -> char const *

def extend_to_cover(self, r: vivl_t) ‑> bool

extend_to_cover(self, r) -> bool Extend a value interval using another value interval of the same type

@param r: (C++: const vivl_t &) vivl_t const & @return: success

def includes(self, r: vivl_t) ‑> bool

includes(self, r) -> bool Does our value interval include another?

@param r: (C++: const vivl_t &) vivl_t const &

def intersect(self, r: vivl_t)

intersect(self, r) -> uval_t Intersect value intervals the same type

@param r: (C++: const vivl_t &) vivl_t const & @return: size of the resulting intersection

def overlap(self, r: vivl_t) ‑> bool

overlap(self, r) -> bool Do two value intervals overlap?

@param r: (C++: const vivl_t &) vivl_t const &

def set(self, *args)

set(self, _type, _off, _size=0)

@param _type: mopt_t @param _off: sval_t @param _size: int

set(self, voff, _size)

@param voff: voff_t const & @param _size: int

def set_reg(self, mreg: mreg_t, sz: int = 0)

set_reg(self, mreg, sz=0)

@param mreg: mreg_t @param sz: int

def set_stkoff(self, stkoff: sval_t, sz: int = 0)

set_stkoff(self, stkoff, sz=0)

@param stkoff: sval_t @param sz: int

Inherited members

class voff_t (*args)

Proxy of C++ voff_t class.

init(self) -> voff_t init(self, _type, _off) -> voff_t

@param _type: mopt_t @param _off: sval_t

init(self, op) -> voff_t

@param op: mop_t const &

Subclasses

Instance variables

var off : sval_t

register number or stack offset

var thisown

The membership flag

var type : mopt_t

mop_r - register, mop_S - stack, mop_z - undefined

Methods

def add(self, width: int) ‑> voff_t

add(self, width) -> voff_t

@param width: int

def compare(self, r: voff_t) ‑> int

compare(self, r) -> int

@param r: voff_t const &

def defined(self) ‑> bool

defined(self) -> bool

def diff(self, r: voff_t)

diff(self, r) -> sval_t

@param r: voff_t const &

def get_reg(self)

get_reg(self) -> mreg_t

def get_stkoff(self)

get_stkoff(self) -> sval_t

def inc(self, delta: sval_t)

inc(self, delta)

@param delta: sval_t

def is_reg(self) ‑> bool

is_reg(self) -> bool

def is_stkoff(self) ‑> bool

is_stkoff(self) -> bool

def set(self, _type: mopt_t, _off: sval_t)

set(self, _type, _off)

@param _type: mopt_t @param _off: sval_t

def set_reg(self, mreg: mreg_t)

set_reg(self, mreg)

@param mreg: mreg_t

def set_stkoff(self, stkoff: sval_t)

set_stkoff(self, stkoff)

@param stkoff: sval_t

def undef(self)

undef(self)