From f21cba6cb5640b6a5132d990eca7c9270570b9b5 Mon Sep 17 00:00:00 2001 From: Jorge Acereda Date: Tue, 26 Oct 2021 23:11:38 +0200 Subject: [PATCH] Add some more NT functions --- libc/nt/gdi32/CreateRectRgn.s | 10 ++++++++++ libc/nt/kernel32/MultiByteToWideChar.s | 10 ++++++++++ libc/nt/master.sh | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libc/nt/gdi32/CreateRectRgn.s b/libc/nt/gdi32/CreateRectRgn.s index b24c08107..9918d7903 100644 --- a/libc/nt/gdi32/CreateRectRgn.s +++ b/libc/nt/gdi32/CreateRectRgn.s @@ -1,2 +1,12 @@ .include "o/libc/nt/codegen.inc" .imp gdi32,__imp_CreateRectRgn,CreateRectRgn,1097 + + .text.windows +CreateRectRgn: + push %rbp + mov %rsp,%rbp + .profilable + mov __imp_CreateRectRgn(%rip),%rax + jmp __sysv2nt + .endfn CreateRectRgn,globl + .previous diff --git a/libc/nt/kernel32/MultiByteToWideChar.s b/libc/nt/kernel32/MultiByteToWideChar.s index d86691d78..610dff1b8 100644 --- a/libc/nt/kernel32/MultiByteToWideChar.s +++ b/libc/nt/kernel32/MultiByteToWideChar.s @@ -1,2 +1,12 @@ .include "o/libc/nt/codegen.inc" .imp kernel32,__imp_MultiByteToWideChar,MultiByteToWideChar,0 + + .text.windows +MultiByteToWideChar: + push %rbp + mov %rsp,%rbp + .profilable + mov __imp_MultiByteToWideChar(%rip),%rax + jmp __sysv2nt6 + .endfn MultiByteToWideChar,globl + .previous diff --git a/libc/nt/master.sh b/libc/nt/master.sh index 4302dc37e..1f0a9593e 100755 --- a/libc/nt/master.sh +++ b/libc/nt/master.sh @@ -663,7 +663,7 @@ imp 'CreateProcessInternal' CreateProcessInternalW KernelBase 211 imp 'CreateProcessInternalA' CreateProcessInternalA KernelBase 210 imp 'CreateProcessWithLogon' CreateProcessWithLogonW advapi32 1142 imp 'CreateProcessWithToken' CreateProcessWithTokenW advapi32 1143 -imp 'CreateRectRgn' CreateRectRgn gdi32 1097 +imp 'CreateRectRgn' CreateRectRgn gdi32 1097 4 imp 'CreateRectRgnIndirect' CreateRectRgnIndirect gdi32 1098 imp 'CreateRemoteThread' CreateRemoteThread kernel32 0 # KernelBase imp 'CreateRemoteThreadEx' CreateRemoteThreadEx kernel32 0 # KernelBase