+
    i                    X   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI t ^ RI!t!^ RI"t"^ RI#t#^ RI$t$^ RI%t%^ RI&t&^ RI't']PP                  R8H  t)])'       d   RMRt* ! R R]+4      t,/ t-R t.R t/R	 t0]PP                  t(]Pb                  t1]!Pd                  t2]Pf                  ! ]4R
R R3/4       ]Pj                  t5]Pl                  t6R t7R t8R t9]Pt                  t:]Pv                  t;]Px                  t<]Pz                  t=]P|                  t>R t?R t@R tAR tBR tC]P                  tD]P                  tE]P                  tF]P                  tG]P                  tH]P                  tI]P                  tJ]I]H,          tKR tLR tMR tNR tOR tP]P                  tQ]P                  tR]P                  tS]P                  tT]P                  tU]P                  tV]P                  tW]P                  tX]P                  tY]P                  tZ]P                  t[]P                  t\]P                  t]]P                  t^]P                  t_]P                  t`]P                  ta]P                  tb]P                  tc]P                  td]P                  te]P                  tf]P                  tg]P                  th]P                  ti]P                  tjR tkR tlR tmR tnR toR tpR tqR  trR! tsR" ttR# tuR$ tvR% twR& txR' tyR( tzR) t{R* t|R+ t}R, t~R- tR. tR/ tR0 t]EP                  R,          t]EP                  R,          t]EP
                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          t]EP                  R,          tR1 tR2 tR3 tR4 tR5 tR6 tR7 tR8 tR9 tR: tR; tR< t]EP8                  R,          t]EP:                  R,          t]EP<                  R,          t]EP>                  R,          t]EP@                  t]EPB                  t]EPD                  t]EPF                  t]EPH                  t]EPJ                  t]EPL                  t]EPN                  t]EPP                  t]EPR                  tR= tR> tR? tR@ tRA tRB tRC tRD tRE tRF tRG tRH tRI tRJ tRK tRL tRM tRN tRO t^ tERtERtERt]EP                  t]EP                  t]EP                  t]EP                  tRP tRQ tERRR lt]EP                  tERRS lt]EP                  tRT tRU t]EP                  t]EP                  tRV t]EP                  tERRW lt]EP                  3RX lt]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  t]EP                  tRY tRZ t]EP                  tR[ tR\ tR] tR^ tR_ tR` tRa tRb tRc tRd tRe t]EP                  t]EP                  tRf t]EP                  t]EP                  t]EP                  t]EP                  tRg t^t^t^t^t^t^ t^t^ t^0t]EP                  t]EP                   Et ]EP                  Et]EP                  Et]EP                  EtRh Et]EP
                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et	]EP                  Et
]EP                  Et]EP                  Et]EP                  Et]EP                  Et^Et^ Et^EtRiEtRjEt]EP(                  Et]EP*                  Et]EP,                  Et]EP.                  Et]EP2                  EtRk Et]EP6                  EtRl Et]EP:                  EtRm EtRn Et]EP@                  Et ]EPB                  Et!]EPD                  Et"]EPF                  Et#]EPH                  Et$]EPJ                  Et%]EPL                  Et&]EPN                  Et(]EPR                  Et)]EPT                  Et*]EPV                  Et+]EPX                  Et,^Et-^Et.^Et/^Et0E].3Ro lEt1]EPd                  Et2]EPf                  Et3Rp Et4]EPj                  Et5]EPl                  Et6]EPn                  Et7]EPp                  Et8]EPr                  Et9]EPt                  Et:Rq Et;]EPx                  Et<]EPz                  Et=]EP|                  Et>]EP~                  Et?]EP                  Et@]EP                  EtA]EP                  EtB]EP                  EtC]EP                  EtD]EP                  EtE]EP                  EtF]EP                  EtG]EP                  EtH]EP                  EtIRr EtJRsEtKRtEtLRuEtMRvEtNRw EtORx EtP]EP                  EtQ]EP                  EtR]EP                  EtSRy EtT]EP                  EtU]EP                  EtV]EP                  EtWERRz lEtX]EP                  EtYR{ EtZR| Et[R} Et\R~ Et]R Et^]EP                  Et`R Eta]EP                  Etb]EP                  Etc]EP                  Etd]EP                  EteR EtfR EtgR Eth]EP                  EtiR Etj]EP                  EtkR EtlR EtmR EtnR Eto]EP                  Etp]EP                  Etq](3R lEtrERR lEts]EP                  Ett]EP                  Etu]EP                  Etv]EP                  EtwR EtxR Ety]EP                  Etz]EP                  Et{]EP                  Et|]EP                  Et}]EP                  Et~]EP                  Et]EP                   Et]EP                  Et]EP                  Et]EP                  EtERR lEtR EtR Et]EP                  Et]EP                  EtR EtR EtR EtR Et]EP                  Et]EP                  Et]EP                  Et]EP                   Et]EP"                  Et]EP$                  Et]EP&                  Et]EP(                  Et]EP*                  Et]EP,                  Et]EP.                  Et]EP0                  Et]EP2                  Et]EP4                  Et]EP*                  Et]EP,                  Et]EP.                  Et]EP0                  Et]EP2                  Et]EP4                  Et]EP,                  Et]EP.                  Et]EP0                  Et]EP2                  Et]EP4                  Et]EP4                  ^,           Et]EP*                  Et]EP,                  Et]EP.                  Et]EP0                  Et]EP2                  Et]EP4                  EtR Et]EP\                  EtE]Et]EP`                  Et]EPb                  Et]EPd                  Et]EPf                  Et]EPh                  Et]EPj                  Et]EPl                  Et]EPn                  Et]EPp                  Et]EPr                  Et]EPt                  Et]EPv                  Et]EPx                  Et]EPz                  Et]EP|                  Et]EP~                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  EtE]EtERE]3R lEtR Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  EtR Et^ Et^Et^Et^Et^EtE]Et^Et^ Et^Et^Et^Et^Et^Et^Et^Et^Et^	Et^
Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^ Et ^@Et^EtRiEt^Et^	Et^
EtR EtE]! ]. ERO4       ^Et^Et	^Et
^Et^Et^Et^Et^Et^Et^Et^Et^Et^EtE]Et^EtE]Et^Et^EtE]Et^EtE]Et^Et^Et^EtE]Et ^ Et!E]!Et"^!Et#E]#Et$^"Et%^#Et&^$Et'E]'Et(^%Et)E])Et*^&Et+^'Et,^(Et-^)Et.^)Et/^*Et0^+Et1^,Et2^-Et3E]3Et4^.Et5E]5Et6^/Et7E]7Et8^0Et9^1Et:^2Et;^3Et<^4Et=^5Et>^6Et?^7Et@^9EtA^EtB^ EtC^EtD^EtE^EtF^EtG^EtH^EtI^:EtJ^;EtK^<EtL^=EtM^>EtN^?EtO^@EtP^AEtQ^BEtRE]AEtSE]JEtTE]KEtUE]LEtVE]MEtWE]NEtXE]OEtYE]PEtZE]QEt[E]REt\^CEt]^DEt^/ E]]]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]^]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]	]EP                  ]EP                  3bE]7]EP                  ]EP                  3bE]J]EP                  ]EP                  3bE]N]EP                  ]EP                  3bE]A]EP                  ]EP                  3bE]L]EP                  ]EP                  3bE]M]EP                  ]EP                  3bE]K]EP                  ]EP                  3bE]P]EP                  ]EP                  3bE]R]EP                  ]EP                  3bE]Q]EP                  ]EP                   3b/ E]O]EP                  ]EP                  3bE]4]EP                  ]EP                  3bE].]EP
                  ]EP                  3bE]]EP                  ]EP                  3bE]@]EP                  ]EP                  3bE]+]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                   3bE]]EP"                  ]EP$                  3bE]]EP&                  ]EP(                  3bE]-]EP*                  ]EP,                  3bE]1]EP.                  ]EP0                  3bE]]EP2                  ]EP4                  3bE]5]EP6                  ]EP8                  3bE],]EP:                  ]EP<                  3bE])]EP>                  ]EP@                  3bE]]EPB                  ]EPD                  3bC/ E]]EPF                  ]EPH                  3bE]0]EPJ                  ]EPL                  3bE]]EPN                  ]EPP                  3bE]%]EPR                  ]EPT                  3bE]]EPV                  ]EPX                  3bE]]EPZ                  ]EP\                  3bE]T]EP                  ]EP                  3bE]&]EP^                  ]EP`                  3bE]]EPb                  ]EPd                  3bE]]EPf                  ]EPh                  3bE]]EPj                  ]EPl                  3bE]]EPn                  ]EPp                  3bE]2]EPr                  ]EPt                  3bE]9]EPv                  ]EPx                  3bE]]EP                  ]EP                  3bE]]EPz                  ]EP|                  3bE]]EP~                  ]EP                  3bC/ E]!]EP                  ]EP                  3bE]']EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EPz                  ]EP|                  3bE]]EP                  ]EP                  3bE]
]EP                  ]EP                  3bE];]EP                  ]EP                  3bE]:]EP                  ]EP                  3bE]>]EP                  ]EP                  3bE]?]EP                  ]EP                  3bE]<]EP                  ]EP                  3bE]=]EP                  ]EP                  3bE]]EP                  ]EP                  3bE]]EP                  ]EP                  3bCE]#]EP                  ]EP                  3E]]EP                  ]EP                  3/CEtR EtR Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  EtR EtR Et]EP                  EtR EtERR lEt]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et^ Et^Et^Et^Et]EP                  Et]EP                  EtR EtR Et ]EP                  Et]EP                  EtR EtR EtR EtR EtR EtR Et]EP                  Et	]EP                  Et
]EP                  Et]EP                  Et]EP                  Et]EP                  EtR Et]EP                   Et]EP"                  Et]EP$                  Et]EP&                  EtR EtR EtR EtR Et]EP0                  Et]EP2                  Et]EP4                  Et]EP6                  Et]EP8                  Et]EP:                  Et]EP<                  Et]EP>                  Et]EP@                  Et ]EPB                  Et!]EPD                  Et"R Et#]EPH                  Et$]EPJ                  Et%]EPL                  Et&]EPN                  Et']EPP                  Et(]EPR                  Et)R Et*R Et+R Et,R Et-]EP\                  Et.]EP^                  Et/]EP`                  Et0]EPb                  Et1]EPd                  Et2]EPf                  Et3]EPh                  Et4]EPj                  Et5]EPl                  Et6]EPn                  Et7]EPp                  Et8]EPr                  Et9R Et:R Et;^ Et<^Et=^Et>^Et?^Et@^EtA^EtB^EtC^EtD^ EtE^$EtF^(EtG^,EtH^0EtI^4EtJ^`EtK^dEtL])'       d4   ^ Et<^Et=^ Et>^(Et?^)Et@^*EtA^+EtB^,EtC^0EtD^8EtE^@EtF^HEtG^PEtH^XEtI^`EtJ^EtK^EtL/ E]<ERbE]=ERbE]>ERbE]?ERbE]@ERbE]AERbE]BERbE]CERbE]DERbE]EERbE]FERbE]GERbE]HERbE]IERbE]JERbE]KERbE]LERbEtM^EtN^EtO^EtP^EtQ^EtR^ EtSR EtT^EtU^EtV^EtW^EtX^ EtYEREtZEREt[EREt\EREt]EREt^EREt_EREt`EREtaEREtbEREtcEREtd]EP                  Ete]EP                  Etg^ Eth^Eti^Etj^Etk^Etl^Etm^Etn^ Eto] EP                  Etp] EP                  Etq] EP                  Etr] EP                  Ets] EP                  Ett] EP                  Etu] EP                  Etv] EP                  Etw] EP                  Etx] EP                  Ety] EP                  Etz] EP                  Et{] EP                  Et|] EP                  Et}] EP                  Et~] EP                  Et] EP                   Et] EP                  Et] EP                  Et] EP                  Et] EP                  EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR Et]EP0                  Et]EP2                  Et]EP4                  EtR EtR EtR EtR Et^ Et^Et^Et^Et^Et^Et^Et^ Et^$Et^Et^Et])'       d"   ^ Et^Et^Et^Et^ Et^(Et^0Et^8Et^@Et^Et^ EtE]ERE]ERE]ERE]ERE]ERE]ERE]ERE]ERE]ERE]ERE]ER/EtR Et]EPX                  Et]EPZ                  Et]EP\                  Et]EP^                  Et]EPb                  Et]EPd                  Et]EPf                  Et]EPh                  Et]EPj                  Et]EPl                  Et]EPn                  Et]EPp                  Et]EPr                  Et]EPt                  Et]EPv                  EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR EtR Et]EP                  EtR EtR EtR EtR EtR EtR EtR EtR Et]
EP                  EtR EtR Et]
EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]EP                  Et]	EP                  Et]	EP                  EtR Et^Et^Et^Et^Et^Et^Et^Et^Et^Et^	Et^EtRuEtR Et^Et^Et^Et^EtR EtR EtR EtR Et]	EP                  Et]EP                  Et]EP                  Et]EP                  EtR EtR Et R EtR EtR EtR EtR EtR EtR EtR EtERR lEt	R Et
R EtR EtR EtR EtR EtERR lEtER^ E]	3R lEtER  EtER EtER^ E]	3ER lEtER EtERER lEt^EtER EtERER lEtER EtER EtER	 EtER
 EtER EtER EtER Et ER Et!ER Et"ER Et#ER Et$ER Et%ER Et&ER Et'ER Et(ER Et)ERER lEt*ERER lEt+ERER lEt,ERER lEt-ER Et.ERER lEt/ER Et0ER Et1ER Et2ER  Et3ER! Et4ER" Et5ER# Et6ER$ Et7ER% Et8ER& Et9ERER' lEt:ERER( lEt;ER) Et<ERER* lEt=ER+Et>ER, Et?ER- Et@]EP                  EtB ]EP                  EtD  ! ER. ER/E]E4      EtFE]F! 4       E]FEnG        ER0 EtHER1 EtIER2 EtJER3 EtKER4 EtLER5 EtMER6 EtNER7 EtOER8 EtPER9 EtQER: EtRER; EtSER< EtTER= EtUER> EtVER? EtWER@ EtXERA EtYERB EtZERC Et[ERD Et\ERE Et]]EP                  Et^]EP                  Et_]EP                  Et`]EP                  Eta]EP                  Etb]EP                  EtcERF EtdERG EteERH EtfERI EtgE]gEthERJ EtiERK EtjERL Etk^ Etl^Etm^EtnE]m3ERM lEto]EP                  Etp]EP                  Etq]EP                  Etr]EP                  Ets]EP                  Ett]EP                  Etu]EP                  Etv]EP                  Etw]EP                  EtxE]pEty^ Etz^Et{^ Et|^0Et}^@Et~^PEtERNEt]E	P                  EtERO EtERP EtERERQ lEtERR Et^Et^Et^Et^EtERS EtERT EtERU Et^ Et^Et^Et^Et^Et^Et^ Et^@Et^EtRiEtRjEtRvEtERVEtRsEtERWEtERX Et]E	P<                  EtERY Et]E	P@                  Et]E	PB                  Et]E	PD                  Et]E	PF                  Et]E	PH                  Et]E	PJ                  Et]E	PL                  Et]E	PN                  Et]E	PP                  Et]E	PR                  Et]E	PT                  Et]E	PV                  Et]E	PX                  Et]E	PZ                  Et]E	P\                  EtERZ EtER[ EtER\ EtER] EtER^ Et]E	Ph                  Et]E	Pj                  Et]E	Pl                  Et]E	Pn                  Et]E	Pp                  EtER_ EtER` Et^Et^Et^Et^Et^EtEREtEREt^ Et^Et^Et^Et^Et^Et^ Et^@Et^EtRiEtRjEtRvEtERVEtRsEt]E	P                  Et]E	P                  Et]E	P                  EtEREt^ Et^Et^Et^Et ERa EtERb EtERc EtERd EtERe EtERf EtERg EtERh EtERi EtERj EtERk EtERl EtERm EtERn EtERo Et]E	P                  Et^Et^Et^Et^Et^Et^@Et^EtRiEtRjEtRvEtERVEtRsEtERpEt^ EtERWEtERpEtRuEt]E	P                  Et]E	P                  Et]E	P                  Et]E	P                  Et^Et^Et]E	P                  Et ERq Et]E
P                  EtERr EtERs Et^Et^Et^Et^Et^Et	^Et
^EtE]
E],          Et^Et^Et^Et^Et^Et^Et^Et^ Et^@Et^EtRiEt^Et^Et^Et^ Et^Et^EtERt EtERERu lEt]E
P@                  Et ]E
PB                  Et!]E
PD                  Et"]E
PF                  Et#EREt$^ Et%^Et&^Et'ERv Et(^ Et)^Et*^Et+]E
PX                  Et,]E
PZ                  Et-^Et.^Et/^Et0^Et1]E
Pd                  Et2]E
Pf                  Et3]E
Ph                  Et4]E
Pj                  Et5ERw Et6]E
Pn                  Et7]E
Pp                  Et8]E
Pr                  Et9]E
Pt                  Et:^ Et;^Et<^Et=^Et>^Et?^Et@^EtA]E
P                  EtB]E
P                  EtC]E
P                  EtE]E
P                  EtG]E
P                  EtI]E
P                  EtK]E
P                  EtL]E
P                  EtM]E
P                  EtNERx EtO^EtP^EtQ^EtRREtSERy EtTERz EtUER{ EtVER| EtWER} EtXER~ EtY. EtZR# (  a`  
IDC compatibility module

This file contains IDA built-in function declarations and internal bit
definitions.  Each byte of the program has 32-bit flags (low 8 bits keep
the byte value). These 32 bits are used in get_full_flags/get_flags functions.

This file is subject to change without any notice.
Future versions of IDA may use other definitions.
)print_functionNl    l    c                       ] tR t^HtRtRtR# )DeprecatedIDCErrorz)
Exception for deprecated function calls
 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       ;C:\Users\user\Downloads\ida93sp2\portable_win\python\idc.pyr   r   H   s     	r   r   c           	      b    V \         9  d$   \        R V : RV: RV: R24       R\         V &   R# R# )z
NOTE: idc.z/ is deprecated due to signature confusion with z. Please use z insteadTN)#__warned_deprecated_proto_confusionprint)whatalternatives   &&r   &__warn_once_deprecated_proto_confusionr   O   s3    66 	 59+D1 7r   c                    W!9   d9   \        WV,          ^,          4      '       d   \        WV,          ^,          4      # RV,          p\        V4      h)zf
Internal function to generically get object attributes
Do not use unless you know what you are doing
Kattribute with offset %d not found, check the offset and report the problem)hasattrgetattrKeyError)objattrmapattroffserrormsgs   &&& r   _IDC_GetAttrr   W   sI    
 wsH,=a,@AAsH-a011`ckkx  r   c                    W!9   da   W,          ^ ,          '       d   \        RV,          4      h\        WV,          ^,          4      '       d   \        WV,          ^,          V4      # RV,          p\        V4      h)zf
Internal function to generically set object attributes
Do not use unless you know what you are doing
z%attribute with offset %d is read-onlyr   )r   r   setattr)r   r   r   valuer   s   &&&& r   _IDC_SetAttrr!   c   sk     QBXMNNS(+A.//3 1! 4e<<\_ggH
8
r   MAXADDRc                  ,    \         P                  ! 4       # N)ida_idainf_get_privrange_start_ear   r   r   <lambda>r'   x   s    W??Ar   c                 "    V \         ,          ^ 8g  #     )FF_IVLFs   &r   	has_valuer.      s    q6za/0r   c                    V \         ,          # )z
Get byte value from flags
Get value of byte provided that the byte is initialized.
This macro works ok only for 8-bit byte machines.
)MS_VALr,   s   &r   
byte_valuer1      s     Jr   c                *    \        \        V 4      4      # )zIs the byte initialized?)r.   get_full_flagseas   &r   	is_loadedr6      s    ^B'((r   c                 *    V \         ,          \        8H  # r$   )MS_CLSFF_CODEr,   s   &r   is_coder:          q6zg56r   c                 *    V \         ,          \        8H  # r$   )r8   FF_DATAr,   s   &r   is_datar>      r;   r   c                 *    V \         ,          \        8H  # r$   )r8   FF_TAILr,   s   &r   is_tailrA      r;   r   c                 *    V \         ,          \        8H  # r$   )r8   FF_UNKr,   s   &r   
is_unknownrD      s    q6zf45r   c                 "    V \         ,          ^ 8g  # r)   )r=   r,   s   &r   is_headrF          q7{q01r   c                 "    V \         ,          ^ 8g  # r)   )FF_FLOWr,   s   &r   is_flowrJ      rG   r   c                 "    V \         ,          ^ 8g  # r)   )FF_LINEr,   s   &r   isExtrarM          a'ka/0r   c                 "    V \         ,          ^ 8g  # r)   )FF_REFr,   s   &r   isRefrQ      s    a&ja/0r   c                 "    V \         ,          ^ 8g  # r)   )FF_NAMEr,   s   &r   hasNamerT      rN   r   c                 *    V \         ,          \        8H  # r$   )
FF_ANYNAMErS   r,   s   &r   hasUserNamerW      s    a*n89r   c                 *    V \         ,          \        8g  # r$   )MS_0TYPEFF_0VOIDr,   s   &r   
is_defarg0r[          q8|89r   c                 *    V \         ,          \        8g  # r$   )MS_1TYPEFF_1VOIDr,   s   &r   
is_defarg1r`      r\   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0NUMDr,   s   &r   isDec0rc          a(lx78r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1NUMDr,   s   &r   isDec1rg      rd   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0NUMHr,   s   &r   isHex0rj      rd   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1NUMHr,   s   &r   isHex1rm      rd   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0NUMOr,   s   &r   isOct0rp      rd   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1NUMOr,   s   &r   isOct1rs      rd   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0NUMBr,   s   &r   isBin0rv      rd   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1NUMBr,   s   &r   isBin1ry      rd   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0OFFr,   s   &r   is_off0r|          q8|78r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1OFFr,   s   &r   is_off1r      r}   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0CHARr,   s   &r   is_char0r      r\   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1CHARr,   s   &r   is_char1r      r\   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0SEGr,   s   &r   is_seg0r      r}   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1SEGr,   s   &r   is_seg1r      r}   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0ENUMr,   s   &r   is_enum0r      r\   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1ENUMr,   s   &r   is_enum1r      r\   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0FOPr,   s   &r   
is_manual0r          !h,7!:;r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1FOPr,   s   &r   
is_manual1r      r   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0STROr,   s   &r   
is_stroff0r      r\   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1STROr,   s   &r   
is_stroff1r      r\   r   c                 *    V \         ,          \        8H  # r$   )rY   FF_0STKr,   s   &r   
is_stkvar0r      r}   r   c                 *    V \         ,          \        8H  # r$   )r^   FF_1STKr,   s   &r   
is_stkvar1r      r}   r   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   DT_TYPEFF_BYTEr,   s   &r   is_byter          GAJCCAKG+CDr   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_WORDr,   s   &r   is_wordr      r   r   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_DWORDr,   s   &r   is_dwordr          WQZEEQ[X,EFr   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_QWORDr,   s   &r   is_qwordr      r   r   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_OWORDr,   s   &r   is_owordr      r   r   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_TBYTEr,   s   &r   is_tbyter     r   r   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_FLOATr,   s   &r   is_floatr         GAJDDAKH+DEr   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   	FF_DOUBLEr,   s   &r   	is_doubler         GAJEEAKI+EFr   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_PACKREALr,   s   &r   is_pack_realr     s    WQZHHQ[[,HIr   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   	FF_STRLITr,   s   &r   	is_strlitr     s    WQZFFQ[Y,FGr   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   	FF_STRUCTr,   s   &r   	is_structr     r   r   c                 P    \        V 4      ;'       d    V \        ,          \        8H  # r$   )r>   r   FF_ALIGNr,   s   &r   is_alignr     r   r   c                     \        R 4      hz%this function is not needed in PythonNotImplementedErrorvars   &r   value_is_stringr   ,       34[ \\r   c                     \        R 4      hr   r   r   s   &r   value_is_longr   -  r   r   c                     \        R 4      hr   r   r   s   &r   value_is_floatr   .  r   r   c                     \        R 4      hr   r   r   s   &r   value_is_funcr   /  r   r   c                     \        R 4      hr   r   r   s   &r   value_is_pvoidr   0  r   r   c                     \        R 4      hr   r   r   s   &r   value_is_int64r   1  r   r   c                "    V ^,          V,           # )z.
Return value of expression: ((seg<<4) + off)
r   )segoffs   &&r   to_ear   3  s     1Hr   c                     \        R 4      h)z;form() is deprecated. Use python string operations instead.r   )formatargss   &*r   formr   9      
Z
[[r   c                     \        R 4      h)z=substr() is deprecated. Use python string operations instead.r   )sx1x2s   &&&r   substrr   <      
\
]]r   c                     \        R 4      h)z=strstr() is deprecated. Use python string operations instead.r   )s1s2s   &&r   strstrr   ?  r   r   c                     \        R 4      h)z=strlen() is deprecated. Use python string operations instead.r   r   s   &r   strlenr   B  r   r   c                     \        R 4      h)z0xtol() is deprecated. Use python long() instead.r   r   s   &r   xtolr   E      
O
PPr   c                .    \         P                  ! V 4      # )z
Convert address value to a string
Return address in the form 'seg000:1234'
(the same as in line prefixes)

:param ea: address to format
)ida_kernwinea2strr4   s   &r   atoar   H  s     b!!r   c                     \        R 4      h)z;ltoa() is deprecated. Use python string operations instead.r   )nradixs   &&r   ltoar  R  r   r   c                     \        R 4      h)z0atol() is deprecated. Use python long() instead.r   r   s   &r   atolr  U  r   r   c                <   V^ 8  g   Q R4       hV^ 8  g   Q R4       hW,          p^W2,           ,          ^V,          ,
          pW,          pV^ 8  dY   \        V4       FH  pWSV,           ^,
          ,	          ^,          '       d   V^,          ^V,          ,          pK?  V^,          pKJ  	  MW\        V) 4       FG  pWS,	          ^,          '       d'   V^,	          ^W2,           ^,
          ,          ,          pK>  V^,	          pKI  	  W V,          ,
          WT,          ,          p V # )a_  
Rotate a value to the left (or right)

:param value: value to rotate
:param count: number of times to rotate. negative counter means
              rotate to the right
:param nbits: number of bits to rotate
:param offset: offset of the first bit to rotate

:returns: the value with the specified field rotated
         all other bits are not modified
zoffset must be >= 0znbits must be > 0)range)r    countnbitsoffsetmasktmpxs   &&&&   r   rotate_leftr  Y  s     Q;---;19)))9	NEv|q&y(D
,CqyuAuQ'1,,axAK0ax	  vA""axA&,q.$9:ax	  $JCJ/ELr   c                     \        W^ ^ 4      # )    r  r  r  s   &&r   rotate_dwordr        ;qQ#??r   c                     \        W^^ 4      # )   r  r  s   &&r   rotate_wordr    r  r   c                     \        W^^ 4      # )   r  r  s   &&r   rotate_byter    s    ;qA#>>r   c                   \         P                  ! 4       p\         P                  ! V\        V 4      pV'       d
   RV,           # VP                  R8X  d   VP
                  # VP                  R8X  d   VP                  4       # \        R4      h)a)  
Evaluate an IDC expression

:param expr: an expression

:returns: the expression value. If there are problems, the returned value will be "IDC_FAILURE: xxx"
         where xxx is the error description

NOTE: Python implementation evaluates IDC only, while IDC can call other registered languages
IDC_FAILURE: z?eval_idc() supports only expressions returning strings or longs)ida_expridc_value_teval_idc_exprBADADDRvtypenumc_strr   )exprrverrs   &  r   eval_idcr(    sm     
			B

 
 Wd
3C
s""88v66MXX88:%&ghhr   c                X    \        V 4      \        8H  ;'       d    V P                  R4      # )z
Check the result of eval_idc() for evaluation failures

:param code: result of eval_idc()

:returns: True if there was an evaluation error
r  )typebytes
startswith)codes   &r   EVAL_FAILUREr.    s$     :CC4???#CCr   c                    \        V 4      ^ 8X  d   \        4       p \        P                  \        P                  ,          \        P
                  ,          p\        P                  ! WV,          4      # )z
Save current database to the specified idb file

:param idbname: name of the idb file. if empty, the current idb
                file will be used.
:param flags: combination of ida_loader.DBFL_... bits or 0
)lenget_idb_path
ida_loader	DBFL_KILL	DBFL_COMPDBFL_BAKsave_database)idbnameflagsr
  s   && r   r6  r6    sM     7|q.*"6"669L9LLD##GT\::r   c                .    \         P                  ! V 4      # )z
check consistency of IDB name records
:param do_repair: try to repair netnode header it TRUE
:returns: number of inconsistent name records
)ida_naltvalidate_idb_names)	do_repairs   &r   r;  r;    s     &&y11r   c                .    \         P                  ! V 4      # )a   
Execute an OS command.

:param command: command line to execute

:returns: error code from OS

NOTE: IDA will wait for the started program to finish.
In order to start the command in parallel, use OS methods.
For example, you may start another program in parallel using
"start" command.
)ossystem)commands   &r   call_systemrA    s     99Wr   c                R    \         P                  ! \        V 4      R,          4       R# )z
qsleep the specified number of milliseconds
This function suspends IDA for the specified amount of time

:param milliseconds: time to sleep
i  N)timesleepfloat)millisecondss   &r   qsleeprG    s     	JJu\"4'(r   c                 8   \         P                  ! 4       p V \        8w  Edy   V \         P                  ! 4       8:  Ed\   \        P
                  ! V 4       \        P                  ! V 4       \        P                  ! V 4      pV'       dG   \        P                  ! VRR4       \        P                  ! VRR4       \        P                  ! V 4       \        P                  ! V 4       \        P                  ! V 4      pV'       dk   \        P                  ! VRR4       \        P                  ! VRR4       \        P                   ! V \        P"                  \        P$                  ,          4       \        P&                  ! V \         P                  ! 4       4      p EK  R# R# )zV
Delete all segments, instructions, comments, i.e. everything
except values of bytes.
 FTN)r%   inf_get_min_ear!  inf_get_max_eaida_namedel_local_namedel_global_name	ida_funcsget_funcset_func_cmtdel_func	ida_bytesdel_hidden_rangeida_segmentgetsegset_segment_cmtdel_segmSEGMOD_KEEPSEGMOD_SILENT	next_head)r5   funcr   s      r   delete_all_segmentsr]    s   
 
			!B -B'"8"8"::#  $!!"%""4U3""4T2r"""2&  $''R7''R6  [%<%<{?X?X%XY  W%;%;%=> ;-r   c                0    \         P                  ! WV4      # )z
Perform full analysis of the range

:param sEA: starting linear address
:param eEA: ending linear address (excluded)
:param final_pass: make the final pass over the specified range

:returns: 1-ok, 0-Ctrl-Break was pressed.
)ida_autoplan_and_wait)sEAeEA
final_passs   &&&r   r`  r`    s     !!#J77r   c                0    \         P                  ! WV4      # )z
Rename an address

:param ea: linear address
:param name: new name of address. If name == "", then delete old name
:param flags: combination of SN_... constants

:returns: 1-ok, 0-failure
)rL  set_name)r5   namer8  s   &&&r   re  re    s     Ru--r   c                   \         P                  ! V 4      p\         P                  ! V4      '       g9   \         P                  ! V4      '       g   \         P                  ! V4      '       d   R# \         P
                  ! V4      '       d   \         P                  p\         P                  ! V4      '       d_   \        P                  ! 4       p\         P                  ! W0^ V4      '       g   Q R4       h\         P                  ! WV4      pVP                  pM\         P                  ! V 4      p\        p\         P                  ! WWA,          V4      # )a  
Create an array.

:param ea: linear address
:param nitems: size of array in items

NOTE: This function will create an array of the items with the same type as
the type of the item at 'ea'. If the byte at 'ea' is undefined, then
this function will create an array of bytes.
Fzget_opinfo() failed)rS  	get_flagsr:   rA   r   rD   r   r   r:  opinfo_t
get_opinfoget_data_elsizetidget_item_sizer!  create_data)r5   nitemsr8  tiitemsizerl  s   &&    r   
make_arrayrr  A  s     #E9#4#4U#;#;y?Q?QRW?X?XE""!!5!! ##BAu55L7LL5,,R;ff**2.  HOSAAr   c                p    \         P                  ! Y\        8X  d   ^ MW,
          \        \        4      4      # )a  
Create a string.

This function creates a string (the string type is determined by the
value of get_inf_attr(INF_STRTYPE))

:param ea: linear address
:param endea: ending address of the string (excluded)
    if endea == BADADDR, then length of string will be calculated
    by the kernel

:returns: 1-ok, 0-failure

