forked from Public-Mirror/Textractor
rename stuff
This commit is contained in:
parent
faa4eb55e0
commit
3a001e66b2
File diff suppressed because it is too large
Load Diff
@ -13,8 +13,8 @@ namespace Engine {
|
|||||||
// Global variables
|
// Global variables
|
||||||
extern wchar_t *process_name_, // cached
|
extern wchar_t *process_name_, // cached
|
||||||
process_path_[MAX_PATH]; // cached
|
process_path_[MAX_PATH]; // cached
|
||||||
extern DWORD module_base_,
|
extern DWORD process_base,
|
||||||
module_limit_;
|
process_limit;
|
||||||
|
|
||||||
//extern LPVOID trigger_addr;
|
//extern LPVOID trigger_addr;
|
||||||
typedef bool (* trigger_fun_t)(LPVOID addr, DWORD frame, DWORD stack);
|
typedef bool (* trigger_fun_t)(LPVOID addr, DWORD frame, DWORD stack);
|
||||||
|
@ -27,8 +27,8 @@ namespace Engine {
|
|||||||
WCHAR *process_name_, // cached
|
WCHAR *process_name_, // cached
|
||||||
process_path_[MAX_PATH]; // cached
|
process_path_[MAX_PATH]; // cached
|
||||||
|
|
||||||
DWORD module_base_,
|
DWORD process_base,
|
||||||
module_limit_;
|
process_limit;
|
||||||
|
|
||||||
//LPVOID trigger_addr;
|
//LPVOID trigger_addr;
|
||||||
trigger_fun_t trigger_fun_;
|
trigger_fun_t trigger_fun_;
|
||||||
@ -791,15 +791,15 @@ bool DetermineNoEngine()
|
|||||||
EXCEPTION_DISPOSITION ExceptHandler(PEXCEPTION_RECORD ExceptionRecord, LPVOID, PCONTEXT, LPVOID)
|
EXCEPTION_DISPOSITION ExceptHandler(PEXCEPTION_RECORD ExceptionRecord, LPVOID, PCONTEXT, LPVOID)
|
||||||
{
|
{
|
||||||
if (ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION) {
|
if (ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION) {
|
||||||
module_limit_ = ExceptionRecord->ExceptionInformation[1];
|
process_limit = ExceptionRecord->ExceptionInformation[1];
|
||||||
//OutputDWORD(module_limit_);
|
//OutputDWORD(process_limit);
|
||||||
__asm
|
__asm
|
||||||
{
|
{
|
||||||
mov eax,fs:[0x30] // jichi 12/13/2013: get PEB
|
mov eax,fs:[0x30] // jichi 12/13/2013: get PEB
|
||||||
mov eax,[eax+0xc]
|
mov eax,[eax+0xc]
|
||||||
mov eax,[eax+0xc]
|
mov eax,[eax+0xc]
|
||||||
mov ecx,module_limit_
|
mov ecx,process_limit
|
||||||
sub ecx,module_base_
|
sub ecx,process_base
|
||||||
mov [eax+0x20],ecx
|
mov [eax+0x20],ecx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -899,7 +899,7 @@ DWORD WINAPI hijackThreadProc(LPVOID unused)
|
|||||||
while (*(--p) != L'\\');
|
while (*(--p) != L'\\');
|
||||||
process_name_ = p + 1;
|
process_name_ = p + 1;
|
||||||
|
|
||||||
FillRange(process_name_, &module_base_, &module_limit_);
|
FillRange(process_name_, &process_base, &process_limit);
|
||||||
DetermineEngineType();
|
DetermineEngineType();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -915,7 +915,7 @@ void Engine::hijack()
|
|||||||
{
|
{
|
||||||
if (!hijackThread) {
|
if (!hijackThread) {
|
||||||
ConsoleOutput("vnreng: hijack process");
|
ConsoleOutput("vnreng: hijack process");
|
||||||
hijackThread = CreateRemoteThread(GetCurrentProcess(), nullptr, 0, hijackThreadProc, 0, 0, nullptr);
|
hijackThread = CreateThread(nullptr, 0, hijackThreadProc, 0, 0, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID unused)
|
|||||||
AddAllModules();
|
AddAllModules();
|
||||||
::currentModule = hModule;
|
::currentModule = hModule;
|
||||||
|
|
||||||
pipeThread = CreateRemoteThread(GetCurrentProcess(), nullptr, 0, PipeManager, 0, 0, nullptr);
|
pipeThread = CreateThread(nullptr, 0, PipeManager, 0, 0, nullptr);
|
||||||
} break;
|
} break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user