There is a project named ReactOS which is mostly a reverse engineering of Windows. CreateToolhelp32Snapshot
and its freinds could be found in the file toolhelp.c
:
[ReactOS Path]/dll/win32/kernel32/client/toolhelp.c
which actually makes a call to NtQuerySystemInformation
in this chain:
CreateToolhelp32Snapshot
|
TH32CreateSnapshot
|
NtQuerySystemInformation
As for EnumProcesses
(dll/win32/psapi/psapi.c
and lib/epsapi/enum/processes.c
):
EnumProcesses
|
PsaEnumerateProcesses
|
PsaEnumerateProcessesAndThreads
|
PsaCaptureProcessesAndThreads
|
NtQuerySystemInformation
Or using a disassembler, IDA:

https://i.stack.imgur.com/1rS6q.png