NOTE: The type of an existing string is returned by get_str_type()
)rS  create_strlitr!  get_inf_attrINF_STRTYPE)r5   endeas   &&r   rt  rt  `  s(      ""2W,<q%*l[fNghhr   c                0    \         P                  ! V ^4      # )zZ
Convert the current item to a byte

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_byter4   s   &r   ry  ry  v         Q''r   c                0    \         P                  ! V ^4      # )zd
Convert the current item to a word (2 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_wordr4   s   &r   r|  r|    rz  r   c                0    \         P                  ! V ^4      # )zk
Convert the current item to a double word (4 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_dwordr4   s   &r   r~  r~         !!"a((r   c                0    \         P                  ! V ^4      # )zk
Convert the current item to a quadro word (8 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_qwordr4   s   &r   r  r    r  r   c                0    \         P                  ! V ^4      # )zt
Convert the current item to an octa word (16 bytes/128 bits)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_owordr4   s   &r   r  r         !!"b))r   c                0    \         P                  ! V ^ 4      # )zr
Convert the current item to a ymm word (32 bytes/256 bits)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_ywordr4   s   &r   r  r    r  r   c                0    \         P                  ! V ^4      # )zn
Convert the current item to a floating point (4 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_floatr4   s   &r   r  r    r  r   c                0    \         P                  ! V ^4      # )zu
Convert the current item to a double floating point (8 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_doubler4   s   &r   r  r    s     ""2q))r   c                V    \         P                  ! V \        P                  ! 4       4      # )zr
Convert the current item to a packed real (10 or 12 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_packed_realida_idpph_get_tbyte_sizer4   s   &r   create_pack_realr    s      ''G,E,E,GHHr   c                V    \         P                  ! V \        P                  ! 4       4      # )zl
Convert the current item to a tbyte (10 or 12 bytes)

:param ea: linear address

:returns: 1-ok, 0-failure
)rS  create_tbyter  r  r4   s   &r   r  r    s      !!"g&?&?&ABBr   c                   \         P                  ! 4       pVP                  RV4      '       d   VP                  4       '       g   R# VR8X  d   VP	                  4       p\
        P                  ! WVP                  4       4      # )z
Convert the current item to a structure instance

:param ea: linear address
:param size: structure size in bytes. -1 means that the size
    will be calculated automatically
:param strname: name of a structure type

:returns: 1-ok, 0-failure
N)ida_typeinftinfo_tget_named_typeis_udtget_sizerS  create_structget_tid)r5   sizestrnametifs   &&& r   r  r    s_     


CdG,,CJJLL	rz||~""2S[[];;r   c                
   \         P                  ! V 4      pV'       g   ^ # \        P                  ! R\        P                  4      pVP                  V4      pV'       d   \        P                  ! VP                  ^4      4      pVR8X  d   ^ # \        VP                  ^4      ^ 4      p\        P                  ! WCV\        P                  ! \        P                  4      4      '       d   ^# ^ # \        P                  ! W@WVR4      # )a  
Create a local variable

:param start: start of address range for the local variable
:param end: end of address range for the local variable
:param location: the variable location in the "[bp+xx]" form where xx is
                 a number. The location can also be specified as a
                 register name.
:param name: name of the local variable

:returns: 1-ok, 0-failure

NOTE: For the stack variables the end address is ignored.
      If there is no function at 'start' then this function will fail.
z\[([a-z]+)([-+][0-9a-fx]+)Nr  )rO  rP  recompile
IGNORECASEmatchr  str2reggroupint	ida_framedefine_stkvarr  r  BT_UNK_BYTE
add_regvar)	startendlocationrf  r\  rmregisterr	  s	   &&&&     r   define_local_varr    s      e$D 	

0"--@A	A??1771:.r>QWWQZ#++D@S@ST_TkTk@lmmqtstt ##DdKKr   c                *    \        RWW#3,          4      # )aU  
Set array representation format

:param ea: linear address
:param flags: combination of AP_... constants or 0
:param litems: number of items per line. 0 means auto
:param align: element alignment
              - -1: do not align
              - 0:  automatic alignment
              - other values: element width

:returns: 1-ok, 0-failure
z$set_array_params(0x%X, 0x%X, %d, %d)r(  )r5   r8  litemsaligns   &&&&r   set_array_paramsr  .  s     :Bv;UUVVr   c                r    V\         8X  d   \        P                  ! W4      # \        P                  ! WV4      # )a	  
Convert operand to an offset
(for the explanations of 'ea' and 'n' please see op_bin())

Example:
========

    seg000:2000 dw      1234h

    and there is a segment at paragraph 0x1000 and there is a data item
    within the segment at 0x1234:

    seg000:1234 MyString        db 'Hello, world!',0

    Then you need to specify a linear address of the segment base to
    create a proper offset:

    op_plain_offset(["seg000",0x2000],0,0x10000);

    and you will have:

    seg000:2000 dw      offset MyString

Motorola 680x0 processor have a concept of "outer offsets".
If you want to create an outer offset, you need to combine number
of the operand with the following bit:

Please note that the outer offsets are meaningful only for
Motorola 680x0.

:param ea: linear address
:param n: number of operand
    - 0 - the first operand
    - 1 - the second, third and all other operands
    - -1 - all operands
:param base: base of the offset as a linear address
    If base == BADADDR then the current operand becomes non-offset
)r!  rS  clr_op_type
ida_offsetop_plain_offset)r5   r   bases   &&&r   r  r  O  s0    N w$$R++))"66r      i   c                2    \         P                  ! W4       R# )z
Toggle the bitwise not operator for the operand

:param ea: linear address
:param n: number of operand
    - 0 - the first operand
    - 1 - the second, third and all other operands
    - -1 - all operands
T)rS  toggle_bnot)r5   r   s   &&r   r  r    s     " r   c                    \         P                  ! ^4      pW$^ &   \        V \        P                  4      '       d   T pM+\        P                  ! 4       p\        P
                  ! WP4       \        P                  ! WQVP                  4       ^V4      # )a  
Convert operand to an offset in a structure

:param ea: linear address
:param n: number of operand
    - 0 - the first operand
    - 1 - the second, third and all other operands
    - -1 - all operands
:param strid: id of a structure type
:param delta: struct offset delta. usually 0. denotes the difference
                between the structure base and the pointer into the structure.

)	ida_pro	tid_array
isinstanceida_uainsn_tdecode_insnrS  	op_stroffcast)r5   r   striddeltapathinsns   &&&&  r   r  r    sg     QDG"fmm$$}}4$t		Q>>r   c                N    \         P                  ! W\        P                  V4      # )a|  
Convert operand to a high offset
High offset is the upper 16bits of an offset.
This type is used by TMS320C6 processors (and probably by other
RISC processors too)

:param ea: linear address
:param n: number of operand
    - 0 - the first operand
    - 1 - the second, third and all other operands
    - -1 - all operands
:param target: the full value (all 32bits) of the offset
)r  	op_offsetr:  
REF_HIGH16)r5   r   targets   &&&r   op_offset_high16r    s     x':':FCCr   c                     R # r$   r   r4   s   &r   MakeVarr    s    r   c                n    \         P                  ! V4      pVR8X  d   R# \        P                  ! WW#4      # )a  
Set value of a segment register.

:param ea: linear address
:param reg: name of a register, like "cs", "ds", "es", etc.
:param value: new value of the segment register.
:param tag: of SR_... constants

NOTE: IDA keeps tracks of all the points where segment register change their
      values. This function allows you to specify the correct value of a segment
      register if IDA is not able to find the correct value.
Fr  )r  str2sregida_segregssplit_sreg_range)r5   regr    tags   &&&&r   r  r    s1     

3
C
by''<<r   c                (    \        W ^,           V4      # )z
Plan to analyze an address
)auto_mark_range)r5   qtypes   &&r   AutoMarkr    s     2d5))r   c                    V \         P                  8X  d   \        P                  M\        P                  pV! V4      pV'       d0   \         P
                  ! WW#V4      p^ RIpVP                  V4       V# R# )a  
Generate an output file

:param filetype:  type of output file. One of OFILE_... symbols. See below.
:param path:  the output file path (will be overwritten!)
:param ea1:   start address. For some file types this argument is ignored
:param ea2:   end address. For some file types this argument is ignored
:param flags: bit combination of GENFLG_...

:returns: number of the generated lines.
            -1 if an error occurred
            OFILE_EXE: 0-can't generate exe file, 1-ok
Nr  )r2  	OFILE_EXE
ida_diskiofopenWBfopenWTgen_fileida_fproqfclose)	filetyper  ea1ea2r8  fopenfpretvalr  s	   &&&&&    r   r  r    s_     #+j.B.B"BJ
HZHZE	tB	$$X3UC	r   c                4    \         P                  ! WRW#V4      # )a  
Generate a flow chart GDL file

:param outfile: output file name. GDL extension will be used
:param title: graph title
:param ea1: beginning of the range to flow chart
:param ea2: end of the range to flow chart.
:param flags: combination of CHART_... constants

NOTE: If ea2 == BADADDR then ea1 is treated as an address within a function.
       That function will be flow charted.
N)ida_gdlgen_flow_graph)outfiletitler  r  r8  s   &&&&&r   r  r  I  s     !!'$%HHr   i   i @  i   i   c                2    \         P                  ! V RW4      # )z
Generate a function call graph GDL file

:param outfile: output file name. GDL extension will be used
:param title:   graph title
:param flags:   combination of CHART_GEN_GDL, CHART_WINGRAPH, CHART_NOLIBFUNCS
zGenerating chart)r  gen_simple_call_chart)r  r  r8  s   &&&r   r  r  _  s     ((2DeSSr   c                 .    \         P                  ! R4      # )zN
Get IDA directory

This function returns the directory where IDA.EXE resides
rI  )r  idadirr   r   r   r  r  m  s     R  r   c                 J    \         P                  ! \         P                  4      # )zP
Get IDB full path

This function returns full path of the current IDB database
)r2  get_pathPATH_TYPE_IDBr   r   r   r1  r1  {  s     z7788r   c                j    V'       d   \         P                  ! W4      # \        P                  ! W4      # )a  
Return the specified number of bytes of the program

:param ea: linear address

:param size: size of buffer in normal 8-bit bytes

:param use_dbg: if True, use debugger memory, otherwise just the database

:returns: None on failure
         otherwise a string containing the read bytes
)ida_idddbg_read_memoryrS  	get_bytes)r5   r  use_dbgs   &&&r   r  r    s)     &&r00""2,,r   c                 $   V\         P                  9  d   R # \        P                  ! W4      pVf   R # \        P
                  ! \        P                  ! 4       '       d   RMR\         P                  V,          ^,          ,           V4      ^ ,          # )N><)
ida_idaapi__struct_unpack_tabler  r  structunpackr%   	inf_is_be)r5   r0  r  s   && r   
__DbgValuer    s    
*222(A94  H&--8I8I8K8KQTXbXxXxy|X}~  YA  1A  CD  #E  FG  #H  Hr   c                    \        V ^4      # )zx
Get value of program byte using the debugger memory

:param ea: linear address
:returns: The value or None on failure.
r  r4   s   &r   read_dbg_byter         b!r   c                    \        V ^4      # )zx
Get value of program word using the debugger memory

:param ea: linear address
:returns: The value or None on failure.
r  r4   s   &r   read_dbg_wordr	    r  r   c                    \        V ^4      # )z
Get value of program double-word using the debugger memory

:param ea: linear address
:returns: The value or None on failure.
r  r4   s   &r   read_dbg_dwordr    r  r   c                    \        V ^4      # )z
Get value of program quadro-word using the debugger memory

:param ea: linear address
:returns: The value or None on failure.
r  r4   s   &r   read_dbg_qwordr    r  r   c                    \        RR4       \        P                  ! 4       '       g   R# \        V4      ^ 8  d   \        P
                  ! W4      # R# )z
Write to debugger memory.

:param ea: linear address
:param data: string to write
:returns: number of written bytes (-1 - network/debugger error)

Thread-safe function (may be called only from the main thread and debthread)
write_dbg_memoryzida_dbg.write_dbg_memoryNr  )r   ida_dbgdbg_can_queryr0  r  dbg_write_memory)r5   datas   &&r   r  r    sE     ++=?YZ  ""		TQ''11 
r   c                ~    \         P                  ! R\        V 4      4      p\         P                  ! RV4      ^ ,          # )z
Get value of a floating point number (4 bytes)
This function assumes number stored using IEEE format
and in the same endianness as integers.

:param ea: linear address

:returns: float
If)r   packget_wide_dwordr  r5   r  s   & r   GetFloatr    s/     ++c>"-
.C==c"1%%r   c                ~    \         P                  ! R\        V 4      4      p\         P                  ! RV4      ^ ,          # )z
Get value of a floating point number (8 bytes)
This function assumes number stored using IEEE format
and in the same endianness as integers.

:param ea: linear address

:returns: double
Qd)r   r  	get_qwordr  r  s   & r   	GetDoubler    s.     ++c9R=
)C==c"1%%r   c                8    \         P                  ! \        V 4      # )z
Get linear address of a name

:param name: name of program byte

:returns: address of the name
         BADADDR - No such name
)rL  get_name_ear!  rf  s   &r   get_name_ea_simpler#    s     ..r   c                    \         P                  ! V 4      p\         P                  ! V4      pV'       d   VP                  # \        # )z
Get segment by segment base

:param base: segment base paragraph or selector

:returns: linear address of the start of the segment or BADADDR
         if no such segment
)rU  find_selectorget_segm_by_selstart_ear!  )r  selr   s   &  r   r&  r&    s6     
#
#D
)C

%
%c
*C
||r   c                 T    \         P                  ! \        P                  ! 4       4      # )z:
Get the disassembly line at the cursor

:returns: string
)	ida_lines
tag_remover   get_curliner   r   r   r,  r,  (  s      7 7 9::r   c                 R    \         P                  ! R4      w  rpV ^8X  d   V# \        # )z^
Get start address of the selected range
returns BADADDR - the user has not selected an range
Nr   read_range_selectionr!  	selection	startaddrendaddrs      r   read_selection_startr4  1  s+    
 %0$D$DT$J!I'A~r   c                 R    \         P                  ! R4      w  rpV ^8X  d   V# \        # )z_
Get end address of the selected range

:returns: BADADDR - the user has not selected an range
Nr.  r0  s      r   read_selection_endr6  >  s*     %0$D$DT$J!I'A~r   c                l    \         P                  ! V4      pVR8X  d   R# \        P                  ! W4      # )ah  
Get value of segment register at the specified address

:param ea: linear address
:param reg: name of segment register

:returns: the value of the segment register or -1 on error

NOTE: The segment registers in 32bit program usually contain selectors,
       so to get paragraph pointed to by the segment register you need to
       call sel2para() function.
r  )r  r  r  get_sreg)r5   r  s   &&r   r8  r8  L  s1     

3
C
by	((r   c                .    \         P                  ! W4      # )z
Get next defined item (instruction or data) in the program

:param ea: linear address to start search from
:param maxea: the search will stop at the address
    maxea is not included in the search range

:returns: BADADDR - no (more) defined items
)rS  r[  )r5   maxeas   &&r   r[  r[  b       r))r   c                .    \         P                  ! W4      # )z
Get previous defined item (instruction or data) in the program

:param ea: linear address to start search from
:param minea: the search will stop at the address
        minea is included in the search range

:returns: BADADDR - no (more) defined items
)rS  	prev_head)r5   mineas   &&r   r=  r=  o  r;  r   c                <    \         P                  ! V 4      V ,
          # )zZ
Get size of instruction or data item in bytes

:param ea: linear address

:returns: 1..n
)rS  get_item_endr4   s   &r   rm  rm    s     !!"%**r   c                n    \         P                  ! V 4      pV'       d   \         P                  ! W!4      # R# )z
Does the given function contain the given address?

:param func_ea: any address belonging to the function
:param ea: linear address

:returns:  success
F)rO  rP  func_contains)func_ear5   r\  s   && r   rB  rB    s+     g&D&&t00r   c                .    \         P                  ! W4      # )z
Get name at the specified address

:param ea: linear address
:param gtn_flags: how exactly the name should be retrieved.
                  combination of GN_ bits

:returns: "" - byte has no name
)rL  get_ea_name)r5   	gtn_flagss   &&r   get_namerG    s     ..r   c                L    \         P                  ! W\         P                  4      # )a:  
demangle_name a name

:param name: name to demangle
:param disable_mask: a mask that tells how to demangle the name
        it is a good idea to get this mask using
        get_inf_attr(INF_SHORT_DN) or get_inf_attr(INF_LONG_DN)

:returns: a demangled name
    If the input name cannot be demangled, returns None
)rL  demangle_nameDQT_FULL)rf  disable_masks   &&r   rI  rI    s     !!$h6G6GHHr   c                n    \         P                  ! W4      pV'       d   \         P                  ! V4      # R# )a  
Get disassembly line

:param ea: linear address of instruction

:param flags: combination of the GENDSM_ flags, or 0

:returns: "" - could not decode instruction at the specified location

NOTE: this function may not return exactly the same mnemonics
       as you see on the screen.
rI  )r*  generate_disasm_liner+  )r5   r8  texts   && r   rM  rM    s+     ))"4D##D))r   c                    \        V ^ 4      # )z
Get disassembly line

:param ea: linear address of instruction

:returns: "" - could not decode instruction at the specified location

NOTE: this function may not return exactly the same mnemonics
       as you see on the screen.
)rM  r4   s   &r   	GetDisasmrP    s      A&&r   c                F    \         P                  ! V 4      pV'       g   R# V# )z
Get instruction mnemonics

:param ea: linear address of instruction

:returns: "" - no instruction at the specified location

NOTE: this function may not return exactly the same mnemonics
as you see on the screen.
rI  )r  ua_mnem)r5   ress   & r   print_insn_mnemrT    s     ..
C
r   c                n    \         P                  ! W4      pV'       g   R# \        P                  ! V4      # )z
Get operand of an instruction or data

:param ea: linear address of the item
:param n: number of operand:
    0 - the first operand
    1 - the second operand

:returns: the current text representation of operand or ""
rI  )r  print_operandr*  r+  )r5   r   rS  s   && r   rV  rV    s+     

r
%C##C((r   c                    \         P                  ! 4       p\         P                  ! W 4      pV^ 8X  d   R# VP                  V,          P                  # )z
Get type of instruction operand

:param ea: linear address of instruction
:param n: number of operand:
    0 - the first operand
    1 - the second operand

:returns: any of o_* constants or -1 on error
r  )r  r  r  opsr*  )r5   r   r  inslens   &&  r   get_operand_typerZ    s>     ==?D)F122$((1+"2"22r   c                p   \         P                  ! 4       p\         P                  ! W 4      pV^ 8X  d   R# VP                  V,          pV'       g   R# VP                  \         P
                  \         P                  \         P                  \         P                  39   d   VP                  pV# VP                  \         P                  8X  d   VP                  pV# VP                  \         P                  8X  d   VP                  pV# VP                  \         P                  8X  d   VP                  pV# RpV# )a  
Get number used in the operand

This function returns an immediate number used in the operand

:param ea: linear address of instruction
:param n: the operand number

:returns: value
    operand is an immediate value  => immediate value
    operand has a displacement     => displacement
    operand is a direct memory ref => memory address
    operand is a register          => register number
    operand is a register phrase   => phrase number
    otherwise                      => -1
r  )r  r  r  rX  r*  o_memo_faro_nearo_displaddro_regr  o_immr    o_phrasephrase)r5   r   r  rY  opr    s   &&    r   get_operand_valuerf  O  s    " ==?D)F{		!B		wwFLL&,,v~~OO L 
FLL	  L 
FLL	 
 L	 
FOO	#		 L Lr   c                    VR8X  d&   \         P                  ! W\         P                  4      p\         P                  ! WV4      # )z
Get string contents
:param ea: linear address
:param length: string length. -1 means to calculate the max string length
:param strtype: the string type (one of STRTYPE_... constants)

:returns: string contents or empty string
r  )rS  get_max_strlit_lengthALOPT_IGNHEADSget_strlit_contents)r5   lengthstrtypes   &&&r   rj  rj    s6     |00i>V>VW((W==r   c                    \         P                  ! V 4      p\         P                  ! V4      '       dB   \        P                  ! 4       p\         P
                  ! W ^ V4      '       d   VP                  # R# R# )zT
Get string type

:param ea: linear address

:returns: One of STRTYPE_... constants
N)rS  rh  r   r:  ri  rj  rl  )r5   r8  ois   &  r   get_str_typero    s\     #E5!! 511:: 2 "r   c                N    \        R\        P                  ! V 4      ,          4      # )z:
Obsolete. Please use ida_idp.process_config_directive().
zprocess_config_directive("%s"))r(  r   str2user)	directives   &r   process_config_liners    s      4{7K7KI7VVWWr   c                    \        V\        4      '       d   V.pV Fh  p\        V 4       FV  pVP                  V4      '       g   K  \	        W4      p\        V\
        P                  4      '       g   KI  V\        4       V&   KX  	  Kj  	  R # r$   )r  strdirr,  r   r  integer_typesglobals)moduleprefixesprefixkeyr    s   &&   r   _import_module_flag_setsr}    se    (C  :v;C~~f%%,eZ%=%=>>%*GIcN	  r   c                4    \         V ,          ^ ,          ! 4       # )z/
Deprecated. Please ida_ida.inf_get_* instead.
_INF_attrs_accessors)attrs   &r   ru  ru    s      %a(**r   c                :    \         V ,          ^,          ! V4       ^# )z/
Deprecated. Please ida_ida.inf_set_* instead.
r  )r  r    s   &&r   set_inf_attrr    s     q!%(r   c                 "    \        V \        4      # r$   )set_processor_typeSETPROC_USER)	processors   &r   SetPrcsrr    s     29l KKr   c                 ,    \         P                  ! 4       # )z<
Get name of the current processor
:returns: processor name
)r%   inf_get_procnamer   r   r   get_processor_namer    s    
 ##%%r   c                d    \         P                  P                  pV \         P                  n        V# )z
Enable/disable batch mode of operation

:param batch: batch mode
        0 - ida will display dialog boxes and wait for the user input
        1 - ida will not display dialog boxes, warnings, etc.

:returns: old balue of batch flag
)r   cvarbatch)r  
batch_prevs   & r   r  r    s)     !!''J"Kr   c                .    \         P                  ! W4      # )zt
Invokes an IDA UI action by name

:param name: Command name
:param flags: Reserved. Must be zero
:returns: Boolean
)r   process_ui_action)rf  r8  s   &&r   r  r  !  s     ((55r   c                    \         P                  ! 4       p\         P                  ! 4       p\        P                  ! WP                  4       VP                  4       4      w  r4V'       g   V # VP                  4       # )z
Get a selector value

:param sel: the selector number

:returns: selector value if found
         otherwise the input value (sel)

NOTE: selector values are always in paragraphs
)r  sel_pointer
ea_pointerrU  getn_selectorr  r    )r(  r   r  rS  r  s   &    r   sel2parar  @  sT     	AD''VVXtyy{CGC
zz|r   c                <    \         P                  ! V 4      R,          # )z
Find a selector which has the specified value

:param val: value to search for

:returns: the selector number if found,
         otherwise the input value (val & 0xFFFF)

NOTE: selector values are always in paragraphs
i  )rU  r%  )vals   &r   r%  r%  U  s     $$S)F22r   c                 `    \         P                  ! 4       p V '       g   \        # V P                  # )zn
Get first segment

:returns: address of the start of the first segment
    BADADDR - no segments are defined
)rU  get_first_segr!  r'  )r   s    r   r  r  g  s$     
#
#
%C||r   c                b    \         P                  ! V 4      pV'       g   \        # VP                  # )zu
Get next segment

:param ea: linear address

:returns: start of the next segment
         BADADDR - no next segment
)rU  get_next_segr!  r'  )r5   nextsegs   & r   r  r  u  s(     &&r*Gr   c                b    \         P                  ! V 4      pV'       g   \        # VP                  # )z
Get start address of a segment

:param ea: any address in the segment

:returns: start of segment
         BADADDR - the specified address doesn't belong to any segment
)rU  rV  r!  r'  r5   r   s   & r   get_segm_startr    s&     

R
 C||r   c                b    \         P                  ! V 4      pV'       g   \        # VP                  # )z
Get end address of a segment

:param ea: any address in the segment

:returns: end of segment (an address past end of the segment)
         BADADDR - the specified address doesn't belong to any segment
)rU  rV  r!  end_ear  s   & r   get_segm_endr    s&     

R
 Czzr   c                    \         P                  ! V 4      pV'       g   R# \         P                  ! V4      pV'       g   R# V# )zr
Get name of a segment

:param ea: any address in the segment

:returns: "" - no segment at the specified address
rI  )rU  rV  get_segm_name)r5   r   rf  s   &  r   r  r    s5     

R
 C((-Kr   c                    \         P                  ! 4       pWn        Wn        \         P                  ! V4      Vn        W7n        WGn        WWn        \         P                  ! VRRV4      # )a  
Create a new segment

:param startea: linear address of the start of the segment
:param endea: linear address of the end of the segment
           this address will not belong to the segment
           'endea' should be higher than 'startea'
:param base: base paragraph or selector of the segment.
           a paragraph is 16byte memory chunk.
           If a selector value is specified, the selector should be
           already defined.
:param use32: 0: 16bit segment, 1: 32bit segment, 2: 64bit segment
:param align: segment alignment. see below for alignment values
:param comb: segment combination. see below for combination values.
:param flags: combination of ADDSEG_... bits

:returns: 0-failed, 1-ok
rI  )
rU  	segment_tr'  r  setup_selectorr(  bitnessr  combadd_segm_ex)startearw  r  use32r  r  r8  r   s   &&&&&&& r   r  r    sT    & 	AJH++D1AEIGF""1b"e44r   c           	      &    \        WW#WE\        4      # r$   )r  ADDSEG_NOSREG)r  rw  r  r  r  r  s   &&&&&&r   AddSegr    s    wtEOOr   c                h    \         P                  ! WV4      \         P                  ! WV4      ,          # )z
Change segment boundaries

:param ea: any address in the segment
:param startea: new start address of the segment
:param endea: new end address of the segment
:param flags: combination of SEGMOD_... flags

:returns: boolean success
)rU  set_segm_startset_segm_end)r5   r  rw  r8  s   &&&&r   set_segment_boundsr    s.     %%b59##Bu56 6r   c                n    \         P                  ! V 4      pV'       g   R# \         P                  ! W!4      # )z
Change name of the segment

:param ea: any address in the segment
:param name: new name of the segment

:returns: success (boolean)
F)rU  rV  set_segm_name)r5   rf  r   s   && r   r  r  	  s+     

R
 C$$S//r   c                n    \         P                  ! V 4      pV'       g   R# \         P                  ! W!4      # )z
Change class of the segment

:param ea: any address in the segment
:param segclass: new class of the segment

:returns: success (boolean)
F)rU  rV  set_segm_class)r5   segclassr   s   && r   r  r  	  s+     

R
 C%%c44r   c                $    \        V \        V4      # )z
Change alignment of the segment

:param ea: any address in the segment
:param alignment: new alignment of the segment (one of the sa... constants)

:returns: success (boolean)
)set_segm_attrSEGATTR_ALIGN)r5   	alignments   &&r   set_segm_alignmentr  %	  s     ]I66r   c                $    \        V \        V4      # )z
Change combination of the segment

:param segea: any address in the segment
:param comb: new combination of the segment (one of the sc... constants)

:returns: success (boolean)
)r  SEGATTR_COMB)segear  s   &&r   set_segm_combinationr  C	  s     d33r   c                R    \         P                  ! V 4      pV'       g   R# Wn        R# )z
Change segment addressing

:param ea: any address in the segment
:param bitness: 0: 16bit, 1: 32bit, 2: 64bit

:returns: success (boolean)
FT)rU  rV  r  )r5   r  r   s   && r   set_segm_addressingr  Z	  s"     

R
 CKr   c                b    \         P                  ! V 4      pV'       g   \        # VP                  # )zf
Get segment selector by name

:param segname: name of segment

:returns: segment selector or BADADDR
)rU  get_segm_by_namer!  r(  )segnamer   s   & r   selector_by_namer  m	  s%     
&
&w
/C77Nr   c                    \         P                  ! V 4      p\        P                  ! V4      pVR8X  d   R# \        P
                  ! W1V4      # )a,  
Set default segment register value for a segment

:param ea: any address in the segment
           if no segment is present at the specified address
           then all segments will be affected
:param reg: name of segment register
:param value: default value of the segment register. -1-undefined.
Fr  )rU  rV  r  r  r  set_default_sreg_value)r5   r  r    r   s   &&& r   r  r  }	  sA     

R
 C


3
C
by--c>>r   c                n    \         P                  ! V 4      pV'       g   R# Wn        VP                  4       # )zr
Set segment type

:param segea: any address within segment
:param segtype: new segment type:

:returns: !=0 - ok
F)rU  rV  r*  update)r  segtyper   s   && r   set_segm_typer  	  s+     

U
#CH::<r   c                   \         P                  ! V 4      pV'       g   Q RV ,          4       hV\        \        \        \
        \        \        39   d*   \         P                  ! V\        V,          ^,          4      # \        V\        V4      # )zk
Get segment attribute

:param segea: any address within segment
:param attr: one of SEGATTR_... constants
could not find segment at 0x%x)rU  rV  
SEGATTR_ES
SEGATTR_CS
SEGATTR_SS
SEGATTR_DS
SEGATTR_FS
SEGATTR_GS	get_defsr_SEGATTRMAPr   )r  r  r   s   && r   get_segm_attrr  	  sh     

U
#C805883ZZZYY$$S+d*;A*>??Cd33r   c                Z   \         P                  ! V 4      pV'       g   Q RV ,          4       hV\        \        \        \
        \        \        39   d;   \         P                  ! V\        V,          ^,          V4       VP                  4       # \        V\        W4       VP                  4       # )a  
Set segment attribute

:param segea: any address within segment
:param attr: one of SEGATTR_... constants

NOTE: Please note that not all segment attributes are modifiable.
       Also some of them should be modified using special functions
       like set_segm_addressing, etc.
r  )rU  rV  r  r  r  r  r  r  	set_defsrr  r!   r  )r  r  r    r   s   &&& r   r  r  	  s     

U
#C805883ZZZYYc;t#4Q#7? ::< 	S+t3::<r   c                x    \         P                  ! V 4      pV'       g   \        # \         P                  ! W1V4      # )a  
Move a segment to a new address
This function moves all information to the new address
It fixes up address sensitive information in the kernel
The total effect is equal to reloading the segment to the target address

:param ea: any address within the segment to move
:param to: new segment start address
:param flags: combination MFS_... constants

:returns: MOVE_SEGM_... error code
)rU  rV  MOVE_SEGM_PARAM	move_segm)r5   tor8  r   s   &&& r   r  r  
  s0     

R
 C  %00r   c                     \        R4      h)zj
Return type of the last xref obtained by
[RD]first/next[B0] functions.

:returns: constants fl_* or dr_*
z0use XrefsFrom() XrefsTo() from idautils instead.r   r   r   r   get_xref_typer  z
  s     O
PPr   c                     \        R 4      h)z4fopen() deprecated. Use Python file objects instead.r   )r  modes   &&r   r  r  
      
S
TTr   c                     \        R 4      h)z5fclose() deprecated. Use Python file objects instead.r   handles   &r   fcloser  
  s    
T
UUr   c                     \        R 4      h)z9filelength() deprecated. Use Python file objects instead.r   r  s   &r   
filelengthr  
      
X
YYr   c                     \        R 4      h)z4fseek() deprecated. Use Python file objects instead.r   )r  r	  origins   &&&r   fseekr  
  r  r   c                     \        R 4      h)z4ftell() deprecated. Use Python file objects instead.r   r  s   &r   ftellr  
  r  r   c                    \         P                  ! V R4      pV'       d8   \        P                  ! WAW"V,           R4      p\         P                  ! V4       V# ^ # )z
Load file into IDA database

:param filepath: path to input file
:param pos: position in the file
:param ea: linear address to load
:param size: number of bytes to load

:returns: 0 - error, 1 - ok
F)r  open_linputr2  	file2baseclose_linput)filepathposr5   r  lir  s   &&&&  r   LoadFiler  
  sG     
		%	0B	%%brd7EB#r   c                     \        WW#4      # r$   )r  r  r  r5   r  s   &&&&r   loadfiler  
      hxb.O'Or   c                $   \         P                  P                  V 4      '       d   \        P                  ! V 4      pM\        P
                  ! V 4      pV'       d6   \        P                  ! WAW"V,           4      p^ RIpVP                  V4       V# ^ # )z
