flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Aditya J 18 Feb 2024, 13:00
As an alt to MSVCRT trying to use UCRTBASE.DLL
but calling the __stdio_common_vfprintf(UCRT version of printf) crashes the program Help plz |
|||
![]() |
|
revolution 18 Feb 2024, 13:28
Show an example of the code.
|
|||
![]() |
|
macomics 19 Feb 2024, 12:50
You precisely pass args to function in accordance with its prototype?
Code: __inline unsigned __int64* __CRTDECL __local_stdio_printf_options(void) { static unsigned __int64 _OptionsStorage; return &_OptionsStorage; } #define _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS (*__local_stdio_printf_options()) _CRT_STDIO_INLINE int __CRTDECL _vfprintf_l( _Inout_ FILE* const _Stream, _In_z_ char const* const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList ) { return __stdio_common_vfprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Stream, _Format, _Locale, _ArgList); } |
|||
![]() |
|
Aditya J 19 Feb 2024, 19:54
ohh dang i guessed it was like a renamed printf function
that will solve the issue... THANKS |
|||
![]() |
|
revolution 19 Feb 2024, 20:08
You should also call exit with the stack aligned.
Code: mov rsp, rbp ; this is okay but not needed pop rbp; ; don't do this, stack is now unaligned invoke exit, rax ; stack is unaligned here! |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.