SHARE
TWEET

Untitled

a guest Aug 4th, 2016 158 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Windows.h>
  2. #include "Detours.h"
  3.  
  4. #define CHAT_MSG_ADDR (BYTE*)0x007BC910
  5.  
  6. typedef void(__fastcall *P0081_t)(DWORD* hstr);
  7. P0081_t tramp;
  8.  
  9. void __fastcall det_P0081(DWORD* hstr){
  10.   if(*hstr == 0x641F8101)
  11.       hstr[3] = 0x00000100;
  12.   tramp(hstr);
  13. }
  14.  
  15. BOOL WINAPI DllMain(HMODULE hMod,DWORD dwReason,LPVOID)
  16. {
  17.   if(dwReason == DLL_PROCESS_ATTACH)
  18.     tramp = (P0081_t)DetourFunc(CHAT_MSG_ADDR,(BYTE*)det_P0081,6);
  19.   return TRUE;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top