summaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authornavewindre <nw@moneybot.cc>2024-07-16 07:19:43 +0200
committernavewindre <nw@moneybot.cc>2024-07-16 07:19:43 +0200
commit46ac5c8191a99e444e0339def6caca339b591ce2 (patch)
tree049ff320ffed7398b91887f6c39cfa3f715a1ee4 /src/util.cpp
parent1441fea13a447d0c52dc34154e06870cc277df54 (diff)
やーーーー
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;
}