The paper addresses the problem of reverse engineering a function block (FB) in situations when its source code is either not available or is too complex to understand. The proposed approach builds up on a recent method for reconstructing FBs based on testing and a search-based optimization algorithm. In our work the method is augmented with candidate solution verification using the NuSMV model checker. Verification is done in a closed-loop way using a manually constructed surrogate model of the plant and environment