title: hardcoded address in disassembly
body: <p>I'm writing optimized Windows based shellcode in C++ and I have problem avoiding hardcoded addresses in C++ while passing it to function.</p>
  
  <p>e.g:</p>
  
  <pre><code>My_CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&amp;thread_callback, NULL, NULL, NULL);
  
  DWORD WINAPI thread_callback(LPVOID lpParam)
  {
      // stuff..
  }
  </code></pre>
  
  <p>in disassembly, it shows CreateThread(..., cardcoded_address, ..);
  instead, I want to pass this address like "from this location to thread_callback"</p>
  
  <p>is there any way to avoid it? (because shellcode should be address independent?)</p>
  
  <p>Regards.</p>