Save from IDA database to file

:param filepath: path to output file
:param pos: position in the file
:param ea: linear address to save from
:param size: number of bytes to save

:returns: 0 - error, 1 - ok
N)
r>  r  isfiler  fopenMr  r2  	base2filer  r  )r  r  r5   r  r  r  r  s   &&&&   r   SaveFiler  
  si     
	!	!x()	%%brd7;r   c                     \        WW#4      # r$   )r  r  s   &&&&r   savefiler  
  r  r   c                     \        R 4      h)z4fgetc() deprecated. Use Python file objects instead.r   r  s   &r   fgetcr  
  r  r   c                     \        R 4      h)z4fputc() deprecated. Use Python file objects instead.r   )byter  s   &&r   fputcr  
  r  r   c                     \        R 4      h)z6fprintf() deprecated. Use Python file objects instead.r   )r  r   r   s   &&*r   fprintfr
  
      
U
VVr   c                     \        R 4      h)z8readshort() deprecated. Use Python file objects instead.r   r  	mostfirsts   &&r   	readshortr  
      
W
XXr   c                     \        R 4      h)z7readlong() deprecated. Use Python file objects instead.r   r  s   &&r   readlongr  
      
V
WWr   c                     \        R 4      h)z9writeshort() deprecated. Use Python file objects instead.r   )r  wordr  s   &&&r   
writeshortr  
  r  r   c                     \        R 4      h)z8writelong() deprecated. Use Python file objects instead.r   )r  dwordr  s   &&&r   	writelongr  
  r  r   c                     \        R 4      h)z6readstr() deprecated. Use Python file objects instead.r   r  s   &r   readstrr  
  r  r   c                     \        R 4      h)z7writestr() deprecated. Use Python file objects instead.r   )r  r   s   &&r   writestrr  
  r  r   c                b    \         P                  ! V 4      pV'       g   \        # VP                  # )z
Find next function

:param ea: any address belonging to the function

:returns:        BADADDR - no more functions
        otherwise returns the next function start address
)rO  get_next_funcr!  r'  r5   r\  s   & r   r  r  
  &     ""2&D}}r   c                b    \         P                  ! V 4      pV'       g   \        # VP                  # )z
Find previous function

:param ea: any address belonging to the function

:returns: BADADDR - no more functions
        otherwise returns the previous function start address
)rO  get_prev_funcr!  r'  r   s   & r   r#  r#  
  r!  r   c                l    \         P                  ! V 4      pV'       d   \        V\        V4      # \        # )z
Get a function attribute

:param ea: any address belonging to the function
:param attr: one of FUNCATTR_... constants

:returns: BADADDR - error otherwise returns the attribute value
)rO  rP  r   _FUNCATTRMAPr!  r5   r  r\  s   && r   get_func_attrr'    s*     b!D59<lD1FwFr   c                    \         P                  ! V 4      pV'       d(   \        V\        W4       \         P                  ! V4      # ^ # )z
Set a function attribute

:param ea: any address belonging to the function
:param attr: one of FUNCATTR_... constants
:param value: new value of the attribute

:returns: 1-ok, 0-failed
)rO  rP  r!   r%  update_func)r5   r  r    r\  s   &&& r   set_func_attrr*    s7     b!DT<5$$T**r   c                Z    \         P                  ! V 4      pV'       g   R# VP                  # )z
Retrieve function flags

:param ea: any address belonging to the function

:returns: -1 - function doesn't exist otherwise returns the flags
r  )rO  rP  r8  r   s   & r   get_func_flagsr,  X  s&     b!D	zzr   c                ~    \         P                  ! V 4      pV'       g   ^ # Wn        \         P                  ! V4       ^# )z
Change function flags

:param ea: any address belonging to the function
:param flags: see get_func_flags() for explanations

:returns: !=0 - ok
)rO  rP  r8  r)  )r5   r8  r\  s   && r   set_func_flagsr.    s0     b!D
d#r   c                F    \         P                  ! V 4      pV'       g   R# V# )z
Retrieve function name

:param ea: any address belonging to the function

:returns: null string - function doesn't exist
        otherwise returns function name
rI  )rO  get_func_name)r5   rf  s   & r   r0  r0    s     ""2&Dr   c                    \         P                  ! V 4      pV'       g   R# \         P                  ! W!4      pV'       g   R# V# )z
Retrieve function comment

:param ea: any address belonging to the function
:param repeatable: 1: get repeatable comment
        0: get regular comment

:returns: function comment string
rI  )rO  rP  get_func_cmt)r5   
repeatabler\  comments   &&  r   r2  r2    s5     b!D((:Nr   c                p    \         P                  ! V 4      pV'       g   R# \         P                  ! W1V4      # )z
Set function comment

:param ea: any address belonging to the function
:param cmt: a function comment line
:param repeatable: 1: get repeatable comment
        0: get regular comment
N)rO  rP  rQ  )r5   cmtr3  r\  s   &&& r   rQ  rQ    s-     b!D%%d<<r   c                x    \         P                  ! V \        P                  4      pVf   \        # VP                  # )z
Ask the user to select a function

Arguments:

:param title: title of the dialog box

:returns: -1 - user refused to select a function
         otherwise returns the selected function start address
)r   choose_funcr  r!  r'  )r  r  s   & r   r8  r8    s/     	z'9'9:Ai7/QZZ/r   c                x    \         P                  \         P                  ,          p\         P                  ! W4      # )a  
Convert address to 'funcname+offset' string

:param ea: address to convert

:returns: if the address belongs to a function then return a string
         formed as 'name+offset' where 'name' is a function name
         'offset' is offset within the function else return null string
)rL  GNCN_NOCOLORGNCN_REQFUNCget_nice_colored_name)r5   r8  s   & r   get_func_off_strr=    s+     !!H$9$99E))"44r   c                    \         P                  ! V 4      p\         P                  ! V\         P                  4      pV\         P                  8X  d   \
        # VP                  # )a  
Determine a new function boundaries

:param ea: starting address of a new function

:returns: if a function already exists, then return its end address.
        If a function end cannot be determined, the return BADADDR
        otherwise return the end address of the new function
)rO  func_tfind_func_boundsFIND_FUNC_DEFINEFIND_FUNC_UNDEFr!  r  )r5   r\  rS  s   &  r   find_func_endrC    sI     BD

