here's the simplest example you can examine and modify according to your needs:
section 'code' code readable executable
........
mov esi, first
xor ecx, ecx
@@:
lodsb
cmp al, 13 ;find EOL
jnz @b
inc ecx
cmp ecx, 3 ;line #3?
jnz @b
dec esi
invoke wsprintf, buffer, frmt, first, mystr, esi
add esp, 4*5 ;pop out 5 DWORDs
.........
section 'data' data readable writeable
first db "hasdhashdhas",13,10,\
"askdjsladj",13,10,\
"asdsaskdjsladj",13,10,\
"sdjsladj",0
frmt db '%s%s%s',0 ;concatenate 3 strings
mystr db 'MYSTRING',0
buffer db 256 dup(?)