Find all functions $f:\mathbb{N} \to \mathbb{N}$ such that for any two positive integers $a$ and $b$ we have $$ f^a(b) + f^b(a) \mid 2(f(ab) +b^2 -1)$$
Where $f^n(m)$ is defined in the standard iterative manner. 
1. **Initial Setup and Definitions:**
   We are given the functional equation:
   \[
   f^a(b) + f^b(a) \mid 2(f(ab) + b^2 - 1)
   \]
   where \( f^n(m) \) denotes the \( n \)-th iterate of \( f \) applied to \( m \). We start by considering the case \( P(a,1) \):
   \[
   f^a(1) + f^1(a) \mid 2(f(a) + 1^2 - 1) \implies f^a(1) + f(a) \mid 2f(a)
   \]
   Since \( f^a(1) = f(a) \), this suggests that \( f \) might be injective.

2. **Iterative Function Analysis:**
   We express \( f^a(b) \) in terms of \( f \):
   \[
   f^a(b) = f^{a-1}(f(b)) = f^{a-1}(f^b(1)) = f^{a+b-1}(1) = f(a+b-1)
   \]
   Similarly, \( f^b(a) = f(a+b-1) \). Thus, we define:
   \[
   Q(a,b): f(a+b-1) \mid f(ab) + b^2 - 1
   \]
   Combining \( Q(a,b) \) and \( Q(b,a) \), we get:
   \[
   R(a,b): f(a+b-1) \mid a^2 - b^2
   \]

3. **Case 1: Non-injective Function:**
   Suppose there exist distinct positive integers \( a_0 \) and \( b_0 \) such that \( f(a_0) = f(b_0) \). Then:
   \[
   f^{a_0}(1) = f^{b_0}(1)
   \]
   This implies the sequence \( \{f^n(1)\} \) is bounded, so \( f \) is bounded.

4. **Claim: \( f(f(1)) = 1 \):**
   From \( R(b+1, b) \):
   \[
   f(2b) \mid 2b + 1
   \]
   Let \( p = 2b + 1 \) be a very large prime. Then \( f(p-1) = 1 \). Let \( k \) be the smallest positive integer such that \( f^k(1) = 1 \). Since \( f^{p-1}(1) = 1 \), we have \( k \mid p-1 \). If \( k > 2 \), by Dirichlet's theorem, we can find a prime \( p \) such that \( p \equiv k-1 \pmod{k} \), implying \( k \mid 2 \), a contradiction. Thus, \( k \leq 2 \), implying \( f(f(1)) = 1 \).

5. **Further Analysis:**
   We have \( f(2k) = 1 \) and \( f(2k-1) = f(1) \). Using \( Q(2,2) \):
   \[
   f(3) \mid f(4) + 3 \implies f(1) \mid 4
   \]
   Therefore, \( f(1) \mid 4 \). It is easy to verify that functions satisfying this condition work.

6. **Case 2: Injective Function:**
   If \( f \) is injective, then:
   \[
   f^a(1) = f(a) \implies f^{a-1}(1) = a \implies f^a(1) = a + 1 \implies f(a) = a + 1
   \]
   The unique function in this case is \( f(x) = x + 1 \), which satisfies the given conditions.

We have found all the functions that satisfy the conditions of the problem. 

\(\blacksquare\)

The final answer is \( \boxed{ f(x) = x + 1 } \) or functions where \( f(1) \mid 4 \).