Advertisement
wwwc

Untitled

Mar 12th, 2013
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.58 KB | None | 0 0
  1. #include "sdk_test.h"
  2.  
  3. DWORD   GObjObjects_offset              = 0x01AAF304;
  4. DWORD   Names_offset                    = 0x015c5658;
  5.  
  6. TArray< UObject* >*     GObjObjects     = ( TArray< UObject* >* )       GObjObjects_offset;             // global objects
  7.  
  8. void Log(char * text)
  9. {
  10.     FILE* Log = NULL;      
  11.     fopen_s ( &Log, "Loot.txt", "a+" );
  12.     fprintf (Log, text);
  13.     fclose ( Log );
  14. }
  15.  
  16. void Log(int i)
  17. {
  18.     FILE* Log = NULL;      
  19.     fopen_s ( &Log, "Loot.txt", "a+" );
  20.     fprintf (Log, "%x", i);
  21.     fclose ( Log );
  22. }
  23.  
  24. void NameDump2()
  25. {
  26.         char * pos = (char *)Names_offset;
  27.         char * name = pos;
  28.         bool run = true;
  29.         while(run)
  30.         {
  31.             char c = *pos;
  32.             pos++;
  33.             run = false;
  34.             if(c!=0)
  35.                 run = true;
  36.             else
  37.             {
  38.                 FILE* L = NULL;      
  39.                 fopen_s ( &L, "Loot.txt", "a+" );
  40.                 fprintf (L, "%p", name);
  41.                 fclose ( L );
  42.                 Log(" : ");
  43.                 Log(name);
  44.                 Log("\n");             
  45.                 int* test = (int *)pos;
  46.                 if(*test!=0)
  47.                 {
  48.                     run = true;
  49.                     pos += 8;
  50.                     name = pos;
  51.                 }
  52.             }
  53.         }
  54. }
  55.  
  56. void onAttach()
  57. {      
  58.         Log("Hello World\n");
  59.         NameDump2();
  60. }
  61.  
  62. BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
  63. {
  64.         switch ( dwReason )
  65.         {
  66.                 case DLL_PROCESS_ATTACH:
  67.                         DisableThreadLibraryCalls ( hModule );
  68.                         CreateThread ( NULL, 0, ( LPTHREAD_START_ROUTINE ) onAttach, NULL, 0, NULL );
  69.                         return true;
  70.                 break;
  71.  
  72.                 case DLL_PROCESS_DETACH:
  73.                         return true;
  74.                 break;
  75.         }
  76. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement