MCPcopy Create free account
hub / github.com/LiteLoaderQQNT/QQNTFileVerifyPatch / DllMain

Function DllMain

HijackMethod/dllmain.cpp:413–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
414{
415 switch (fdwReason)
416 {
417 case DLL_PROCESS_ATTACH:
418 {
419 /***DEBUG
420 AllocConsole();
421 freopen("CONIN$", "r", stdin);
422 freopen("CONOUT$", "w", stdout);
423 freopen("CONOUT$", "w", stderr);
424 ***/
425
426 PVOID Cookie;
427 Org_LdrRegisterDllNotification = (def_LdrRegisterDllNotification)GetProcAddress(GetModuleHandleA("ntdll.dll"), "LdrRegisterDllNotification");
428
429 HANDLE hProc = GetCurrentProcess();
430 std::wstring processName(MAX_PATH, L'\0');
431 GetModuleFileNameEx(hProc, nullptr, &processName[0], MAX_PATH);
432 DisableThreadLibraryCalls(hinstDLL);
433 if (IsParentQQ() != true || wcsstr(GetCommandLine(), L"--from-multiple-login") != NULL) {
434
435 if (_taccess(L"ffmpeg.dll",0)==0)
436 {
437 OldQQ = true;
438 Exploit();
439 }
440 else
441 {
442 Org_LdrRegisterDllNotification(0, DLLNotification, NULL, &Cookie); //New Exploit
443 }
444
445 return true;
446 }
447 else
448 {
449 return true;
450 }
451
452 break;
453 }
454 case DLL_THREAD_ATTACH:
455 break;
456 case DLL_THREAD_DETACH:
457 break;
458 case DLL_PROCESS_DETACH:
459 break;
460 }
461 return TRUE;
462}
463
464
465

Callers

nothing calls this directly

Calls 2

IsParentQQFunction · 0.70
ExploitFunction · 0.70

Tested by

no test coverage detected