MCPcopy Create free account
hub / github.com/NoMercy-ac/NoMercy / InitCheckModuleModifications

Method InitCheckModuleModifications

Source/Client/NM_Engine/ManualMap.cpp:917–939  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915#endif
916
917bool CNM_App::InitCheckModuleModifications()
918{
919 DEBUG_LOG(LL_SYS, "Thread creation has been started!");
920
921 auto ulFuncSize = g_nmApp->ThreadManagerInstance()->GetThreadFuncSize((LPBYTE)CheckModuleModificationsRoutine);
922 if (!ulFuncSize || ulFuncSize > 1024)
923 {
924 DEBUG_LOG(LL_ERR, "Not valid thread func size: %u", ulFuncSize);
925 return false;
926 }
927
928 auto thread = g_nmApp->ThreadManagerInstance()->CreateCustomThread(SELF_THREAD_MMAPMODULES, CheckModuleModificationsRoutine, ulFuncSize, nullptr, 5000 + 1000, false);
929 if (!IS_VALID_SMART_PTR(thread) || thread->IsCorrect() == false)
930 {
931 DEBUG_LOG(LL_ERR, "Thread can NOT created! Error: %u", g_winapiApiTable->GetLastError());
932 return false;
933 }
934
935 DEBUG_LOG(LL_SYS, "Info - %u[%p->%p][%d-%s] - Completed! Shared:%p Custom:%p",
936 thread->GetId(), thread->GetHandle(), thread->GetStartAddress(), thread->GetCustomCode(), thread->GetThreadCustomName().c_str(), thread, thread.get());
937
938 return true;
939}
940

Callers

nothing calls this directly

Calls 10

GetThreadFuncSizeMethod · 0.80
ThreadManagerInstanceMethod · 0.80
CreateCustomThreadMethod · 0.80
IsCorrectMethod · 0.80
GetHandleMethod · 0.80
GetStartAddressMethod · 0.80
GetCustomCodeMethod · 0.80
GetThreadCustomNameMethod · 0.80
GetIdMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected