wwwc

Untitled

Mar 12th, 2013
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.17 KB | None | 0 0
  1. #include "sdk_test.h"
  2.  
  3. DWORD   GObjObjects_offset              = 0x01AAF304;
  4. DWORD   Names_offset                    = 0x1241D4A8;//WRONG!!!
  5. DWORD   Offset_Name                     = 0x24;
  6.  
  7. // Objects and Names arrays
  8. TArray< UObject* >*     GObjObjects = ( TArray< UObject* >* )       GObjObjects_offset;             // global objects
  9. TArray< FNameEntry* >*  Names           = ( TArray< FNameEntry* >* )    Names_offset;                   // global names
  10.  
  11. // funcs
  12.  
  13. void onAttach()
  14. {      
  15.         FILE* Log = NULL;      
  16.         fopen_s ( &Log, "Loot.txt", "w+" );
  17.     fprintf (Log, "Hello World\n");
  18.     fprintf (Log, "%i\n", GObjObjects->Num());
  19.     fclose ( Log );
  20. }
  21.  
  22. BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
  23. {
  24.         switch ( dwReason )
  25.         {
  26.                 case DLL_PROCESS_ATTACH:
  27.                         DisableThreadLibraryCalls ( hModule );
  28.                         CreateThread ( NULL, 0, ( LPTHREAD_START_ROUTINE ) onAttach, NULL, 0, NULL );
  29.                         return true;
  30.                 break;
  31.  
  32.                 case DLL_PROCESS_DETACH:
  33.                         return true;
  34.                 break;
  35.         }
  36. };
Advertisement
Add Comment
Please, Sign In to add comment