	.386
	.model use32 small
	PUBLic _strstr
	.code
_strstr:
	push	ebp
	mov	ebp,esp
	push	esi
	push	edi
	mov	edi,[ebp+12]
	push	edi
	sub	al,al
	mov	ecx,-1
	cld
	repne	scasb
	not	ecx
	dec	ecx
	pop	edi
	mov	esi,[ebp+8]
lp:
	mov	al,[esi]
	or	al,al
	je	short badexit
	cmp	al,[edi]
	jne	short nocomp
	push	ecx
	push	esi
	push	edi
	rep	cmpsb
	pop	edi
	pop	esi
	pop	ecx
	je	short exit
nocomp:
	inc esi
	jmp	lp
badexit:
	sub	esi,esi
exit:
	mov	eax,esi
	pop	edi
	pop	esi
	pop	ebp
	ret
	end
	
	