$
$T9+E+E
FC
i'''{{r   c                "    \        V \        4      # )a   
Get ID of function frame structure

:param ea: any address belonging to the function

:returns: ID of function frame or None In order to access stack variables
         you need to use structure member manipulaion functions with the
         obtained ID.
)r'  FUNCATTR_FRAMEr4   s   &r   get_frame_idrF    s     ^,,r   c                "    \        V \        4      # )z
Get size of local variables in function frame

:param ea: any address belonging to the function

:returns: Size of local variables in bytes.
         If the function doesn't have a frame, return 0
         If the function doesn't exist, return None
)r'  FUNCATTR_FRSIZEr4   s   &r   get_frame_lvar_sizerI    s     _--r   c                "    \        V \        4      # )a>  
Get size of saved registers in function frame

:param ea: any address belonging to the function

:returns: Size of saved registers in bytes.
         If the function doesn't have a frame, return 0
         This value is used as offset for BP (if FUNC_FRAME is set)
         If the function doesn't exist, return None
)r'  FUNCATTR_FRREGSr4   s   &r   get_frame_regs_sizerL    s     _--r   c                "    \        V \        4      # )a  
Get size of arguments in function frame which are purged upon return

:param ea: any address belonging to the function

:returns: Size of function arguments in bytes.
         If the function doesn't have a frame, return 0
         If the function doesn't exist, return -1
)r'  FUNCATTR_ARGSIZEr4   s   &r   get_frame_args_sizerO  -  s     -..r   c                n    \         P                  ! V 4      pV'       g   ^ # \        P                  ! V4      # )a  
Get full size of function frame

:param ea: any address belonging to the function
:returns: Size of function frame in bytes.
            This function takes into account size of local
            variables + size of saved registers + size of
            return address + size of function arguments
            If the function doesn't have a frame, return size of
            function return address in the stack.
            If the function doesn't exist, return 0
)rO  rP  r  get_frame_sizer   s   & r   rQ  rQ  :  s+     b!D''--r   c                    \         P                  ! V 4      pVf   R# \        P                  ! WAW#4      pV'       g    \        P                  ! WAW#4      '       g   R# VP
                  # )ag  
Make function frame

:param ea: any address belonging to the function
:param lvsize: size of function local variables
:param frregs: size of saved registers
:param argsize: size of function arguments

:returns: ID of function frame or -1
         If the function did not have a frame, the frame
         will be created. Otherwise the frame will be modified
r  )rO  rP  r  	add_frameset_frame_sizeframe)r5   lvsizefrregsargsizer\  frameids   &&&&  r   rT  rT  O  sU     b!D|	!!$@G''fFFI::r   c                n    \         P                  ! V 4      pV'       g   R# \        P                  ! W4      # )a   
Get current delta for the stack pointer

:param ea: end address of the instruction
           i.e.the last address of the instruction+1

:returns: The difference between the original SP upon
         entering the function and SP for the specified address
N)rO  rP  r  get_spdr   s   & r   r[  r[  i  s+     b!DT&&r   c                n    \         P                  ! V 4      pV'       g   R# \        P                  ! W4      # )aS  
Get modification of SP made by the instruction

:param ea: end address of the instruction
           i.e.the last address of the instruction+1

:returns: Get modification of SP made at the specified location
         If the specified location doesn't contain a SP change point, return 0
         Otherwise return delta of SP modification
N)rO  rP  r  get_sp_deltar   s   & r   r]  r]  {  s+     b!D!!$++r   c                l    \         P                  ! V 4      pV'       d   \        V\        V4      # \        # )z
Get a function chunk attribute

:param ea: any address in the chunk
:param attr: one of: FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER, FUNCATTR_REFQTY

:returns: desired attribute or -1
)rO  
get_fchunkr   r%  r!  r&  s   && r   get_fchunk_attrr`    s*     #D59<lD1FwFr   c                    V\         \        \        39   dF   \        P                  ! V 4      pV'       d(   \        V\        W4       \        P                  ! V4      # ^ # )z
Set a function chunk attribute

:param ea: any address in the chunk
:param attr: only FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER
:param value: desired value

:returns: 0 if failed, 1 if success
)FUNCATTR_STARTFUNCATTR_ENDFUNCATTR_OWNERrO  r_  r!   r%  r)  )r5   r  r    chunks   &&& r   set_fchunk_attrrf    sF     ~??$$R(d:((//r   c                b    \         P                  ! V 4      pV'       d   VP                  # \        # )z
Get next function chunk

:param ea: any address

:returns:  the starting address of the next function chunk or BADADDR

NOTE: This function enumerates all chunks of all functions in the database
)rO  get_next_fchunkr'  r!  r   s   & r   rh  rh    &     $$R(D}}r   c                b    \         P                  ! V 4      pV'       d   VP                  # \        # )z
Get previous function chunk

:param ea: any address

:returns: the starting address of the function chunk or BADADDR

NOTE: This function enumerates all chunks of all functions in the database
)rO  get_prev_fchunkr'  r!  r   s   & r   rk  rk    ri  r   c                p    \         P                  ! V 4      pV'       g   ^ # \         P                  ! W1V4      # )a'  
Append a function chunk to the function

:param funcea: any address in the function
:param ea1: start of function tail
:param ea2: end of function tail
:returns: 0 if failed, 1 if success

NOTE: If a chunk exists at the specified addresses, it must have exactly
       the specified boundaries
)rO  rP  append_func_tail)funcear  r  r\  s   &&& r   rm  rm    s-     f%D))$S99r   c                n    \         P                  ! V 4      pV'       g   ^ # \         P                  ! W!4      # )z
Remove a function chunk from the function

:param funcea: any address in the function
:param tailea: any address in the function chunk to remove

:returns: 0 if failed, 1 if success
)rO  rP  remove_func_tail)rn  tailear\  s   && r   remove_fchunkrr    s+     f%D))$77r   c                n    \         P                  ! V 4      pV'       g   R# \         P                  ! W!4      # )z
Change the function chunk owner

:param tailea: any address in the function chunk
:param funcea: the starting address of the new owner

:returns: False if failed, True if success

NOTE: The new owner must already have the chunk appended before the call
F)rO  r_  set_tail_owner)rq  rn  tails   && r   rt  rt    s+     'D''55r   c                    \         P                  ! V 4      p\         P                  ! W4      pVP                  4       '       d   VP	                  4       P
                  # \        # )z
Get the first function chunk of the specified function

:param funcea: any address in the function

:returns: the function entry point or BADADDR

NOTE: This function returns the first (main) chunk of the specified function
)rO  rP  func_tail_iterator_tmainre  r'  r!  )rn  r\  fcis   &  r   first_func_chunkrz    sF     f%D

(
(
6C
xxzzyy{###r   c                   \         P                  ! V 4      p\         P                  ! W 4      pVP                  4       '       g   \        # Rp VP                  4       P                  V8:  d#   VP                  4       P                  V8  d   RpM\        V4      '       d   KU   V'       d,   \        V4      '       d   VP                  4       P                  # \        # )a  
Get the next function chunk of the specified function

:param funcea: any address in the function
:param tailea: any address in the current chunk

:returns: the starting address of the next function chunk or BADADDR

NOTE: This function returns the next chunk of the specified function
FT)	rO  rP  rw  rx  r!  re  r'  r  next)rn  rq  r\  ry  founds   &&   r   next_func_chunkr~    s     f%D

(
(
6C88:: E
99;6)99;&ECyy cyy{###r   c                p    \         P                  ! V 4      pV'       g   ^ # \        P                  ! W1V4      # )a;  
Add automatic SP register change point
:param func_ea: function start
:param ea: linear address where SP changes
           usually this is the end of the instruction which
           modifies the stack pointer (insn.ea+insn.size)
:param delta: difference between old and new values of SP
:returns: 1-ok, 0-failed
)rO  rP  r  add_auto_stkpnt)rC  r5   r  pfns   &&& r   r  r  D  s-     

W
%C$$Se44r   c                n    \         P                  ! V 4      pV'       g   ^ # \        P                  ! W!4      # )zt
Delete SP register change point

:param func_ea: function start
:param ea: linear address
:returns: 1-ok, 0-failed
)rO  rP  r  
del_stkpnt)rC  r5   r  s   && r   r  r  U  s+     

W
%C((r   c                v    \         P                  ! V 4      pV'       g   \        # \        P                  ! V4      # )z
Return the address with the minimal spd (stack pointer delta)
If there are no SP change points, then return BADADDR.

:param func_ea: function start
:returns: BADDADDR - no such function
)rO  rP  r!  r  get_min_spd_ea)rC  r  s   & r   r  r  b  s-     

W
%C##C((r   c                ~    \         P                  ! 4       pVP                  V 4      '       g   ^ # VP                  4       # )z
Get fixup target type

:param ea: address to get information about

:returns: 0 - no fixup at the specified address
             otherwise returns fixup type
)	ida_fixupfixup_data_tgetget_typer5   fds   & r   get_fixup_target_typer    s.     
			!B66"::;;=r   c                ~    \         P                  ! 4       pVP                  V 4      '       g   ^ # VP                  4       # )z
Get fixup target flags

:param ea: address to get information about

:returns: 0 - no fixup at the specified address
             otherwise returns fixup target flags
)r  r  r  rh  r  s   & r   get_fixup_target_flagsr    s.     
			!B66"::<<>r   c                ~    \         P                  ! 4       pVP                  V 4      '       g   \        # VP                  # )z
Get fixup target selector

:param ea: address to get information about

:returns: BADSEL - no fixup at the specified address
                  otherwise returns fixup target selector
)r  r  r  BADSELr(  r  s   & r   get_fixup_target_selr    s-     
			!B66"::66Mr   c                ~    \         P                  ! 4       pVP                  V 4      '       g   \        # VP                  # )z
Get fixup target offset

:param ea: address to get information about

:returns: BADADDR - no fixup at the specified address
                   otherwise returns fixup target offset
)r  r  r  r!  r   r  s   & r   get_fixup_target_offr    s-     
			!B66"::66Mr   c                v    \         P                  ! 4       pVP                  V 4      '       g   ^ # VP                  # )z
Get fixup target displacement

:param ea: address to get information about

:returns: 0 - no fixup at the specified address
             otherwise returns fixup target displacement
)r  r  r  displacementr  s   & r   get_fixup_target_disr    s,     
			!B66"::??r   c                x    \         P                  ! W4      pW6n        WFn        WVn        VP                  V 4       R# )a  
Set fixup information

:param ea: address to set fixup information about
:param fixuptype:  fixup type. see get_fixup_target_type()
                   for possible fixup types.
:param fixupflags: fixup flags. see get_fixup_target_flags()
                   for possible fixup types.
:param targetsel:  target selector
:param targetoff:  target offset
:param displ:      displacement

:returns:        none
N)r  r  r(  r   r  set)r5   	fixuptype
fixupflags	targetsel	targetoffdisplr  s   &&&&&& r   	set_fixupr    s.     
				6BFFOFF2Jr   c                     \         P                  ! V 4      p\         P                  ! 4       pV\        8w  d0   VP	                  V4      '       d   VP                  4       '       d   V# \        # r$   )r  get_named_type_tidr  r!  get_type_by_tidr  )rf  rl  r  s   &  r   get_struc_idr    sK    

(
(
.C



C
g~#--c22szz||
Nr   c                 .    \         P                  ! V 4      # r$   )r  get_tid_name)rl  s   &r   get_struc_namer     s    ##C((r   c                     \         P                  ! 4       pVP                  V 4      '       d)   VP                  4       '       d   VP	                  4       # R # R # r$   )r  r  r  r  get_type_cmtrl  r  s   & r   get_struc_cmtr  $  sB    



C
3CJJLL!! %1r   c                     \         P                  ! 4       pVP                  V 4      '       d)   VP                  4       '       d   VP	                  4       # R # R # r$   )r  r  r  r  r  r  s   & r   get_struc_sizer  *  s?    



C
3CJJLL||~ %1r   c                    \         P                  ! 4       pVP                  V 4      '       d'   VP                  4       '       d   VP	                  4       # R# )z
Get number of members of a structure

:param sid: structure type ID

:returns: -1 if bad structure type ID is passed otherwise
         returns number of members.
r  )r  r  r  r  get_udt_nmemberssidr  s   & r   get_member_qtyr  0  sA     


C
3CJJLL##%%Ir   c                    \         P                  ! 4       pV^ 8  dS   VP                  V 4      '       d<   VP                  4       '       d&   WP	                  4       8  d   VP                  V4      # R# )z
Get member ID by member ordinal number

:param sid: structure type ID
:param idx: member ordinal number

:returns: -1 if bad structure type ID is passed or there is
         no member with the specified index
         otherwise returns the member ID.
r  )r  r  r  r  r  get_udm_tid)r  idxr  s   && r   get_member_by_idxr  ?  sU     


C
axC'',,#H\H\H^B^s##Ir   c                V    \         P                  ! 4       pVP                  RV 4      R8g  # )z
Is a member id?

:param sid: structure type ID

:returns: True there is structure member with the specified ID
         False otherwise
Nr  )r  r  get_udm_by_tidr  s   & r   is_member_idr  P  s*     


CdC(B..r   c                0   \         P                  ! 4       pVP                  V 4      '       dj   VP                  4       '       dT   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d   VP                  V4      # R# )aT  

:param sid: structure type ID
:param member_offset:. The offset can be
any offset in the member. For example,
is a member is 4 bytes long and starts
at offset 2, then 2,3,4,5 denote
the same structure member.

:returns: -1 if bad structure type ID is passed or there is
no member at the specified offset.
otherwise returns the member id.
r  )	r  r  r  r  udm_tr	  find_udmSTRMEM_AUTOr  r  member_offsetr  udmr  s   &&   r   get_member_idr  ]  sq     


C
3CJJLL!"
ll3 7 78"9??3''Ir   c                   VR8X  d   \         P                  pVR8X  d   \         P                  p\        P                  ! 4       pVP                  V 4      '       dl   VP                  4       '       dV   \        P                  ! 4       pWn        VP                  V\        P                  4      pVR8w  d   VP                  ^,          # R# )a  
Get offset of a member of a structure by the member name

:param sid: structure type ID
:param member_name: name of structure member

:returns: -1 if bad structure type ID is passed
         or no such member in the structure
         otherwise returns offset of the specified member.

NOTE: Union members are, in IDA's internals, located
       at subsequent byte offsets: member 0 -> offset 0x0,
       member 1 -> offset 0x1, etc...
z rz sr  )r  FRAME_UDM_NAME_RFRAME_UDM_NAME_Sr  r  r  r  r  rf  r  STRMEM_NAMEr	  )r  member_namer  r  r  s   &&   r   get_member_offsetr  u  s     d00d00



C
3CJJLL!ll3 7 78"9::?"Ir   c                &   \         P                  ! 4       pVP                  V 4      '       de   VP                  4       '       dO   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d   VP                  # R# )a  
Get name of a member of a structure

:param sid: structure type ID
:param member_offset: member offset. The offset can be
                      any offset in the member. For example,
                      is a member is 4 bytes long and starts
                      at offset 2, then 2,3,4,5 denote
                      the same structure member.

:returns: None if bad structure type ID is passed
         or no such member in the structure
         otherwise returns name of the specified member.
Nr  )	r  r  r  r  r  r	  r  r  rf  r  s   &&   r   get_member_namer    si     


C
3CJJLL!"
ll3 7 78"988Or   c                &   \         P                  ! 4       pVP                  V 4      '       de   VP                  4       '       dO   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d   VP                  # R# )a  
Get comment of a member

:param sid: structure type ID
:param member_offset: member offset. The offset can be
                      any offset in the member. For example,
                      is a member is 4 bytes long and starts
                      at offset 2, then 2,3,4,5 denote
                      the same structure member.
:param repeatable: is not used anymore

:returns: None if bad structure type ID is passed
         or no such member in the structure
         otherwise returns comment of the specified member.
Nr  )	r  r  r  r  r  r	  r  r  r6  )r  r  r3  r  r  r  s   &&&   r   get_member_cmtr    si      


C
3CJJLL!"
ll3 7 78"977Nr   c                4   \         P                  ! 4       pVP                  V 4      '       dl   VP                  4       '       dV   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d   VP                  ^,          # R# )a  
Get size of a member

:param sid: structure type ID
:param member_offset: member offset. The offset can be
                      any offset in the member. For example,
                      is a member is 4 bytes long and starts
                      at offset 2, then 2,3,4,5 denote
                      the same structure member.

:returns: None if bad structure type ID is passed,
         or no such member in the structure
         otherwise returns size of the specified
         member in bytes.
r  )	r  r  r  r  r  r	  r  r  r  r  s   &&   r   get_member_sizer    sp      


C
3CJJLL!"
ll3 7 78"988q= Ir   c                \   \         P                  ! 4       pVP                  V 4      '       d   VP                  4       '       dj   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d(   VP                  P                  4       pV\        8w  d   V# R# )a(  
Get structure id of a member

:param sid: structure type ID
:param member_offset: member offset. The offset can be
                      any offset in the member. For example,
                      is a member is 4 bytes long and starts
                      at offset 2, then 2,3,4,5 denote
                      the same structure member.
:returns: -1 if bad structure type ID is passed
         or no such member in the structure
         otherwise returns structure id of the member.
         If the current member is not a structure, returns -1.
r  )r  r  r  r  r  r	  r  r  r*  r  r!  )r  r  r  r  r  rl  s   &&    r   get_member_stridr    s     


C
3CJJLL!"
ll3 7 78"9((""$Cg~
Ir   c                    \         P                  ! 4       pVP                  V 4      '       d'   VP                  4       '       d   VP	                  4       # R# )z
Is a structure a union?

:param sid: structure type ID

:returns: True: yes, this is a union id
         False: no

NOTE: Unions are a special kind of structures
F)r  r  r  r  is_unionr  s   & r   r  r    s<     


C
3CJJLL||~r   c                   \         P                  ! 4       pW#n        \         P                  ! 4       pVP	                  V4      '       d6   VP                  RV4      \         P                  8X  d   VP                  4       # \        # )ad  
Define a new structure type

:param index: -1
:param name: name of the new structure type.
:param is_union: 0: structure
                 1: union

:returns: -1 if can't define structure type because of
         bad structure name: the name is ill-formed or is
         already used in the program.
         otherwise returns ID of the new structure type
N)	r  udt_type_data_tr  r  
create_udtset_named_typeTERR_OKr  r!  )indexrf  r  udtr  s   &&&  r   	add_strucr    s_     
%
%
'CL



C
~~cs11$=ATATT{{}Nr   c                    \         P                  ! 4       pVP                  V 4       \         P                  ! RVP	                  4       4      # )a)  
Delete a structure type

:param sid: structure type ID

:returns: 0 if bad structure type ID is passed
         1 otherwise the structure type is deleted. All data
         and other structure types referencing to the
         deleted structure type will be displayed as array
         of bytes.
N)r  r  r  del_numbered_typeget_ordinalr  s   & r   	del_strucr  "  s:     


C((s/@AAr   c                     \         P                  ! 4       pVP                  V 4      '       d#   VP                  V4      \         P                  8H  # R # F)r  r  r  rename_typer  )r  rf  r  s   && r   set_struc_namer  3  s>    



C
3t$(;(;;;r   c                     \         P                  ! 4       pVP                  V 4      '       d(   VP                  W'       * 4      \         P                  8H  # R # r$   )r  r  r  set_type_cmtr  )r  r6  r3  r  s   &&& r   set_struc_cmtr  :  sD    



C
3^48K8KKK  r   c	                    \        V4      '       d7   \        RT \        P                  ! T;'       g    R4      W#WEWgV3	,          4      # \        RT \        P                  ! T;'       g    R4      W#WE3,          4      # )a  
Add structure member

:param sid: structure type ID
:param name: name of the new member
:param offset: offset of the new member
               -1 means to add at the end of the structure
:param flag: type of the new member. Should be one of
             FF_BYTE..FF_PACKREAL (see above) combined with FF_DATA
:param typeid: if is_struct(flag) then typeid specifies the structure id for the member
               if is_off0(flag) then typeid specifies the offset base.
               if is_strlit(flag) then typeid specifies the string type (STRTYPE_...).
               if is_stroff(flag) then typeid specifies the structure id
               if is_enum(flag) then typeid specifies the enum id
               if is_custom(flags) then typeid specifies the dtid and fid: dtid|(fid<<16)
               Otherwise typeid should be -1.
:param nbytes: number of bytes in the new member

:param target: target address of the offset expr. You may specify it as
               -1, ida will calculate it itself
:param tdelta: offset target delta. usually 0
:param reftype: see REF_... definitions

NOTE: The remaining arguments are allowed only if is_off0(flag) and you want
       to specify a complex offset expression

:returns: 0 - ok, otherwise error code (one of typeinf.TERR_*)

z7add_struc_member(%d, "%s", %d, %d, %d, %d, %d, %d, %d);rI  z+add_struc_member(%d, "%s", %d, %d, %d, %d);)r|   r(  r   rq  )	r  rf  r	  flagtypeidnbytesr  tdeltareftypes	   &&&&&&&&&r   add_struc_memberr  @  s    < t}}QUXZeZnZnosoyoywyZz  }C  KQOU_fUh h i 	i EkNbNbcgcmcmkmNnpv  E  IN  N  O  	Or   c                R   \         P                  ! 4       pVP                  V 4      '       d{   VP                  4       '       de   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d#   VP                  V4      \         P                  8H  # R# )z
Delete structure member

:param sid: structure type ID
:param member_offset: offset of the member

:returns: != 0 - ok.

NOTE: IDA allows 'holes' between members of a
       structure. It treats these 'holes'
       as unnamed arrays of bytes.
Fr  )
r  r  r  r  r  r	  r  r  del_udmr  r  s   &&   r   del_struc_memberr  e  sz     


C
3CJJLL!"
ll3 7 78"9;;s#{':':::r   c                R   \         P                  ! 4       pVP                  V 4      '       d{   VP                  4       '       de   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d#   VP                  WR4      \         P                  8H  # R# )z
Change structure member name

:param sid: structure type ID
:param member_offset: offset of the member
:param name: new name of the member

:returns: != 0 - ok.
Fr  )
r  r  r  r  r  r	  r  r  
rename_udmr  )r  r  rf  r  r  r  s   &&&   r   set_member_namer  |  sz     


C
3CJJLL!"
ll3 7 78"9>>#,0C0CCCr   c                |    \        V4      '       d   \        RWW#VWVV3,          4      # \        RWW#V3,          4      # )ax  
Change structure member type

:param sid: structure type ID
:param member_offset: offset of the member
:param flag: new type of the member. Should be one of
             FF_BYTE..FF_PACKREAL (see above) combined with FF_DATA
:param typeid: if is_struct(flag) then typeid specifies the structure id for the member
               if is_off0(flag) then typeid specifies the offset base.
               if is_strlit(flag) then typeid specifies the string type (STRTYPE_...).
               if is_stroff(flag) then typeid specifies the structure id
               if is_enum(flag) then typeid specifies the enum id
               if is_custom(flags) then typeid specifies the dtid and fid: dtid|(fid<<16)
               Otherwise typeid should be -1.
:param nitems: number of items in the member

:param target: target address of the offset expr. You may specify it as
               -1, ida will calculate it itself
:param tdelta: offset target delta. usually 0
:param reftype: see REF_... definitions

NOTE: The remaining arguments are allowed only if is_off0(flag) and you want
       to specify a complex offset expression

:returns: !=0 - ok.
z0set_member_type(%d, %d, %d, %d, %d, %d, %d, %d);z$set_member_type(%d, %d, %d, %d, %d);)r|   r(  )r  r  r  r  ro  r  r  r  s   &&&&&&&&r   set_member_typer    sV    6 t}}JcbfpvNT^eNg g h 	h >#VZdjAkkllr   c                ^   \         P                  ! 4       pVP                  V 4      '       d   VP                  4       '       dk   \         P                  ! 4       pWn        VP                  V\         P                  4      pVR8w  d)   VP                  WbV'       * 4      \         P                  8H  # R# )a  
Change structure member comment

:param sid: structure type ID
:param member_offset: offset of the member
:param comment: new comment of the structure member
:param repeatable: 1: change repeatable comment
                   0: change regular comment

:returns: != 0 - ok
Fr  )
r  r  r  r  r  r	  r  r  set_udm_cmtr  )r  r  r4  r3  r  r  r  s   &&&&   r   set_member_cmtr    s~     


C
3CJJLL!"
ll3 7 78"9??3Z@KDWDWWWr   c                   \         P                  ! 4       pVP                  V 4      '       d   VP                  4       '       d   \         P                  ! 4       pV^,          Vn        VP                  V\         P                  \         P                  ,          4      pVR8w  d#   VP                  Wb4      \         P                  8H  # R# )z
Expand or shrink a structure type
:param id: structure type ID
:param offset: offset in the structure
:param delta: how many bytes to add or remove
:param recalc: is not used anymore
:returns: True if ok, False on error
Fr  )r  r  r  r  r  r	  r  STRMEM_LOWBNDSTRMEM_SKIP_GAPS
expand_udtr  )r  r	  r  recalcr  r  r  s   &&&&   r   expand_strucr    s     


C
3CJJLL!AX
ll3 9 9+:V:V VW"9>>#-1D1DDDr   c                    \         P                  ! 4       pVP                  RV 4      '       d'   VP                  4       '       d   VP	                  4       # \
        # )zS
Get enum by name

:param name: enum type name

:returns: enum type TID or BADADDR
N)r  r  r  is_enumr  r!  )rf  r  s   & r   get_enumr    s@     


C
$%%#++--{{}Nr   c                    \         P                  ! 4       pVP                  V 4      '       d3   V\        ,          ^ 8w  d   VP	                  4       # VP                  4       # R# )z{
Get name of enum

:param enum_id: enum TID
:param flags: use ENFL_REGEX to beautify the name

:returns: enum name or None
N)r  r  r  
ENFL_REGEXget_nice_type_nameget_type_name)enum_idr8  r  s   && r   get_enum_namer    sO     


C
7##,1J,>1+Ds%%']#J[J[J]]r   c                n    \         P                  ! 4       pVP                  V 4       VP                  4       # )zD
Get enum comment

:param enum_id: enum TID

:returns: enum comment
)r  r  r  r  r  r  s   & r   get_enum_cmtr    s/     


C r   c                n    \         P                  ! 4       pVP                  V 4       VP                  4       # )zb
Get the number of the members of the enum

:param enum_id: enum TID

:returns: number of members
)r  r  r  get_enum_nmembersr  s   & r   get_enum_sizer
  	  s/     


C   ""r   c                n    \         P                  ! 4       pVP                  V 4       VP                  4       # )z
Get the width of a enum element
allowed values: 0 (unspecified),1,2,4,8,16,32,64

:param enum_id: enum TID

:returns: enum width or -1 in case of error
)r  r  r  get_enum_widthr  s   & r   r  r    s/     


C r   c                   \         P                  ! 4       p^ pVP                  V 4      '       Ed.   VP                  4       '       Ed   VP	                  4       pV^8X  d'   \
        P                  ! \
        P                  ^ 4      pMV^8X  d'   \
        P                  ! \
        P                  ^ 4      pMV^8X  d'   \
        P                  ! \
        P                  ^ 4      pMRV^
8X  d'   \
        P                  ! \
        P                  ^ 4      pM%\
        P                  ! \
        P                  ^ 4      pVP                  4       '       d   V\
        P                  ,          pV# )z
Get flags determining the representation of the enum.
(currently they define the numeric base: octal, decimal, hex, bin) and signness.

:param enum_id: enum TID

:returns: flag of 0
)r  r  r  r  get_enum_radixrS  get_operand_flag	FF_N_CHAR	FF_N_NUMB	FF_N_NUMO	FF_N_NUMD	FF_N_NUMH	is_signedFF_SIGN)r  r  r-   r  s   &   r   get_enum_flagr  $  s     


C	A
7##""$A:**9+>+>BAaZ**9+>+>BAaZ**9+>+>BAb[**9+>+>BA**9+>+>BA==??"""AHr   c                    \         P                  ! 4       pVP                  V 4      pVR8w  d   VP                  V4      # \        # )zt
Get a reference to an enum member by its name

:param name: enum member name

:returns: enum member TID or BADADDR
r  )r  r  get_edm_by_nameget_edm_tidr!  )rf  r  r  s   &  r   get_enum_member_by_namer  @  s=     


C


d
#C
bys##Nr   c                    \         P                  ! 4       pVP                  V 4      '       d'   VP                  4       '       d   VP	                  4       # \
        # )zd
Get the parent enum of an enum member

:param const_id: id of const

:returns: enum TID or BADADDR
)r  r  r  r  r  r!  )const_idr  s   & r   get_enum_member_enumr  O  s>     


C
8$${{}Nr   c                @   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V 4      '       d8   VP                  WQW24      R8w  d!   \        P                  ! VP                  4      # R# )a:  
Get id of constant

:param enum_id: id of enum
:param value: value of constant
:param serial: serial number of the constant in the
          enumeration. See op_enum() for details.
:param bmask: bitmask of the constant
          ordinary enums accept only -1 as a bitmask

:returns: id of constant or -1 if error
r  )r!  r  r  r  edm_tfind_edmr  rf  )r  r    serialbmaskr  edms   &&&&  r   get_enum_memberr%  ]  s}     qy



C 



C
7##S(OSU(U--chh77Ir   c                .   \         P                  ! 4       pVP                  V 4       \         P                  ! 4       pVP	                  V4       VP
                  P                  4       '       g)   V^ ,          P                  VP                  4       ,          # R# )zd
Get first bitmask in the enum

:param enum_id: id of enum

:returns: id of constant or -1 if error
r  )	r  r  r  enum_type_data_tget_enum_detailsgroup_sizesemptyr    	calc_mask)r  r  eis   &  r   get_first_bmaskr-  t  sm     


C 		%	%	'B>>!!!u{{R\\^++Ir   c                "   \         P                  ! 4       pVP                  V 4       \         P                  ! 4       pVP	                  V4       RpVP                  4        F,  w  rEW$,          P                  VP                  4       ,          pK.  	  V# )zc
Get last bitmask in the enum

:param enum_id: id of enum

:returns: id of constant or -1 if error
r  )r  r  r  r'  r(  
all_groupsr    r+  )r  r  r,  r  	grp_startgrp_sizes   &     r   get_last_bmaskr2    sq     


C 		%	%	'B
A!#M",,.0 "1Hr   c                   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V4       RpVP                  4       pW,          pVP                  4        F<  w  rgW6,          P                  V,          pV'       g   W8X  d   RpK0  V'       g   K:  Vu # 	  R# )zp
Get next bitmask in the enum

:param enum_id: id of enum
:param bmask

:returns: id of constant or -1 if error
FTr  	r!  r  r  r  r'  r(  r+  r/  r    )	r  r#  r  r,  r}  vmaskr0  r1  r  s	   &&       r   get_next_bmaskr6    s     qy



C 		%	%	'BELLNE	NE!#M%'EUH "1 Ir   c                   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V4       RpVP                  4       pW,          pVP                  4        FL  w  rgW6,          P                  V,          pW8X  d'   VR8w  d   W4,          P                  V,          u # Ru # TpKN  	  R# )zp
Get prev bitmask in the enum

:param enum_id: id of enum
:param bmask

:returns: id of constant or -1 if error
r  r4  )	r  r#  r  r,  prev_grp_startr5  r0  r1  r  s	   &&       r   get_prev_bmaskr9    s     qy



C 		%	%	'BNLLNE	NE!#M%':7E7K2%++e3SQSS"	 "1
 Ir   c                    V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  W14      pVR8w  d   VP                  # R# )z
Get bitmask name (only for bitfields)

:param enum_id: id of enum
:param bmask: bitmask of the constant

:returns: name of bitmask or None
Nr  )r!  r  r  r  r   r!  rf  )r  r#  r  r$  r  s   &&   r   get_bmask_namer;    s`     qy



C 



C
,,s
"C
byxxr   c                    V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  WA4      pVR8w  d   VP                  # R# )z
Get bitmask comment (only for bitfields)

:param enum_id: id of enum
:param bmask: bitmask of the constant
:param repeatable: type of comment, 0-regular, 1-repeatable

:returns: comment attached to bitmask or None
Nr  )r!  r  r  r  r   r!  r6  )r  r#  r3  r  r$  r  s   &&&   r   get_bmask_cmtr=    s`     qy



C 



C
,,s
"C
bywwr   c                    V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       VP	                  RV4      pVR8w  d#   VP                  WB4      \        P                  8H  # R# )z
Set bitmask name (only for bitfields)

:param enum_id: id of enum
:param bmask: bitmask of the constant
:param name: name of bitmask

:returns: True-ok, False-failed
NFr  )r!  r  r  r  r!  
rename_edmr  )r  r#  rf  r  r  s   &&&  r   set_bmask_namer@    se     qy



C 
,,tU
#C
by~~c(K,?,???r   c                    V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       VP	                  RV4      pVR8w  d#   VP                  WR4      \        P                  8H  # R# )z
Set bitmask comment (only for bitfields)

:param enum_id: id of enum
:param bmask: bitmask of the constant
:param cmt: comment
repeatable - is not used anymore

:returns: 1-ok, 0-failed
NFr  )r!  r  r  r  r!  set_edm_cmtr  )r  r#  r6  r3  r  r  s   &&&&  r   set_bmask_cmtrC  	  se     qy



C 
,,tU
#C
bys(K,?,???r   c                 N   V P                  4       p\        4       pV\        8X  dE   V P                  4        F/  w  p pVP	                  W,          P
                  V,          4       K1  	  MV P                  4       '       d   W,          pV P                  4        Fw  w  rgW,          P
                  V,          V8X  g   K%  Wg,           pV^8w  d
   V^,          p\        Wh4       F+  pVP	                  W,          P
                  V,          4       K-  	   M	  \        \        V4      4      #    )r+  r  r!  all_constantsaddr    is_bfr/  r  listsorted)	r,  r#  r5  valuesr  _r0  r1  grp_ends	   &&       r   __collect_enum_valuerO    s    LLNEUF++-KS!QJJrw}}u,- .	%']]_!Y##e+5#.q=NI 4CJJrw}}u45 5 &5 vr   c                   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V4      '       d%   \        W14      p\        V4      ^ 8w  d
   V^ ,          # R# )a  
Get first constant in the enum

:param enum_id: id of enum
:param bmask: bitmask of the constant (ordinary enums accept only -1 as a bitmask)

:returns: value of constant or -1 if no constants are defined
         All constants are sorted by their values as unsigned longs.
r  r!  r  r  r  r'  r(  rO  r0  r  r#  r  r,  rL  s   &&   r   get_first_enum_memberrS  1  su     qy



C 		%	%	'B
B%b0v;!!9Ir   c                   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V4      '       d%   \        W14      p\        V4      ^ 8w  d
   VR,          # R# )a  
Get last constant in the enum

:param enum_id: id of enum
:param bmask: bitmask of the constant (ordinary enums accept only -1 as a bitmask)

:returns: value of constant or -1 if no constants are defined
         All constants are sorted by their values
         as unsigned longs.
r  rQ  rR  s   &&   r   get_last_enum_memberrU  G  su     qy



C 		%	%	'B
B%b0v;!":Ir   c                   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V4      '       dV   \        WB4      pWP                  4       ,          p VP                  V4      pV\        V4      8  d   WV^,           ,          #  R# R#     R# ; i)ap  
Get next constant in the enum

:param enum_id: id of enum
:param bmask: bitmask of the constant ordinary enums accept only -1 as a bitmask
:param value: value of the current constant

:returns: value of a constant with value higher than the specified
         value. -1 if no such constants exist.
         All constants are sorted by their values as unsigned longs.
r  )
r!  r  r  r  r'  r(  rO  r+  r  r0  r  r    r#  r  r,  rL  r  s   &&&    r   get_next_enum_memberrX  ^  s     qy



C 		%	%	'B
B%b0	,,u%CS[ !e}$ ! I2I	Is   	/B> >Cc                z   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       \        P                  ! 4       pVP                  V4      '       dM   \        WB4      pWP                  4       ,          p VP                  V4      pV^ 8w  d   WV^,
          ,          #  R# R#     R# ; i)aq  
Get prev constant in the enum

:param enum_id: id of enum
:param bmask  : bitmask of the constant
          ordinary enums accept only -1 as a bitmask
:param value: value of the current constant

:returns: value of a constant with value lower than the specified
    value. -1 if no such constants exist.
    All constants are sorted by their values as unsigned longs.
r  )	r!  r  r  r  r'  r(  rO  r+  r  rW  s   &&&    r   get_prev_enum_memberrZ  {  s     qy



C 		%	%	'B
B%b0	,,u%Cax!e}$  I2I	Is   	&B5 5B:c                    \         P                  ! 4       p\         P                  ! 4       pVP                  W 4      R8w  d   VP                  # R# )zQ
Get name of a constant

:param const_id: id of const

Returns: name of constant
Nr  )r  r  r   get_edm_by_tidrf  r  r  r$  s   &  r   get_enum_member_namer^    s?     


C



C
#(B.xxr   c                    \         P                  ! 4       p\         P                  ! 4       pVP                  W04      R8w  d   VP                  # R# )zw
Get comment of a constant

:param const_id: id of const
:param repeatable: not used anymore

:returns: comment string
Nr  )r  r  r   r\  r6  )r  r3  r  r$  s   &&  r   get_enum_member_cmtr`    s?     


C



C
#(B.wwr   c                    \         P                  ! 4       p\         P                  ! 4       pVP                  W 4      R8w  d"   VP                  VP                  4       ,          # R# )z[
Get value of an enum member

:param const_id: id of const

:returns: member value or None
Nr  )r  r  r   r\  r    calc_enum_maskr]  s   &  r   get_enum_member_valuerc    sN     


C



C
#(B.yy3--///r   c                B   \         P                  ! 4       pVP                  RV 4      pVR8w  dq   VP                  4       '       d[   \         P                  ! 4       pVP                  V4      '       d/   VP                  V4      pVe   W4^ ,          ,          P                  # R# )z]
Get bitmask of an enum member

:param const_id: id of const

:returns: member value or None
Nr  )r  r  r\  is_bitmask_enumr'  r(  get_constant_groupr    )r  r  r  r,  grps   &    r   get_enum_member_bmaskrh    s     


C


T8
,C
byS((**))+##'',Ca&z'''r   c                   \         P                  ! 4       p\        P                  ! V4      '       d   ^M\        P                  ! V^ 4      pVP                  WB\        P                  ,          ^ 8g  4       \         P                  ! 4       pVP                  V4      '       d6   VP                  RV4      \         P                  8X  d   VP                  4       # \        # )z
Add a new enum type

