#include <process.h>
#include <Windows.h>
#include <fstream>
#include <iostream>
using namespace std;
using std::ofstream;
using std::ios;
using std::hex;
using std::dec;
using std::endl;
void Logger ()
{
while(1)
{
if(GetModuleHandleW(L"CShell.dll") && GetModuleHandleW(L"ClientFx.fxd"))
{
Sleep(100);
DWORD cshell = (DWORD)GetModuleHandleA( "CShell.dll" );
std::ofstream file;
file.open("Logger.txt");
for(int i = 0; i < 600; i++)
{ //You can see later how many weapons there are. Then you can lower the loop.
DWORD wapens = *(DWORD*)(weapon +(4*i));
char * weaponname = (char*)(wapens + 0x0008);
file << "Item number: " << i << " ID: " << hex << i << " Name: " << (LPCTSTR)weaponname << ".\n";
}
}
}
}
BOOL WINAPI DllMain ( HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved )
{
if (dwReason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hDll);
file.open("myLog.txt", ios::trunc); // this line
CreateThread(0,0,(LPTHREAD_START_ROUTINE)Func,0,0,0);
}
if ( reason == DLL_PROCESS_DETACH)
{
file.close;
}
return 0;
}
