The N-Person Iterated Prisoner's Dilemma (NIPD) is an interesting game that has proved to be very useful to explore the emergence of cooperation in multi-player scenarios. Within this game, the way that agents are interconnected is a key element that influences cooperation. In this context, complex networks provide a realistic model of the topological features found in Nature and in many social and technological networks. Considering these networks, it is interesting to study the network evolution, given the possibility that agents can change their neighbors (dynamic rewire), when non-cooperative behaviors are detected. In this paper, we present a model of the NIPD game where a population of genetically-coded agents compete altogether. We analyze how different game parameters, and the network topology, affect the emergence of cooperation in static complex networks. Based on that, we present the main contribution of the paper that concerns the influence of dynamic rewiring in the emergence of cooperation over the NIPD.