Detection and recovery of high-level control structures, such as functions and their arguments, plays an important role in decompilation. It has a direct impact on the quality of the generated code because it is needed for generating functionally equivalent and highly readable code. In this paper, we present an innovative, platform-independent method of detection and recovery of functions and their arguments. This method is based on static code interpretation and iterative bidirectional search over reconstructed basic blocks. This approach has been adopted and tested in an existing retargetable decompiler. According to our experimental results, the proposed retargetable solution is fully competitive with existing hand-coded decompilers.