:param idx: is not used anymore
:param name: name of the enum.
:param flag: flags for representation of numeric constants
             in the definition of enum.

:returns: id of new enum or BADADDR
N)r  r'  rS  r   	get_radixset_enum_radixr  r  create_enumr  r  r  r!  )r  rf  r  r,  r  r  s   &&&   r   add_enumrm    s     
	%	%	'B##D))Ay/B/B4/KEeY%6%661<=



C
rs11$=ATATT{{}Nr   c                v    \         P                  ! R\         P                  ! V 4      \         P                  4      # )zD
Delete an enum type

:param enum_id: id of enum

:returns: success
N)r  del_named_typer  NTF_TYPE)r  s   &r   del_enumrq    s*     %%dK,D,DW,M{OcOcddr   c                    \         P                  ! 4       pVP                  V 4      '       d   VP                  V4      '       d   ^# ^ # )zh
Set name of enum type

:param enum_id: id of enum
:param name: new enum name

:returns: 1-ok, 0-failed
)r  r  r  r  )r  rf  r  s   && r   set_enum_namers    s7     


C
7##(=(=r   c                >   \         P                  ! 4       p\        P                  ! V4      '       d   ^pM\        P                  ! V^ 4      pVP                  V 4      ;'       d;    VP                  W1\        P                  ,          ^ 8g  4      \         P                  8H  # )za
Set enum constant representation flags

:param enum_id: enum TID
:param flag

:returns: success
)	r  r  rS  r   rj  r  rk  r  r  )r  r  r  r  s   &&  r   set_enum_flagru    s{     


C$##D!,w'}}C,>,>uiN_N_G_deFe,fjuj}j},}}r   c                p    \         P                  ! 4       pVP                  V 4       VP                  V4      # )z
Set the width of enum base type

:param enum_id: enum TID
:param nbytes: width of enum base type, allowed values: 0 (unspecified),1,2,4,8,16,32,64

:returns: success
)r  r  r  set_enum_width)r  r  r  s   && r   rw  rw    s1     


C f%%r   c                n    \         P                  ! 4       pVP                  V 4       VP                  4       # )zo
Is enum a bitmask ?

:param enum_id: enum TID

:returns: if it is a bitmask enum return True, otherwise False
)r  r  r  re  r  s   & r   rI  rI  '  s/     


C   r   c                   \         P                  ! 4       pVP                  V 4      ;'       d]    TP                  V'       d   \         P                  P                  M\         P                  P
                  4      \         P                  8H  # )z}
Set or clear the 'bitmask' attribute of an enum

:param enum_id: enum TID
:param bf: bitmask enum or not

:returns: success
)r  r  r  set_enum_is_bitmask	ENUMBM_ON
ENUMBM_OFFr  )r  bfr  s   && r   set_enum_bfr~  4  s     


Cw'  d  dC,C,CegKDWDWDaDamx  nA  nA  nL  nL  -M  Q\  Qd  Qd  -d  dr   c                    \         P                  ! 4       pVP                  V 4      '       d   VP                  W'       * 4      '       d   ^# ^ # )z
Set comment for enum type

:param enum_id: enum TID
:param cmt: comment
:param repeatable: is comment repeatable ?

:returns: 1-ok, 0-failed
)r  r  r  r  )r  r6  r3  r  s   &&& r   set_enum_cmtr  A  s;     


C
7##(8(8n(M(Mr   c                   V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4      '       d3   \        P                  ! 4       pWn        W%n        VP                  WS4      # \        P                  # )a  
Add a member of enum - a symbolic constant

:param enum_id: id of enum
:param name: name of symbolic constant. Must be unique in the program.
:param value: value of symbolic constant.
:param bmask: bitmask of the constant
    ordinary enums accept only -1 as a bitmask
    all bits set in value should be set in bmask too

:returns: 0-ok, otherwise error code (one of ENUM_MEMBER_ERROR_*)
)	r!  r  r  r  r   rf  r    add_edmTERR_BAD_TYPE)r  rf  r    r#  r  r$  s   &&&&  r   add_enum_memberr  Q  sg     qy



C
7##!	{{3&&$$$r   c                    V^ 8  d   V\         ,          p\        P                  ! 4       pVP                  V 4       VP	                  RWV4      pVR8w  d'   VP                  V4      \        P                  8X  d   ^# ^ # )aH  
Delete a member of enum - a symbolic constant

:param enum_id: id of enum
:param value: value of symbolic constant.
:param serial: serial number of the constant in the
    enumeration. See op_enum() for for details.
:param bmask: bitmask of the constant ordinary enums accept
    only -1 as a bitmask

:returns: 1-ok, 0-failed
Nr  )r!  r  r  r  r!  del_edmr  )r  r    r"  r#  r  r  s   &&&&  r   del_enum_memberr  i  sf     qy



C 
,,tU6
2C
byS[[%)<)<<r   c                    \         P                  ! 4       pVP                  RV 4      pVR8w  d'   VP                  W14      \         P                  8X  d   ^# ^ # )zt
Set name of enum member

:param const_id: enum constant TID
:param name: new member name

:returns: 1-ok, 0-failed
Nr  )r  r  r\  r?  r  )r  rf  r  r  s   &&  r   set_enum_member_namer    sG     


C


T8
,C
byS^^C.+2E2EEr   c                    \         P                  ! V 4      p\         P                  ! 4       pVP                  V4      pVR8w  d'   VP	                  WQ4      \         P
                  8X  d   ^# ^ # )z
Set comment for enum member

:param const_id: enum constant TID
:param cmt: comment
:param repeatable: is not used anymore

:returns: 1-ok, 0-failed
r  )r  r  r  r  rB  r  )r  r6  r3  rf  r  r  s   &&&   r   set_enum_member_cmtr    sU     ##H-D



C


d
#C
byS__S.+2E2EEr   z$ idc_array c                4    V \         P                  8X  d   R# V # )zs
Long to minus 1: If the 'v' appears to be the
'signed long' version of -1, then return -1.
Otherwise, return 'v'.
r  ida_netnodeBADNODEvs   &r   __l2m1r    s     	K	r   c                4    V R8X  d   \         P                  # V # )z{
Long -1 to BADNODE: If the 'v' appears to be the
'signed long' version of -1, then return BADNODE.
Otherwise, return 'v'.
r  r  r  s   &r   __m1tolr    s     	Bw"""r   c                      a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"V t#R!# )"__dummy_netnodei  a  
Implements, in an "always failing" fashion, the
netnode functions that are necessary for the
array-related functions.

The sole purpose of this singleton class is to
serve as a placeholder for netnode-manipulating
functions, that don't want to each have to perform
checks on the existence of the netnode.
(..in other words: it avoids a bunch of if/else's).

See __GetArrayById() for more info.
c                    ^ # r)   r   selfr   s   &*r   rename__dummy_netnode.rename      Ar   c                    R # r$   r   r  s   &*r   kill__dummy_netnode.kill  s    4r   c                    R# rF  r  r   r  s   &*r   r  __dummy_netnode.index  s    2Ir   c                    ^ # r)   r   r  s   &*r   altset__dummy_netnode.altset  r  r   c                    ^ # r)   r   r  s   &*r   supset__dummy_netnode.supset  r  r   c                    ^ # r)   r   r  s   &*r   altval__dummy_netnode.altval  r  r   c                    ^ # r)   r   r  s   &*r   supval__dummy_netnode.supval  r  r   c                    ^ # r)   r   r  s   &*r   altdel__dummy_netnode.altdel  r  r   c                    ^ # r)   r   r  s   &*r   supdel__dummy_netnode.supdel  r  r   c                    R# r  r   r  s   &*r   altfirst__dummy_netnode.altfirst      byr   c                    R# r  r   r  s   &*r   supfirst__dummy_netnode.supfirst  r  r   c                    R# r  r   r  s   &*r   altlast__dummy_netnode.altlast      Rir   c                    R# r  r   r  s   &*r   suplast__dummy_netnode.suplast  r  r   c                    R# r  r   r  s   &*r   altnext__dummy_netnode.altnext  r  r   c                    R# r  r   r  s   &*r   supnext__dummy_netnode.supnext  r  r   c                    R# r  r   r  s   &*r   altprev__dummy_netnode.altprev  r  r   c                    R# r  r   r  s   &*r   supprev__dummy_netnode.supprev  r  r   c                    ^ # r)   r   r  s   &*r   hashset__dummy_netnode.hashset      Qr   c                    ^ # r)   r   r  s   &*r   hashval__dummy_netnode.hashval  r  r   c                    ^ # r)   r   r  s   &*r   hashstr__dummy_netnode.hashstr  r  r   c                    ^ # r)   r   r  s   &*r   hashstr_buf__dummy_netnode.hashstr_buf      r   c                    ^ # r)   r   r  s   &*r   hashset_idx__dummy_netnode.hashset_idx  r  r   c                    ^ # r)   r   r  s   &*r   hashset_buf__dummy_netnode.hashset_buf  r  r   c                    ^ # r)   r   r  s   &*r   hashval_long__dummy_netnode.hashval_long  s    !r   c                    ^ # r)   r   r  s   &*r   hashdel__dummy_netnode.hashdel  r  r   c                    ^ # r)   r   r  s   &*r   	hashfirst__dummy_netnode.hashfirst  s    qr   c                    ^ # r)   r   r  s   &*r   hashnext__dummy_netnode.hashnext      ar   c                    ^ # r)   r   r  s   &*r   hashprev__dummy_netnode.hashprev  r  r   c                    ^ # r)   r   r  s   &*r   hashlast__dummy_netnode.hashlast  r  r   r   N)$r   r   r   r	   r
   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   __classdictcell____classdict__s   @r   r  r    sf      &%%%%%%%((''''''&&&***+&(''''r   r  c                ,    \         P                  ! V 4      pVP                  4       pVe   VP                  \        4      '       g   \
        P                  # V#   \         d    \
        P                  u # \         d    \
        P                  u # i ; i)a-  
Get an array, by its ID.

This (internal) wrapper around 'idaaip.netnode(array_id)'
will ensure a certain safety around the retrieval of
arrays (by catching quite unexpect[ed|able] exceptions,
and making sure we don't create & use `transient' netnodes).

:param array_id: A positive, valid array ID.
)	r  netnoderG  r,  _IDC_ARRAY_PREFIXr  instance	TypeErrorr   )array_idnodenodenames   &  r   __GetArrayByIdr    sy    
(""8,==?8#6#67H#I#I"+++K (''' ('''(s*   AA A A B6B?BBc                    \         P                  ! 4       pVP                  \        V ,           4      pVR8X  d   R# VP	                  4       # )zk
Create array.

:param name: The array name.

:returns: -1 in case of failure, a valid array_id otherwise.
Fr  )r  r  creater  r  )rf  r  rS  s   &  r   create_arrayr    s>      D;;(4/0C
e|	zz|r   c                v    \        \        P                  ! \        V ,           ^ R4      P	                  4       4      # )z
Get array array_id, by name.

:param name: The array name.

:returns: -1 in case of failure (i.e., no array with that
         name exists), a valid array_id otherwise.
F)r  r  r  r  r  r"  s   &r   get_array_idr    s-     +%%&7$&>5IOOQRRr   c                R    \        V 4      P                  \        V,           4      ^8H  # )z
Rename array, by its ID.

:param id: The ID of the array to rename.
:param newname: The new name of the array.

:returns: 1 in case of success, 0 otherwise
)r  r  r  )r  newnames   &&r   rename_arrayr	  )  s%     (#**+<w+FG1LLr   c                8    \        V 4      P                  4        R# )zK
Delete array, by its ID.

:param array_id: The ID of the array to delete.
N)r  r  )r  s   &r   delete_arrayr  5  s     8!!#r   c                6    \        V 4      P                  W4      # )z
Sets the long value of an array element.

:param array_id: The array ID.
:param idx: Index of an element.
:param value: 32bit or 64bit value to store in the array

:returns: 1 in case of success, 0 otherwise
)r  r  r  r  r    s   &&&r   set_array_longr  >       (#**366r   c                6    \        V 4      P                  W4      # )z
Sets the string value of an array element.

:param array_id: The array ID.
:param idx: Index of an element.
:param value: String value to store in the array

:returns: 1 in case of success, 0 otherwise
)r  r  r  s   &&&r   set_array_stringr  K  r  r   c                    \        V4      pV \        8X  d   VP                  W 4      # V \        8X  d   VP	                  W 4      pVf   ^ # T# ^ # )aV  
Get value of array element.

:param tag: Tag of array, specifies one of two array types: AR_LONG, AR_STR
:param array_id: The array ID.
:param idx: Index of an element.

:returns: Value of the specified array element. Note that
         this function may return char or long result. Unexistent
         array elements give zero as a result.
)r  AR_LONGr  AR_STRr  )r  r  r  r  rS  s   &&&  r   get_array_elementr  X  sK     (#D
g~{{3$$	kk##Kq(S(r   c                    \        V4      pV \        8X  d   VP                  W 4      # V \        8X  d   VP	                  W 4      # ^ # )z
Delete an array element.

:param tag: Tag of array, specifies one of two array types: AR_LONG, AR_STR
:param array_id: The array ID.
:param idx: Index of an element.

:returns: 1 in case of success, 0 otherwise.
)r  r  r  r  r  r  r  r  r  s   &&& r   del_array_elementr  n  s=     (#D
g~{{3$$	{{3$$r   c                    \        V4      pV \        8X  d   \        VP                  V 4      4      # V \        8X  d   \        VP                  V 4      4      # R# )a   
Get index of the first existing array element.

:param tag: Tag of array, specifies one of two array types: AR_LONG, AR_STR
:param array_id: The array ID.

:returns: -1 if the array is empty, otherwise index of first array
         element of given type.
r  )r  r  r  r  r  r  r  r  r  s   && r   get_first_indexr    sI     (#D
g~dmmC())	dmmC())	r   c                    \        V4      pV \        8X  d   \        VP                  V 4      4      # V \        8X  d   \        VP                  V 4      4      # R# )z
Get index of last existing array element.

:param tag: Tag of array, specifies one of two array types: AR_LONG, AR_STR
:param array_id: The array ID.

:returns: -1 if the array is empty, otherwise index of first array
         element of given type.
r  )r  r  r  r  r  r  r  s   && r   get_last_indexr    sI     (#D
g~dll3'((	dll3'((	r   c                    \        V4      p V \        8X  d%   \        VP                  \	        V4      V 4      4      # V \
        8X  d%   \        VP                  \	        V4      V 4      4      # R#   \         d    Ru # i ; i)a2  
Get index of the next existing array element.

:param tag: Tag of array, specifies one of two array types: AR_LONG, AR_STR
:param array_id: The array ID.
:param idx: Index of the current element.

:returns: -1 if no more elements, otherwise returns index of the
         next array element of given type.
r  )r  r  r  r  r  r  r  OverflowErrorr  s   &&& r   get_next_indexr     n     (#D	'>$,,ws|S9::F]$,,ws|S9::I 	   .A- .A- +A- -A=<A=c                    \        V4      p V \        8X  d%   \        VP                  \	        V4      V 4      4      # V \
        8X  d%   \        VP                  \	        V4      V 4      4      # R#   \         d    Ru # i ; i)a:  
Get index of the previous existing array element.

:param tag: Tag of array, specifies one of two array types: AR_LONG, AR_STR
:param array_id: The array ID.
:param idx: Index of the current element.

:returns: -1 if no more elements, otherwise returns index of the
         previous array element of given type.
r  )r  r  r  r  r  r  r  r  r  s   &&& r   get_prev_indexr$    r!  r"  c                6    \        V 4      P                  W4      # )z
Sets the long value of a hash element.

:param hash_id: The hash ID.
:param key: Key of an element.
:param value: 32bit or 64bit value to store in the hash

:returns: 1 in case of success, 0 otherwise
)r  r  hash_idr|  r    s   &&&r   set_hash_longr(         '"..s::r   c                6    \        V 4      P                  V4      # )z
Gets the long value of a hash element.

:param hash_id: The hash ID.
:param key: Key of an element.

:returns: the 32bit or 64bit value of the element, or 0 if no such
         element.
)r  r  r'  r|  s   &&r   get_hash_longr,    s     '"//44r   c                6    \        V 4      P                  W4      # )z
Sets the string value of a hash element.

:param hash_id: The hash ID.
:param key: Key of an element.
:param value: string value to store in the hash

:returns: 1 in case of success, 0 otherwise
)r  r  r&  s   &&&r   set_hash_stringr.    r)  r   c                6    \        V 4      P                  V4      # )z
Gets the string value of a hash element.

:param hash_id: The hash ID.
:param key: Key of an element.

:returns: the string value of the element, or None if no such
         element.
)r  r  r+  s   &&r   get_hash_stringr0     s     '"..s33r   c                6    \        V 4      P                  V4      # )z|
Delete a hash element.

:param hash_id: The hash ID.
:param key: Key of an element

:returns: 1 upon success, 0 otherwise.
)r  r  r+  s   &&r   del_hash_stringr2    s     '"**3//r   c                D    \        V 4      P                  4       pVf   ^ # T# )z_
Get the first key in the hash.

:param hash_id: The hash ID.

:returns: the key, 0 otherwise.
)r  r  r'  r  s   & r   get_first_hash_keyr5    s&     	w))+A	1 q r   c                D    \        V 4      P                  4       pVf   ^ # T# )z^
Get the last key in the hash.

:param hash_id: The hash ID.

:returns: the key, 0 otherwise.
)r  r  r4  s   & r   get_last_hash_keyr7  %  s&     	w((*A	1 q r   c                F    \        V 4      P                  V4      pVf   ^ # T# )z
Get the next key in the hash.

:param hash_id: The hash ID.
:param key: The current key.

:returns: the next key, 0 otherwise
)r  r  r'  r|  r  s   && r   get_next_hash_keyr:  1  (     	w((-A	1 q r   c                F    \        V 4      P                  V4      pVf   ^ # T# )z
Get the previous key in the hash.

:param hash_id: The hash ID.
:param key: The current key.

:returns: the previous key, 0 otherwise
)r  r  r9  s   && r   get_prev_hash_keyr=  >  r;  r   c                d    \         P                  ! V \         P                  4      pV'       d   ^# ^ # )zS
Load a type library

:param name: name of type library.
:returns: 1-ok, 0-failed.
)r  add_tilADDTIL_DEFAULT)rf  tils   & r   add_default_tilrB  ]  s%     

dK$>$>
?C
r   c                    \         P                  ! 4       pVP                  RV4      '       d   VP                  4       # \        # )a  
Copy information from type library to database
Copy structure, union, or enum definition from the type library
to the IDA database.

:param idx: -1, ignored
:param type_name: name of type to copy

:returns: BADNODE-failed, otherwise the type id (structure id or enum id)
N)r  r  r  	force_tidr!  )r  	type_namer  s   && r   import_typerF  k  s6     


C
$	**}}Nr   c                .    \         P                  ! V 4      # )zn
Get type of function/variable

:param ea: the address of the object

:returns: type string or None if failed
)r  idc_get_typer4   s   &r   r  r  |  s     ##B''r   c                   \        V \        4      '       d8   \        V 4      ^8X  d   V ^,          pM[\        V 4      ^8X  d   V ^ ,          pMARpM>\        V \        4      '       d   T pM%\        V \        4      '       d   \        V ^ 4      w  r!p\        X\        4      '       d    \        P                  ! RV4      pVf   R# T# \        R4      h)aF  
Returns the size of the type. It is equivalent to IDC's sizeof().
:param typestr: can be specified as a typeinfo tuple (e.g. the result of get_tinfo()),
        serialized type byte string,
        or a string with C declaration (e.g. "int")
:returns: -1 if typestring is not valid or has no size. otherwise size of the type
NzKidc.sizeof(): expected type tuple, serialized type string, or C declarationr  )	r  tupler0  r+  ru  
parse_declr  calc_type_sizer  )typestrtprf  rM  r  s   &    r   sizeofrO    s     '5!!
g,!
ajLAqz	GU	#	#	GS	!	!!'1-1 "e%%dB/qIb%A%deer   c                .    \         P                  ! V 4      # )z
Get type information of function/variable as 'typeinfo' object

:param ea: the address of the object
:returns: None on failure, or (type, fields) tuple.
)r  idc_get_type_rawr4   s   &r   	get_tinforR    s     ''++r   c                .    \         P                  ! V 4      # )z
Get local type information as 'typeinfo' object

:param ordinal:  slot number (1...NumberOfLocalTypes)
:returns: None on failure, or (type, fields) tuple.
)r  idc_get_local_type_rawordinals   &r   get_local_tinforW    s     --g66r   c                .    \         P                  ! V 4      # )z
Guess type of function/variable

:param ea: the address of the object, can be the structure member id too

:returns: type string or None if failed
)r  idc_guess_typer4   s   &r   
guess_typerZ    s     %%b))r   c                    Vf   Rp\        V\        P                  4      '       d   \        V4      ^ 8X  d   RpM\        V4      ^8X  d   VR,          pMTp\        P
                  ! RV^ ,          V^,          W4      # )a  
Apply the specified type to the address

:param ea: the address of the object
:param py_type: typeinfo tuple (type, fields) as get_tinfo() returns
             or tuple (name, type, fields) as parse_decl() returns
             or None
            if specified as None, then the
            item associated with 'ea' will be deleted.
:param flags: combination of TINFO_... constants or 0
:returns: Boolean
NrI  :rF  NN)r   r   )r  r  string_typesr0  r  
apply_type)r5   py_typer8  pts   &&& r   r]  r]    sj     ':2233G8Iw<1r{""!!$1r!ub@@r   i   c                b    VR8w  d   \        V\        4      pVf   R# MRp\        W\        4      # )a-  
Set type of function/variable

:param ea: the address of the object
:param newtype: the type string in C declaration form.
            Must contain the closing ';'
            if specified as an empty string, then the
            item associated with 'ea' will be deleted.

:returns: 1-ok, 0-failed.
rI  N)rK  PT_SILr]  TINFO_DEFINITE)r5   newtyper_  s   && r   SetTyperd    s8     "}(:  bn--r   c                ~    \        V 4      ^ 8w  d   V R,          R8w  d
   V R,           p \        P                  ! RW4      # )z
Parse type declaration

:param inputtype: file name or C declarations (depending on the flags)
:param flags: combination of PT_... constants or 0

:returns: None on failure or (name, type, fields) tuple
;Nr  )r0  r  idc_parse_decl	inputtyper8  s   &&r   rK  rK    s7     9~y}3O	%%dI==r   c                .    \         P                  ! W4      # )z
Parse type declarations

:param inputtype: file name or C declarations (depending on the flags)
:param flags: combination of PT_... constants or 0

:returns: number of parsing errors (0 no errors)
)r  idc_parse_typesrh  s   &&r   parse_declsrl    s     &&y88r   c                     ! R R\         P                  4      pV! 4       p\        \        R V P	                  R4      4      4      p\         P
                  ! VRWA4       VP                  # )z
Print types in a format suitable for use in a header file

:param ordinals: comma-separated list of type ordinals
:param flags: combination of PDF_... constants or 0

:returns: string containing the type definitions
c                   ,   a  ] tR tRt o R tR tRtV tR# )print_decls.<locals>.def_sinki1  c                R    \         P                  P                  V 4       R V n        R# )rI  N)r  text_sink_t__init__rN  )r  s   &r   rr  &print_decls.<locals>.def_sink.__init__3  s    ##,,T2DIr   c                8    V ;P                   V,          un         ^ # r)   rN  )r  defstrs   &&r   _print$print_decls.<locals>.def_sink._print7  s    IIIr   ru  N)r   r   r   r	   rr  rw  r   r  r  s   @r   def_sinkro  1  s     		 	r   ry  c                     \        V 4      # r$   )r  )ls   &r   r'   print_decls.<locals>.<lambda><  s    c!fr   ,N)r  rq  rJ  mapsplitprint_declsrN  )ordinalsr8  ry  sinkpy_ordinalss   &&   r   r  r  (  sT    ;**  :Ds,hnnS.ABCKD$;99r   c                 .    \         P                  ! R4      # )z]
Get number of local types + 1

:returns: value >= 1. 1 means that there are no local types.
N)r  get_ordinal_limitr   r   r   r  r  H  s     ((..r   c                0    \         P                  ! WV4      # )at  
Parse one type declaration and store it in the specified slot

:param ordinal:  slot number (1...NumberOfLocalTypes)
                 -1 means allocate new slot or reuse the slot
                 of the existing named type
:param input:  C declaration. Empty input empties the slot
:param flags:  combination of PT_... constants or 0

:returns: slot number or 0 if error
)r  idc_set_local_type)rV  inputr8  s   &&&r   set_local_typer  Q  s     ))'%@@r   c                t    \        V 4      w  r#V'       d#   \        V 4      p\        P                  ! W#WA4      # R# )zy
Retrieve a local type declaration
:param flags: any of PRTYPE_* constants
:returns: local type as a C declaration or ""
rI  )rW  get_numbered_type_namer  idc_print_type)rV  r8  r*  fieldsrf  s   &&   r   GetLocalTyper  `  s3     %W-NT#G,d''dBBr   i   i    c                .    \         P                  ! V 4      # )zu
Retrieve a local type name

:param ordinal:  slot number (1...NumberOfLocalTypes)

returns: local type name or None
)r  idc_get_local_type_namerU  s   &r   r  r  }  s     ..w77r   c                z    \         P                  ! V 4      pV'       g   ^ # Wn        \         P                  ! V4      # )z
Set hidden range state

:param ea:      any address belonging to the hidden range
:param visible: new state of the range

:returns: != 0 - ok
)rS  get_hidden_rangevisibleupdate_hidden_range)r5   r  has   && r   r  r    s0     
	#	#B	'B
,,R00r   c               #     "   \         P                  ! 4       p \        P                  ! V 4      pV'       d   V x  \        P                  ! V 4      pK$  R# 5i)z%
INTERNAL: Enumerate process modules
N)r  	modinfo_tr  get_first_moduleget_next_module)ry  results     r   _get_modulesr    sB       F%%f-F
((0 s
   3AAc                 @    \        4        F  p V P                  u # 	  R# )zU
Enumerate process modules

:returns: first module's base address or None on failure
Nr  r  )ry  s    r   r  r    s     .{{ ! r   c                    Rp\        4        F.  pV'       d   VP                  u # VP                  V 8X  g   K,  RpK0  	  R# )z
Enumerate process modules

:param base: previous module's base address

:returns: next module's base address or None on failure
FTNr  )r  founditry  s   &  r   r  r    s8     G.;;;;$G	 ! r   c                f    \        4        F"  pVP                  V 8X  g   K  VP                  u # 	  ^ # )zg
Get process module name

:param base: the base address of the module

:returns: required info or None
)r  r  rf  r  ry  s   & r   get_module_namer    s+     .;;$;; ! r   c                f    \        4        F"  pVP                  V 8X  g   K  VP                  u # 	  R# )ze
Get process module size

:param base: the base address of the module

:returns: required info or -1
r  )r  r  r  r  s   & r   get_module_sizer    s-     .;;$;; ! 	r   c                  8    \        \        \        ,          ^ 4      # r)   )wait_for_next_event	WFNE_CONTWFNE_NOWAITr   r   r   resume_processr    s    y4a88r   c                    \        R\        P                  ! V 4      ,          4      pVP                  R4      '       d   \	        R4      hV# )zSends a command to the debugger module and returns the output string.
An exception will be raised if the debugger is not running or the current debugger does not export
the 'send_dbg_command' IDC command.
zsend_dbg_command("%s");IDC_FAILUREz?Debugger command is available only when the debugger is active!)r(  r   rq  r,  	Exception)cmdr   s   & r   send_dbg_commandr    s?    
 	*[-A-A#-FFGA||M""YZZHr   c                 j    \         P                  ! 4       p V '       g   Q R4       hV P                  4       # )z+
Get ID of debug event

:returns: event ID
Could not retrieve debug event)r  get_debug_eventeidevs    r   get_event_idr  D  s+     
	 	 	"B///2668Or   c                 b    \         P                  ! 4       p V '       g   Q R4       hV P                  # )z6
Get process ID for debug event

:returns: process ID
r  )r  r  pidr  s    r   get_event_pidr  O  )     
	 	 	"B///266Mr   c                 b    \         P                  ! 4       p V '       g   Q R4       hV P                  # )z0
Get type ID for debug event

:returns: type ID
r  )r  r  rl  r  s    r   get_event_tidr  Z  r  r   c                 b    \         P                  ! 4       p V '       g   Q R4       hV P                  # )z&
Get ea for debug event

:returns: ea
r  )r  r  r5   r  s    r   get_event_ear  e  s)     
	 	 	"B///255Lr   c                 b    \         P                  ! 4       p V '       g   Q R4       hV P                  # )z0
Is the debug event handled?

:returns: boolean
r  )r  r  handledr  s    r   is_event_handledr  p  s*     
	 	 	"B///2::r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z8
Get module name for debug event

:returns: module name
r  )r  r  r  get_event_module_namer  s    r   r  r  }  1     
	 	 	"B///2((,,r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z8
Get module base for debug event

:returns: module base
r  )r  r  r  get_event_module_baser  s    r   r  r    r  r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z8
Get module size for debug event

:returns: module size
r  )r  r  r  get_event_module_sizer  s    r   r  r    r  r   c                 j    \         P                  ! 4       p V '       g   Q R4       hV P                  4       # )z]
Get exit code for debug event

:returns: exit code for PROCESS_EXITED, THREAD_EXITED events
r  )r  r  	exit_coder  s    r   get_event_exit_coder    s,     
	 	 	"B///2<<>r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z
Get debug event info

:returns: event info: for THREAD_STARTED (thread name)
                     for LIB_UNLOADED (unloaded library name)
                     for INFORMATION (message to display)
r  )r  r  r  get_event_infor  s    r   r  r    s1     
	 	 	"B///2!!"%%r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )zG
Get hardware address for BREAKPOINT event

:returns: hardware address
r  )r  r  r  get_event_bpt_hear  s    r   r  r    s1     
	 	 	"B///2$$R((r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )zB
Get exception code for EXCEPTION event

:returns: exception code
r  )r  r  r  get_event_exc_coder  s    r   r  r    1     
	 	 	"B///2%%b))r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z@
Get address for EXCEPTION event

:returns: adress of exception
r  )r  r  r  get_event_exc_ear  s    r   r  r    1     
	 	 	"B///2##B''r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z;
Can it continue after EXCEPTION event?

:returns: boolean
r  )r  r  r  can_exc_continuer  s    r   r  r    r  r   c                 v    \         P                  ! 4       p V '       g   Q R4       h\        P                  ! V 4      # )z5
Get info for EXCEPTION event

:returns: info string
r  )r  r  r  get_event_exc_infor  s    r   r  r    r  r   i `  c                .    \         P                  ! W4      # )a	  
Set register value

:param name: the register name
:param value: new register value

NOTE: The debugger should be running
       It is not necessary to use this function to set register values.
       A register name in the left side of an assignment will do too.
)r  set_reg_val)r    rf  s   &&r   set_reg_valuer    s     t++r   c                    \         P                  ! 4       p\         P                  ! W4      '       d   VP                  # \        # )z
Get breakpoint address

:param n: number of breakpoint, is in range 0..get_bpt_qty()-1

:returns: address of the breakpoint or BADADDR
)r  bpt_tgetn_bptr5   r!  )r   bpts   & r   
get_bpt_ear  "  s.     --/Cvvr   c                   \         P                  ! 4       p\         P                  ! W4      '       g   R# V\        8X  d   VP                  # V\
        8X  d   VP                  # V\        8X  d   VP                  # V\        8X  d   VP                  # V\        8X  d   VP                  # V\        8X  d   VP                  # V\        8X  d   VP                   # V\"        8X  d   VP$                  # R# )z
Get the characteristics of a breakpoint

:param ea: any address in the breakpoint range
:param bptattr: the desired attribute code, one of BPTATTR_... constants

:returns: the desired attribute value or -1
r  )r  r  get_bpt
BPTATTR_EAr5   BPTATTR_SIZEr  BPTATTR_TYPEr*  BPTATTR_COUNT
pass_countBPTATTR_FLAGSr8  BPTATTR_COND	conditionBPTATTR_PIDr  BPTATTR_TIDrl  )r5   bptattrr  s   && r   get_bpt_attrr  2  s     --/C??2##	j 66Ml"88Ol"88Om#>>!m#99l"== k!77Nk!77N	r   c                   \         P                  ! 4       p\         P                  ! W4      '       g   R# V\        \        \
        \        \        \        39  d   R# V\        8X  d   W#n	        V\        8X  d   W#n
        V\        8X  d   W#n        V\
        8X  d   W#n        V\        8X  d   W#n        V\        8X  d   W#n        \         P                  ! V4      # )a  
    modifiable characteristics of a breakpoint

:param address: any address in the breakpoint range
:param bptattr: the attribute code, one of BPTATTR_* constants
                BPTATTR_CND is not allowed, see set_bpt_cond()
:param value: the attribute value

:returns: success
F)r  r  r  r  r  r  r  r  r  r  r*  r  r8  r  rl  
update_bpt)addressr  r    r  s   &&& r   set_bpt_attrr  ~  s     --/C??7((L,}Vacnppl"Hl"Hm#"Nm#Ik!Gk!G!!#&&r   c                (   \         P                  ! 4       p\         P                  ! W4      '       g   R# Wn        V'       d   V;P                  \
        ,          un        MV;P                  \
        ( ,          un        \         P                  ! V4      # )z
Set breakpoint condition

:param ea: any address in the breakpoint range
:param cnd: breakpoint condition
:param is_lowcnd: 0 - regular condition, 1 - low level condition

:returns: success
F)r  r  r  r  r8  
BPT_LOWCNDr  )r5   cnd	is_lowcndr  s   &&& r   set_bpt_condr    sX     --/C??2##M		Z			j[ 	c""r   c                   V \         \        \        39   g   Q R4       hV \         8X  d   \        P                  ! V4      # V \        8X  d   \        P
                  ! V4      # V \        8X  d   \        P                  ! V4      # R# )z
Enable step tracing

:param trace_level:  what kind of trace to modify
:param enable: 0: turn off, 1: turn on

:returns: success
z,trace_level must be one of TRACE_* constantsF)
TRACE_STEP
TRACE_INSN
TRACE_FUNCr  enable_step_traceenable_insn_traceenable_func_trace)trace_levelenables   &&r   enable_tracingr    ss     J
J@@ 767@ j ((00j ((00j ((00r   c                ,    \         P                  ! 4       # )z 
Clear the current trace buffer
)r  clear_trace)filenames   &r   r  r    s       r   c                v   V\         \        \        39  d   \        R4      hV\         8X  d   \        P
                  ! V 4      # V\        8X  d1   \        P                  ! V 4      pV'       d   VP                  # \        # V\        8X  d1   \        P                  ! V 4      pV'       d   VP                  # \        # R# )z
Get item color

:param ea: address of the item
:param what: type of the item (one of  CIC_* constants)

:returns: color code in RGB (hex 0xBBGGRR)
5'what' must be one of CIC_ITEM, CIC_FUNC and CIC_SEGMN)CIC_ITEMCIC_FUNCCIC_SEGM
ValueErrorr:  get_item_colorrO  rP  colorDEFCOLORrU  rV  )r5   r   r\  r   s   &&  r   	get_colorr    s     Xx33PQQx&&r**x!!"%::Ox  $99O r   c                   V\         \        \        39  d   \        R4      hV\         8X  d   \        P
                  ! W4      # V\        8X  dF   \        P                  ! V 4      pV'       d&   W#n        \        \        P                  ! V4      4      # R# V\        8X  d@   \        P                  ! V 4      pV'       d    W$n        \        VP                  4       4      # R# R# )z
Set item color

:param ea: address of the item
:param what: type of the item (one of CIC_* constants)
:param color: new color code in RGB (hex 0xBBGGRR)

:returns: success (True or False)
r  FN)r  r  r	  r
  r:  set_item_colorrO  rP  r  boolr)  rU  rV  r  )r5   r   r  r\  r   s   &&&  r   	set_colorr  4  s     Xx33PQQx&&r11x!!"%J	--d344x  $I

%% r   c                &    \        RV ,          4      # )a  
Some ARM compilers in Thumb mode use BL (branch-and-link)
instead of B (branch) for long jumps, since BL has more range.
By default, IDA tries to determine if BL is a jump or a call.
You can override IDA's decision using commands in Edit/Other menu
(Force BL call/Force BL jump) or the following two functions.

Force BL instruction to be a jump

:param ea: address of the BL instruction

:returns: 1-ok, 0-failed
zforce_bl_jump(0x%x)r  r4   s   &r   force_bl_jumpr  X  s     )",--r   c                &    \        RV ,          4      # )zg
Force BL instruction to be a call

:param ea: address of the BL instruction

:returns: 1-ok, 0-failed
zforce_bl_call(0x%x)r  r4   s   &r   force_bl_callr  i  s     )",--r   c                 f    \        V 4      pV'       d
   W1,          pM	W1( ,          p\        W4       R # r$   )ru  r  )r   bitr    r  s   &&& r   set_flagr  u  s'    3!
	A	DAsr   c                      \        4       # r$   )get_screen_ear   r   r   herer  ~  s	    =?"r   c                 ,    \        V ^,           4      V 8H  # rE  )	prev_addrr4   s   &r   	is_mappedr    s    9RT?B./r   r  r)   )Tr  )INFFL_LFLG_IDB_AF_AF2_SW_NM_DEMNAM_LN_OFLG_SCF_LMT_PREF_STRF_ABI_)Tr'  )Tr  )Forgbase)Fr  )Fr  )Fperm)Fr  )Fr8  )Fr(  )Fr*   )FrF  )F   )F   )F   )F   )Fr*  )Fr  i)i)i)i)i)i)TrU  )Tfrsize)TrW  )TrX  )Ffpd)Towner)Trefqty)r  ([  r
   
__future__r   r  r_  r  r  	ida_entryr  r  r  rO  r  r%   ida_idcrS  r  r  r   r*  r2  	ida_movesr:  rL  r  r  r  
ida_searchrU  r  r  r  ida_xref_ida_idaapir>  r  r   rC  typessysr!  __EA64__WORDMASKr  r   r   r   r   r!   r  SIZE_MAX__set_module_dynattrsr   r0   r+   r.   r1   r6   r8   r9   r=   r@   rC   r:   r>   rA   rD   rF   MS_COMMFF_COMMrP   rL   rS   FF_LABLrI   rV   rJ   rM   rQ   rT   rW   rY   rZ   ri   rb   r   r   r{   ru   ro   r   r   r   r   r^   r_   rl   rf   r   r   r   rx   rr   r   r   r   r   r[   r`   rc   rg   rj   rm   rp   rs   rv   ry   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   MS_CODEFF_FUNCFF_IMMDFF_JUMPNEF_SEGSNEF_RSCSNEF_NAMENEF_MANNEF_FILLNEF_IMPS	NEF_FIRSTNEF_CODE
NEF_RELOADNEF_FLATr   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  IDCHK_OK	IDCHK_ARG	IDCHK_KEY	IDCHK_MAXadd_idc_hotkeydel_idc_hotkeyjumpto	auto_waitr(  r.  r6  r5  r;  qexitrA  rG  load_and_run_pluginplan_to_apply_idasgnr]  create_insnr`  SN_CHECKre  
SN_NOCHECK	SN_PUBLICSN_NON_PUBLICSN_WEAKSN_NON_WEAKSN_AUTOSN_NON_AUTO	SN_NOLIST	SN_NOWARNSN_LOCALset_cmtrr  rt  rn  ry  r|  r~  r  r  r  r  r  r  r  r  create_custdatacreate_custom_datacreate_alignr  	del_itemsDELIT_SIMPLEDELIT_EXPANDDELIT_DELNAMESr  AP_ALLOWDUPS	AP_SIGNEDAP_INDEXAP_ARRAYAP_IDXBASEMASK	AP_IDXDEC	AP_IDXHEX	AP_IDXOCT	AP_IDXBINop_binop_octop_decop_hexop_chrr  
OPND_OUTERr  REF_OFF8	REF_OFF16	REF_OFF32REF_LOW8	REF_LOW16	REF_HIGH8r  	REF_OFF64REFINFO_RVAREFINFO_PASTENDREFINFO_NOBASEREFINFO_SUBTRACTREFINFO_SIGNEDOPop_segop_numop_fltset_forced_operandop_mantoggle_signr  op_enumr  	op_stkvarr  r  E_PREVE_NEXTget_extra_cmtupdate_extra_cmtdel_extra_cmtset_manual_insnget_manual_insnput_dbg_bytepatch_dbg_byte
patch_byte
patch_wordpatch_dwordpatch_qword
SR_inheritSR_userSR_autoSR_autostartr  r  auto_unmarkr  AU_UNKAU_CODEAU_PROCAU_USEDAU_LIBFAU_FINALr  	OFILE_MAPr  	OFILE_IDC	OFILE_LST	OFILE_ASM	OFILE_DIFGENFLG_MAPSEGGENFLG_MAPNAMEGENFLG_MAPDMNGGENFLG_MAPLOCGENFLG_IDCTYPEGENFLG_ASMTYPEGENFLG_GENHTMLGENFLG_ASMINCr  CHART_PRINT_NAMESCHART_GEN_GDLCHART_WINGRAPHCHART_NOLIBFUNCSr  r  get_root_filenameget_input_file_pathset_root_filenamer1  retrieve_input_file_md5r3   get_db_byter  get_wide_byter  r  r	  r  r  r  read_dbg_memoryr  get_original_byteget_wide_wordr  r  r  r  r#  r!  r&  r  r,  r4  r6  r8  	next_addrr  r[  r=  next_not_tailprev_not_tailget_item_headr@  rm  rB  
GN_VISIBLE
GN_COLOREDGN_DEMANGLED	GN_STRICTGN_SHORTGN_LONGGN_LOCALGN_ISRETGN_NOT_ISRETcalc_gtn_flagsrG  rI  rM  GENDSM_FORCE_CODEGENDSM_MULTI_LINErP  rT  rV  rZ  o_voidra  r\  rc  r_  rb  r]  r^  
o_idpspec0
o_idpspec1
o_idpspec2
o_idpspec3
o_idpspec4
o_idpspec5o_trrego_dbrego_crrego_fprego_mmxrego_xmmreg	o_reglist
o_creglisto_crego_fpreglisto_texto_condo_spro_twofpro_shmbmeo_crfo_crbo_dcrrf  get_cmtGetCommentExget_forced_operandBPU_1BBPU_2BBPU_4BSTRWIDTH_1BSTRWIDTH_2BSTRWIDTH_4BSTRWIDTH_MASKSTRLYT_TERMCHRSTRLYT_PASCAL1STRLYT_PASCAL2STRLYT_PASCAL4STRLYT_MASKSTRLYT_SHIFTSTRTYPE_TERMCHR	STRTYPE_CSTRTYPE_C_16STRTYPE_C_32STRTYPE_PASCALSTRTYPE_PASCAL_16STRTYPE_LEN2STRTYPE_LEN2_16STRTYPE_LEN4STRTYPE_LEN4_16STRTYPE_C16rj  ro  find_suspop	find_code	find_datafind_unknownfind_definedfind_imm	find_text
find_bytesrs  INF_VERSIONINF_PROCNAMEINF_GENFLAGS
INF_LFLAGSINF_DATABASE_CHANGE_COUNTINF_CHANGE_COUNTERINF_FILETYPE
FT_EXE_OLD
FT_COM_OLDFT_BINFT_DRVFT_WINFT_HEXFT_MEXFT_LXFT_LEFT_NLMFT_COFFFT_PEFT_OMFFT_SRECFT_ZIP	FT_OMFLIBFT_AR	FT_LOADERFT_ELF	FT_W32RUNFT_AOUTFT_PRCFT_EXEFT_COMFT_AIXARFT_MACHO
INF_OSTYPEOSTYPE_MSDOS
OSTYPE_WIN
OSTYPE_OS2OSTYPE_NETWINF_APPTYPEAPPT_CONSOLEAPPT_GRAPHICAPPT_PROGRAMAPPT_LIBRARYAPPT_DRIVERAPPT_1THREADAPPT_MTHREAD
APPT_16BIT
APPT_32BITINF_ASMTYPEINF_SPECSEGSINF_AFr}  INF_AF2INF_BASEADDRINF_START_SSINF_START_CSINF_START_IPINF_START_EAINF_START_SPINF_MAIN
INF_MIN_EA
INF_MAX_EAINF_OMIN_EAINF_OMAX_EA
INF_LOWOFFINF_LOW_OFFINF_HIGHOFFINF_HIGH_OFF
INF_MAXREFINF_PRIVRANGE_START_EAINF_START_PRIVRANGEINF_PRIVRANGE_END_EAINF_END_PRIVRANGEINF_NETDELTAINF_XREFNUMINF_TYPE_XREFNUMINF_TYPE_XREFSINF_REFCMTNUMINF_REFCMTSINF_XREFFLAG	INF_XREFSINF_MAX_AUTONAME_LENINF_NAMETYPEINF_SHORT_DEMNAMESINF_SHORT_DNINF_LONG_DEMNAMESINF_LONG_DNINF_DEMNAMESINF_LISTNAMES
INF_INDENTINF_CMT_INDENTINF_COMMENT
INF_MARGININF_LENXREFINF_OUTFLAGS
INF_CMTFLGINF_CMTFLAGINF_LIMITER
INF_BORDERINF_BIN_PREFIX_SIZEINF_BINPREFINF_PREFFLAGINF_STRLIT_FLAGSINF_STRLIT_BREAKINF_STRLIT_ZEROESrv  INF_STRLIT_PREFINF_STRLIT_SERNUMINF_DATATYPES	INF_CC_ID	COMP_MASKCOMP_UNKCOMP_MSCOMP_BCCOMP_WATCOMCOMP_GNUCOMP_VISAGECOMP_BP	INF_CC_CMINF_CC_SIZE_IINF_CC_SIZE_BINF_CC_SIZE_EINF_CC_DEFALIGNINF_CC_SIZE_SINF_CC_SIZE_LINF_CC_SIZE_LLINF_CC_SIZE_LDBLINF_COMPILER	INF_MODELINF_SIZEOF_INTINF_SIZEOF_BOOLINF_SIZEOF_ENUMINF_SIZEOF_ALGNINF_SIZEOF_SHORTINF_SIZEOF_LONGINF_SIZEOF_LLONGINF_SIZEOF_LDBLINF_ABIBITSINF_APPCALL_OPTIONSinf_get_abibitsinf_set_abibits
inf_get_af
inf_set_afinf_get_af2inf_set_af2inf_get_appcall_optionsinf_set_appcall_optionsinf_get_apptypeinf_set_apptypeinf_get_asmtypeinf_set_asmtypeinf_get_baseaddrinf_set_baseaddrinf_get_bin_prefix_sizeinf_set_bin_prefix_sizeinf_get_cc_cminf_set_cc_cminf_get_cc_defaligninf_set_cc_defaligninf_get_cc_idinf_set_cc_idinf_get_cc_size_binf_set_cc_size_binf_get_cc_size_einf_set_cc_size_einf_get_cc_size_iinf_set_cc_size_iinf_get_cc_size_linf_set_cc_size_linf_get_cc_size_ldblinf_set_cc_size_ldblinf_get_cc_size_llinf_set_cc_size_llinf_get_cc_size_sinf_set_cc_size_sinf_get_cmtflginf_set_cmtflginf_get_cmt_indentinf_set_cmt_indentinf_get_database_change_countinf_set_database_change_countinf_get_datatypesinf_set_datatypesinf_get_demnamesinf_set_demnamesinf_get_privrange_end_eainf_set_privrange_end_eainf_get_filetypeinf_set_filetypeinf_get_genflagsinf_set_genflagsinf_get_highoffinf_set_highoffinf_get_indentinf_set_indentinf_get_lenxrefinf_set_lenxrefinf_get_lflagsinf_set_lflagsinf_get_limiterinf_set_limiterinf_get_listnamesinf_set_listnamesinf_get_long_demnamesinf_set_long_demnamesinf_get_lowoffinf_set_lowoffinf_get_maininf_set_maininf_get_margininf_set_margininf_get_maxrefinf_set_maxrefinf_get_max_autoname_leninf_set_max_autoname_lenrK  inf_set_max_earJ  inf_set_min_eainf_get_nametypeinf_set_nametypeinf_get_netdeltainf_set_netdeltainf_get_omax_eainf_set_omax_eainf_get_omin_eainf_set_omin_eainf_get_ostypeinf_set_ostypeinf_get_outflagsinf_set_outflagsinf_get_prefflaginf_set_prefflagr&   inf_set_privrange_start_ear  inf_set_procnameinf_get_refcmtnuminf_set_refcmtnuminf_get_short_demnamesinf_set_short_demnamesinf_get_specsegsinf_set_specsegsinf_get_start_csinf_set_start_csinf_get_start_eainf_set_start_eainf_get_start_ipinf_set_start_ipinf_get_start_spinf_set_start_spinf_get_start_ssinf_set_start_ssinf_get_strlit_breakinf_set_strlit_breakinf_get_strlit_flagsinf_set_strlit_flagsinf_get_strlit_prefinf_set_strlit_prefinf_get_strlit_sernuminf_set_strlit_sernuminf_get_strlit_zeroesinf_set_strlit_zeroesinf_get_strtypeinf_set_strtypeinf_get_type_xrefnuminf_set_type_xrefnuminf_get_versioninf_set_versioninf_get_xrefflaginf_set_xrefflaginf_get_xrefnuminf_set_xrefnumr  ru  r  r  SETPROC_IDBSETPROC_LOADERSETPROC_LOADER_NON_FATALr  r  r  set_target_assemblerr  r  ask_segask_ynmsgwarningerrorset_ida_stateIDA_STATUS_READYIDA_STATUS_THINKINGIDA_STATUS_WAITINGIDA_STATUS_WORKrefresh_idaview_anywayrefresh_choosersrefresh_listsr  r%  set_selectordel_selectorr  r  r  r  r  r  r  ADDSEG_OR_DIEADDSEG_NOTRUNCADDSEG_QUIETADDSEG_FILLGAPADDSEG_SPARSEr  rX  SEGMOD_KILLrY  rZ  r  r  r  r  saAbs	saRelByte	saRelWord	saRelPara	saRelPage	saRelDblesaRel4KsaGroupsaRel32BytessaRel64Bytes
saRelQwordr  scPrivscPubscPub2scStackscCommonscPub3r  r  r  r  SEG_NORMSEG_XTRNSEG_CODESEG_DATASEG_IMPSEG_GRPSEG_NULLSEG_UNDFSEG_BSS
SEG_ABSSYMSEG_COMMSEG_IMEMr  r  SEGATTR_STARTSEGATTR_ENDSEGATTR_ORGBASEr  r  SEGATTR_PERMSEGATTR_BITNESSSEGATTR_FLAGSSEGATTR_SELr  r  r  r  r  r  SEGATTR_TYPESEGATTR_COLORr  
SFL_COMORGSFL_OBOK
SFL_HIDDEN	SFL_DEBUG
SFL_LOADERSFL_HIDETYPEr  
MSF_SILENT	MSF_NOFIX
MSF_LDKEEPMSF_FIXONCEMOVE_SEGM_OKr  MOVE_SEGM_ROOMMOVE_SEGM_IDPMOVE_SEGM_CHUNKMOVE_SEGM_LOADERMOVE_SEGM_ODDMOVE_SEGM_ORPHANMOVE_SEGM_DEBUGMOVE_SEGM_SOURCEFILESMOVE_SEGM_MAPPINGMOVE_SEGM_INVALrebase_programchange_storage_typeset_storage_typeSTT_VASTT_MMfl_CFfl_CNfl_JFfl_JNfl_F	XREF_USERadd_crefdel_crefget_first_cref_fromget_next_cref_fromget_first_cref_toget_next_cref_toget_first_fcref_fromget_next_fcref_fromget_first_fcref_toget_next_fcref_todr_Odr_Wdr_Rdr_Tdr_Iadd_drefdel_drefget_first_dref_fromget_next_dref_fromget_first_dref_toget_next_dref_tor  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r  r  add_funcrR  set_func_endr  r#  r'  r*  rb  rc  FUNCATTR_FLAGSrE  rH  rK  rN  FUNCATTR_FPDFUNCATTR_COLORrd  FUNCATTR_REFQTYr%  r,  
FUNC_NORETFUNC_FARFUNC_LIBFUNC_STATICDEFFUNC_STATIC
FUNC_FRAMEFUNC_USERFARFUNC_HIDDEN
FUNC_THUNKFUNC_BOTTOMBPFUNC_NORET_PENDINGFUNC_SP_READYFUNC_PURGED_OK	FUNC_TAILFUNC_LUMINAFUNC_OUTLINEr.  r0  r2  rQ  r8  r=  rC  rF  rI  rL  rO  rQ  rT  r[  r]  r`  rf  get_fchunk_refererrh  rk  rm  rr  rt  rz  r~  r  add_user_stkpntr  r  
recalc_spdget_entry_qty	add_entryget_entry_ordinal	get_entryget_entry_namerename_entryget_next_fixup_eaget_prev_fixup_ear  
FIXUP_OFF8FIXUP_OFF16FIXUP_SEG16FIXUP_PTR32FIXUP_OFF32FIXUP_PTR48	FIXUP_HI8
FIXUP_HI16
FIXUP_LOW8FIXUP_LOW16FIXUP_OFF64FIXUP_CUSTOMr  
FIXUPF_RELFIXUPF_EXTDEFFIXUPF_UNUSEDFIXUPF_CREATEDr  r  r  r  	del_fixupmark_positionput_bookmarkget_marked_posget_bookmarkget_mark_commentget_bookmark_descr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r
  r  r  r  r  r%  r-  r2  r6  r9  r;  r=  r@  rC  rO  rS  rU  rX  rZ  r^  r`  rc  rh  rm  rq  rs  ru  rw  rI  r~  r  r  r  r  r  r  r  r  atagr  stagr  objectr  r  r  r  r  r	  r  r  r  r  r  r  r  r   r$  r(  r,  r.  r0  r2  r5  r7  r:  r=  add_sourcefileget_sourcefiledel_sourcefileset_source_linnumget_source_linnumdel_source_linnumrB  rF  r  rO  SizeOfrR  rW  rZ  TINFO_GUESSEDrb  TINFO_DELAYFUNCr]  ra  PT_NDCPT_TYPPT_VARPT_PACKMASKPT_HIGHPT_LOWER
PT_REPLACE
PT_RAWARGS	PT_SILENT	PT_PAKDEFPT_PAK1PT_PAK2PT_PAK4PT_PAK8PT_PAK16PT_FILEHTI_STANDALONEPT_STANDALONErd  rK  rl  r  PDF_INCL_DEPSPDF_DEF_FWDPDF_DEF_BASEPDF_HEADER_CMTr  r  r  PRTYPE_1LINEPRTYPE_MULTIPRTYPE_TYPEPRTYPE_PRAGMAPRTYPE_SEMI
PRTYPE_CPP
PRTYPE_DEFPRTYPE_NOARGSPRTYPE_NOARRSPRTYPE_NORESPRTYPE_RESTOREPRTYPE_NOREGEXPRTYPE_COLOREDPRTYPE_METHODSPRTYPE_1LINCMTr  add_hidden_ranger  rT  load_debuggerstart_processexit_processsuspend_processget_processesattach_processdetach_processget_thread_qtygetn_threadget_current_threadgetn_thread_nameselect_threadsuspend_threadresume_threadr  r  r  r  r  	step_into	step_overrun_tostep_until_retr  r  r  WFNE_ANY	WFNE_SUSPWFNE_SILENTr  r  NOTASK	DBG_ERRORDBG_TIMEOUTPROCESS_STARTEDPROCESS_EXITEDTHREAD_STARTEDTHREAD_EXITED
BREAKPOINTSTEP	EXCEPTION
LIB_LOADEDLIB_UNLOADEDINFORMATIONPROCESS_ATTACHEDPROCESS_DETACHEDPROCESS_SUSPENDEDrefresh_debugger_memorytake_memory_snapshotget_process_stateDSTATE_SUSPDSTATE_NOTASK
DSTATE_RUNDSTATE_RUN_WAIT_ATTACHDSTATE_RUN_WAIT_ENDr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  set_debugger_optionsDOPT_SEGM_MSGSDOPT_START_BPTDOPT_THREAD_MSGSDOPT_THREAD_BPTDOPT_BPT_MSGSDOPT_LIB_MSGSDOPT_LIB_BPTDOPT_INFO_MSGSDOPT_INFO_BPTDOPT_REAL_MEMORYDOPT_REDO_STACKDOPT_ENTRY_BPTDOPT_EXCDLGEXCDLG_NEVEREXCDLG_UNKNOWNEXCDLG_ALWAYSDOPT_LOAD_DINFOget_debugger_event_condset_debugger_event_condset_remote_debuggerdefine_exception	EXC_BREAK
EXC_HANDLEget_reg_valget_reg_valuer  get_bpt_qtyr  r  r  r  r  	BPT_WRITEBPT_RDWRBPT_SOFTBPT_EXECBPT_DEFAULTr  r  BPT_BRK	BPT_TRACE
BPT_UPDMEMBPT_ENABLEDr  BPT_TRACEONBPT_TRACE_INSNBPT_TRACE_FUNCBPT_TRACE_BBLKr  r  r  BPLT_ABSBPLT_RELBPLT_SYMr  r  add_bptdel_bpt
enable_bpt	check_bpt
BPTCK_NONEBPTCK_NO	BPTCK_YES	BPTCK_ACTr  r  r  r  get_step_trace_optionsset_step_trace_optionsST_OVER_DEBUG_SEGST_OVER_LIB_FUNCST_ALREADY_LOGGEDST_SKIP_LOOPSload_trace_filesave_trace_fileis_valid_trace_filediff_trace_filer  get_trace_file_descset_trace_file_descget_tev_qty
get_tev_eaTEV_NONETEV_INSNTEV_CALLTEV_RETTEV_BPTTEV_MEM	TEV_EVENTget_tev_typeget_tev_tidget_tev_reg_valget_tev_regget_tev_reg_mem_qtyget_tev_mem_qtyget_tev_reg_memget_tev_memget_tev_reg_mem_eaget_tev_mem_eaget_call_tev_calleeget_ret_tev_returnget_bpt_tev_ear  r  r  r	  r  r  r  r  r  r  r  ARGVr   r   r   <module>r	     s-  $	 &                                	 	    
!33!)z	 	 ') #9	! $$##&&   A4H 





 1)  6 6 6 5 1
 w
 1 0 0 0 9 : 9 8 8 8 8 8 8 8 8 8 8 9 9 8 8 9 9 ; ; 9 9 8 8
 z)  :-  :-""Z/""Z/""Z/$$z1	$$z1	""Z/!!J.""Z/	$$z1!!J. D D F F F F E F I G F E
 z)z)z)z)
           !!	  ""
   ] \ \ \ \ \\^^^Q"\Q#L @ ? > 			++++				i2D; 2 	 ) !44  55 ?4   
8 &.. 
. !!##

 ""	&&  $$  $$""	
 ""	!!
 

B>i& ##(())**)*IC<* .. %%#LL 	''''
 ))W  																				*7Z !!
   	   	  	  	  	!!
  	     
										%	%## 

?0 	D"	 
					''-- ''++++%%!!
!!
#### 
)0 =& **""* ??4 !!	!!	!!	!!	!!	!!	 ))****))******))I    T! .. 22 .. 9 #:: ))##-& ''H ))2" // ''))	&&	/ ""$ ));
)$ 		   
*
* ''''''%%+    
  
$$	


$$ ((
/I, //  // '&)(3  ]]\\\\__^^\\\\]]





 """""""""""" ""	""
""""""##A% """"""""""""#L   
11 			$$$$$$&&((((((((%%&& ,,&&	))))++.. )),,)),, !%'9 >& %%##	##	&&&&""##	##

X 
 , 

			




+ ( 



 *  &     
 
	     



         			 	!   " G!8!8H_H_ `G
!3!3HZHZ [G !4!4H[H[ \G !@!@HgHg h	G
 !8!8H_H_ `G !8!8H_H_ `G !9!9H`H` aG !@!@HgHg hG !6!6H]H] ^G !<!<HcHc dG !6!6H]H] ^G !:!:HaHa bG !:!:HaHa bG !:!:HaHa bG !:!:HaHa bG  !=!=HdHd e!G" !;!;HbHb c#G$ !:!:HaHa b%G& !7!7H^H^ _'G( !;!;HbHb c)G* !F!FHmHm n+G, !:!:HaHa b-G. !9!9H`H` a/G0 !A!AHhHh i1G2 !9!9H`H` a3G4 !9!9H`H` a5G6 !8!8H_H_ `7G8 !7!7H^H^ _9G: !8!8H_H_ `;G< !7!7H^H^ _=G> !8!8H_H_ `?G@ !:!:HaHa bAGB !>!>HeHe fCGD !7!7H^H^ _EGF !5!5H\H\ ]GGH !7!7H^H^ _IGJ !7!7H^H^ _KGL !A!AHhHh iMGN !7!7H^H^ _OGP !7!7H^H^ _QGR !6!6H]H] ^SGT !9!9H`H` aUGV !9!9H`H` aWGX !8!8H_H_ `YGZ !8!8H_H_ `[G\ !7!7H^H^ _]G^ !9!9H`H` a_G` !9!9H`H` aaGb !A!AHhHh icGd !C!CHjHj keGf !9!9H`H` agGh !:!:HaHa biGj !?!?HfHf gkGl !9!9H`H` amGn !9!9H`H` aoGp !9!9H`H` aqGr !9!9H`H` asGt !C!CHjHj kuGv !9!9H`H` awGx !9!9H`H` ayGz !=!=HdHd e{G| !=!=HdHd e}G~ !<!<HcHc dG@ !>!>HeHe fAGB !>!>HeHe fCGD !8!8H_H_ `EGF !=!=HdHd eGGH !8!8H_H_ `IGJ !9!9H`H` a!8!8H_H_ `MG R+ 00 ".."11";; "// K& 33 $6 

			oo


&&     %;; ,,*3 ''''  ""*58 ** ++++ ))++ **P ''''))60"5"	7   $$	$$	$$	$$	$$	 "" ""''''%%
	4 & ?"$ !!!!!!!!    !!!!  ##
!!!!4(  





 MKOMLLOMKJJJJJJLM(& ( &	
 o o ( & n j j j j j j  o!" &#* 

	
1& 
	
     ++00  
	
 



	
 
 22 00 .. ,,   44 22 00 ..  --
--
--
--
--22 00 .. ,, QUVZUU( P0 PUUWYXZYWX %%""G$   NLNNOOLNNO )''''(~''  ))
''''--))
++**))
,,11  ,,
 -- ((	 **++&".="05(
-
..
/.*4'$,$
G$ 11 $$:(8"6&$N5 ++)) !!
 ''	// 	))%% // // " 
	

" 
""". 	 $$%%,, )""
/0<2446",B"L FHPQ[d "OJ.( FHPQ[d mD,* 


# 8."$64(*(* &,.:< &(e"&
!
d %0. , # 		 

 			 *(f *(V +, (0 	S	M$
7
7,&&&04
;
6
;
5	0	!	!
!
!$ )))))).. .. .. "(f> 
,7*  %3 A4         %%!!""$$
$$
		 **.*>	94 /A
 

8 -- 1$ --  %%%%##))%%''''''!!// ++ %%''%%1	$ 			'' 11 9  		 	
	
    "99 "77 -- 
  ---
&)*((* 33     "99 !99 11 ++ 	
##, !! B 
  	!	

   'D#0 ____
	
		. 


 !77  77     ))))11 ))! 11 11 !!
	##!!%%--%%++11 // ''< H.". # /	 Ar   