List all functions from an executable
List all functions from an executable
Hi,
is it possible to list all functions of an executable? Can ParseFunction return a pointer to the next function?
take care, keiner
is it possible to list all functions of an executable? Can ParseFunction return a pointer to the next function?
take care, keiner
-
- Posts: 46
- Joined: Fri Apr 28, 2006 1:17 pm
-
- Posts: 46
- Joined: Fri Apr 28, 2006 1:17 pm
Well, for ParseFunction one needs the entry point of the function (your task). This implies, that it is intended to analyze one function - not the whole program control flow (a job for IDA). The analyzed function could be followed by anything (e.g. hundreds and thousands of data bytes).
topic: Back to your initial question: TFunctionInfo.CodeLen
topic: Back to your initial question: TFunctionInfo.CodeLen
Nico is right, of course.
One option would be to disassemble the EXE's entry point function plus every exported function. Then for every disassembled function you can enumerate the call instructions. You can then disassemble the call targets. This will again give you a new list of call instructions. You can do this recursively. That will probably not result in a full disassembly of the whole EXE, but it might cover the majority of functions. Of course there are problems: E.g. some calls are hard to trace. And if a thread is created, you will probably miss the thread function and all functions it calls inside etc...
One option would be to disassemble the EXE's entry point function plus every exported function. Then for every disassembled function you can enumerate the call instructions. You can then disassemble the call targets. This will again give you a new list of call instructions. You can do this recursively. That will probably not result in a full disassembly of the whole EXE, but it might cover the majority of functions. Of course there are problems: E.g. some calls are hard to trace. And if a thread is created, you will probably miss the thread function and all functions it calls inside etc...
Re: List all functions from an executable
I understand there still is no available lib for madDisAsm, right ?
Re: List all functions from an executable
It's kind of part of the madCodeHook32/64.lib file, but there's no way to access the disasm functionality atm.