	SECTION _TEXT align=1 CLASS=CODE USE32
	SECTION _DATA align=16 CLASS=DATA USE32
	SECTION _BSS align=16 CLASS=BSS USE32
	SECTION _CONST align=16 CLASS=CONST USE32
	SECTION _STRING align=4 CLASS=STRING USE32
	SECTION _INIT_ align=1 CLASS=INITDATA USE32
	SECTION _EXIT_ align=1 CLASS=EXITDATA USE32
	SECTION cppinit  align=1 CLASS=CPPINIT USE32
	SECTION cppexit  align=1 CLASS=CPPEXIT USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
;
; Line 38:	static void CreateWindowMsg(WINDOW wnd)
;
_CreateWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_2:
;
; Line 39:	{
;
;
; Line 40:	AppendWindow(wnd);
;
	PUSH	ESI
	CALL	_AppendWindow
	POP	ECX
;
; Line 41:	if (!SendMessage(NULL, MOUSE_INSTALLED, 0, 0))
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 020H
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	TEST	EAX,EAX
	JNE	SHORT	L_3
;
; Line 42:	ClearAttribute(wnd, VSCROLLBAR | HSCROLLBAR);
;
	AND	DWORD [ESI+054H],BYTE 0FFFFFFCFH
L_3:
;
; Line 43:	if (TestAttribute(wnd, SAVESELF) && isVisible(wnd))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,080H
	JE	SHORT	L_5
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_5
;
; Line 44:	GetVideoBuffer(wnd);
;
	PUSH	ESI
	CALL	_GetVideoBuffer
	POP	ECX
L_5:
;
; Line 45:	}
;
L_1:
	POP	ESI
	POP	EBP
	RET
