title: Detour null function
body: <p>I've been trying to detour a nullsub, this function is used with log purposes, but as the program is compiled under release flags it got removed and I'd like to restore it.</p>
  
  <p>IDA reports as follow:</p>
  
  <pre><code>.text:004BAC10 ; void __thiscall nullsub_2(void *)
  .text:004BAC10 nullsub_2       proc near       
  .text:004BAC10                 retn
  .text:004BAC10 nullsub_2       endp
  </code></pre>
  
  <p>My attempt is to detour this address with my own log function, but Microsoft Detours 3.0 throws <strong>ERROR_INVALID_BLOCK</strong> </p>
  
  <p>I think I get this error as it does not have space to place the jump function, and I don't have any idea how I can fix it.</p>