OldSchoolHack

Register / Login English

OSH Tutorial 11 - Help

icon Thread: OSH Tutorial 11 - Help

Join Date: Apr 2010

Posts: 168

I do not know what to do with that code. Can someone help me ?

Ich weiss nicht was ich mit dem Code machen soll? Kann mir jemand helfen?

KN4CK3R's Tut's sind Top, aber ich wohl zu blöde

Spoiler

CPP Code:
  1.  
  2. /*-------------------------------------------------------------------------------------------
  3.  * File: Defines the entry point for the console application.
  4.  * Autor: ZeRoKiLLeR
  5.  * Date: 11/05/2010
  6.  * Based On: OSH Tut 11 by KN4CK3R
  7.  * ------------------------------------------------------------------------------------------- */
  8.  
  9. // Direct 3D Lib Include (VS 2010 Beta Suxx)
  10. #pragma once
  11. #pragma comment (lib, "C:\Programme\Microsoft DirectX SDK (June 2007)\Lib\x86\d3d9.lib")
  12. #pragma comment (lib, "C:\Programme\Microsoft DirectX SDK (June 2007)\Lib\x86\d3dx9.lib")
  13.  
  14. // Direct 3D Include (VS 2010 Beta Suxx)
  15. #include "C:\Programme\Microsoft DirectX SDK (June 2007)\Include\d3d9.h"
  16. #include "C:\Programme\Microsoft DirectX SDK (June 2007)\Include\d3dx9.h"
  17.  
  18. // Standard Windows Functions
  19. #include "WINDOWS.H"
  20.  
  21. // Standard Input/Output
  22. #include "STDIO.H"
  23.  
  24. // Others --> o.0
  25. #include "TCHAR.H"
  26. /* ------------------------------------------------------------------------------------------- */
  27. // Found by OllyDbg
  28. /*
  29. 0040143F |> 90 |NOP
  30. 00401440 |. 90 |NOP
  31. 00401441 |. 90 |NOP
  32. 00401442 |. A1 708C4200 |MOV EAX,DWORD PTR DS:[428C70]
  33. 00401447 |. 8B08 |MOV ECX,DWORD PTR DS:[EAX]
  34. 00401449 |. 50 |PUSH EAX
  35. 0040144A |. FF91 88000000 |CALL DWORD PTR DS:[ECX+88] --> ECX = 0014E238, + 88 = 14E2C0
  36. 00401450 |. 85C0 |TEST EAX,EAX
  37. 00401452 |. 7C 31 |JL SHORT DXWindow.00401485
  38. 00401454 |. 90 |NOP
  39. 00401455 |. 90 |NOP
  40. 00401456 |. 90 |NOP
  41. */
  42. DWORD dwBeginScene = 0x0040144A; // <-- o.0?
  43. // -----------------------------
  44. typedef void (*oBeginScene) ();
  45. oBeginScene pBeginScene;
  46. // -----------------------------
  47. IDirect3DDevice9* device;
  48. bool bBeginScene = false;
  49. // -----------------------------------------
  50. // Entry Point of the Application
  51. int _tmain(int argc, _TCHAR* argv[])
  52. {
  53. while(true)
  54. {
  55. /* What to do here ?
  56. *
  57. * I'll draw something to the Device. But how ? o.0
  58. *
  59. */
  60.  
  61. // Paused for 1 sec
  62. Sleep(1000);
  63. }
  64.  
  65. return 0;
  66. }
  67. // -----------------------------------------------
  68. // Gets the Device ?
  69. void __declspec(naked) NewBeginScene() // Why '()' ? KN4CK3R not uses those -.-
  70. {
  71. __asm
  72. {
  73. cmp bBeginScene, 0x0 // If bBeginScene = False
  74. jnz _end // Go to End
  75. push eax // Save eax to stack
  76. mov eax, [esp+0x2c+0x4] // mov eax, [esp+0x30]
  77. mov device, eax // Get Device
  78. mov bBeginScene, 0x1 // bBeginScene = True
  79. pop eax // Get saved Device back
  80. jmp [pBeginScene] // Go to normal BeginScene
  81. _end: // End Procedure
  82. jmp [pBeginScene] // Go to normal BeginScene
  83. }
  84. }


Wäre um jede antwort dankbar!

__________________

mfg ZeRoKiLLeR

*Hax? Nur solange man mit Hack besser als ohne ist * :schaden:

Only registered and activated users can see links.

Let's Rock ! :schaden: