MCPcopy Create free account
hub / github.com/dobin/RedEdr / MakeProcess

Function MakeProcess

RedEdrShared/myprocess.cpp:130–149  ·  view source on GitHub ↗

This should be fast

Source from the content-addressed store, hash-verified

128
129// This should be fast
130Process* MakeProcess(DWORD pid, std::vector<std::string> targetNames) {
131 Process* process;
132 process = new Process(pid);
133
134 // Process PEB info
135 ProcessPebInfoRet pebInfo = GetProcessNameByPid(pid);
136 process->name = pebInfo.image_path;
137 process->commandline = pebInfo.commandline;
138
139 // Dont observe ourselves
140 if (contains_case_insensitive(process->name, "rededr.exe")) {
141 process->observe = 0;
142 return process;
143 }
144
145 // Check if we should trace
146 process->ObserveIfMatchesTargets(targetNames);
147
148 return process;
149}
150
151
152BOOL Process::OpenTarget() {

Callers 3

TEST_METHODFunction · 0.85
getObjectMethod · 0.85
PopulateAllProcessesMethod · 0.85

Calls 3

GetProcessNameByPidFunction · 0.85

Tested by 1

TEST_METHODFunction · 0.68