Skip to content

Instantly share code, notes, and snippets.

@silascutler
Created February 17, 2018 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silascutler/756744ca69dc3f68e75e335726618b16 to your computer and use it in GitHub Desktop.
Save silascutler/756744ca69dc3f68e75e335726618b16 to your computer and use it in GitHub Desktop.
IDAPython routine to describe a function flags
from idautils import *
from idaapi import *
from idc import *
def descFlags(inflags):
if inflags & FUNC_NORET:
print "Flag: FUNC_NORET"
if inflags & FUNC_FAR:
print "Flag: FUNC_FAR"
if inflags & FUNC_LIB:
print "Flag: FUNC_LIB"
if inflags & FUNC_STATICDEF:
print "Flag: FUNC_STATICDEF"
if inflags & FUNC_FRAME:
print "Flag: FUNC_FRAME"
if inflags & FUNC_USERFAR:
print "Flag: FUNC_USERFAR"
if inflags & FUNC_HIDDEN:
print "Flag: FUNC_HIDDEN"
if inflags & FUNC_THUNK:
print "Flag: FUNC_THUNK"
if inflags & FUNC_BOTTOMBP:
print "Flag: FUNC_BOTTOMBP"
if inflags & FUNC_NORET_PENDING:
print "Flag: FUNC_NORET_PENDING"
if inflags & FUNC_SP_READY:
print "Flag: FUNC_SP_READY"
if inflags & FUNC_PURGED_OK:
print "Flag: FUNC_PURGED_OK"
if inflags & FUNC_TAIL:
print "Flag: FUNC_TAIL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment