TheCruZ / Simple-Manual-Map-Injector

Simple C++ DLL Manual Map Injector For x86 and x64
MIT License
366 stars 77 forks source link

Unused variable? #12

Closed nefarearworm closed 11 months ago

nefarearworm commented 11 months ago

Hello! In the injector.cpp > ManualMapDll fuction arguments > "SIZE_T FileSize" - not used in code. Please, let me know can I just delete it, or as I suppose its need to insert in this line: "void* pShellcode = VirtualAllocEx(hProc, nullptr, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);" insted of 0x1000 and accordingly in the WriteMemory fuction too. Please answer me and sorry for my bad English.

TheCruZ commented 11 months ago

FileSize is not used, size is determined by header of the file and the 0x1000 don't need to be replaced, is the common header file size (which it can be reduced in some files)