Occasionally, especially when working with embedded firmware or obfuscated code, you may see an error message when trying to create a function (from context menu or using P hotkey):
There can be multiple reasons for it, for example:
You can double-click the address indicated to jump there and to see if you can identify the issue and try to fix it, but it can take a long time to figure out.
Functions are required to use some of IDA’s basic functionality such as graph view or the decompiler.
Whatever the reason of the error, you can still create a function manually if you can determine its bounds using your best judgement. For this, the anchor selection is the most simple and convenient way:
Note that the function created this way may have all kinds of issues, e.g. disconnected blocks in the graph view, JUMPOUT
statements in pseudocode or wrong decompilation, but at least it should allow you to advance in your analysis.