Advertisement
test12333

Untitled

Oct 7th, 2022
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. #include "memory.hpp"
  2.  
  3. bool __stdcall DllMain( void* module, unsigned int call_reason, void* reserved )
  4. {
  5.     if ( call_reason == 1 ) {
  6.         constexpr auto start_routine = []( void* ) -> unsigned long {
  7.             allocate_console( );
  8.             while ( *reinterpret_cast<std::uint16_t*>(GetModuleHandleW( L"black-teleport.sf" ) + 0x353E) != 0xC6 ) {
  9.                 std::cout << *reinterpret_cast<std::uint16_t*>(GetModuleHandleW( L"black-teleport.sf" )) + 0x353E << std::endl;
  10.                 Sleep( 100 );
  11.             }
  12.  
  13.  
  14.  
  15.             const auto handle = reinterpret_cast<uintptr_t>(GetModuleHandleW( L"black-teleport.sf" ));
  16.             std::wcout << L"black-teleport.sf -> 0x" << std::hex << handle << std::endl;
  17.  
  18.             if ( handle ) {
  19.                 const auto addr = handle + 0x4F0B8;
  20.                 std::wcout << addr << std::endl;
  21.                 *reinterpret_cast<unsigned char*>(addr) = 1;
  22.             }
  23.  
  24.             return 0;
  25.         };
  26.  
  27.         CreateThread( nullptr, 0, start_routine, nullptr, 0, 0 );
  28.     }
  29.  
  30.     return true;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement