To realize a Network Service (NS) in a Network Function Virtualization (NFV) network, it is needed to form an ordered set of connected Virtual Network Functions (VNFs), commonly referred to as VNF Forwarding Graph (VNF-FG), and then embed it onto the substrate network. Forming a VNF-FG is a challenging step of NFV resource allocation (NFV-RA), especially when the VNFs can be further decomposed into different sub-functions. In this paper, we propose a cost-aware algorithm to solve the problem of topological decomposition of VNF-FGs with the main objective of minimizing the embedding cost while satisfying the given service requirements. The simulation results indicate that our proposed algorithm outperforms the existing benchmark in terms of embedding cost, while being significantly scalable compared to the brute-force approach.