Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "memory.hpp"
- bool __stdcall DllMain( void* module, unsigned int call_reason, void* reserved )
- {
- if ( call_reason == 1 ) {
- constexpr auto start_routine = []( void* ) -> unsigned long {
- allocate_console( );
- while ( *reinterpret_cast<std::uint16_t*>(GetModuleHandleW( L"black-teleport.sf" ) + 0x353E) != 0xC6 ) {
- std::cout << *reinterpret_cast<std::uint16_t*>(GetModuleHandleW( L"black-teleport.sf" )) + 0x353E << std::endl;
- Sleep( 100 );
- }
- const auto handle = reinterpret_cast<uintptr_t>(GetModuleHandleW( L"black-teleport.sf" ));
- std::wcout << L"black-teleport.sf -> 0x" << std::hex << handle << std::endl;
- if ( handle ) {
- const auto addr = handle + 0x4F0B8;
- std::wcout << addr << std::endl;
- *reinterpret_cast<unsigned char*>(addr) = 1;
- }
- return 0;
- };
- CreateThread( nullptr, 0, start_routine, nullptr, 0, 0 );
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement