1

I have a x86 executable opened in IDA. In the function window you can see a list of all functions with their starting address.

enter image description here

My goal is to programmatically export a list of all functions IDA found including the following informations:

  • Their starting address
  • Their instructions as a byte array

How would i do this?

2

1 Answer 1

2

idc

auto func,i;
func = NextFunction(0);
while ( func != BADADDR ) 
{
    Message("start = %08x size = %04x    " , func , GetFunctionAttr(func,FUNCATTR_END )-func);
    for (i=0; i<0x10;i++)
    {
        Message("%02x ", Byte(func+i));
    }
    Message("\n");
    func = NextFunction(func);
}

enter image description here

1
  • Thanks works great!
    – veteri
    Commented Dec 28, 2021 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.