typedef NTSTATUS(NTAPI* ZwCreateThreadEx)(
OUT PHANDLE ThreadHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN HANDLE ProcessHandle,
IN PTHREAD_START_ROUTINE StartRoutine,
IN PVOID StartContext,
IN ULONG CreateThreadFlags,
IN SIZE_T ZeroBits OPTIONAL,
IN SIZE_T StackSize OPTIONAL,
IN SIZE_T MaximumStackSize OPTIONAL,
IN PVOID AttributeList
);
ntStatus = ZwCreateThreadEx(&hThread, PROCESS_ALL_ACCESS, NULL, NtCurrentProcess(), (LPTHREAD_START_ROUTINE)StartAddress, NULL, NULL, 0, 0, 0, NULL);