;
; Line 48:	static void ShowWindowMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_ShowWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_8:
;
; Line 49:	{
;
;
; Line 50:	if (GetParent(wnd) == NULL || isVisible(GetParent(wnd)))    {
;
	MOV	EAX,DWORD [ESI+03CH]
	TEST	EAX,EAX
	JE	SHORT	L_11
	PUSH	DWORD [ESI+03CH]
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_9
L_11:
;
; Line 52:	if (TestAttribute(wnd, SAVESELF) &&
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,080H
	JE	SHORT	L_12
	MOV	EAX,DWORD [ESI+058H]
	TEST	EAX,EAX
	JNE	SHORT	L_12
;
; Line 54:	GetVideoBuffer(wnd);
;
	PUSH	ESI
	CALL	_GetVideoBuffer
	POP	ECX
L_12:
;
; Line 55:	SetVisible(wnd);
;
	OR	DWORD [ESI+054H],BYTE 040H
;
; Line 56:	SendMessage(wnd, PAINT, 0, TRUE);
;
	PUSH	BYTE 01H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 57:	SendMessage(wnd, BORDER, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0AH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 59:	cwnd = FirstWindow(wnd);
;
	MOV	EDI,DWORD [ESI+040H]
	JMP	SHORT	L_14
L_16:
;
; Line 61:	if (cwnd->condition != ISCLOSING)
;
	MOV	EAX,DWORD [EDI+05CH]
	CMP	EAX,BYTE 03H
	JE	SHORT	L_17
;
; Line 62:	SendMessage(cwnd, SHOW_WINDOW, p1, p2);
;
	PUSH	DWORD [EBP+010H]
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 05H
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_17:
;
; Line 63:	cwnd = NextWindow(cwnd);
;
	MOV	EDI,DWORD [EDI+048H]
L_14:
;
; Line 60:	while (cwnd != NULL)	{
;
	MOV	EAX,EDI
	TEST	EAX,EAX
	JNE	SHORT	L_16
L_15:
L_9:
;
; Line 66:	}
;
L_7:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
;
; Line 69:	static void HideWindowMsg(WINDOW wnd)
;
_HideWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_20:
;
; Line 70:	{
;
;
; Line 71:	if (isVisible(wnd))    {
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_21
;
; Line 72:	ClearVisible(wnd);
;
	AND	DWORD [ESI+054H],BYTE 0FFFFFFBFH
;
; Line 74:	if (TestAttribute(wnd, SAVESELF))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,080H
	JE	SHORT	L_23
;
; Line 75:	PutVideoBuffer(wnd);
;
	PUSH	ESI
	CALL	_PutVideoBuffer
	POP	ECX
L_23:
;
; Line 80:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
L_21:
;
; Line 82:	}
;
L_19:
	POP	ESI
	POP	EBP
	RET
;
; Line 85:	static BOOL KeyboardMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_KeyboardMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_26:
;
; Line 86:	{
;
;
; Line 87:	if (WindowMoving || WindowSizing)    {
;
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JNE	SHORT	L_29
	MOV	EAX,DWORD [_WindowSizing]
	TEST	EAX,EAX
	JE	NEAR	L_27
L_29:
;
; Line 90:	x=WindowMoving?GetLeft(&dwnd):GetRight(&dwnd);
;
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JE	SHORT	L_30
	MOV	EAX,DWORD [_dwnd+0CH]
	JMP	SHORT	L_31
L_30:
	MOV	EAX,DWORD [_dwnd+014H]
L_31:
	MOV	EDI,EAX
;
; Line 91:	y=WindowMoving?GetTop(&dwnd):GetBottom(&dwnd);
;
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JE	SHORT	L_32
	MOV	EAX,DWORD [_dwnd+010H]
	JMP	SHORT	L_33
L_32:
	MOV	EAX,DWORD [_dwnd+018H]
L_33:
	MOV	EBX,EAX
;
; Line 92:	switch ((int)p1)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD 010CBH
	JE	NEAR	L_40
	JG	SHORT	L_42
	CMP	EAX,BYTE 01BH
	JE	SHORT	L_36
	JG	SHORT	L_43
	CMP	EAX,BYTE 0DH
	JE	NEAR	L_41
	JMP	NEAR	L_35
L_43:
	CMP	EAX,DWORD 010C8H
	JE	SHORT	L_37
	JMP	NEAR	L_35
L_42:
	CMP	EAX,DWORD 010D0H
	JE	SHORT	L_38
	JG	NEAR	L_35
	CMP	EAX,DWORD 010CDH
	JE	SHORT	L_39
	JMP	SHORT	L_35
L_36:
;
; Line 94:	TerminateMoveSize();
;
	CALL	_TerminateMoveSize
;
; Line 95:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_25
L_37:
;
; Line 97:	if (y)
;
	TEST	EBX,EBX
	JE	SHORT	L_44
;
; Line 98:	--y;
;
	DEC	EBX
L_44:
;
; Line 99:	break;
;
	JMP	SHORT	L_34
L_38:
;
; Line 101:	if (y < SCREENHEIGHT-1)
;
	MOV	EAX,EBX
	PUSH	EAX
	CALL	_isVGA
	MOV	ECX,EAX
	POP	EAX
	TEST	ECX,ECX
	JNE	SHORT	L_50
	PUSH	EAX
	CALL	_isEGA
	MOV	ECX,EAX
	POP	EAX
	TEST	ECX,ECX
	JE	SHORT	L_48
L_50:
	MOV	CX,00H
	ADD	ECX,084H
	MOVSX	ECX,BYTE [ECX+00H]
	INC	ECX
	JMP	SHORT	L_49
L_48:
	MOV	ECX,019H
L_49:
	DEC	ECX
	CMP	EAX,ECX
	JGE	SHORT	L_46
;
; Line 102:	y++;
;
	INC	EBX
L_46:
;
; Line 103:	break;
;
	JMP	SHORT	L_34
L_39:
;
; Line 105:	if (x < SCREENWIDTH-1)
;
	MOV	EAX,EDI
	MOV	CX,00H
	ADD	ECX,BYTE 04AH
	MOVSX	ECX,BYTE [ECX+00H]
	MOVZX	ECX,CL
	DEC	ECX
	CMP	EAX,ECX
	JGE	SHORT	L_51
;
; Line 106:	x++;
;
	INC	EDI
L_51:
;
; Line 107:	break;
;
	JMP	SHORT	L_34
L_40:
;
; Line 109:	if (x)
;
	TEST	EDI,EDI
	JE	SHORT	L_53
;
; Line 110:	--x;
;
	DEC	EDI
L_53:
;
; Line 111:	break;
;
	JMP	SHORT	L_34
L_41:
;
; Line 113:	SendMessage(wnd,BUTTON_RELEASED,x,y);
;
	PUSH	EBX
	PUSH	EDI
	PUSH	BYTE 025H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 114:	default:
;
L_35:
;
; Line 115:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_25
L_34:
;
; Line 118:	SendMessage(wnd, MOUSE_CURSOR, x, y);
;
	PUSH	EBX
	PUSH	EDI
	PUSH	BYTE 027H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 119:	SendMessage(wnd, MOUSE_MOVED, x, y);
;
	PUSH	EBX
	PUSH	EDI
	PUSH	BYTE 024H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 120:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_25
L_27:
;
; Line 122:	switch ((int)p1)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 020H
	JE	SHORT	L_58
	CMP	EAX,DWORD 010BBH
	JE	SHORT	L_57
	CMP	EAX,DWORD 010E1H
	JE	SHORT	L_59
	JMP	SHORT	L_56
L_57:
;
; Line 124:	SendMessage(wnd, COMMAND, ID_HELP, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 033H
	PUSH	BYTE 02H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 125:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_25
L_58:
;
; Line 127:	if ((int)p2 & ALTKEY)
;
	MOV	EAX,DWORD [EBP+010H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_60
;
; Line 128:	if (TestAttribute(wnd, HASTITLEBAR))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_62
;
; Line 129:	if (TestAttribute(wnd, CONTROLBOX))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_64
;
; Line 130:	BuildSystemMenu(wnd);
;
	PUSH	ESI
	CALL	_BuildSystemMenu
	POP	ECX
L_64:
L_62:
L_60:
;
; Line 131:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_25
L_59:
;
; Line 133:	if (TestAttribute(wnd, CONTROLBOX))	{
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_66
;
; Line 134:	SendMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 135:	SkipApplicationControls();
;
	CALL	_SkipApplicationControls
;
; Line 136:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_25
L_66:
;
; Line 138:	break;
;
	JMP	SHORT	L_55
L_56:
;
; Line 140:	break;
;
	JMP	SHORT	L_55
L_55:
;
; Line 142:	return FALSE;
;
	MOV	EAX,00H
L_25:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 146:	static void CommandMsg(WINDOW wnd, PARAM p1)
;
_CommandMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD _dwnd
L_69:
;
; Line 147:	{
;
;
; Line 148:	switch ((int)p1)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 024H
	JE	SHORT	L_73
	CMP	EAX,BYTE 025H
	JE	SHORT	L_74
	CMP	EAX,BYTE 026H
	JE	NEAR	L_75
	CMP	EAX,BYTE 033H
	JE	SHORT	L_72
	JMP	NEAR	L_71
L_72:
;
; Line 150:	DisplayHelp(wnd,ClassNames[GetClass(wnd)]);
;
	MOV	EAX,DWORD [ESI+00H]
	LEA	EAX,[EAX*4+00H]
	PUSH	DWORD [EAX+_ClassNames]
	PUSH	ESI
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 151:	break;
;
	JMP	NEAR	L_70
L_73:
;
; Line 158:	SendMessage(wnd, CAPTURE_MOUSE, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 02CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 160:	SendMessage(wnd, CAPTURE_KEYBOARD, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 014H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 162:	SendMessage(wnd, MOUSE_CURSOR,
;
	PUSH	DWORD [ESI+010H]
	PUSH	DWORD [ESI+0CH]
	PUSH	BYTE 027H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 164:	WindowMoving = TRUE;
;
	MOV	DWORD [_WindowMoving],01H
;
; Line 165:	dragborder(wnd, GetLeft(wnd), GetTop(wnd));
;
	PUSH	DWORD [ESI+010H]
	PUSH	DWORD [ESI+0CH]
	PUSH	ESI
	CALL	_dragborder
	ADD	ESP,BYTE 0CH
;
; Line 166:	break;
;
	JMP	SHORT	L_70
L_74:
;
; Line 168:	SendMessage(wnd, CAPTURE_MOUSE, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 02CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 170:	SendMessage(wnd, CAPTURE_KEYBOARD, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 014H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 172:	SendMessage(wnd, MOUSE_CURSOR,
;
	PUSH	DWORD [ESI+018H]
	PUSH	DWORD [ESI+014H]
	PUSH	BYTE 027H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 174:	WindowSizing = TRUE;
;
	MOV	DWORD [_WindowSizing],01H
;
; Line 175:	dragborder(wnd, GetLeft(wnd), GetTop(wnd));
;
	PUSH	DWORD [ESI+010H]
	PUSH	DWORD [ESI+0CH]
	PUSH	ESI
	CALL	_dragborder
	ADD	ESP,BYTE 0CH
;
; Line 176:	break;
;
	JMP	SHORT	L_70
L_75:
;
; Line 188:	SendMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 189:	SkipApplicationControls();
;
	CALL	_SkipApplicationControls
;
; Line 190:	break;
;
	JMP	SHORT	L_70
L_71:
;
; Line 192:	break;
;
	JMP	SHORT	L_70
L_70:
;
; Line 194:	}
;
L_68:
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 197:	static void SetFocusMsg(WINDOW wnd, PARAM p1)
;
_SetFocusMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 028H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
L_78:
;
; Line 198:	{
;
;
; Line 199:	RECT rc = {0,0,0,0};
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD L_76
	LEA	EDI,[EBP-010H]
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 200:	if (p1 && wnd != NULL && inFocus != wnd)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	TEST	EAX,EAX
	JE	NEAR	L_79
	MOV	EAX,EBX
	TEST	EAX,EAX
	JE	NEAR	L_79
	MOV	EAX,DWORD [_inFocus]
	CMP	EAX,EBX
	JE	NEAR	L_79
;
; Line 202:	WINDOW that = NULL, thatpar = NULL;
;
	MOV	DWORD [EBP-024H],00H
	MOV	DWORD [EBP-020H],00H
;
; Line 204:	WINDOW cwnd = wnd, fwnd = GetParent(wnd);
;
	MOV	DWORD [EBP-01CH],EBX
	MOV	EAX,DWORD [EBX+03CH]
	MOV	DWORD [EBP-018H],EAX
	JMP	SHORT	L_81
L_83:
;
; Line 207:	fwnd->childfocus = cwnd;
;
	MOV	EAX,DWORD [EBP-01CH]
	MOV	ECX,DWORD [EBP-018H]
	MOV	DWORD [ECX+050H],EAX
;
; Line 208:	cwnd = fwnd;
;
	MOV	EAX,DWORD [EBP-018H]
	MOV	DWORD [EBP-01CH],EAX
;
; Line 209:	fwnd = GetParent(fwnd);
;
	MOV	EAX,DWORD [EBP-018H]
	MOV	EAX,DWORD [EAX+03CH]
	MOV	DWORD [EBP-018H],EAX
L_81:
;
; Line 206:	while (fwnd != NULL)	{
;
	MOV	EAX,DWORD [EBP-018H]
	TEST	EAX,EAX
	JNE	SHORT	L_83
L_82:
;
; Line 212:	fwnd = wnd;
;
	MOV	DWORD [EBP-018H],EBX
	JMP	SHORT	L_84
L_86:
;
; Line 214:	cwnd = fwnd->childfocus;
;
	MOV	EAX,DWORD [EBP-018H]
	MOV	EAX,DWORD [EAX+050H]
	MOV	DWORD [EBP-01CH],EAX
;
; Line 215:	fwnd->childfocus = NULL;
;
	MOV	EAX,DWORD [EBP-018H]
	MOV	DWORD [EAX+050H],00H
;
; Line 216:	fwnd = cwnd;
;
	MOV	EAX,DWORD [EBP-01CH]
	MOV	DWORD [EBP-018H],EAX
L_84:
;
; Line 213:	while (fwnd != NULL)	{
;
	MOV	EAX,DWORD [EBP-018H]
	TEST	EAX,EAX
	JNE	SHORT	L_86
L_85:
;
; Line 219:	This = wnd;
;
	MOV	ESI,EBX
;
; Line 220:	that = thatpar = inFocus;
;
	MOV	EAX,DWORD [_inFocus]
	MOV	DWORD [EBP-020H],EAX
	MOV	DWORD [EBP-024H],EAX
	JMP	NEAR	L_87
L_89:
;
; Line 224:	thispar = wnd;
;
	MOV	DWORD [EBP-028H],EBX
	JMP	SHORT	L_90
L_92:
;
; Line 226:	if (This == CaptureMouse || This == CaptureKeyboard)	{
;
	MOV	EAX,ESI
	CMP	EAX,DWORD [_CaptureMouse]
	JE	SHORT	L_95
	MOV	EAX,ESI
	CMP	EAX,DWORD [_CaptureKeyboard]
	JNE	SHORT	L_93
L_95:
;
; Line 228:	that = thatpar = NULL;
;
	MOV	DWORD [EBP-020H],00H
	MOV	DWORD [EBP-024H],00H
;
; Line 229:	break;
;
	JMP	SHORT	L_91
L_93:
;
; Line 231:	if (thispar == thatpar)	{
;
	MOV	EAX,DWORD [EBP-028H]
	CMP	EAX,DWORD [EBP-020H]
	JNE	SHORT	L_96
;
; Line 233:	if (This != that && TestAttribute(that, SAVESELF))
;
	MOV	EAX,ESI
	CMP	EAX,DWORD [EBP-024H]
	JE	SHORT	L_98
	MOV	EAX,DWORD [EBP-024H]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,080H
	JE	SHORT	L_98
;
; Line 234:	that = thatpar = NULL;
;
	MOV	DWORD [EBP-020H],00H
	MOV	DWORD [EBP-024H],00H
L_98:
;
; Line 235:	break;
;
	JMP	SHORT	L_91
L_96:
;
; Line 237:	This = thispar;
;
	MOV	ESI,DWORD [EBP-028H]
;
; Line 238:	thispar = GetParent(thispar);
;
	MOV	EAX,DWORD [EBP-028H]
	MOV	EAX,DWORD [EAX+03CH]
	MOV	DWORD [EBP-028H],EAX
L_90:
;
; Line 225:	while (thispar != NULL)	{
;
	MOV	EAX,DWORD [EBP-028H]
	TEST	EAX,EAX
	JNE	SHORT	L_92
L_91:
;
; Line 240:	if (thispar != NULL)
;
	MOV	EAX,DWORD [EBP-028H]
	TEST	EAX,EAX
	JNE	SHORT	L_88
;
; Line 241:	break;
;
L_100:
;
; Line 242:	that = thatpar;
;
	MOV	EAX,DWORD [EBP-020H]
	MOV	DWORD [EBP-024H],EAX
;
; Line 243:	thatpar = GetParent(thatpar);
;
	MOV	EAX,DWORD [EBP-020H]
	MOV	EAX,DWORD [EAX+03CH]
	MOV	DWORD [EBP-020H],EAX
L_87:
;
; Line 223:	while (thatpar != NULL)	{
;
	MOV	EAX,DWORD [EBP-020H]
	TEST	EAX,EAX
	JNE	NEAR	L_89
L_88:
;
; Line 245:	if (inFocus != NULL)
;
	MOV	EAX,DWORD [_inFocus]
	TEST	EAX,EAX
	JE	SHORT	L_102
;
; Line 246:	SendMessage(inFocus, SETFOCUS, FALSE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 08H
	PUSH	DWORD [_inFocus]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_102:
;
; Line 247:	inFocus = wnd;
;
	MOV	DWORD [_inFocus],EBX
;
; Line 248:	if (that != NULL && isVisible(wnd))	{
;
	MOV	EAX,DWORD [EBP-024H]
	TEST	EAX,EAX
	JE	NEAR	L_104
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	NEAR	L_104
;
; Line 249:	rc = subRectangle(WindowRect(that), WindowRect(This));
;
	PUSH	DWORD [ESI+0CH+0CH]
	PUSH	DWORD [ESI+0CH+08H]
	PUSH	DWORD [ESI+0CH+04H]
	PUSH	DWORD [ESI+0CH+00H]
	MOV	EAX,DWORD [EBP-024H]
	PUSH	DWORD [EAX+0CH+0CH]
	PUSH	DWORD [EAX+0CH+08H]
	PUSH	DWORD [EAX+0CH+04H]
	PUSH	DWORD [EAX+0CH+00H]
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_subRectangle
	ADD	ESP,BYTE 024H
;
; Line 250:	if (!ValidRect(rc))	{
;
	MOV	EAX,DWORD [EBP-08H]
	TEST	EAX,EAX
	JNE	NEAR	L_106
	MOV	EAX,DWORD [EBP-010H]
	TEST	EAX,EAX
	JNE	SHORT	L_106
	MOV	EAX,DWORD [EBP-0CH]
	TEST	EAX,EAX
	JNE	SHORT	L_106
	MOV	EAX,DWORD [EBP-04H]
	TEST	EAX,EAX
	JNE	SHORT	L_106
;
; Line 251:	if (ApplicationWindow != NULL)	{
;
	MOV	EAX,DWORD [_ApplicationWindow]
	TEST	EAX,EAX
	JE	SHORT	L_108
;
; Line 252:	WINDOW fwnd = FirstWindow(ApplicationWindow);
;
	MOV	EAX,DWORD [_ApplicationWindow]
	MOV	EDI,DWORD [EAX+040H]
	JMP	SHORT	L_110
L_112:
;
; Line 254:	if (!isAncestor(wnd, fwnd))	{
;
	PUSH	EDI
	PUSH	EBX
	CALL	_isAncestor
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JNE	SHORT	L_113
;
; Line 255:	rc = subRectangle(WindowRect(wnd),WindowRect(fwnd));
;
	PUSH	DWORD [EDI+0CH+0CH]
	PUSH	DWORD [EDI+0CH+08H]
	PUSH	DWORD [EDI+0CH+04H]
	PUSH	DWORD [EDI+0CH+00H]
	PUSH	DWORD [EBX+0CH+0CH]
	PUSH	DWORD [EBX+0CH+08H]
	PUSH	DWORD [EBX+0CH+04H]
	PUSH	DWORD [EBX+0CH+00H]
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_subRectangle
	ADD	ESP,BYTE 024H
;
; Line 256:	if (ValidRect(rc))
;
	MOV	EAX,DWORD [EBP-08H]
	TEST	EAX,EAX
	JNE	SHORT	L_117
	MOV	EAX,DWORD [EBP-010H]
	TEST	EAX,EAX
	JNE	SHORT	L_117
	MOV	EAX,DWORD [EBP-0CH]
	TEST	EAX,EAX
	JNE	SHORT	L_117
	MOV	EAX,DWORD [EBP-04H]
	TEST	EAX,EAX
	JE	SHORT	L_115
L_117:
;
; Line 257:	break;
;
	JMP	SHORT	L_111
L_115:
L_113:
;
; Line 259:	fwnd = NextWindow(fwnd);
;
	MOV	EDI,DWORD [EDI+048H]
L_110:
;
; Line 253:	while (fwnd != NULL)	{
;
	MOV	EAX,EDI
	TEST	EAX,EAX
	JNE	SHORT	L_112
L_111:
L_108:
L_106:
L_104:
;
; Line 264:	if (that != NULL && !ValidRect(rc) && isVisible(wnd))
;
	MOV	EAX,DWORD [EBP-024H]
	TEST	EAX,EAX
	JE	SHORT	L_118
	MOV	EAX,DWORD [EBP-08H]
	TEST	EAX,EAX
	JNE	SHORT	L_118
	MOV	EAX,DWORD [EBP-010H]
	TEST	EAX,EAX
	JNE	SHORT	L_118
	MOV	EAX,DWORD [EBP-0CH]
	TEST	EAX,EAX
	JNE	SHORT	L_118
	MOV	EAX,DWORD [EBP-04H]
	TEST	EAX,EAX
	JNE	SHORT	L_118
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_118
;
; Line 265:	This = NULL;
;
	MOV	ESI,00H
L_118:
;
; Line 266:	ReFocus(wnd);
;
	PUSH	EBX
	CALL	_ReFocus
	POP	ECX
;
; Line 267:	if (This != NULL &&
;
	MOV	EAX,ESI
	TEST	EAX,EAX
	JE	SHORT	L_120
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_122
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,080H
	JNE	SHORT	L_120
L_122:
;
; Line 269:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [EBX+064H],00H
;
; Line 270:	SendMessage(This, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_121
L_120:
;
; Line 272:	else if (!isVisible(wnd))
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JNE	SHORT	L_123
;
; Line 273:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_124
L_123:
;
; Line 275:	SendMessage(wnd, BORDER, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0AH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_124:
L_121:
	JMP	SHORT	L_80
L_79:
;
; Line 277:	else if (!p1 && inFocus == wnd)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	TEST	EAX,EAX
	JNE	SHORT	L_125
	MOV	EAX,DWORD [_inFocus]
	CMP	EAX,EBX
	JNE	SHORT	L_125
;
; Line 279:	inFocus = NULL;
;
	MOV	DWORD [_inFocus],00H
;
; Line 280:	SendMessage(wnd, BORDER, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0AH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_125:
L_80:
;
; Line 282:	}
;
L_77:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 285:	static void DoubleClickMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_DoubleClickMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_128:
;
; Line 286:	{
;
;
; Line 287:	int mx = (int) p1 - GetLeft(wnd);
;
	MOV	EAX,DWORD [ESI+0CH]
	NEG	EAX
	ADD	EAX,DWORD [EBP+0CH]
	MOV	EDI,EAX
;
; Line 288:	int my = (int) p2 - GetTop(wnd);
;
	MOV	EAX,DWORD [ESI+010H]
	NEG	EAX
	ADD	EAX,DWORD [EBP+010H]
	MOV	EBX,EAX
;
; Line 289:	if (!WindowSizing && !WindowMoving)	{
;
	MOV	EAX,DWORD [_WindowSizing]
	TEST	EAX,EAX
	JNE	SHORT	L_129
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JNE	SHORT	L_129
;
; Line 290:	if (HitControlBox(wnd, mx, my))	{
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_131
	MOV	EAX,EDI
	CMP	EAX,BYTE 02H
	JNE	SHORT	L_131
	MOV	EAX,EBX
	TEST	EAX,EAX
	JNE	SHORT	L_131
;
; Line 291:	PostMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 292:	SkipApplicationControls();
;
	CALL	_SkipApplicationControls
L_131:
L_129:
;
; Line 295:	}
;
L_127:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 298:	static void LeftButtonMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_LeftButtonMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_134:
;
; Line 299:	{
;
;
; Line 300:	int mx = (int) p1 - GetLeft(wnd);
;
	MOV	EAX,DWORD [ESI+0CH]
	NEG	EAX
	ADD	EAX,DWORD [EBP+0CH]
	MOV	EBX,EAX
;
; Line 301:	int my = (int) p2 - GetTop(wnd);
;
	MOV	EAX,DWORD [ESI+010H]
	NEG	EAX
	ADD	EAX,DWORD [EBP+010H]
	MOV	EDI,EAX
;
; Line 302:	if (WindowSizing || WindowMoving)
;
	MOV	EAX,DWORD [_WindowSizing]
	TEST	EAX,EAX
	JNE	SHORT	L_137
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JE	SHORT	L_135
L_137:
;
; Line 303:	return;
;
	JMP	NEAR	L_133
L_135:
;
; Line 304:	if (HitControlBox(wnd, mx, my))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_138
	MOV	EAX,EBX
	CMP	EAX,BYTE 02H
	JNE	SHORT	L_138
	MOV	EAX,EDI
	TEST	EAX,EAX
	JNE	SHORT	L_138
;
; Line 305:	BuildSystemMenu(wnd);
;
	PUSH	ESI
	CALL	_BuildSystemMenu
	POP	ECX
;
; Line 306:	return;
;
	JMP	NEAR	L_133
L_138:
;
; Line 308:	if (my == 0 && mx > -1 && mx < WindowWidth(wnd))  {
;
	MOV	EAX,EDI
	TEST	EAX,EAX
	JNE	NEAR	L_140
	MOV	EAX,EBX
	CMP	EAX,BYTE 0FFFFFFFFH
	JLE	NEAR	L_140
	MOV	EAX,EBX
	CMP	EAX,DWORD [ESI+020H]
	JGE	NEAR	L_140
;
; Line 310:	if (TestAttribute(wnd, MINMAXBOX) &&
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0400H
	JE	SHORT	L_142
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_142
;
; Line 312:	if (mx == WindowWidth(wnd)-2)    {
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 02H
	CMP	EAX,EBX
	JNE	SHORT	L_144
;
; Line 313:	if (wnd->condition != ISRESTORED)
;
	MOV	EAX,DWORD [ESI+05CH]
	TEST	EAX,EAX
	JE	SHORT	L_146
;
; Line 315:	SendMessage(wnd, RESTORE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_146:
;
; Line 321:	return;
;
	JMP	NEAR	L_133
L_144:
L_142:
;
; Line 336:	if (TestAttribute(wnd, MOVEABLE))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 02H
	JE	SHORT	L_148
;
; Line 337:	WindowMoving = TRUE;
;
	MOV	DWORD [_WindowMoving],01H
;
; Line 338:	px = mx;
;
	MOV	DWORD [_px],EBX
;
; Line 339:	py = my;
;
	MOV	DWORD [_py],EDI
;
; Line 340:	diff = (int) mx;
;
	MOV	DWORD [_diff],EBX
;
; Line 341:	SendMessage(wnd, CAPTURE_MOUSE, TRUE,
;
	PUSH	DWORD _dwnd
	PUSH	BYTE 01H
	PUSH	BYTE 02CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 343:	dragborder(wnd, GetLeft(wnd), GetTop(wnd));
;
	PUSH	DWORD [ESI+010H]
	PUSH	DWORD [ESI+0CH]
	PUSH	ESI
	CALL	_dragborder
	ADD	ESP,BYTE 0CH
L_148:
;
; Line 345:	return;
;
	JMP	SHORT	L_133
L_140:
;
; Line 347:	if (mx == WindowWidth(wnd)-1 &&
;
	MOV	EAX,DWORD [ESI+020H]
	DEC	EAX
	CMP	EAX,EBX
	JNE	SHORT	L_150
	MOV	EAX,DWORD [ESI+01CH]
	DEC	EAX
	CMP	EAX,EDI
	JNE	SHORT	L_150
;
; Line 354:	if (!TestAttribute(wnd, SIZEABLE))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 04H
	JE	SHORT	L_133
;
; Line 355:	return;
;
L_152:
;
; Line 369:	WindowSizing = TRUE;
;
	MOV	DWORD [_WindowSizing],01H
;
; Line 370:	SendMessage(wnd, CAPTURE_MOUSE,
;
	PUSH	DWORD _dwnd
	PUSH	BYTE 01H
	PUSH	BYTE 02CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 372:	dragborder(wnd, GetLeft(wnd), GetTop(wnd));
;
	PUSH	DWORD [ESI+010H]
	PUSH	DWORD [ESI+0CH]
	PUSH	ESI
	CALL	_dragborder
	ADD	ESP,BYTE 0CH
L_150:
;
; Line 374:	}
;
L_133:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 377:	static BOOL MouseMovedMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_MouseMovedMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 010H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
L_155:
;
; Line 378:	{
;
;
; Line 379:	if (WindowMoving)    {
;
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JE	NEAR	L_156
;
; Line 380:	int leftmost = 0, topmost = 0,
;
	MOV	DWORD [EBP-010H],00H
	MOV	DWORD [EBP-0CH],00H
;
; Line 381:	bottommost = SCREENHEIGHT-2,
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_160
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_158
L_160:
	MOV	AX,00H
	ADD	EAX,084H
	MOVSX	EAX,BYTE [EAX+00H]
	INC	EAX
	JMP	SHORT	L_159
L_158:
	MOV	EAX,019H
L_159:
	SUB	EAX,BYTE 02H
	MOV	DWORD [EBP-08H],EAX
;
; Line 382:	rightmost = SCREENWIDTH-2;
;
	MOV	AX,00H
	ADD	EAX,BYTE 04AH
	MOVSX	EAX,BYTE [EAX+00H]
	MOVZX	EAX,AL
	SUB	EAX,BYTE 02H
	MOV	DWORD [EBP-04H],EAX
;
; Line 383:	int x = (int) p1 - diff;
;
	MOV	EAX,DWORD [EBP+0CH]
	SUB	EAX,DWORD [_diff]
	MOV	EDI,EAX
;
; Line 384:	int y = (int) p2;
;
	MOV	EBX,DWORD [EBP+010H]
;
; Line 385:	if (GetParent(wnd) != NULL &&
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EAX,DWORD [EAX+03CH]
	TEST	EAX,EAX
	JE	NEAR	L_161
	MOV	EAX,DWORD [EBP+08H]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,0800H
	JNE	NEAR	L_161
;
; Line 387:	WINDOW wnd1 = GetParent(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EAX+03CH]
;
; Line 388:	topmost    = GetClientTop(wnd1);
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_163
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_163
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_163
	MOV	EAX,03H
	JMP	SHORT	L_164
L_163:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_168
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_167
L_168:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_165
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_165
L_167:
	MOV	EAX,02H
	JMP	SHORT	L_166
L_165:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_169
	MOV	EAX,01H
	JMP	SHORT	L_170
L_169:
	MOV	EAX,00H
L_170:
L_166:
L_164:
	ADD	EAX,DWORD [ESI+010H]
	MOV	DWORD [EBP-0CH],EAX
;
; Line 389:	leftmost   = GetClientLeft(wnd1);
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_171
	MOV	EAX,01H
	JMP	SHORT	L_172
L_171:
	MOV	EAX,00H
L_172:
	ADD	EAX,DWORD [ESI+0CH]
	MOV	DWORD [EBP-010H],EAX
;
; Line 390:	bottommost = GetClientBottom(wnd1);
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_173
	MOV	EAX,01H
	JMP	SHORT	L_174
L_173:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_175
	MOV	EAX,01H
	JMP	SHORT	L_176
L_175:
	MOV	EAX,00H
L_176:
L_174:
	NEG	EAX
	ADD	EAX,DWORD [ESI+018H]
	MOV	DWORD [EBP-08H],EAX
;
; Line 391:	rightmost  = GetClientRight(wnd1);
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_177
	MOV	EAX,01H
	JMP	SHORT	L_178
L_177:
	MOV	EAX,00H
L_178:
	NEG	EAX
	ADD	EAX,DWORD [ESI+014H]
	MOV	DWORD [EBP-04H],EAX
L_161:
;
; Line 393:	if (x < leftmost || x > rightmost ||
;
	MOV	EAX,EDI
	CMP	EAX,DWORD [EBP-010H]
	JL	SHORT	L_181
	MOV	EAX,EDI
	CMP	EAX,DWORD [EBP-04H]
	JG	SHORT	L_181
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP-0CH]
	JL	SHORT	L_181
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP-08H]
	JLE	SHORT	L_179
L_181:
;
; Line 395:	x = max(x, leftmost);
;
	MOV	EAX,EDI
	CMP	EAX,DWORD [EBP-010H]
	JLE	SHORT	L_182
	MOV	EAX,EDI
	JMP	SHORT	L_183
L_182:
	MOV	EAX,DWORD [EBP-010H]
L_183:
	MOV	EDI,EAX
;
; Line 396:	x = min(x, rightmost);
;
	MOV	EAX,EDI
	CMP	EAX,DWORD [EBP-04H]
	JGE	SHORT	L_184
	MOV	EAX,EDI
	JMP	SHORT	L_185
L_184:
	MOV	EAX,DWORD [EBP-04H]
L_185:
	MOV	EDI,EAX
;
; Line 397:	y = max(y, topmost);
;
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP-0CH]
	JLE	SHORT	L_186
	MOV	EAX,EBX
	JMP	SHORT	L_187
L_186:
	MOV	EAX,DWORD [EBP-0CH]
L_187:
	MOV	EBX,EAX
;
; Line 398:	y = min(y, bottommost);
;
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP-08H]
	JGE	SHORT	L_188
	MOV	EAX,EBX
	JMP	SHORT	L_189
L_188:
	MOV	EAX,DWORD [EBP-08H]
L_189:
	MOV	EBX,EAX
;
; Line 399:	SendMessage(NULL,MOUSE_CURSOR,x+diff,y);
;
	PUSH	EBX
	MOV	EAX,EDI
	ADD	EAX,DWORD [_diff]
	PUSH	EAX
	PUSH	BYTE 027H
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_179:
;
; Line 401:	if (x != px || y != py)    {
;
	MOV	EAX,EDI
	CMP	EAX,DWORD [_px]
	JNE	SHORT	L_192
	MOV	EAX,EBX
	CMP	EAX,DWORD [_py]
	JE	SHORT	L_190
L_192:
;
; Line 402:	px = x;
;
	MOV	DWORD [_px],EDI
;
; Line 403:	py = y;
;
	MOV	DWORD [_py],EBX
;
; Line 404:	dragborder(wnd, x, y);
;
	PUSH	EBX
	PUSH	EDI
	PUSH	DWORD [EBP+08H]
	CALL	_dragborder
	ADD	ESP,BYTE 0CH
L_190:
;
; Line 406:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_154
L_156:
;
; Line 408:	if (WindowSizing)    {
;
	MOV	EAX,DWORD [_WindowSizing]
	TEST	EAX,EAX
	JE	SHORT	L_193
;
; Line 409:	sizeborder(wnd, (int) p1, (int) p2);
;
	PUSH	DWORD [EBP+010H]
	PUSH	DWORD [EBP+0CH]
	PUSH	DWORD [EBP+08H]
	CALL	_sizeborder
	ADD	ESP,BYTE 0CH
;
; Line 410:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_154
L_193:
;
; Line 412:	return FALSE;
;
	MOV	EAX,00H
L_154:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 496:	static void MoveMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_MoveMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 0CH
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_196:
;
; Line 497:	{
;
;
; Line 499:	BOOL wasVisible = isVisible(wnd);
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	MOV	DWORD [EBP-08H],EAX
;
; Line 500:	int xdif = (int) p1 - wnd->rc.lf;
;
	MOV	EAX,DWORD [ESI+0CH]
	NEG	EAX
	ADD	EAX,DWORD [EBP+0CH]
	MOV	DWORD [EBP-04H],EAX
;
; Line 501:	int ydif = (int) p2 - wnd->rc.tp;
;
	MOV	EAX,DWORD [ESI+010H]
	NEG	EAX
	ADD	EAX,DWORD [EBP+010H]
	MOV	EBX,EAX
;
; Line 503:	if (xdif == 0 && ydif == 0)
;
	MOV	EAX,DWORD [EBP-04H]
	TEST	EAX,EAX
	JNE	SHORT	L_197
	MOV	EAX,EBX
	TEST	EAX,EAX
	JE	NEAR	L_195
;
; Line 504:	return;
;
L_197:
;
; Line 505:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 506:	if (wasVisible)
;
	MOV	EAX,DWORD [EBP-08H]
	TEST	EAX,EAX
	JE	SHORT	L_199
;
; Line 507:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_199:
;
; Line 508:	wnd->rc.lf = (int) p1;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [ESI+0CH],EAX
;
; Line 509:	wnd->rc.tp = (int) p2;
;
	MOV	EAX,DWORD [EBP+010H]
	MOV	DWORD [ESI+010H],EAX
;
; Line 510:	wnd->rc.rt = GetLeft(wnd)+WindowWidth(wnd)-1;
;
	MOV	EAX,DWORD [ESI+0CH]
	ADD	EAX,DWORD [ESI+020H]
	DEC	EAX
	MOV	DWORD [ESI+014H],EAX
;
; Line 511:	wnd->rc.bt = GetTop(wnd)+WindowHeight(wnd)-1;
;
	MOV	EAX,DWORD [ESI+010H]
	ADD	EAX,DWORD [ESI+01CH]
	DEC	EAX
	MOV	DWORD [ESI+018H],EAX
;
; Line 512:	if (wnd->condition == ISRESTORED)
;
	MOV	EAX,DWORD [ESI+05CH]
	TEST	EAX,EAX
	JNE	SHORT	L_201
;
; Line 513:	wnd->RestoredRC = wnd->rc;
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	MOV	EDI,EAX
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
L_201:
;
; Line 515:	cwnd = FirstWindow(wnd);
;
	MOV	EDI,DWORD [ESI+040H]
	JMP	SHORT	L_203
L_205:
;
; Line 517:	SendMessage(cwnd, MOVE, cwnd->rc.lf+xdif, cwnd->rc.tp+ydif);
;
	MOV	EAX,DWORD [EDI+010H]
	ADD	EAX,EBX
	PUSH	EAX
	MOV	EAX,DWORD [EDI+0CH]
	ADD	EAX,DWORD [EBP-04H]
	PUSH	EAX
	PUSH	BYTE 0CH
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 518:	cwnd = NextWindow(cwnd);
;
	MOV	EDI,DWORD [EDI+048H]
L_203:
;
; Line 516:	while (cwnd != NULL)	{
;
	MOV	EAX,EDI
	TEST	EAX,EAX
	JNE	SHORT	L_205
L_204:
;
; Line 520:	if (wasVisible)
;
	MOV	EAX,DWORD [EBP-08H]
	TEST	EAX,EAX
	JE	SHORT	L_206
;
; Line 521:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_206:
;
; Line 522:	}
;
L_195:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 525:	static void SizeMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_SizeMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 020H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+010H]
L_209:
;
; Line 526:	{
;
;
; Line 527:	BOOL wasVisible = isVisible(wnd);
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	MOV	EBX,EAX
;
; Line 530:	int xdif = (int) p1 - wnd->rc.rt;
;
	MOV	EAX,DWORD [ESI+014H]
	NEG	EAX
	ADD	EAX,DWORD [EBP+0CH]
	MOV	DWORD [EBP-08H],EAX
;
; Line 531:	int ydif = (int) p2 - wnd->rc.bt;
;
	MOV	EAX,DWORD [ESI+018H]
	NEG	EAX
	ADD	EAX,EDI
	MOV	DWORD [EBP-04H],EAX
;
; Line 533:	if (xdif == 0 && ydif == 0)
;
	MOV	EAX,DWORD [EBP-08H]
	TEST	EAX,EAX
	JNE	SHORT	L_210
	MOV	EAX,DWORD [EBP-04H]
	TEST	EAX,EAX
	JE	SHORT	L_208
;
; Line 534:	return;
;
L_210:
;
; Line 535:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 536:	if (wasVisible)
;
	TEST	EBX,EBX
	JE	SHORT	L_212
;
; Line 537:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_212:
;
; Line 538:	wnd->rc.rt = (int) p1;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [ESI+014H],EAX
;
; Line 539:	wnd->rc.bt = (int) p2;
;
	MOV	DWORD [ESI+018H],EDI
;
; Line 540:	wnd->ht = GetBottom(wnd)-GetTop(wnd)+1;
;
	MOV	EAX,DWORD [ESI+018H]
	SUB	EAX,DWORD [ESI+010H]
	INC	EAX
	MOV	DWORD [ESI+01CH],EAX
;
; Line 541:	wnd->wd = GetRight(wnd)-GetLeft(wnd)+1;
;
	MOV	EAX,DWORD [ESI+014H]
	SUB	EAX,DWORD [ESI+0CH]
	INC	EAX
	MOV	DWORD [ESI+020H],EAX
;
; Line 543:	if (wnd->condition == ISRESTORED)
;
	MOV	EAX,DWORD [ESI+05CH]
	TEST	EAX,EAX
	JNE	SHORT	L_214
;
; Line 544:	wnd->RestoredRC = WindowRect(wnd);
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	MOV	EDI,EAX
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
L_214:
;
; Line 557:	if (wasVisible)
;
	TEST	EBX,EBX
	JE	SHORT	L_216
;
; Line 558:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_216:
;
; Line 559:	}
;
L_208:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 562:	static void CloseWindowMsg(WINDOW wnd)
;
_CloseWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD _inFocus
L_219:
;
; Line 563:	{
;
;
; Line 565:	wnd->condition = ISCLOSING;
;
	MOV	DWORD [ESI+05CH],03H
;
; Line 567:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 570:	cwnd = LastWindow(wnd);
;
	MOV	EBX,DWORD [ESI+044H]
	JMP	SHORT	L_220
L_222:
;
; Line 572:	if (inFocus == cwnd)
;
	MOV	EAX,DWORD [EDI+00H]
	CMP	EAX,EBX
	JNE	SHORT	L_223
;
; Line 573:	inFocus = wnd;
;
	MOV	DWORD [EDI+00H],ESI
L_223:
;
; Line 574:	SendMessage(cwnd,CLOSE_WINDOW,0,0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 575:	cwnd = LastWindow(wnd);
;
	MOV	EBX,DWORD [ESI+044H]
L_220:
;
; Line 571:	while (cwnd != NULL)	{
;
	MOV	EAX,EBX
	TEST	EAX,EAX
	JNE	SHORT	L_222
L_221:
;
; Line 579:	if (wnd->PrevClock != NULL)
;
	MOV	EAX,DWORD [ESI+07CH]
	TEST	EAX,EAX
	JE	SHORT	L_225
;
; Line 580:	SendMessage(wnd, RELEASE_CLOCK, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 012H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_225:
;
; Line 581:	if (wnd->PrevMouse != NULL)
;
	MOV	EAX,DWORD [ESI+074H]
	TEST	EAX,EAX
	JE	SHORT	L_227
;
; Line 582:	SendMessage(wnd, RELEASE_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02DH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_227:
;
; Line 583:	if (wnd->PrevKeyboard != NULL)
;
	MOV	EAX,DWORD [ESI+078H]
	TEST	EAX,EAX
	JE	SHORT	L_229
;
; Line 584:	SendMessage(wnd, RELEASE_KEYBOARD, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 015H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_229:
;
; Line 587:	if (wnd == inFocus)
;
	MOV	EAX,ESI
	CMP	EAX,DWORD [EDI+00H]
	JNE	SHORT	L_231
;
; Line 588:	SetPrevFocus();
;
	CALL	_SetPrevFocus
L_231:
;
; Line 590:	if (wnd->title != NULL)
;
	MOV	EAX,DWORD [ESI+04H]
	TEST	EAX,EAX
	JE	SHORT	L_233
;
; Line 591:	free(wnd->title);
;
	PUSH	DWORD [ESI+04H]
	CALL	_free
	POP	ECX
L_233:
;
; Line 592:	if (wnd->videosave != NULL)
;
	MOV	EAX,DWORD [ESI+058H]
	TEST	EAX,EAX
	JE	SHORT	L_235
;
; Line 593:	free(wnd->videosave);
;
	PUSH	DWORD [ESI+058H]
	CALL	_free
	POP	ECX
L_235:
;
; Line 595:	RemoveWindow(wnd);
;
	PUSH	ESI
	CALL	_RemoveWindow
	POP	ECX
;
; Line 596:	if (wnd == inFocus)
;
	MOV	EAX,ESI
	CMP	EAX,DWORD [EDI+00H]
	JNE	SHORT	L_237
;
; Line 597:	inFocus = NULL;
;
	MOV	DWORD [EDI+00H],00H
L_237:
;
; Line 598:	free(wnd);
;
	PUSH	ESI
	CALL	_free
	POP	ECX
;
; Line 599:	}
;
L_218:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_NormalProc]
;
; Line 602:	int NormalProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
;
_NormalProc:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EBP+010H]
	MOV	EDI,DWORD _dwnd
L_240:
;
; Line 603:	{
;
;
; Line 604:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 0DH
	JE	NEAR	L_260
	JA	SHORT	L_262
	CMP	EAX,BYTE 07H
	JE	NEAR	L_261
	JA	SHORT	L_263
	CMP	EAX,BYTE 05H
	JE	NEAR	L_244
	JA	SHORT	L_264
	CMP	EAX,BYTE 03H
	JE	NEAR	L_243
	JA	NEAR	L_242
	CMP	EAX,BYTE 02H
	JE	NEAR	L_253
	JMP	NEAR	L_242
L_264:
	CMP	EAX,BYTE 06H
	JE	NEAR	L_245
	JMP	NEAR	L_242
L_263:
	CMP	EAX,BYTE 0AH
	JE	NEAR	L_252
	JA	SHORT	L_265
	CMP	EAX,BYTE 09H
	JE	NEAR	L_251
	JA	NEAR	L_242
	CMP	EAX,BYTE 08H
	JE	NEAR	L_254
	JMP	NEAR	L_242
L_265:
	CMP	EAX,BYTE 0CH
	JE	NEAR	L_259
	JMP	NEAR	L_242
L_262:
	CMP	EAX,BYTE 023H
	JE	NEAR	L_255
	JA	SHORT	L_266
	CMP	EAX,BYTE 01CH
	JE	NEAR	L_250
	JA	SHORT	L_267
	CMP	EAX,BYTE 013H
	JE	NEAR	L_248
	JA	NEAR	L_242
	CMP	EAX,BYTE 0FH
	JE	SHORT	L_247
	JMP	NEAR	L_242
L_267:
	CMP	EAX,BYTE 022H
	JE	NEAR	L_256
	JMP	NEAR	L_242
L_266:
	CMP	EAX,BYTE 04AH
	JE	SHORT	L_246
	JA	SHORT	L_268
	CMP	EAX,BYTE 025H
	JE	NEAR	L_258
	JA	NEAR	L_242
	CMP	EAX,BYTE 024H
	JE	NEAR	L_257
	JMP	NEAR	L_242
L_268:
	CMP	EAX,BYTE 04BH
	JE	SHORT	L_249
	JMP	NEAR	L_242
L_243:
;
; Line 606:	CreateWindowMsg(wnd);
;
	PUSH	EBX
	CALL	_CreateWindowMsg
	POP	ECX
;
; Line 607:	break;
;
	JMP	NEAR	L_241
L_244:
;
; Line 609:	ShowWindowMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_ShowWindowMsg
	ADD	ESP,BYTE 0CH
;
; Line 610:	break;
;
	JMP	NEAR	L_241
L_245:
;
; Line 612:	HideWindowMsg(wnd);
;
	PUSH	EBX
	CALL	_HideWindowMsg
	POP	ECX
;
; Line 613:	break;
;
	JMP	NEAR	L_241
L_246:
;
; Line 615:	return DisplayHelp(wnd, (char *)p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
	JMP	NEAR	L_239
L_247:
;
; Line 617:	return InsideWindow(wnd, (int) p1, (int) p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_InsideWindow
	ADD	ESP,BYTE 0CH
	JMP	NEAR	L_239
L_248:
;
; Line 619:	if (KeyboardMsg(wnd, p1, p2))
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_KeyboardMsg
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_269
;
; Line 620:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_239
L_269:
;
; Line 622:	case ADDSTATUS:
;
L_249:
;
; Line 623:	case SHIFT_CHANGED:
;
L_250:
;
; Line 624:	if (GetParent(wnd) != NULL)
;
	MOV	EAX,DWORD [EBX+03CH]
	TEST	EAX,EAX
	JE	SHORT	L_271
;
; Line 625:	PostMessage(GetParent(wnd), msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	DWORD [EBX+03CH]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_271:
;
; Line 626:	break;
;
	JMP	NEAR	L_241
L_251:
;
; Line 628:	if (isVisible(wnd))	{
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_273
;
; Line 635:	wnd->wasCleared = TRUE;
;
	MOV	DWORD [EBX+064H],01H
;
; Line 636:	ClearWindow(wnd, (RECT *)p1, ' ');
;
	PUSH	BYTE 020H
	PUSH	ESI
	PUSH	EBX
	CALL	_ClearWindow
	ADD	ESP,BYTE 0CH
L_273:
;
; Line 639:	break;
;
	JMP	NEAR	L_241
L_252:
;
; Line 641:	if (isVisible(wnd))    {
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_275
;
; Line 642:	if (TestAttribute(wnd, HASBORDER))
;
	MOV	EAX,DWORD [EBX+054H]
	AND	EAX,04000H
	JE	SHORT	L_277
;
; Line 643:	RepaintBorder(wnd, (RECT *)p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_RepaintBorder
	ADD	ESP,BYTE 08H
	JMP	SHORT	L_278
L_277:
;
; Line 644:	else if (TestAttribute(wnd, HASTITLEBAR))
;
	MOV	EAX,DWORD [EBX+054H]
	AND	EAX,0100H
	JE	SHORT	L_279
;
; Line 645:	DisplayTitle(wnd, (RECT *)p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_DisplayTitle
	ADD	ESP,BYTE 08H
L_279:
L_278:
L_275:
;
; Line 647:	break;
;
	JMP	NEAR	L_241
L_253:
;
; Line 649:	CommandMsg(wnd, p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_CommandMsg
	ADD	ESP,BYTE 08H
;
; Line 650:	break;
;
	JMP	NEAR	L_241
L_254:
;
; Line 652:	SetFocusMsg(wnd, p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_SetFocusMsg
	ADD	ESP,BYTE 08H
;
; Line 653:	break;
;
	JMP	NEAR	L_241
L_255:
;
; Line 655:	DoubleClickMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_DoubleClickMsg
	ADD	ESP,BYTE 0CH
;
; Line 656:	break;
;
	JMP	NEAR	L_241
L_256:
;
; Line 658:	LeftButtonMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_LeftButtonMsg
	ADD	ESP,BYTE 0CH
;
; Line 659:	break;
;
	JMP	NEAR	L_241
L_257:
;
; Line 661:	if (MouseMovedMsg(wnd, p1, p2))
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_MouseMovedMsg
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_281
;
; Line 662:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_239
L_281:
;
; Line 663:	break;
;
	JMP	SHORT	L_241
L_258:
;
; Line 665:	if (WindowMoving || WindowSizing)    {
;
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JNE	SHORT	L_285
	MOV	EAX,DWORD [_WindowSizing]
	TEST	EAX,EAX
	JE	SHORT	L_283
L_285:
;
; Line 666:	if (WindowMoving)
;
	MOV	EAX,DWORD [_WindowMoving]
	TEST	EAX,EAX
	JE	SHORT	L_286
;
; Line 667:	PostMessage(wnd,MOVE,dwnd.rc.lf,dwnd.rc.tp);
;
	PUSH	DWORD [EDI+010H]
	PUSH	DWORD [EDI+0CH]
	PUSH	BYTE 0CH
	PUSH	EBX
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_287
L_286:
;
; Line 669:	PostMessage(wnd,SIZE,dwnd.rc.rt,dwnd.rc.bt);
;
	PUSH	DWORD [EDI+018H]
	PUSH	DWORD [EDI+014H]
	PUSH	BYTE 0DH
	PUSH	EBX
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_287:
;
; Line 670:	TerminateMoveSize();
;
	CALL	_TerminateMoveSize
L_283:
;
; Line 672:	break;
;
	JMP	SHORT	L_241
L_259:
;
; Line 698:	MoveMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_MoveMsg
	ADD	ESP,BYTE 0CH
;
; Line 699:	break;
;
	JMP	SHORT	L_241
L_260:
;
; Line 701:	SizeMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_SizeMsg
	ADD	ESP,BYTE 0CH
;
; Line 702:	break;
;
	JMP	SHORT	L_241
L_261:
;
; Line 705:	CloseWindowMsg(wnd);
;
	PUSH	EBX
	CALL	_CloseWindowMsg
	POP	ECX
;
; Line 706:	break;
;
	JMP	SHORT	L_241
L_242:
;
; Line 708:	break;
;
	JMP	SHORT	L_241
L_241:
;
; Line 710:	return TRUE;
;
	MOV	EAX,01H
L_239:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 765:	static void TerminateMoveSize(void)
;
_TerminateMoveSize:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD _dwnd
L_289:
;
; Line 766:	{
;
;
; Line 767:	px = py = -1;
;
	MOV	DWORD [_py],0FFFFFFFFH
	MOV	DWORD [_px],0FFFFFFFFH
;
; Line 768:	diff = 0;
;
	MOV	DWORD [_diff],00H
;
; Line 769:	SendMessage(&dwnd, RELEASE_MOUSE, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 02DH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 770:	SendMessage(&dwnd, RELEASE_KEYBOARD, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 015H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 771:	RestoreBorder(dwnd.rc);
;
	PUSH	DWORD [EBX+0CH+0CH]
	PUSH	DWORD [EBX+0CH+08H]
	PUSH	DWORD [EBX+0CH+04H]
	PUSH	DWORD [EBX+0CH+00H]
	CALL	_RestoreBorder
	ADD	ESP,BYTE 010H
;
; Line 772:	WindowMoving = WindowSizing = FALSE;
;
	MOV	DWORD [_WindowSizing],00H
	MOV	DWORD [_WindowMoving],00H
;
; Line 773:	}
;
L_288:
	POP	EBX
	POP	EBP
	RET
;
; Line 775:	static void near dragborder(WINDOW wnd, int x, int y)
;
_dragborder:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD _dwnd
	MOV	EDI,DWORD [EBP+08H]
L_291:
;
; Line 776:	{
;
;
; Line 777:	RestoreBorder(dwnd.rc);
;
	PUSH	DWORD [ESI+0CH+0CH]
	PUSH	DWORD [ESI+0CH+08H]
	PUSH	DWORD [ESI+0CH+04H]
	PUSH	DWORD [ESI+0CH+00H]
	CALL	_RestoreBorder
	ADD	ESP,BYTE 010H
;
; Line 779:	dwnd.rc.lf = x;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [ESI+0CH],EAX
;
; Line 780:	dwnd.rc.tp = y;
;
	MOV	EAX,DWORD [EBP+010H]
	MOV	DWORD [ESI+010H],EAX
;
; Line 781:	dwnd.rc.rt = dwnd.rc.lf+WindowWidth(wnd)-1;
;
	MOV	EAX,DWORD [EDI+020H]
	ADD	EAX,DWORD [ESI+0CH]
	DEC	EAX
	MOV	DWORD [ESI+014H],EAX
;
; Line 782:	dwnd.rc.bt = dwnd.rc.tp+WindowHeight(wnd)-1;
;
	MOV	EAX,DWORD [EDI+01CH]
	ADD	EAX,DWORD [ESI+010H]
	DEC	EAX
	MOV	DWORD [ESI+018H],EAX
;
; Line 783:	dwnd.ht = WindowHeight(wnd);
;
	MOV	EAX,DWORD [EDI+01CH]
	MOV	DWORD [ESI+01CH],EAX
;
; Line 784:	dwnd.wd = WindowWidth(wnd);
;
	MOV	EAX,DWORD [EDI+020H]
	MOV	DWORD [ESI+020H],EAX
;
; Line 785:	dwnd.parent = GetParent(wnd);
;
	MOV	EAX,DWORD [EDI+03CH]
	MOV	DWORD [ESI+03CH],EAX
;
; Line 786:	dwnd.attrib = VISIBLE | HASBORDER | NOCLIP;
;
	MOV	DWORD [ESI+054H],04840H
;
; Line 787:	InitWindowColors(&dwnd);
;
	PUSH	ESI
	CALL	_InitWindowColors
	POP	ECX
;
; Line 788:	SaveBorder(dwnd.rc);
;
	PUSH	DWORD [ESI+0CH+0CH]
	PUSH	DWORD [ESI+0CH+08H]
	PUSH	DWORD [ESI+0CH+04H]
	PUSH	DWORD [ESI+0CH+00H]
	CALL	_SaveBorder
	ADD	ESP,BYTE 010H
;
; Line 789:	RepaintBorder(&dwnd, NULL);
;
	PUSH	BYTE 00H
	PUSH	ESI
	CALL	_RepaintBorder
	ADD	ESP,BYTE 08H
;
; Line 790:	}
;
L_290:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
;
; Line 792:	static void near sizeborder(WINDOW wnd, int rt, int bt)
;
_sizeborder:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+010H]
	MOV	EDI,DWORD _dwnd
L_293:
;
; Line 793:	{
;
;
; Line 794:	int leftmost = GetLeft(wnd)+10;
;
	MOV	EAX,DWORD [ESI+0CH]
	ADD	EAX,BYTE 0AH
	MOV	DWORD [EBP-010H],EAX
;
; Line 795:	int topmost = GetTop(wnd)+3;
;
	MOV	EAX,DWORD [ESI+010H]
	ADD	EAX,BYTE 03H
	MOV	DWORD [EBP-0CH],EAX
;
; Line 796:	int bottommost = SCREENHEIGHT-1;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_296
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_294
L_296:
	MOV	AX,00H
	ADD	EAX,084H
	MOVSX	EAX,BYTE [EAX+00H]
	INC	EAX
	JMP	SHORT	L_295
L_294:
	MOV	EAX,019H
L_295:
	DEC	EAX
	MOV	DWORD [EBP-08H],EAX
;
; Line 797:	int rightmost  = SCREENWIDTH-1;
;
	MOV	AX,00H
	ADD	EAX,BYTE 04AH
	MOVSX	EAX,BYTE [EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	MOV	DWORD [EBP-04H],EAX
;
; Line 798:	if (GetParent(wnd))    {
;
	MOV	EAX,DWORD [ESI+03CH]
	TEST	EAX,EAX
	JE	NEAR	L_297
;
; Line 800:	bottommost = min(bottommost,             GetClientBottom(GetParent(wnd)));
;
	MOV	EAX,DWORD [EBP-08H]
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,08000H
	JE	SHORT	L_301
	MOV	ECX,01H
	JMP	SHORT	L_302
L_301:
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,04000H
	JE	SHORT	L_303
	MOV	ECX,01H
	JMP	SHORT	L_304
L_303:
	MOV	ECX,00H
L_304:
L_302:
	NEG	ECX
	MOV	EDX,DWORD [ESI+03CH]
	ADD	ECX,DWORD [EDX+018H]
	CMP	EAX,ECX
	JGE	SHORT	L_299
	MOV	EAX,DWORD [EBP-08H]
	JMP	SHORT	L_300
L_299:
	MOV	EAX,DWORD [ESI+03CH]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,08000H
	JE	SHORT	L_305
	MOV	EAX,01H
	JMP	SHORT	L_306
L_305:
	MOV	EAX,DWORD [ESI+03CH]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,04000H
	JE	SHORT	L_307
	MOV	EAX,01H
	JMP	SHORT	L_308
L_307:
	MOV	EAX,00H
L_308:
L_306:
	NEG	EAX
	MOV	ECX,DWORD [ESI+03CH]
	ADD	EAX,DWORD [ECX+018H]
L_300:
	MOV	DWORD [EBP-08H],EAX
;
; Line 802:	rightmost  = min(rightmost,             GetClientRight(GetParent(wnd)));
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,04000H
	JE	SHORT	L_311
	MOV	ECX,01H
	JMP	SHORT	L_312
L_311:
	MOV	ECX,00H
L_312:
	NEG	ECX
	MOV	EDX,DWORD [ESI+03CH]
	ADD	ECX,DWORD [EDX+014H]
	CMP	EAX,ECX
	JGE	SHORT	L_309
	MOV	EAX,DWORD [EBP-04H]
	JMP	SHORT	L_310
L_309:
	MOV	EAX,DWORD [ESI+03CH]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,04000H
	JE	SHORT	L_313
	MOV	EAX,01H
	JMP	SHORT	L_314
L_313:
	MOV	EAX,00H
L_314:
	NEG	EAX
	MOV	ECX,DWORD [ESI+03CH]
	ADD	EAX,DWORD [ECX+014H]
L_310:
	MOV	DWORD [EBP-04H],EAX
L_297:
;
; Line 804:	rt = min(rt, rightmost);
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-04H]
	JGE	SHORT	L_315
	MOV	EAX,DWORD [EBP+0CH]
	JMP	SHORT	L_316
L_315:
	MOV	EAX,DWORD [EBP-04H]
L_316:
	MOV	DWORD [EBP+0CH],EAX
;
; Line 805:	bt = min(bt, bottommost);
;
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP-08H]
	JGE	SHORT	L_317
	MOV	EAX,EBX
	JMP	SHORT	L_318
L_317:
	MOV	EAX,DWORD [EBP-08H]
L_318:
	MOV	EBX,EAX
;
; Line 806:	rt = max(rt, leftmost);
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-010H]
	JLE	SHORT	L_319
	MOV	EAX,DWORD [EBP+0CH]
	JMP	SHORT	L_320
L_319:
	MOV	EAX,DWORD [EBP-010H]
L_320:
	MOV	DWORD [EBP+0CH],EAX
;
; Line 807:	bt = max(bt, topmost);
;
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP-0CH]
	JLE	SHORT	L_321
	MOV	EAX,EBX
	JMP	SHORT	L_322
L_321:
	MOV	EAX,DWORD [EBP-0CH]
L_322:
	MOV	EBX,EAX
;
; Line 808:	SendMessage(NULL, MOUSE_CURSOR, rt, bt);
;
	PUSH	EBX
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 027H
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 810:	if (rt != px || bt != py)
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [_px]
	JNE	SHORT	L_325
	MOV	EAX,EBX
	CMP	EAX,DWORD [_py]
	JE	SHORT	L_323
L_325:
;
; Line 811:	RestoreBorder(dwnd.rc);
;
	PUSH	DWORD [EDI+0CH+0CH]
	PUSH	DWORD [EDI+0CH+08H]
	PUSH	DWORD [EDI+0CH+04H]
	PUSH	DWORD [EDI+0CH+00H]
	CALL	_RestoreBorder
	ADD	ESP,BYTE 010H
L_323:
;
; Line 814:	dwnd.ht = bt-dwnd.rc.tp+1;
;
	MOV	EAX,DWORD [EDI+010H]
	NEG	EAX
	ADD	EAX,EBX
	INC	EAX
	MOV	DWORD [EDI+01CH],EAX
;
; Line 815:	dwnd.wd = rt-dwnd.rc.lf+1;
;
	MOV	EAX,DWORD [EDI+0CH]
	NEG	EAX
	ADD	EAX,DWORD [EBP+0CH]
	INC	EAX
	MOV	DWORD [EDI+020H],EAX
;
; Line 816:	dwnd.rc.rt = rt;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [EDI+014H],EAX
;
; Line 817:	dwnd.rc.bt = bt;
;
	MOV	DWORD [EDI+018H],EBX
;
; Line 818:	if (rt != px || bt != py)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [_px]
	JNE	SHORT	L_328
	MOV	EAX,EBX
	CMP	EAX,DWORD [_py]
	JE	SHORT	L_326
L_328:
;
; Line 819:	px = rt;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [_px],EAX
;
; Line 820:	py = bt;
;
	MOV	DWORD [_py],EBX
;
; Line 821:	SaveBorder(dwnd.rc);
;
	PUSH	DWORD [EDI+0CH+0CH]
	PUSH	DWORD [EDI+0CH+08H]
	PUSH	DWORD [EDI+0CH+04H]
	PUSH	DWORD [EDI+0CH+00H]
	CALL	_SaveBorder
	ADD	ESP,BYTE 010H
;
; Line 822:	RepaintBorder(&dwnd, NULL);
;
	PUSH	BYTE 00H
	PUSH	EDI
	CALL	_RepaintBorder
	ADD	ESP,BYTE 08H
L_326:
;
; Line 824:	}
;
L_292:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 973:	static void SaveBorder(RECT rc)
;
_SaveBorder:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP+08H]
L_330:
;
; Line 974:	{
;
;
; Line 978:	Bht = RectBottom(rc) - RectTop(rc) + 1;
;
	MOV	EAX,DWORD [ESI+0CH]
	SUB	EAX,DWORD [ESI+04H]
	INC	EAX
	MOV	DWORD [_Bht],EAX
;
; Line 979:	Bwd = RectRight(rc) - RectLeft(rc) + 1;
;
	MOV	EAX,DWORD [ESI+08H]
	SUB	EAX,DWORD [ESI+00H]
	INC	EAX
	MOV	DWORD [_Bwd],EAX
;
; Line 980:	Bsave = DFrealloc(Bsave, ((Bht + Bwd) * 2) * sizeof(short));
;
	MOV	EAX,DWORD [_Bht]
	ADD	EAX,DWORD [_Bwd]
	SHL	EAX,02H
	PUSH	EAX
	PUSH	DWORD [_Bsave]
	CALL	_DFrealloc
	ADD	ESP,BYTE 08H
	MOV	DWORD [_Bsave],EAX
;
; Line 982:	lrc = rc;
;
	PUSH	ESI
	PUSH	EDI
	LEA	EDI,[EBP-010H]
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 983:	RectBottom(lrc) = RectTop(lrc);
;
	MOV	EAX,DWORD [EBP-0CH]
	MOV	DWORD [EBP-04H],EAX
;
; Line 984:	getvideo(lrc, Bsave);
;
	PUSH	DWORD [_Bsave]
	PUSH	DWORD [EBP-010H+0CH]
	PUSH	DWORD [EBP-010H+08H]
	PUSH	DWORD [EBP-010H+04H]
	PUSH	DWORD [EBP-010H+00H]
	CALL	_getvideo
	ADD	ESP,BYTE 014H
;
; Line 985:	RectTop(lrc) = RectBottom(lrc) = RectBottom(rc);
;
	MOV	EAX,DWORD [ESI+0CH]
	MOV	DWORD [EBP-04H],EAX
	MOV	DWORD [EBP-0CH],EAX
;
; Line 986:	getvideo(lrc, Bsave + Bwd);
;
	MOV	EAX,DWORD [_Bwd]
	SHL	EAX,01H
	ADD	EAX,DWORD [_Bsave]
	PUSH	EAX
	PUSH	DWORD [EBP-010H+0CH]
	PUSH	DWORD [EBP-010H+08H]
	PUSH	DWORD [EBP-010H+04H]
	PUSH	DWORD [EBP-010H+00H]
	CALL	_getvideo
	ADD	ESP,BYTE 014H
;
; Line 987:	cp = Bsave + Bwd * 2;
;
	MOV	EAX,DWORD [_Bwd]
	SHL	EAX,01H
	SHL	EAX,01H
	ADD	EAX,DWORD [_Bsave]
	MOV	EDI,EAX
	MOV	EBX,01H
	JMP	SHORT	L_333
L_331:
;
; Line 989:	*cp++ = GetVideoChar(RectLeft(rc),RectTop(rc)+i);
;
	MOV	EAX,DWORD [ESI+04H]
	ADD	EAX,EBX
	PUSH	EAX
	PUSH	DWORD [ESI+00H]
	CALL	_GetVideoChar
	ADD	ESP,BYTE 08H
	MOV	ECX,EDI
	ADD	EDI,BYTE 02H
	MOV	WORD [ECX+00H],AX
;
; Line 990:	*cp++ = GetVideoChar(RectRight(rc),RectTop(rc)+i);
;
	MOV	EAX,DWORD [ESI+04H]
	ADD	EAX,EBX
	PUSH	EAX
	PUSH	DWORD [ESI+08H]
	CALL	_GetVideoChar
	ADD	ESP,BYTE 08H
	MOV	ECX,EDI
	ADD	EDI,BYTE 02H
	MOV	WORD [ECX+00H],AX
;
; Line 988:	for (i = 1; i < Bht-1; i++)    {
;
L_332:
	INC	EBX
L_333:
	MOV	EAX,EBX
	MOV	ECX,DWORD [_Bht]
	DEC	ECX
	CMP	EAX,ECX
	JL	SHORT	L_331
L_334:
;
; Line 992:	}
;
L_329:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 994:	static void RestoreBorder(RECT rc)
;
_RestoreBorder:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 010H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP-010H]
L_336:
;
; Line 995:	{
;
;
; Line 996:	if (Bsave != NULL)    {
;
	MOV	EAX,DWORD [_Bsave]
	TEST	EAX,EAX
	JE	NEAR	L_337
;
; Line 1000:	lrc = rc;
;
	LEA	EAX,[ESI+00H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP+08H]
	MOV	EDI,EAX
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 1001:	RectBottom(lrc) = RectTop(lrc);
;
	MOV	EAX,DWORD [ESI+04H]
	MOV	DWORD [ESI+0CH],EAX
;
; Line 1002:	storevideo(lrc, Bsave);
;
	PUSH	DWORD [_Bsave]
	PUSH	DWORD [ESI+00H+0CH]
	PUSH	DWORD [ESI+00H+08H]
	PUSH	DWORD [ESI+00H+04H]
	PUSH	DWORD [ESI+00H+00H]
	CALL	_storevideo
	ADD	ESP,BYTE 014H
;
; Line 1003:	RectTop(lrc) = RectBottom(lrc) = RectBottom(rc);
;
	MOV	EAX,DWORD [EBP+014H]
	MOV	DWORD [ESI+0CH],EAX
	MOV	DWORD [ESI+04H],EAX
;
; Line 1004:	storevideo(lrc, Bsave + Bwd);
;
	MOV	EAX,DWORD [_Bwd]
	SHL	EAX,01H
	ADD	EAX,DWORD [_Bsave]
	PUSH	EAX
	PUSH	DWORD [ESI+00H+0CH]
	PUSH	DWORD [ESI+00H+08H]
	PUSH	DWORD [ESI+00H+04H]
	PUSH	DWORD [ESI+00H+00H]
	CALL	_storevideo
	ADD	ESP,BYTE 014H
;
; Line 1005:	cp = Bsave + Bwd * 2;
;
	MOV	EAX,DWORD [_Bwd]
	SHL	EAX,01H
	SHL	EAX,01H
	ADD	EAX,DWORD [_Bsave]
	MOV	EDI,EAX
	MOV	EBX,01H
	JMP	SHORT	L_341
L_339:
;
; Line 1007:	PutVideoChar(RectLeft(rc),RectTop(rc)+i, *cp++);
;
	MOV	EAX,EDI
	ADD	EDI,BYTE 02H
	MOVSX	EAX,WORD [EAX+00H]
	PUSH	EAX
	MOV	EAX,DWORD [EBP+0CH]
	ADD	EAX,EBX
	PUSH	EAX
	PUSH	DWORD [EBP+08H]
	CALL	_PutVideoChar
	ADD	ESP,BYTE 0CH
;
; Line 1008:	PutVideoChar(RectRight(rc),RectTop(rc)+i, *cp++);
;
	MOV	EAX,EDI
	ADD	EDI,BYTE 02H
	MOVSX	EAX,WORD [EAX+00H]
	PUSH	EAX
	MOV	EAX,DWORD [EBP+0CH]
	ADD	EAX,EBX
	PUSH	EAX
	PUSH	DWORD [EBP+010H]
	CALL	_PutVideoChar
	ADD	ESP,BYTE 0CH
;
; Line 1006:	for (i = 1; i < Bht-1; i++)    {
;
L_340:
	INC	EBX
L_341:
	MOV	EAX,EBX
	MOV	ECX,DWORD [_Bht]
	DEC	ECX
	CMP	EAX,ECX
	JL	SHORT	L_339
L_342:
;
; Line 1010:	free(Bsave);
;
	PUSH	DWORD [_Bsave]
	CALL	_free
	POP	ECX
;
; Line 1011:	Bsave = NULL;
;
	MOV	DWORD [_Bsave],00H
L_337:
;
; Line 1013:	}
;
L_335:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 1015:	static BOOL InsideWindow(WINDOW wnd, int x, int y)
;
_InsideWindow:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 024H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+010H]
L_344:
;
; Line 1016:	{
;
;
; Line 1018:	rc = WindowRect(wnd);
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	LEA	EDI,[EBP-010H]
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 1019:	if (!TestAttribute(wnd, NOCLIP))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0800H
	JNE	SHORT	L_345
;
; Line 1020:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EBX,DWORD [ESI+03CH]
	JMP	SHORT	L_347
L_349:
;
; Line 1022:	rc = subRectangle(rc, ClientRect(pwnd));
;
	PUSH	EBX
	LEA	EAX,[EBP-024H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	PUSH	DWORD [EAX+00H+0CH]
	PUSH	DWORD [EAX+00H+08H]
	PUSH	DWORD [EAX+00H+04H]
	PUSH	DWORD [EAX+00H+00H]
	PUSH	DWORD [EBP-010H+0CH]
	PUSH	DWORD [EBP-010H+08H]
	PUSH	DWORD [EBP-010H+04H]
	PUSH	DWORD [EBP-010H+00H]
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_subRectangle
	ADD	ESP,BYTE 024H
;
; Line 1023:	pwnd = GetParent(pwnd);
;
	MOV	EBX,DWORD [EBX+03CH]
L_347:
;
; Line 1021:	while (pwnd != NULL)    {
;
	MOV	EAX,EBX
	TEST	EAX,EAX
	JNE	SHORT	L_349
L_348:
L_345:
;
; Line 1026:	return InsideRect(x, y, rc);
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-010H]
	JL	SHORT	L_351
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-08H]
	JG	SHORT	L_351
	MOV	EAX,EDI
	CMP	EAX,DWORD [EBP-0CH]
	JL	SHORT	L_352
	MOV	EAX,EDI
	CMP	EAX,DWORD [EBP-04H]
	JLE	SHORT	L_350
L_352:
L_351:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_350:
	SUB	EAX,EAX
	INC	EAX
	NOP
; end TEST EAX,IMMED
L_343:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_isDerivedFrom]
;
; Line 1029:	BOOL isDerivedFrom(WINDOW wnd, CLASS Class)
;
_isDerivedFrom:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
L_354:
;
; Line 1030:	{
;
;
; Line 1031:	CLASS tclass = GetClass(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EBX,DWORD [EAX+00H]
	JMP	SHORT	L_355
L_357:
;
; Line 1033:	if (tclass == Class)
;
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP+0CH]
	JNE	SHORT	L_358
;
; Line 1034:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_353
L_358:
;
; Line 1035:	tclass = (classdefs[tclass].base);
;
	MOV	EAX,EBX
	IMUL	EAX,BYTE 0CH
	MOV	EBX,DWORD [EAX+00H+_classdefs]
L_355:
;
; Line 1032:	while (tclass != -1)    {
;
	MOV	EAX,EBX
	CMP	EAX,BYTE 0FFFFFFFFH
	JNE	SHORT	L_357
L_356:
;
; Line 1037:	return FALSE;
;
	MOV	EAX,00H
L_353:
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_GetAncestor]
;
; Line 1041:	WINDOW GetAncestor(WINDOW wnd)
;
_GetAncestor:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_361:
;
; Line 1042:	{
;
;
; Line 1043:	if (wnd != NULL)    {
;
	MOV	EAX,ESI
	TEST	EAX,EAX
	JE	SHORT	L_362
	JMP	SHORT	L_364
L_366:
;
; Line 1045:	if (GetClass(GetParent(wnd)) == APPLICATION)
;
	MOV	EAX,DWORD [ESI+03CH]
	MOV	EAX,DWORD [EAX+00H]
	CMP	EAX,BYTE 01H
	JE	SHORT	L_365
;
; Line 1046:	break;
;
L_367:
;
; Line 1047:	wnd = GetParent(wnd);
;
	MOV	ESI,DWORD [ESI+03CH]
L_364:
;
; Line 1044:	while (GetParent(wnd) != NULL)    {
;
	MOV	EAX,DWORD [ESI+03CH]
	TEST	EAX,EAX
	JNE	SHORT	L_366
L_365:
L_362:
;
; Line 1050:	return wnd;
;
	MOV	EAX,ESI
L_360:
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_isVisible]
;
; Line 1053:	BOOL isVisible(WINDOW wnd)
;
_isVisible:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_370:
;
; Line 1054:	{
;
	JMP	SHORT	L_371
L_373:
;
; Line 1056:	if (isHidden(wnd))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 040H
	JNE	SHORT	L_374
;
; Line 1057:	return FALSE;
;
	MOV	EAX,00H
	JMP	SHORT	L_369
L_374:
;
; Line 1058:	wnd = GetParent(wnd);
;
	MOV	ESI,DWORD [ESI+03CH]
L_371:
;
; Line 1055:	while (wnd != NULL)    {
;
	MOV	EAX,ESI
	TEST	EAX,EAX
	JNE	SHORT	L_373
L_372:
;
; Line 1060:	return TRUE;
;
	MOV	EAX,01H
L_369:
	POP	ESI
	POP	EBP
	RET
;
; Line 1064:	static RECT near ClipRect(WINDOW wnd)
;
_ClipRect:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 024H
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+0CH]
	LEA	EDI,[EBP-020H]
L_377:
;
; Line 1065:	{
;
;
; Line 1067:	rc = WindowRect(wnd);
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 1068:	if (TestAttribute(wnd, SHADOW))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 01H
	JE	SHORT	L_378
;
; Line 1069:	RectBottom(rc)++;
;
	INC	DWORD [EDI+0CH]
;
; Line 1070:	RectRight(rc)++;
;
	INC	DWORD [EDI+08H]
L_378:
;
; Line 1072:	return ClipRectangle(wnd, rc);
;
	PUSH	DWORD [EDI+00H+0CH]
	PUSH	DWORD [EDI+00H+08H]
	PUSH	DWORD [EDI+00H+04H]
	PUSH	DWORD [EDI+00H+00H]
	PUSH	ESI
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_ClipRectangle
	ADD	ESP,BYTE 018H
	MOV	ECX,DWORD [EBP+08H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EAX+00H]
	LEA	EDI,[ECX+00H]
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
	MOV	EAX,DWORD [EBP+08H]
L_376:
	POP	EDI
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 1076:	static void GetVideoBuffer(WINDOW wnd)
;
_GetVideoBuffer:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 018H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	LEA	EDI,[EBP-014H]
L_381:
;
; Line 1077:	{
;
;
; Line 1082:	rc = ClipRect(wnd);
;
	PUSH	ESI
	PUSH	EDI
	CALL	_ClipRect
	ADD	ESP,BYTE 08H
;
; Line 1083:	ht = RectBottom(rc) - RectTop(rc) + 1;
;
	MOV	EAX,DWORD [EDI+0CH]
	SUB	EAX,DWORD [EDI+04H]
	INC	EAX
	MOV	DWORD [EBP-04H],EAX
;
; Line 1084:	wd = RectRight(rc) - RectLeft(rc) + 1;
;
	MOV	EAX,DWORD [EDI+08H]
	SUB	EAX,DWORD [EDI+00H]
	INC	EAX
	MOV	EBX,EAX
;
; Line 1085:	wnd->videosave = DFrealloc(wnd->videosave, (ht * wd * 2));
;
	MOV	EAX,DWORD [EBP-04H]
	IMUL	EAX,EBX
	SHL	EAX,01H
	PUSH	EAX
	PUSH	DWORD [ESI+058H]
	CALL	_DFrealloc
	ADD	ESP,BYTE 08H
	MOV	DWORD [ESI+058H],EAX
;
; Line 1086:	get_videomode();
;
	CALL	_get_videomode
;
; Line 1087:	getvideo(rc, wnd->videosave);
;
	PUSH	DWORD [ESI+058H]
	PUSH	DWORD [EDI+00H+0CH]
	PUSH	DWORD [EDI+00H+08H]
	PUSH	DWORD [EDI+00H+04H]
	PUSH	DWORD [EDI+00H+00H]
	CALL	_getvideo
	ADD	ESP,BYTE 014H
;
; Line 1088:	}
;
L_380:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 1091:	static void PutVideoBuffer(WINDOW wnd)
;
_PutVideoBuffer:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 010H
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_383:
;
; Line 1092:	{
;
;
; Line 1093:	if (wnd->videosave != NULL)    {
;
	MOV	EAX,DWORD [ESI+058H]
	TEST	EAX,EAX
	JE	SHORT	L_384
;
; Line 1095:	rc = ClipRect(wnd);
;
	PUSH	ESI
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_ClipRect
	ADD	ESP,BYTE 08H
;
; Line 1096:	get_videomode();
;
	CALL	_get_videomode
;
; Line 1097:	storevideo(rc, wnd->videosave);
;
	PUSH	DWORD [ESI+058H]
	PUSH	DWORD [EBP-010H+0CH]
	PUSH	DWORD [EBP-010H+08H]
	PUSH	DWORD [EBP-010H+04H]
	PUSH	DWORD [EBP-010H+00H]
	CALL	_storevideo
	ADD	ESP,BYTE 014H
;
; Line 1098:	free(wnd->videosave);
;
	PUSH	DWORD [ESI+058H]
	CALL	_free
	POP	ECX
;
; Line 1099:	wnd->videosave = NULL;
;
	MOV	DWORD [ESI+058H],00H
L_384:
;
; Line 1101:	}
;
L_382:
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_isAncestor]
;
; Line 1104:	BOOL isAncestor(WINDOW wnd, WINDOW awnd)
;
_isAncestor:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [EBP+08H]
L_387:
;
; Line 1105:	{
;
	JMP	SHORT	L_388
L_390:
;
; Line 1107:	if (wnd == awnd)
;
	MOV	EAX,EBX
	CMP	EAX,DWORD [EBP+0CH]
	JNE	SHORT	L_391
;
; Line 1108:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_386
L_391:
;
; Line 1109:	wnd = GetParent(wnd);
;
	MOV	EBX,DWORD [EBX+03CH]
L_388:
;
; Line 1106:	while (wnd != NULL)	{
;
	MOV	EAX,EBX
	TEST	EAX,EAX
	JNE	SHORT	L_390
L_389:
;
; Line 1111:	return FALSE;
;
	MOV	EAX,00H
L_386:
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_ChangedText]
;
; Line 1116:	void ChangedText(WINDOW wnd, BOOL s)
;
_ChangedText:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+0CH]
L_394:
;
; Line 1117:	{
;
;
; Line 1118:	if (wnd->TextChanged != s) {
;
	MOV	EAX,DWORD [ESI+0E4H]
	CMP	EAX,EDI
	JE	SHORT	L_395
;
; Line 1119:	BOOL flag = FALSE;
;
	MOV	EBX,00H
;
; Line 1120:	wnd->TextChanged = s;
;
	MOV	DWORD [ESI+0E4H],EDI
;
; Line 1121:	if (!isVisible(wnd))
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JNE	SHORT	L_397
;
; Line 1123:	flag = TRUE;
;
	MOV	EBX,01H
;
; Line 1124:	SetVisible(wnd);
;
	OR	DWORD [ESI+054H],BYTE 040H
L_397:
;
; Line 1126:	BaseWndProc(TEXTBOX, wnd, BORDER, 0, 0);  
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0AH
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+018H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+00H+_classdefs+04H]
	ADD	ESP,BYTE 010H
;
; Line 1127:	if (flag)
;
	TEST	EBX,EBX
	JE	SHORT	L_399
;
; Line 1129:	ClearVisible(wnd);
;
	AND	DWORD [ESI+054H],BYTE 0FFFFFFBFH
L_399:
L_395:
;
; Line 1132:	}
;
L_393:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
SECTION _DATA

_px	DD	0FFFFFFFFH

_py	DD	0FFFFFFFFH

_dwnd	DD	016H,00H,_NormalProc+0
	DD	0FFFFFFFFH,0FFFFFFFFH,0FFFFFFFFH,0FFFFFFFFH
	RESB	04H
	RESB	04H
	RESB	010H
	RESB	08H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
	RESB	04H
[GLOBAL	_classdefs]

_classdefs	DD	0FFFFFFFFH,_NormalProc+0,00H
	DD	00H,_ApplicationProc+0,02C0H
	DD	00H,_TextBoxProc+0,00H
	DD	02H,_ListBoxProc+0,00H
	DD	02H,_EditBoxProc+0,00H
	DD	00H,_MenuBarProc+0,0800H
	DD	00H,_TabBarProc+0,0800H
	DD	03H,_PopDownProc+0,04880H
	DD	00H,_DialogProc+0,04A03H
	DD	00H,_BoxProc+0,04000H
	DD	02H,_ButtonProc+0,01H
	DD	04H,_ComboProc+0,00H
	DD	02H,_TextProc+0,00H
	DD	02H,_RadioButtonProc+0,00H
	DD	02H,_CheckBoxProc+0,00H
	DD	03H,_SpinButtonProc+0,00H
	DD	08H,00H,04001H,08H,00H
	DD	04001H,08H,_HelpBoxProc+0
	DD	04A82H,02H,_StatusBarProc+0
	DD	0800H,04H,_EditorProc+0
	DD	00H,0FFFFFFFFH,00H,00H,0FFFFFFFFH
	DD	00H,04000H

L_76	DD	00H,00H,00H,00H
SECTION _BSS

_diff	RESB	04H

_Bsave	RESB	04H

_Bht	RESB	04H

_Bwd	RESB	04H
[GLOBAL	_WindowMoving]

_WindowMoving	RESB	04H
[GLOBAL	_WindowSizing]

_WindowSizing	RESB	04H
[GLOBAL	_HiddenWindow]

_HiddenWindow	RESB	04H
SECTION _CONST

SECTION _TEXT
[EXTERN	_ListBoxProc]
[EXTERN	_PutVideoChar]
[EXTERN	_InitWindowColors]
[EXTERN	_ClipRectangle]
[EXTERN	_DFrealloc]
[EXTERN	_ClientRect]
[EXTERN	_ReFocus]
[EXTERN	_CheckBoxProc]
[EXTERN	_inFocus]
[EXTERN	_HelpBoxProc]
[EXTERN	_ApplicationProc]
[EXTERN	_CaptureKeyboard]
[EXTERN	_get_videomode]
[EXTERN	_ClearWindow]
[EXTERN	_isEGA]
[EXTERN	_ComboProc]
[EXTERN	_ButtonProc]
[EXTERN	_RepaintBorder]
[EXTERN	_GetVideoChar]
[EXTERN	_RadioButtonProc]
[EXTERN	_AppendWindow]
[EXTERN	_TextProc]
[EXTERN	_TabBarProc]
[EXTERN	_SpinButtonProc]
[EXTERN	_BuildSystemMenu]
[EXTERN	_StatusBarProc]
[EXTERN	_RemoveWindow]
[EXTERN	_isVGA]
[EXTERN	_ClassNames]
[EXTERN	_SkipApplicationControls]
[EXTERN	_PopDownProc]
[EXTERN	_free]
[EXTERN	_TextBoxProc]
[EXTERN	_ApplicationWindow]
[EXTERN	_EditorProc]
[EXTERN	_storevideo]
[EXTERN	_getvideo]
[EXTERN	_SendMessage]
[EXTERN	_subRectangle]
[EXTERN	_DialogProc]
[EXTERN	_DisplayHelp]
[EXTERN	_PostMessage]
[EXTERN	_CaptureMouse]
[EXTERN	_BoxProc]
[EXTERN	_DisplayTitle]
[EXTERN	___seg0040]
[EXTERN	_EditBoxProc]
[EXTERN	_SetPrevFocus]
[EXTERN	_MenuBarProc]
