how do i use both functions so i can printf smth on my attached console? its really hard to debug dll with sprintf and messagebox
format pe gui
section '.code' code readable executable
push -1
push -1
call [AllocConsole]
mov eax, dword [_iob]
add eax,32
push sss
push eax
call [fprintf]
add esp,8
call [Sleep]
sss db 'lol',0
section '.idata' import readable
dd 0,0,0,RVA msvcrt_name,RVA msvcrt_table
dd 0,0,0,RVA kernel32_name,RVA kernel32_table
dd 0,0,0,0,0
msvcrt_table:
fprintf dd RVA _fpritnf
_iob dd RVA __iob
dd 0
kernel32_table:
AllocConsole dd RVA _AllocConsole
Sleep dd RVA _Sleep
dd 0
msvcrt_name db 'msvcrt.dll',0
kernel32_name db 'kernel32.dll',0
_fpritnf db 0,0,'fprintf',0
__iob db 0,0,'_iob',0
_AllocConsole db 0,0,'AllocConsole',0
_Sleep db 0,0,'Sleep',0
dont work