summaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 81b1192..7f47677 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -8,11 +8,25 @@ ULONG u_thread_create( LPTHREAD_START_ROUTINE routine, void* param ) {
REG64 thread;
ULONG ret_id;
+#ifndef X64
nt_create_thread64( &thread, 0x1fffff, 0, GetCurrentProcess(), routine, param, 0 );
ret_id = GetThreadId( (HANDLE)thread.u32[0] );
nt_close64( thread );
-
+#else
+ static auto nt_create_thread = (NTSTATUS(__stdcall*)(
+ PHANDLE,
+ ACCESS_MASK,
+ POBJECT_ATTRIBUTES,
+ HANDLE,
+ PCLIENT_ID,
+ PCONTEXT,
+ PINITIAL_TEB,
+ BOOLEAN)
+ )GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "NtCreateThread" );
+
+ //aaa
+#endif
return ret_id;
}