.386
ideal
model flat

codeseg
public 	AADump_
proc	AADump_
	pushad
	mov	edi,0A0000h
	mov	ebp,(64000-4*321)/2
	xor	eax,eax
	xor	ebx,ebx
	xor	ecx,ecx
	xor	edx,edx
@@loop:
	mov	al,[esi]

	mov	cl,[esi+1]
	mov	bl,[esi+320]

	add	eax,ecx
	mov	dl,[esi+321]

	add	eax,ebx
	add	ecx,edx

	add	eax,edx
	mov	dl,[esi+2]

	shr	eax,2
	add	ecx,edx

	mov	[edi],al
	mov	dl,[esi+322]

	add	ecx,edx
	add	esi,2

	shr	ecx,2
	dec	ebp

	mov	[edi+1],cl
	lea	edi,[edi+2]

	jnz	@@loop

	popad
	ret
endp
end