title: Can't find the base address of a function with IDA PRO (compiled with vs2015)
body: <p>Hi so I was just trying to learn reverse-engineering and when I open my program in IDA pro I find this address sub_11330 (rebased to 0) <a href="https://gyazo.com/1c34d2c31f29583f05d0dd4d956d6f74" rel="nofollow">https://gyazo.com/1c34d2c31f29583f05d0dd4d956d6f74</a> however when I try to hook this function the address GetModuleHandle(NULL) + 0x11330 doesn't work so I just tried to print the base address of the function with std::cout &lt;&lt; (DWORD)callme - (DWORD)GetModuleHandle(NULL) and when I try this address it works (0x1128a) why can't I find it with IDA ? sorry if I wasn't clear if you can't understand what I'm trying to explain I'll re write my post.</p>
  
  <p>this is how I'm hooking it</p>
  
  <pre><code>int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  {
  
      if (dwReason == DLL_PROCESS_ATTACH)
      {
          std::cout &lt;&lt; "injected" &lt;&lt; std::endl;
          Detour((PBYTE)GetModuleHandle(NULL) + 0x1128a, (PBYTE)&amp;func);
      }
  
      return true;
  }
  </code></pre>
  
  <p>My function detours just changes the first 5 bytes of the function and this one works i'm compiling with vs2015 in debug mode my program is a console application written in c++</p>