updated xtils and cleaned code in main.cpp

merge-requests/3/head
_xeroxz 3 years ago
parent 72af7d2f9c
commit 0c9b379825

@ -1 +1 @@
Subproject commit 99a1fc74e16af3261e7cfff4e03d470a7a05feb0
Subproject commit fdcafdbbcb3f34c33b9cffb2be569b9aa5f42a57

@ -43,18 +43,22 @@ int __cdecl main( int argc, const char *argv[] )
if ( parser.exists( "bin" ) && parser.exists( "vmentry" ) )
{
if ( !std::filesystem::exists( parser.get< std::string >( "bin" ) ) )
{
std::printf( "> path to protected file is invalid... check your cli args...\n" );
return -1;
}
const auto module_base = reinterpret_cast< std::uintptr_t >(
LoadLibraryExA( parser.get< std::string >( "bin" ).c_str(), NULL, DONT_RESOLVE_DLL_REFERENCES ) );
const auto vm_entry_rva = std::strtoull( parser.get< std::string >( "vmentry" ).c_str(), nullptr, 16 );
const auto image_base = umtils->image_base( parser.get< std::string >( "bin" ).c_str() );
const auto image_size = NT_HEADER( module_base )->OptionalHeader.SizeOfImage;
std::printf( "> module base = 0x%p, image base = 0x%p, image size = 0x%p\n", module_base, image_base,
image_size );
vm::ctx_t vmctx( module_base, image_base, image_size, vm_entry_rva );
if ( !vmctx.init() )

Loading…
Cancel
Save