iAmHooker

Untitled

Jan 13th, 2013
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <stdio.h>
  3. #include "Keys.h"
  4. #include "DrawText.h"
  5. #include "Hook.h"
  6. #include "RegisteredItems.h"
  7. bool kDown(uint kIndex)
  8. {
  9. if (Key_Down(0,kIndex))
  10. return true;
  11. else
  12. return false;
  13. }
  14. bool isRegistered=false;
  15. Items nItems[20][216];
  16. int MaxItemCount[9]={9,0,0,0,0,0,0,0,0};
  17. void RegisterItems()
  18. {
  19. for(int i =0;i<MaxItemCount[0];i++)
  20. {
  21. nItems[0][i].color=nColor( 1.0f, 1.0f, 1.0f, 1.0f );
  22. nItems[0][i].nFont=(void *)font_s::hudBigFont;
  23. nItems[0][i].column=mainMenuColumns[i];
  24. nItems[0][i].row=mainMenuRows[i];
  25. nItems[0][i].x=(float)(nItems[0][i].row * 150);
  26. nItems[0][i].y=(float)(nItems[0][i].column * 200);
  27. nItems[0][i].xScale=1;
  28. nItems[0][i].yScale=1;
  29. nItems[0][i].text=mainMenuText[i];
  30. }
  31. }
  32. HRESULT FrameHook()
  33. {
  34. if(!isRegistered){
  35. RegisterItems();
  36. isRegistered=true;
  37. }
  38. else
  39. {
  40. #pragma region drawing
  41. R_AddCmdDrawText("Hooker", 0x7FFFFFFF, (void *)font_s::hudBigFont, 500, 100, 1, 1, 0, nColor( 1.0f, 1.0f, 1.0f, 1.0f ), 0);
  42. #pragma endregion
  43. }
  44. return S_OK;
  45. }
  46.  
  47. BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD reason, LPVOID lpReserved)
  48. {
  49. switch(reason)
  50. {
  51. case DLL_PROCESS_ATTACH:
  52. patchInJump((DWORD *)0x82146178, (DWORD)FrameHook, false);
  53. printf("Hooker");
  54. break;
  55. case DLL_THREAD_ATTACH:
  56. printf("Hooker");
  57. break;
  58. case DLL_THREAD_DETACH:
  59. printf("Hooker");
  60. break;
  61. case DLL_PROCESS_DETACH:
  62. printf("Hooker");
  63. break;
  64. }
  65. return TRUE;
  66. }
Add Comment
Please, Sign In to add comment