Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "sdk_test.h"
- DWORD GObjObjects_offset = 0x01AAF304;
- DWORD Names_offset = 0x015c5658;
- TArray< UObject* >* GObjObjects = ( TArray< UObject* >* ) GObjObjects_offset; // global objects
- void Log(char * text)
- {
- FILE* Log = NULL;
- fopen_s ( &Log, "Loot.txt", "a+" );
- fprintf (Log, text);
- fclose ( Log );
- }
- void Log(int i)
- {
- FILE* Log = NULL;
- fopen_s ( &Log, "Loot.txt", "a+" );
- fprintf (Log, "%x", i);
- fclose ( Log );
- }
- void NameDump2()
- {
- char * pos = (char *)Names_offset;
- char * name = pos;
- bool run = true;
- while(run)
- {
- char c = *pos;
- pos++;
- run = false;
- if(c!=0)
- run = true;
- else
- {
- FILE* L = NULL;
- fopen_s ( &L, "Loot.txt", "a+" );
- fprintf (L, "%p", name);
- fclose ( L );
- Log(" : ");
- Log(name);
- Log("\n");
- int* test = (int *)pos;
- if(*test!=0)
- {
- run = true;
- pos += 8;
- name = pos;
- }
- }
- }
- }
- void onAttach()
- {
- Log("Hello World\n");
- NameDump2();
- }
- BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
- {
- switch ( dwReason )
- {
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls ( hModule );
- CreateThread ( NULL, 0, ( LPTHREAD_START_ROUTINE ) onAttach, NULL, 0, NULL );
- return true;
- break;
- case DLL_PROCESS_DETACH:
- return true;
- break;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement