News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Strings in the stack

Started by Vortex, November 01, 2020, 07:40:45 AM

Previous topic - Next topic

Vortex

Hello,

Macro to pass strings to the stack :

.386
.model flat,stdcall
option casemap:none

ExitProcess PROTO :DWORD
MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
MessageBox  EQU <MessageBoxA>
MB_OK       EQU 0

include     StrToStackMacro.inc

includelib  \PellesC\lib\Win\kernel32.lib
includelib  \PellesC\lib\Win\user32.lib

.code

start:

    call    main
    invoke  ExitProcess,0

main PROC

; Dummy local variable
; initializing the stack frame

LOCAL x:DWORD

    mov     x,0
    mov     eax,@StrToStack(<This is a long test string in the stack.>)
    mov     ecx,@StrToStack(<Hello>)
    invoke  MessageBox,0,eax,ecx,MB_OK
    ret

main ENDP   

END start



Vortex

Hi Jochen,

That's right. Converting the Masm macros to Poasm is problematic in my case. The @CatStr macro is emitting the following error message :

POASM: fatal error: Internal error (').

jj2007

Why the hell does this thread attract the spammer brigade??

Vortex

Hi Jochen,

The spam message is removed. Probably the bots are gaining more capabilities nowadays or they choose randomly a thread to spam.