Advertisement
captmicro

Untitled

Jul 11th, 2010
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. static void hook_endframe()
  2. {
  3.     //"TEST\x00"
  4.     BYTE str[] = {116,101,115,116,NULL};
  5.     //"fonts/smalldevfont"
  6.     BYTE fontstr[] = {102,111,110,116,115,47,115,109,97,108,108,100,101,118,102,111,110,116,NULL};
  7.     //color
  8.     RGBA_COLOR col = {1.0f, 0.0f, 0.0f, 1.0f};
  9.     //DrawText
  10.     DRAWTEXT((char*)str, -1, GETFONT((char*)fontstr, 0), 200, 200, 1.0f, 1.0f, 0.0f, &col, 0);
  11.     //fix original endframe
  12.     BYTE oendframe[10] = {0x51,0xA1,0xBC,0x1A,0x7E,0x00,0x83,0x78,0x10,0x03};
  13.     int oidx = 0;
  14.     while (oidx < 1 + sizeof(DWORD_PTR))
  15.         (*(BYTE*)(0x00586E00 + oidx)) = oendframe[oidx--];
  16.     //jmp 0x00586E00
  17.     _asm { jmp 0x00586E00 }
  18. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement