	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 cstartup align=4 CLASS=INITDATA USE32
	SECTION crundown align=4 CLASS=EXITDATA USE32
	SECTION cppinit  align=4 CLASS=CPPINIT USE32
	SECTION cppexit  align=4 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 022H
	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)))    {
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	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
	CMP	DWORD [ESI+058H],BYTE 00H
	JNE	SHORT	L_12
;
; Line 54:	GetVideoBuffer(wnd);
;
	PUSH	ESI
	CALL	_GetVideoBuffer
	POP	ECX
L_12:
;
; Line 55:	SetVisible(wnd);
;
	BTS	DWORD [ESI+054H],06H
;
; 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)
;
	CMP	DWORD [EDI+05CH],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)	{
;
	TEST	EDI,EDI
	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
	JMP	SHORT	L_24
L_23:
;
; Line 78:	PaintOverLappers(wnd);
;
	PUSH	ESI
	CALL	_PaintOverLappers
	POP	ECX
L_24:
;
; 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)    {
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	JNE	SHORT	L_29
	CMP	DWORD [_WindowSizing],BYTE 00H
	JE	NEAR	L_27
L_29:
;
; Line 90:	x=WindowMoving?GetLeft(&dwnd):GetRight(&dwnd);
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	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);
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	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	NEAR	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)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_50
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_48
L_50:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_49
L_48:
	MOV	EAX,019H
L_49:
	DEC	EAX
	CMP	EBX,EAX
	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,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	CMP	EDI,EAX
	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 027H
	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 029H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 119:	SendMessage(wnd, MOUSE_MOVED, x, y);
;
	PUSH	EBX
	PUSH	EDI
	PUSH	BYTE 026H
	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 036H
	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 027H
	JE	NEAR	L_76
	JG	SHORT	L_79
	CMP	EAX,BYTE 025H
	JE	SHORT	L_74
	JG	SHORT	L_80
	CMP	EAX,BYTE 024H
	JE	SHORT	L_73
	JMP	NEAR	L_71
L_80:
	CMP	EAX,BYTE 026H
	JE	NEAR	L_75
	JMP	NEAR	L_71
L_79:
	CMP	EAX,BYTE 029H
	JE	NEAR	L_78
	JG	SHORT	L_81
	CMP	EAX,BYTE 028H
	JE	NEAR	L_77
	JMP	NEAR	L_71
L_81:
	CMP	EAX,BYTE 036H
	JE	SHORT	L_72
	JMP	NEAR	L_71
L_72:
;
; Line 150:	DisplayHelp(wnd,ClassNames[GetClass(wnd)]);
;
	MOV	EAX,DWORD [ESI+00H]
	PUSH	DWORD [EAX*4+_ClassNames+00H]
	PUSH	ESI
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 151:	break;
;
	JMP	NEAR	L_70
L_73:
;
; Line 154:	SendMessage(wnd, RESTORE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 010H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 155:	break;
;
	JMP	NEAR	L_70
L_74:
;
; Line 158:	SendMessage(wnd, CAPTURE_MOUSE, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 02EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 160:	SendMessage(wnd, CAPTURE_KEYBOARD, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 016H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 162:	SendMessage(wnd, MOUSE_CURSOR,
;
	PUSH	DWORD [ESI+010H]
	PUSH	DWORD [ESI+0CH]
	PUSH	BYTE 029H
	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	NEAR	L_70
L_75:
;
; Line 168:	SendMessage(wnd, CAPTURE_MOUSE, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 02EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 170:	SendMessage(wnd, CAPTURE_KEYBOARD, TRUE,
;
	PUSH	EBX
	PUSH	BYTE 01H
	PUSH	BYTE 016H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 172:	SendMessage(wnd, MOUSE_CURSOR,
;
	PUSH	DWORD [ESI+018H]
	PUSH	DWORD [ESI+014H]
	PUSH	BYTE 029H
	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_76:
;
; Line 179:	SendMessage(wnd, MINIMIZE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0FH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 180:	break;
;
	JMP	SHORT	L_70
L_77:
;
; Line 184:	SendMessage(wnd, MAXIMIZE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 185:	break;
;
	JMP	SHORT	L_70
L_78:
;
; 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_84:
;
; Line 198:	{
;
;
; Line 199:	RECT rc = {0,0,0,0};
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD L_82
	LEA	EDI,[EBP-010H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 200:	if (p1 && wnd != NULL && inFocus != wnd)    {
;
	CMP	DWORD [EBP+0CH],BYTE 00H
	JE	NEAR	L_85
	TEST	EBX,EBX
	JE	NEAR	L_85
	CMP	DWORD [_inFocus],EBX
	JE	NEAR	L_85
;
; 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_87
L_89:
;
; Line 207:	fwnd->childfocus = cwnd;
;
	MOV	EAX,DWORD [EBP-018H]
	MOV	ECX,DWORD [EBP-01CH]
	MOV	DWORD [EAX+050H],ECX
;
; 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_87:
;
; Line 206:	while (fwnd != NULL)	{
;
	CMP	DWORD [EBP-018H],BYTE 00H
	JNE	SHORT	L_89
L_88:
;
; Line 212:	fwnd = wnd;
;
	MOV	DWORD [EBP-018H],EBX
	JMP	SHORT	L_90
L_92:
;
; 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_90:
;
; Line 213:	while (fwnd != NULL)	{
;
	CMP	DWORD [EBP-018H],BYTE 00H
	JNE	SHORT	L_92
L_91:
;
; 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	SHORT	L_93
L_95:
;
; Line 224:	thispar = wnd;
;
	MOV	DWORD [EBP-028H],EBX
	JMP	SHORT	L_96
L_98:
;
; Line 226:	if (This == CaptureMouse || This == CaptureKeyboard)	{
;
	CMP	ESI,DWORD [_CaptureMouse]
	JE	SHORT	L_101
	CMP	ESI,DWORD [_CaptureKeyboard]
	JNE	SHORT	L_99
L_101:
;
; Line 228:	that = thatpar = NULL;
;
	MOV	DWORD [EBP-020H],00H
	MOV	DWORD [EBP-024H],00H
;
; Line 229:	break;
;
	JMP	SHORT	L_97
L_99:
;
; Line 231:	if (thispar == thatpar)	{
;
	MOV	EAX,DWORD [EBP-028H]
	CMP	EAX,DWORD [EBP-020H]
	JNE	SHORT	L_102
;
; Line 233:	if (This != that && TestAttribute(that, SAVESELF))
;
	CMP	ESI,DWORD [EBP-024H]
	JE	SHORT	L_104
	MOV	EAX,DWORD [EBP-024H]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,080H
	JE	SHORT	L_104
;
; Line 234:	that = thatpar = NULL;
;
	MOV	DWORD [EBP-020H],00H
	MOV	DWORD [EBP-024H],00H
L_104:
;
; Line 235:	break;
;
	JMP	SHORT	L_97
L_102:
;
; 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_96:
;
; Line 225:	while (thispar != NULL)	{
;
	CMP	DWORD [EBP-028H],BYTE 00H
	JNE	SHORT	L_98
L_97:
;
; Line 240:	if (thispar != NULL)
;
	CMP	DWORD [EBP-028H],BYTE 00H
	JNE	SHORT	L_94
;
; Line 241:	break;
;
L_106:
;
; 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_93:
;
; Line 223:	while (thatpar != NULL)	{
;
	CMP	DWORD [EBP-020H],BYTE 00H
	JNE	SHORT	L_95
L_94:
;
; Line 245:	if (inFocus != NULL)
;
	CMP	DWORD [_inFocus],BYTE 00H
	JE	SHORT	L_108
;
; 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_108:
;
; Line 247:	inFocus = wnd;
;
	MOV	DWORD [_inFocus],EBX
;
; Line 248:	if (that != NULL && isVisible(wnd))	{
;
	CMP	DWORD [EBP-024H],BYTE 00H
	JE	NEAR	L_110
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	NEAR	L_110
;
; 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	ECX,[EBP-010H]
	PUSH	ECX
	CALL	_subRectangle
	ADD	ESP,BYTE 024H
;
; Line 250:	if (!ValidRect(rc))	{
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JNE	SHORT	L_112
	CMP	DWORD [EBP-010H],BYTE 00H
	JNE	SHORT	L_112
	CMP	DWORD [EBP-0CH],BYTE 00H
	JNE	SHORT	L_112
	CMP	DWORD [EBP-04H],BYTE 00H
	JNE	SHORT	L_112
;
; Line 251:	if (ApplicationWindow != NULL)	{
;
	CMP	DWORD [_ApplicationWindow],BYTE 00H
	JE	SHORT	L_114
;
; Line 252:	WINDOW fwnd = FirstWindow(ApplicationWindow);
;
	MOV	EAX,DWORD [_ApplicationWindow]
	MOV	EDI,DWORD [EAX+040H]
	JMP	SHORT	L_116
L_118:
;
; Line 254:	if (!isAncestor(wnd, fwnd))	{
;
	PUSH	EDI
	PUSH	EBX
	CALL	_isAncestor
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JNE	SHORT	L_119
;
; 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))
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JNE	SHORT	L_123
	CMP	DWORD [EBP-010H],BYTE 00H
	JNE	SHORT	L_123
	CMP	DWORD [EBP-0CH],BYTE 00H
	JNE	SHORT	L_123
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	SHORT	L_121
L_123:
;
; Line 257:	break;
;
	JMP	SHORT	L_117
L_121:
L_119:
;
; Line 259:	fwnd = NextWindow(fwnd);
;
	MOV	EDI,DWORD [EDI+048H]
L_116:
;
; Line 253:	while (fwnd != NULL)	{
;
	TEST	EDI,EDI
	JNE	SHORT	L_118
L_117:
L_114:
L_112:
L_110:
;
; Line 264:	if (that != NULL && !ValidRect(rc) && isVisible(wnd))
;
	CMP	DWORD [EBP-024H],BYTE 00H
	JE	SHORT	L_124
	CMP	DWORD [EBP-08H],BYTE 00H
	JNE	SHORT	L_124
	CMP	DWORD [EBP-010H],BYTE 00H
	JNE	SHORT	L_124
	CMP	DWORD [EBP-0CH],BYTE 00H
	JNE	SHORT	L_124
	CMP	DWORD [EBP-04H],BYTE 00H
	JNE	SHORT	L_124
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_124
;
; Line 265:	This = NULL;
;
	MOV	ESI,00H
L_124:
;
; Line 266:	ReFocus(wnd);
;
	PUSH	EBX
	CALL	_ReFocus
	POP	ECX
;
; Line 267:	if (This != NULL &&
;
	TEST	ESI,ESI
	JE	SHORT	L_126
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_128
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,080H
	JNE	SHORT	L_126
L_128:
;
; 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_127
L_126:
;
; Line 272:	else if (!isVisible(wnd))
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JNE	SHORT	L_129
;
; 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_130
L_129:
;
; 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_130:
L_127:
	JMP	SHORT	L_86
L_85:
;
; Line 277:	else if (!p1 && inFocus == wnd)    {
;
	CMP	DWORD [EBP+0CH],BYTE 00H
	JNE	SHORT	L_131
	CMP	DWORD [_inFocus],EBX
	JNE	SHORT	L_131
;
; 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_131:
L_86:
;
; Line 282:	}
;
L_83:
	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_134:
;
; Line 286:	{
;
;
; Line 287:	int mx = (int) p1 - GetLeft(wnd);
;
	MOV	EDI,DWORD [EBP+0CH]
	SUB	EDI,DWORD [ESI+0CH]
;
; Line 288:	int my = (int) p2 - GetTop(wnd);
;
	MOV	EBX,DWORD [EBP+010H]
	SUB	EBX,DWORD [ESI+010H]
;
; Line 289:	if (!WindowSizing && !WindowMoving)	{
;
	CMP	DWORD [_WindowSizing],BYTE 00H
	JNE	SHORT	L_135
	CMP	DWORD [_WindowMoving],BYTE 00H
	JNE	SHORT	L_135
;
; Line 290:	if (HitControlBox(wnd, mx, my))	{
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_137
	CMP	EDI,BYTE 02H
	JNE	SHORT	L_137
	TEST	EBX,EBX
	JNE	SHORT	L_137
;
; 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_137:
L_135:
;
; Line 295:	}
;
L_133:
	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_140:
;
; Line 299:	{
;
;
; Line 300:	int mx = (int) p1 - GetLeft(wnd);
;
	MOV	EBX,DWORD [EBP+0CH]
	SUB	EBX,DWORD [ESI+0CH]
;
; Line 301:	int my = (int) p2 - GetTop(wnd);
;
	MOV	EDI,DWORD [EBP+010H]
	SUB	EDI,DWORD [ESI+010H]
;
; Line 302:	if (WindowSizing || WindowMoving)
;
	CMP	DWORD [_WindowSizing],BYTE 00H
	JNE	SHORT	L_143
	CMP	DWORD [_WindowMoving],BYTE 00H
	JE	SHORT	L_141
L_143:
;
; Line 303:	return;
;
	JMP	NEAR	L_139
L_141:
;
; Line 304:	if (HitControlBox(wnd, mx, my))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_144
	CMP	EBX,BYTE 02H
	JNE	SHORT	L_144
	TEST	EDI,EDI
	JNE	SHORT	L_144
;
; Line 305:	BuildSystemMenu(wnd);
;
	PUSH	ESI
	CALL	_BuildSystemMenu
	POP	ECX
;
; Line 306:	return;
;
	JMP	NEAR	L_139
L_144:
;
; Line 308:	if (my == 0 && mx > -1 && mx < WindowWidth(wnd))  {
;
	TEST	EDI,EDI
	JNE	NEAR	L_146
	CMP	EBX,BYTE 0FFFFFFFFH
	JLE	NEAR	L_146
	CMP	EBX,DWORD [ESI+020H]
	JGE	NEAR	L_146
;
; Line 310:	if (TestAttribute(wnd, MINMAXBOX) &&
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0400H
	JE	SHORT	L_148
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_148
;
; Line 312:	if (mx == WindowWidth(wnd)-2)    {
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 02H
	CMP	EBX,EAX
	JNE	SHORT	L_150
;
; Line 313:	if (wnd->condition != ISRESTORED)
;
	CMP	DWORD [ESI+05CH],BYTE 00H
	JE	SHORT	L_152
;
; Line 315:	SendMessage(wnd, RESTORE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 010H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_153
L_152:
;
; Line 319:	SendMessage(wnd, MAXIMIZE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_153:
;
; Line 321:	return;
;
	JMP	NEAR	L_139
L_150:
;
; Line 324:	if (mx == WindowWidth(wnd)-3)    {
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 03H
	CMP	EBX,EAX
	JNE	SHORT	L_154
;
; Line 326:	if (wnd->condition != ISMINIMIZED)
;
	CMP	DWORD [ESI+05CH],BYTE 01H
	JE	SHORT	L_156
;
; Line 327:	SendMessage(wnd, MINIMIZE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0FH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_156:
;
; Line 328:	return;
;
	JMP	NEAR	L_139
L_154:
L_148:
;
; Line 333:	if (wnd->condition == ISMAXIMIZED)
;
	CMP	DWORD [ESI+05CH],BYTE 02H
	JE	NEAR	L_139
;
; Line 334:	return;
;
L_158:
;
; Line 336:	if (TestAttribute(wnd, MOVEABLE))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 02H
	JE	SHORT	L_160
;
; 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 02EH
	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_160:
;
; Line 345:	return;
;
	JMP	SHORT	L_139
L_146:
;
; Line 347:	if (mx == WindowWidth(wnd)-1 &&
;
	MOV	EAX,DWORD [ESI+020H]
	DEC	EAX
	CMP	EBX,EAX
	JNE	SHORT	L_162
	MOV	EAX,DWORD [ESI+01CH]
	DEC	EAX
	CMP	EDI,EAX
	JNE	SHORT	L_162
;
; Line 351:	if (wnd->condition == ISMINIMIZED)
;
	CMP	DWORD [ESI+05CH],BYTE 01H
	JE	SHORT	L_139
;
; Line 352:	return;
;
L_164:
;
; Line 354:	if (!TestAttribute(wnd, SIZEABLE))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 04H
	JE	SHORT	L_139
;
; Line 355:	return;
;
L_166:
;
; Line 357:	if (wnd->condition == ISMAXIMIZED)    {
;
	CMP	DWORD [ESI+05CH],BYTE 02H
	JNE	SHORT	L_168
;
; Line 358:	if (GetParent(wnd) == NULL)
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	JE	SHORT	L_139
;
; Line 359:	return;
;
L_170:
;
; Line 360:	if (TestAttribute(GetParent(wnd),HASBORDER))
;
	MOV	EAX,DWORD [ESI+03CH]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,04000H
	JNE	SHORT	L_139
;
; Line 361:	return;
;
L_172:
;
; Line 364:	wnd = GetParent(wnd);
;
	MOV	ESI,DWORD [ESI+03CH]
;
; Line 365:	if (!TestAttribute(wnd, SIZEABLE))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 04H
	JE	SHORT	L_139
;
; Line 366:	return;
;
L_174:
L_168:
;
; Line 369:	WindowSizing = TRUE;
;
	MOV	DWORD [_WindowSizing],01H
;
; Line 370:	SendMessage(wnd, CAPTURE_MOUSE,
;
	PUSH	DWORD _dwnd
	PUSH	BYTE 01H
	PUSH	BYTE 02EH
	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_162:
;
; Line 374:	}
;
L_139:
	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_177:
;
; Line 378:	{
;
;
; Line 379:	if (WindowMoving)    {
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	JE	NEAR	L_178
;
; 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_182
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_180
L_182:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_181
L_180:
	MOV	EAX,019H
L_181:
	SUB	EAX,BYTE 02H
	MOV	DWORD [EBP-08H],EAX
;
; Line 382:	rightmost = SCREENWIDTH-2;
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	SUB	EAX,BYTE 02H
	MOV	DWORD [EBP-04H],EAX
;
; Line 383:	int x = (int) p1 - diff;
;
	MOV	EDI,DWORD [EBP+0CH]
	SUB	EDI,DWORD [_diff]
;
; Line 384:	int y = (int) p2;
;
	MOV	EBX,DWORD [EBP+010H]
;
; Line 385:	if (GetParent(wnd) != NULL &&
;
	MOV	EAX,DWORD [EBP+08H]
	CMP	DWORD [EAX+03CH],BYTE 00H
	JE	NEAR	L_183
	MOV	EAX,DWORD [EBP+08H]
	MOV	EAX,DWORD [EAX+054H]
	AND	EAX,0800H
	JNE	NEAR	L_183
;
; 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_185
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_185
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_185
	MOV	EAX,03H
	JMP	SHORT	L_186
L_185:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_190
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_189
L_190:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_187
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_187
L_189:
	MOV	EAX,02H
	JMP	SHORT	L_188
L_187:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_191
	MOV	EAX,01H
	JMP	SHORT	L_192
L_191:
	MOV	EAX,00H
L_192:
L_188:
L_186:
	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_193
	MOV	EAX,01H
	JMP	SHORT	L_194
L_193:
	MOV	EAX,00H
L_194:
	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_195
	MOV	EAX,01H
	JMP	SHORT	L_196
L_195:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_197
	MOV	EAX,01H
	JMP	SHORT	L_198
L_197:
	MOV	EAX,00H
L_198:
L_196:
	MOV	ECX,DWORD [ESI+018H]
	SUB	ECX,EAX
	MOV	DWORD [EBP-08H],ECX
;
; Line 391:	rightmost  = GetClientRight(wnd1);
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_199
	MOV	EAX,01H
	JMP	SHORT	L_200
L_199:
	MOV	EAX,00H
L_200:
	MOV	ECX,DWORD [ESI+014H]
	SUB	ECX,EAX
	MOV	DWORD [EBP-04H],ECX
L_183:
;
; Line 393:	if (x < leftmost || x > rightmost ||
;
	CMP	EDI,DWORD [EBP-010H]
	JL	SHORT	L_203
	CMP	EDI,DWORD [EBP-04H]
	JG	SHORT	L_203
	CMP	EBX,DWORD [EBP-0CH]
	JL	SHORT	L_203
	CMP	EBX,DWORD [EBP-08H]
	JLE	SHORT	L_201
L_203:
;
; Line 395:	x = max(x, leftmost);
;
	CMP	EDI,DWORD [EBP-010H]
	JLE	SHORT	L_204
	MOV	EAX,EDI
	JMP	SHORT	L_205
L_204:
	MOV	EAX,DWORD [EBP-010H]
L_205:
	MOV	EDI,EAX
;
; Line 396:	x = min(x, rightmost);
;
	CMP	EDI,DWORD [EBP-04H]
	JGE	SHORT	L_206
	MOV	EAX,EDI
	JMP	SHORT	L_207
L_206:
	MOV	EAX,DWORD [EBP-04H]
L_207:
	MOV	EDI,EAX
;
; Line 397:	y = max(y, topmost);
;
	CMP	EBX,DWORD [EBP-0CH]
	JLE	SHORT	L_208
	MOV	EAX,EBX
	JMP	SHORT	L_209
L_208:
	MOV	EAX,DWORD [EBP-0CH]
L_209:
	MOV	EBX,EAX
;
; Line 398:	y = min(y, bottommost);
;
	CMP	EBX,DWORD [EBP-08H]
	JGE	SHORT	L_210
	MOV	EAX,EBX
	JMP	SHORT	L_211
L_210:
	MOV	EAX,DWORD [EBP-08H]
L_211:
	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 029H
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_201:
;
; Line 401:	if (x != px || y != py)    {
;
	CMP	EDI,DWORD [_px]
	JNE	SHORT	L_214
	CMP	EBX,DWORD [_py]
	JE	SHORT	L_212
L_214:
;
; 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_212:
;
; Line 406:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_176
L_178:
;
; Line 408:	if (WindowSizing)    {
;
	CMP	DWORD [_WindowSizing],BYTE 00H
	JE	SHORT	L_215
;
; 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_176
L_215:
;
; Line 412:	return FALSE;
;
	MOV	EAX,00H
L_176:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 417:	static void MaximizeMsg(WINDOW wnd)
;
_MaximizeMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 024H
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	LEA	EDI,[EBP-020H]
L_219:
;
; Line 418:	{
;
;
; Line 419:	RECT rc = {0, 0, 0, 0};
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD L_217
	PUSH	ES
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	ES
	POP	EDI
	POP	ESI
;
; Line 421:	holdrc = wnd->RestoredRC;
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 024H
	LEA	EDI,[EBP-010H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 422:	rc.rt = SCREENWIDTH-1;
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	MOV	DWORD [SS:EDI+08H],EAX
;
; Line 423:	rc.bt = SCREENHEIGHT-1;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_222
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_220
L_222:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_221
L_220:
	MOV	EAX,019H
L_221:
	DEC	EAX
	MOV	DWORD [SS:EDI+0CH],EAX
;
; Line 424:	if (GetParent(wnd))
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	JE	SHORT	L_223
;
; Line 425:	rc = ClientRect(GetParent(wnd));
;
	PUSH	DWORD [ESI+03CH]
	PUSH	EDI
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
L_223:
;
; Line 426:	wnd->oldcondition = wnd->condition;
;
	MOV	EAX,DWORD [ESI+05CH]
	MOV	DWORD [ESI+060H],EAX
;
; Line 427:	wnd->condition = ISMAXIMIZED;
;
	MOV	DWORD [ESI+05CH],02H
;
; Line 428:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 429:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 430:	SendMessage(wnd, MOVE,
;
	PUSH	DWORD [SS:EDI+04H]
	PUSH	DWORD [SS:EDI+00H]
	PUSH	BYTE 0CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 432:	SendMessage(wnd, SIZE,
;
	PUSH	DWORD [SS:EDI+0CH]
	PUSH	DWORD [SS:EDI+08H]
	PUSH	BYTE 0DH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 434:	if (wnd->restored_attrib == 0)
;
	CMP	DWORD [ESI+068H],BYTE 00H
	JNE	SHORT	L_225
;
; Line 435:	wnd->restored_attrib = wnd->attrib;
;
	MOV	EAX,DWORD [ESI+054H]
	MOV	DWORD [ESI+068H],EAX
L_225:
;
; Line 436:	ClearAttribute(wnd, SHADOW);
;
	AND	DWORD [ESI+054H],BYTE 0FFFFFFFEH
;
; Line 437:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 438:	wnd->RestoredRC = holdrc;
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP-010H]
	MOV	EDI,EAX
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 439:	}
;
L_218:
	POP	EDI
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 444:	static void MinimizeMsg(WINDOW wnd)
;
_MinimizeMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 024H
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	LEA	EDI,[EBP-020H]
L_228:
;
; Line 445:	{
;
;
; Line 449:	holdrc = wnd->RestoredRC;
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 024H
	LEA	EDI,[EBP-010H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 450:	rc = PositionIcon(wnd);
;
	PUSH	ESI
	PUSH	EDI
	CALL	_PositionIcon
	ADD	ESP,BYTE 08H
;
; Line 451:	wnd->oldcondition = wnd->condition;
;
	MOV	EAX,DWORD [ESI+05CH]
	MOV	DWORD [ESI+060H],EAX
;
; Line 452:	wnd->condition = ISMINIMIZED;
;
	MOV	DWORD [ESI+05CH],01H
;
; Line 453:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 454:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 455:	SendMessage(wnd, MOVE,
;
	PUSH	DWORD [SS:EDI+04H]
	PUSH	DWORD [SS:EDI+00H]
	PUSH	BYTE 0CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 457:	SendMessage(wnd, SIZE,
;
	PUSH	DWORD [SS:EDI+0CH]
	PUSH	DWORD [SS:EDI+08H]
	PUSH	BYTE 0DH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 459:	if (wnd == inFocus)
;
	CMP	ESI,DWORD [_inFocus]
	JNE	SHORT	L_229
;
; Line 460:	SetNextFocus();
;
	CALL	_SetNextFocus
L_229:
;
; Line 461:	if (wnd->restored_attrib == 0)
;
	CMP	DWORD [ESI+068H],BYTE 00H
	JNE	SHORT	L_231
;
; Line 462:	wnd->restored_attrib = wnd->attrib;
;
	MOV	EAX,DWORD [ESI+054H]
	MOV	DWORD [ESI+068H],EAX
L_231:
;
; Line 465:	ClearAttribute(wnd,         SHADOW | SIZEABLE | HASMENUBAR | HASTABBAR |         VSCROLLBAR | HSCROLLBAR);
;
	AND	DWORD [ESI+054H],0FFFEFFC2H
;
; Line 466:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 467:	wnd->RestoredRC = holdrc;
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP-010H]
	MOV	EDI,EAX
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 468:	}
;
L_227:
	POP	EDI
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 473:	static void RestoreMsg(WINDOW wnd)
;
_RestoreMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_234:
;
; Line 474:	{
;
;
; Line 476:	holdrc = wnd->RestoredRC;
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 024H
	LEA	EDI,[EBP-010H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 477:	wnd->oldcondition = wnd->condition;
;
	MOV	EAX,DWORD [ESI+05CH]
	MOV	DWORD [ESI+060H],EAX
;
; Line 478:	wnd->condition = ISRESTORED;
;
	MOV	DWORD [ESI+05CH],00H
;
; Line 479:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 480:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 481:	wnd->attrib = wnd->restored_attrib;
;
	MOV	EAX,DWORD [ESI+068H]
	MOV	DWORD [ESI+054H],EAX
;
; Line 482:	wnd->restored_attrib = 0;
;
	MOV	DWORD [ESI+068H],00H
;
; Line 483:	SendMessage(wnd, MOVE, wnd->RestoredRC.lf,
;
	PUSH	DWORD [ESI+028H]
	PUSH	DWORD [ESI+024H]
	PUSH	BYTE 0CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 485:	wnd->RestoredRC = holdrc;
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP-010H]
	MOV	EDI,EAX
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 486:	SendMessage(wnd, SIZE, wnd->RestoredRC.rt,
;
	PUSH	DWORD [ESI+030H]
	PUSH	DWORD [ESI+02CH]
	PUSH	BYTE 0DH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 488:	if (wnd != inFocus)
;
	CMP	ESI,DWORD [_inFocus]
	JE	SHORT	L_235
;
; Line 489:	SendMessage(wnd, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_236
L_235:
;
; Line 491:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_236:
;
; Line 492:	}
;
L_233:
	POP	ESI
	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_238:
;
; 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 [EBP+0CH]
	SUB	EAX,DWORD [ESI+0CH]
	MOV	DWORD [EBP-04H],EAX
;
; Line 501:	int ydif = (int) p2 - wnd->rc.tp;
;
	MOV	EBX,DWORD [EBP+010H]
	SUB	EBX,DWORD [ESI+010H]
;
; Line 503:	if (xdif == 0 && ydif == 0)
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JNE	SHORT	L_239
	TEST	EBX,EBX
	JE	NEAR	L_237
;
; Line 504:	return;
;
L_239:
;
; Line 505:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 506:	if (wasVisible)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JE	SHORT	L_241
;
; 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_241:
;
; 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)
;
	CMP	DWORD [ESI+05CH],BYTE 00H
	JNE	SHORT	L_243
;
; Line 513:	wnd->RestoredRC = wnd->rc;
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	MOV	EDI,EAX
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
L_243:
;
; Line 515:	cwnd = FirstWindow(wnd);
;
	MOV	EDI,DWORD [ESI+040H]
	JMP	SHORT	L_245
L_247:
;
; 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_245:
;
; Line 516:	while (cwnd != NULL)	{
;
	TEST	EDI,EDI
	JNE	SHORT	L_247
L_246:
;
; Line 520:	if (wasVisible)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JE	SHORT	L_248
;
; 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_248:
;
; Line 522:	}
;
L_237:
	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 01CH
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_251:
;
; 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 [EBP+0CH]
	SUB	EAX,DWORD [ESI+014H]
	MOV	DWORD [EBP-08H],EAX
;
; Line 531:	int ydif = (int) p2 - wnd->rc.bt;
;
	MOV	EAX,DWORD [EBP+010H]
	SUB	EAX,DWORD [ESI+018H]
	MOV	DWORD [EBP-04H],EAX
;
; Line 533:	if (xdif == 0 && ydif == 0)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JNE	SHORT	L_252
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	NEAR	L_250
;
; Line 534:	return;
;
L_252:
;
; Line 535:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 536:	if (wasVisible)
;
	TEST	EBX,EBX
	JE	SHORT	L_254
;
; 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_254:
;
; 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	EAX,DWORD [EBP+010H]
	MOV	DWORD [ESI+018H],EAX
;
; 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)
;
	CMP	DWORD [ESI+05CH],BYTE 00H
	JNE	SHORT	L_256
;
; Line 544:	wnd->RestoredRC = WindowRect(wnd);
;
	LEA	EAX,[ESI+024H]
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	MOV	EDI,EAX
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
L_256:
;
; Line 547:	rc = ClientRect(wnd);
;
	PUSH	ESI
	LEA	EAX,[EBP-018H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
;
; Line 549:	cwnd = FirstWindow(wnd);
;
	MOV	EDI,DWORD [ESI+040H]
	JMP	SHORT	L_258
L_260:
;
; Line 551:	if (cwnd->condition == ISMAXIMIZED)
;
	CMP	DWORD [EDI+05CH],BYTE 02H
	JNE	SHORT	L_261
;
; Line 552:	SendMessage(cwnd, SIZE, RectRight(rc), RectBottom(rc));
;
	PUSH	DWORD [EBP-0CH]
	PUSH	DWORD [EBP-010H]
	PUSH	BYTE 0DH
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_261:
;
; Line 553:	cwnd = NextWindow(cwnd);
;
	MOV	EDI,DWORD [EDI+048H]
L_258:
;
; Line 550:	while (cwnd != NULL)	{
;
	TEST	EDI,EDI
	JNE	SHORT	L_260
L_259:
;
; Line 557:	if (wasVisible)
;
	TEST	EBX,EBX
	JE	SHORT	L_263
;
; 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_263:
;
; Line 559:	}
;
L_250:
	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_266:
;
; 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_267
L_269:
;
; Line 572:	if (inFocus == cwnd)
;
	CMP	DWORD [EDI+00H],EBX
	JNE	SHORT	L_270
;
; Line 573:	inFocus = wnd;
;
	MOV	DWORD [EDI+00H],ESI
L_270:
;
; 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_267:
;
; Line 571:	while (cwnd != NULL)	{
;
	TEST	EBX,EBX
	JNE	SHORT	L_269
L_268:
;
; Line 579:	if (wnd->PrevClock != NULL)
;
	CMP	DWORD [ESI+07CH],BYTE 00H
	JE	SHORT	L_272
;
; Line 580:	SendMessage(wnd, RELEASE_CLOCK, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 014H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_272:
;
; Line 581:	if (wnd->PrevMouse != NULL)
;
	CMP	DWORD [ESI+074H],BYTE 00H
	JE	SHORT	L_274
;
; Line 582:	SendMessage(wnd, RELEASE_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02FH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_274:
;
; Line 583:	if (wnd->PrevKeyboard != NULL)
;
	CMP	DWORD [ESI+078H],BYTE 00H
	JE	SHORT	L_276
;
; Line 584:	SendMessage(wnd, RELEASE_KEYBOARD, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 017H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_276:
;
; Line 587:	if (wnd == inFocus)
;
	CMP	ESI,DWORD [EDI+00H]
	JNE	SHORT	L_278
;
; Line 588:	SetPrevFocus();
;
	CALL	_SetPrevFocus
L_278:
;
; Line 590:	if (wnd->title != NULL)
;
	CMP	DWORD [ESI+04H],BYTE 00H
	JE	SHORT	L_280
;
; Line 591:	free(wnd->title);
;
	PUSH	DWORD [ESI+04H]
	CALL	_free
	POP	ECX
L_280:
;
; Line 592:	if (wnd->videosave != NULL)
;
	CMP	DWORD [ESI+058H],BYTE 00H
	JE	SHORT	L_282
;
; Line 593:	free(wnd->videosave);
;
	PUSH	DWORD [ESI+058H]
	CALL	_free
	POP	ECX
L_282:
;
; Line 595:	RemoveWindow(wnd);
;
	PUSH	ESI
	CALL	_RemoveWindow
	POP	ECX
;
; Line 596:	if (wnd == inFocus)
;
	CMP	ESI,DWORD [EDI+00H]
	JNE	SHORT	L_284
;
; Line 597:	inFocus = NULL;
;
	MOV	DWORD [EDI+00H],00H
L_284:
;
; Line 598:	free(wnd);
;
	PUSH	ESI
	CALL	_free
	POP	ECX
;
; Line 599:	}
;
L_265:
	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	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+010H]
	MOV	EDI,DWORD _dwnd
L_287:
;
; Line 603:	{
;
;
; Line 604:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 0FH
	JE	NEAR	L_307
	JA	NEAR	L_312
	CMP	EAX,BYTE 08H
	JE	NEAR	L_301
	JA	SHORT	L_313
	CMP	EAX,BYTE 05H
	JE	NEAR	L_291
	JA	SHORT	L_314
	CMP	EAX,BYTE 03H
	JE	NEAR	L_290
	JA	NEAR	L_289
	CMP	EAX,BYTE 02H
	JE	NEAR	L_300
	JMP	NEAR	L_289
L_314:
	CMP	EAX,BYTE 07H
	JE	NEAR	L_311
	JA	NEAR	L_289
	CMP	EAX,BYTE 06H
	JE	NEAR	L_292
	JMP	NEAR	L_289
L_313:
	CMP	EAX,BYTE 0CH
	JE	NEAR	L_309
	JA	SHORT	L_315
	CMP	EAX,BYTE 0AH
	JE	NEAR	L_299
	JA	NEAR	L_289
	CMP	EAX,BYTE 09H
	JE	NEAR	L_298
	JMP	NEAR	L_289
L_315:
	CMP	EAX,BYTE 0EH
	JE	NEAR	L_306
	JA	NEAR	L_289
	CMP	EAX,BYTE 0DH
	JE	NEAR	L_310
	JMP	NEAR	L_289
L_312:
	CMP	EAX,BYTE 025H
	JE	NEAR	L_302
	JA	SHORT	L_316
	CMP	EAX,BYTE 015H
	JE	NEAR	L_295
	JA	SHORT	L_317
	CMP	EAX,BYTE 011H
	JE	NEAR	L_294
	JA	NEAR	L_289
	CMP	EAX,BYTE 010H
	JE	NEAR	L_308
	JMP	NEAR	L_289
L_317:
	CMP	EAX,BYTE 024H
	JE	NEAR	L_303
	JA	NEAR	L_289
	CMP	EAX,BYTE 01EH
	JE	NEAR	L_297
	JMP	NEAR	L_289
L_316:
	CMP	EAX,BYTE 04CH
	JE	SHORT	L_293
	JA	SHORT	L_318
	CMP	EAX,BYTE 027H
	JE	NEAR	L_305
	JA	NEAR	L_289
	CMP	EAX,BYTE 026H
	JE	NEAR	L_304
	JMP	NEAR	L_289
L_318:
	CMP	EAX,BYTE 04DH
	JE	SHORT	L_296
	JMP	NEAR	L_289
L_290:
;
; Line 606:	CreateWindowMsg(wnd);
;
	PUSH	ESI
	CALL	_CreateWindowMsg
	POP	ECX
;
; Line 607:	break;
;
	JMP	NEAR	L_288
L_291:
;
; Line 609:	ShowWindowMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_ShowWindowMsg
	ADD	ESP,BYTE 0CH
;
; Line 610:	break;
;
	JMP	NEAR	L_288
L_292:
;
; Line 612:	HideWindowMsg(wnd);
;
	PUSH	ESI
	CALL	_HideWindowMsg
	POP	ECX
;
; Line 613:	break;
;
	JMP	NEAR	L_288
L_293:
;
; Line 615:	return DisplayHelp(wnd, (char *)p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
	JMP	NEAR	L_286
L_294:
;
; Line 617:	return InsideWindow(wnd, (int) p1, (int) p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_InsideWindow
	ADD	ESP,BYTE 0CH
	JMP	NEAR	L_286
L_295:
;
; Line 619:	if (KeyboardMsg(wnd, p1, p2))
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_KeyboardMsg
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_319
;
; Line 620:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_286
L_319:
;
; Line 622:	case ADDSTATUS:
;
L_296:
;
; Line 623:	case SHIFT_CHANGED:
;
L_297:
;
; Line 624:	if (GetParent(wnd) != NULL)
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	JE	SHORT	L_321
;
; Line 625:	PostMessage(GetParent(wnd), msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	DWORD [ESI+03CH]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_321:
;
; Line 626:	break;
;
	JMP	NEAR	L_288
L_298:
;
; Line 628:	if (isVisible(wnd))	{
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_323
;
; Line 630:	if (wnd->wasCleared)
;
	CMP	DWORD [ESI+064H],BYTE 00H
	JE	SHORT	L_325
;
; Line 631:	PaintUnderLappers(wnd);
;
	PUSH	ESI
	CALL	_PaintUnderLappers
	POP	ECX
	JMP	SHORT	L_326
L_325:
;
; Line 635:	wnd->wasCleared = TRUE;
;
	MOV	DWORD [ESI+064H],01H
;
; Line 636:	ClearWindow(wnd, (RECT *)p1, ' ');
;
	PUSH	BYTE 020H
	PUSH	EBX
	PUSH	ESI
	CALL	_ClearWindow
	ADD	ESP,BYTE 0CH
L_326:
L_323:
;
; Line 639:	break;
;
	JMP	NEAR	L_288
L_299:
;
; Line 641:	if (isVisible(wnd))    {
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_327
;
; Line 642:	if (TestAttribute(wnd, HASBORDER))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_329
;
; Line 643:	RepaintBorder(wnd, (RECT *)p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_RepaintBorder
	ADD	ESP,BYTE 08H
	JMP	SHORT	L_330
L_329:
;
; Line 644:	else if (TestAttribute(wnd, HASTITLEBAR))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_331
;
; Line 645:	DisplayTitle(wnd, (RECT *)p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_DisplayTitle
	ADD	ESP,BYTE 08H
L_331:
L_330:
L_327:
;
; Line 647:	break;
;
	JMP	NEAR	L_288
L_300:
;
; Line 649:	CommandMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_CommandMsg
	ADD	ESP,BYTE 08H
;
; Line 650:	break;
;
	JMP	NEAR	L_288
L_301:
;
; Line 652:	SetFocusMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_SetFocusMsg
	ADD	ESP,BYTE 08H
;
; Line 653:	break;
;
	JMP	NEAR	L_288
L_302:
;
; Line 655:	DoubleClickMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_DoubleClickMsg
	ADD	ESP,BYTE 0CH
;
; Line 656:	break;
;
	JMP	NEAR	L_288
L_303:
;
; Line 658:	LeftButtonMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_LeftButtonMsg
	ADD	ESP,BYTE 0CH
;
; Line 659:	break;
;
	JMP	NEAR	L_288
L_304:
;
; Line 661:	if (MouseMovedMsg(wnd, p1, p2))
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_MouseMovedMsg
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_333
;
; Line 662:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_286
L_333:
;
; Line 663:	break;
;
	JMP	NEAR	L_288
L_305:
;
; Line 665:	if (WindowMoving || WindowSizing)    {
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	JNE	SHORT	L_337
	CMP	DWORD [_WindowSizing],BYTE 00H
	JE	SHORT	L_335
L_337:
;
; Line 666:	if (WindowMoving)
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	JE	SHORT	L_338
;
; Line 667:	PostMessage(wnd,MOVE,dwnd.rc.lf,dwnd.rc.tp);
;
	PUSH	DWORD [EDI+010H]
	PUSH	DWORD [EDI+0CH]
	PUSH	BYTE 0CH
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_339
L_338:
;
; Line 669:	PostMessage(wnd,SIZE,dwnd.rc.rt,dwnd.rc.bt);
;
	PUSH	DWORD [EDI+018H]
	PUSH	DWORD [EDI+014H]
	PUSH	BYTE 0DH
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_339:
;
; Line 670:	TerminateMoveSize();
;
	CALL	_TerminateMoveSize
L_335:
;
; Line 672:	break;
;
	JMP	SHORT	L_288
L_306:
;
; Line 675:	if (wnd->condition != ISMAXIMIZED)
;
	CMP	DWORD [ESI+05CH],BYTE 02H
	JE	SHORT	L_340
;
; Line 676:	MaximizeMsg(wnd);
;
	PUSH	ESI
	CALL	_MaximizeMsg
	POP	ECX
L_340:
;
; Line 677:	break;
;
	JMP	SHORT	L_288
L_307:
;
; Line 681:	if (wnd->condition != ISMINIMIZED)
;
	CMP	DWORD [ESI+05CH],BYTE 01H
	JE	SHORT	L_342
;
; Line 682:	MinimizeMsg(wnd);
;
	PUSH	ESI
	CALL	_MinimizeMsg
	POP	ECX
L_342:
;
; Line 683:	break;
;
	JMP	SHORT	L_288
L_308:
;
; Line 687:	if (wnd->condition != ISRESTORED)    {
;
	CMP	DWORD [ESI+05CH],BYTE 00H
	JE	SHORT	L_344
;
; Line 689:	if (wnd->oldcondition == ISMAXIMIZED)
;
	CMP	DWORD [ESI+060H],BYTE 02H
	JNE	SHORT	L_346
;
; Line 690:	SendMessage(wnd, MAXIMIZE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_347
L_346:
;
; Line 693:	RestoreMsg(wnd);
;
	PUSH	ESI
	CALL	_RestoreMsg
	POP	ECX
L_347:
L_344:
;
; Line 695:	break;
;
	JMP	SHORT	L_288
L_309:
;
; Line 698:	MoveMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_MoveMsg
	ADD	ESP,BYTE 0CH
;
; Line 699:	break;
;
	JMP	SHORT	L_288
L_310:
;
; Line 701:	SizeMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_SizeMsg
	ADD	ESP,BYTE 0CH
;
; Line 702:	break;
;
	JMP	SHORT	L_288
L_311:
;
; Line 705:	CloseWindowMsg(wnd);
;
	PUSH	ESI
	CALL	_CloseWindowMsg
	POP	ECX
;
; Line 706:	break;
;
	JMP	SHORT	L_288
L_289:
;
; Line 708:	break;
;
	JMP	SHORT	L_288
L_288:
;
; Line 710:	return TRUE;
;
	MOV	EAX,01H
L_286:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 714:	static RECT LowerRight(RECT prc)
;
_LowerRight:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	ESI
	LEA	ESI,[EBP-010H]
L_349:
;
; Line 715:	{
;
;
; Line 717:	RectLeft(rc) = RectRight(prc) - ICONWIDTH;
;
	MOV	EAX,DWORD [EBP+014H]
	SUB	EAX,BYTE 0AH
	MOV	DWORD [SS:ESI+00H],EAX
;
; Line 718:	RectTop(rc) = RectBottom(prc) - ICONHEIGHT;
;
	MOV	EAX,DWORD [EBP+018H]
	SUB	EAX,BYTE 03H
	MOV	DWORD [SS:ESI+04H],EAX
;
; Line 719:	RectRight(rc) = RectLeft(rc)+ICONWIDTH-1;
;
	MOV	EAX,DWORD [SS:ESI+00H]
	ADD	EAX,BYTE 09H
	MOV	DWORD [SS:ESI+08H],EAX
;
; Line 720:	RectBottom(rc) = RectTop(rc)+ICONHEIGHT-1;
;
	MOV	EAX,DWORD [SS:ESI+04H]
	ADD	EAX,BYTE 02H
	MOV	DWORD [SS:ESI+0CH],EAX
;
; Line 721:	return rc;
;
	MOV	EAX,DWORD [EBP+08H]
	PUSH	ESI
	PUSH	EDI
	LEA	EDI,[EAX+00H]
	PUSH	DS
	PUSH	SS
	PUSH	SS
	POP	ES
	POP	DS
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	DS
	POP	EDI
	POP	ESI
	MOV	EAX,DWORD [EBP+08H]
L_348:
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 724:	static RECT PositionIcon(WINDOW wnd)
;
_PositionIcon:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 044H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	LEA	EDI,[EBP-010H]
L_351:
;
; Line 725:	{
;
;
; Line 726:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	EBX,DWORD [EAX+03CH]
;
; Line 728:	RectLeft(rc) = SCREENWIDTH-ICONWIDTH;
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	SUB	EAX,BYTE 0AH
	MOV	DWORD [SS:EDI+00H],EAX
;
; Line 729:	RectTop(rc) = SCREENHEIGHT-ICONHEIGHT;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_354
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_352
L_354:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_353
L_352:
	MOV	EAX,019H
L_353:
	SUB	EAX,BYTE 03H
	MOV	DWORD [SS:EDI+04H],EAX
;
; Line 730:	RectRight(rc) = SCREENWIDTH-1;
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	MOV	DWORD [SS:EDI+08H],EAX
;
; Line 731:	RectBottom(rc) = SCREENHEIGHT-1;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_357
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_355
L_357:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_356
L_355:
	MOV	EAX,019H
L_356:
	DEC	EAX
	MOV	DWORD [SS:EDI+0CH],EAX
;
; Line 732:	if (pwnd != NULL)    {
;
	TEST	EBX,EBX
	JE	NEAR	L_358
;
; Line 733:	RECT prc = WindowRect(pwnd);
;
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBX+0CH]
	LEA	EDI,[EBP-024H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 734:	WINDOW cwnd = FirstWindow(pwnd);
;
	MOV	ESI,DWORD [EBX+040H]
;
; Line 735:	rc = LowerRight(prc);
;
	PUSH	DWORD [EBP-024H+0CH]
	PUSH	DWORD [EBP-024H+08H]
	PUSH	DWORD [EBP-024H+04H]
	PUSH	DWORD [EBP-024H+00H]
	PUSH	EDI
	CALL	_LowerRight
	ADD	ESP,BYTE 014H
	JMP	NEAR	L_360
L_362:
;
; Line 738:	if (cwnd->condition == ISMINIMIZED)    {
;
	CMP	DWORD [ESI+05CH],BYTE 01H
	JNE	NEAR	L_363
;
; Line 740:	rc1 = WindowRect(cwnd);
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	LEA	EDI,[EBP-034H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
;
; Line 741:	if (RectLeft(rc1) == RectLeft(rc) &&
;
	MOV	EAX,DWORD [EBP-034H]
	CMP	EAX,DWORD [SS:EDI+00H]
	JNE	SHORT	L_365
	MOV	EAX,DWORD [EBP-030H]
	CMP	EAX,DWORD [SS:EDI+04H]
	JNE	SHORT	L_365
;
; Line 743:	RectLeft(rc) -= ICONWIDTH;
;
	SUB	DWORD [SS:EDI+00H],BYTE 0AH
;
; Line 744:	RectRight(rc) -= ICONWIDTH;
;
	SUB	DWORD [SS:EDI+08H],BYTE 0AH
;
; Line 745:	if (RectLeft(rc) < RectLeft(prc)+1)   {
;
	MOV	EAX,DWORD [EBP-024H]
	INC	EAX
	CMP	DWORD [SS:EDI+00H],EAX
	JGE	SHORT	L_367
;
; Line 746:	RectLeft(rc) =
;
	MOV	EAX,DWORD [EBP-01CH]
	SUB	EAX,BYTE 0AH
	MOV	DWORD [SS:EDI+00H],EAX
;
; Line 748:	RectRight(rc) =
;
	MOV	EAX,DWORD [SS:EDI+00H]
	ADD	EAX,BYTE 09H
	MOV	DWORD [SS:EDI+08H],EAX
;
; Line 750:	RectTop(rc) -= ICONHEIGHT;
;
	SUB	DWORD [SS:EDI+04H],BYTE 03H
;
; Line 751:	RectBottom(rc) -= ICONHEIGHT;
;
	SUB	DWORD [SS:EDI+0CH],BYTE 03H
;
; Line 752:	if (RectTop(rc) < RectTop(prc)+1)
;
	MOV	EAX,DWORD [EBP-020H]
	INC	EAX
	CMP	DWORD [SS:EDI+04H],EAX
	JGE	SHORT	L_369
;
; Line 753:	return LowerRight(prc);
;
	PUSH	DWORD [EBP-024H+0CH]
	PUSH	DWORD [EBP-024H+08H]
	PUSH	DWORD [EBP-024H+04H]
	PUSH	DWORD [EBP-024H+00H]
	LEA	EAX,[EBP-044H]
	PUSH	EAX
	CALL	_LowerRight
	ADD	ESP,BYTE 014H
	MOV	ECX,EAX
	MOV	EAX,DWORD [EBP+08H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[ECX+00H]
	LEA	EDI,[EAX+00H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
	MOV	EAX,DWORD [EBP+08H]
	JMP	SHORT	L_350
L_369:
L_367:
;
; Line 755:	break;
;
	JMP	SHORT	L_361
L_365:
L_363:
;
; Line 758:	cwnd = NextWindow(cwnd);
;
	MOV	ESI,DWORD [ESI+048H]
L_360:
;
; Line 737:	while (cwnd != NULL)	{
;
	TEST	ESI,ESI
	JNE	NEAR	L_362
L_361:
L_358:
;
; Line 761:	return rc;
;
	MOV	EAX,DWORD [EBP+08H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EDI+00H]
	LEA	EDI,[EAX+00H]
	PUSH	DS
	PUSH	SS
	PUSH	SS
	POP	ES
	POP	DS
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	DS
	POP	EDI
	POP	ESI
	MOV	EAX,DWORD [EBP+08H]
L_350:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 765:	static void TerminateMoveSize(void)
;
_TerminateMoveSize:
	PUSH	EBX
	MOV	EBX,DWORD _dwnd
L_372:
;
; 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 02FH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 770:	SendMessage(&dwnd, RELEASE_KEYBOARD, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 017H
	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_371:
	POP	EBX
	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_374:
;
; 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 [ESI+0CH]
	ADD	EAX,DWORD [EDI+020H]
	DEC	EAX
	MOV	DWORD [ESI+014H],EAX
;
; Line 782:	dwnd.rc.bt = dwnd.rc.tp+WindowHeight(wnd)-1;
;
	MOV	EAX,DWORD [ESI+010H]
	ADD	EAX,DWORD [EDI+01CH]
	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_373:
	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_376:
;
; 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_379
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_377
L_379:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_378
L_377:
	MOV	EAX,019H
L_378:
	DEC	EAX
	MOV	DWORD [EBP-08H],EAX
;
; Line 797:	int rightmost  = SCREENWIDTH-1;
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	MOV	DWORD [EBP-04H],EAX
;
; Line 798:	if (GetParent(wnd))    {
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	JE	NEAR	L_380
;
; Line 800:	bottommost = min(bottommost,             GetClientBottom(GetParent(wnd)));
;
	MOV	EAX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,08000H
	JE	SHORT	L_384
	MOV	ECX,01H
	JMP	SHORT	L_385
L_384:
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,04000H
	JE	SHORT	L_386
	MOV	ECX,01H
	JMP	SHORT	L_387
L_386:
	MOV	ECX,00H
L_387:
L_385:
	MOV	EAX,DWORD [EAX+018H]
	SUB	EAX,ECX
	CMP	DWORD [EBP-08H],EAX
	JGE	SHORT	L_382
	MOV	EAX,DWORD [EBP-08H]
	JMP	SHORT	L_383
L_382:
	MOV	EAX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,08000H
	JE	SHORT	L_388
	MOV	ECX,01H
	JMP	SHORT	L_389
L_388:
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,04000H
	JE	SHORT	L_390
	MOV	ECX,01H
	JMP	SHORT	L_391
L_390:
	MOV	ECX,00H
L_391:
L_389:
	MOV	EAX,DWORD [EAX+018H]
	SUB	EAX,ECX
L_383:
	MOV	DWORD [EBP-08H],EAX
;
; Line 802:	rightmost  = min(rightmost,             GetClientRight(GetParent(wnd)));
;
	MOV	EAX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,04000H
	JE	SHORT	L_394
	MOV	ECX,01H
	JMP	SHORT	L_395
L_394:
	MOV	ECX,00H
L_395:
	MOV	EAX,DWORD [EAX+014H]
	SUB	EAX,ECX
	CMP	DWORD [EBP-04H],EAX
	JGE	SHORT	L_392
	MOV	EAX,DWORD [EBP-04H]
	JMP	SHORT	L_393
L_392:
	MOV	EAX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ESI+03CH]
	MOV	ECX,DWORD [ECX+054H]
	AND	ECX,04000H
	JE	SHORT	L_396
	MOV	ECX,01H
	JMP	SHORT	L_397
L_396:
	MOV	ECX,00H
L_397:
	MOV	EAX,DWORD [EAX+014H]
	SUB	EAX,ECX
L_393:
	MOV	DWORD [EBP-04H],EAX
L_380:
;
; Line 804:	rt = min(rt, rightmost);
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-04H]
	JGE	SHORT	L_398
	MOV	EAX,DWORD [EBP+0CH]
	JMP	SHORT	L_399
L_398:
	MOV	EAX,DWORD [EBP-04H]
L_399:
	MOV	DWORD [EBP+0CH],EAX
;
; Line 805:	bt = min(bt, bottommost);
;
	CMP	EBX,DWORD [EBP-08H]
	JGE	SHORT	L_400
	MOV	EAX,EBX
	JMP	SHORT	L_401
L_400:
	MOV	EAX,DWORD [EBP-08H]
L_401:
	MOV	EBX,EAX
;
; Line 806:	rt = max(rt, leftmost);
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-010H]
	JLE	SHORT	L_402
	MOV	EAX,DWORD [EBP+0CH]
	JMP	SHORT	L_403
L_402:
	MOV	EAX,DWORD [EBP-010H]
L_403:
	MOV	DWORD [EBP+0CH],EAX
;
; Line 807:	bt = max(bt, topmost);
;
	CMP	EBX,DWORD [EBP-0CH]
	JLE	SHORT	L_404
	MOV	EAX,EBX
	JMP	SHORT	L_405
L_404:
	MOV	EAX,DWORD [EBP-0CH]
L_405:
	MOV	EBX,EAX
;
; Line 808:	SendMessage(NULL, MOUSE_CURSOR, rt, bt);
;
	PUSH	EBX
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 029H
	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_408
	CMP	EBX,DWORD [_py]
	JE	SHORT	L_406
L_408:
;
; 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_406:
;
; Line 814:	dwnd.ht = bt-dwnd.rc.tp+1;
;
	MOV	EAX,EBX
	SUB	EAX,DWORD [EDI+010H]
	INC	EAX
	MOV	DWORD [EDI+01CH],EAX
;
; Line 815:	dwnd.wd = rt-dwnd.rc.lf+1;
;
	MOV	EAX,DWORD [EBP+0CH]
	SUB	EAX,DWORD [EDI+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_411
	CMP	EBX,DWORD [_py]
	JE	SHORT	L_409
L_411:
;
; 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_409:
;
; Line 824:	}
;
L_375:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 827:	static RECT adjShadow(WINDOW wnd)
;
_adjShadow:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP-010H]
	MOV	EDI,DWORD [EBP+0CH]
L_413:
;
; Line 828:	{
;
;
; Line 830:	rc = wnd->rc;
;
	LEA	EAX,[ESI+00H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EDI+0CH]
	MOV	EDI,EAX
	PUSH	ES
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	ES
	POP	EDI
	POP	ESI
;
; Line 831:	if (TestAttribute(wnd, SHADOW))    {
;
	MOV	EAX,DWORD [EDI+054H]
	AND	EAX,BYTE 01H
	JE	SHORT	L_414
;
; Line 832:	if (RectRight(rc) < SCREENWIDTH-1)
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	CMP	DWORD [SS:ESI+08H],EAX
	JGE	SHORT	L_416
;
; Line 833:	RectRight(rc)++;
;
	INC	DWORD [SS:ESI+08H]
L_416:
;
; Line 834:	if (RectBottom(rc) < SCREENHEIGHT-1)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_422
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_420
L_422:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_421
L_420:
	MOV	EAX,019H
L_421:
	DEC	EAX
	CMP	DWORD [SS:ESI+0CH],EAX
	JGE	SHORT	L_418
;
; Line 835:	RectBottom(rc)++;
;
	INC	DWORD [SS:ESI+0CH]
L_418:
L_414:
;
; Line 837:	return rc;
;
	MOV	EAX,DWORD [EBP+08H]
	PUSH	ESI
	PUSH	EDI
	LEA	EDI,[EAX+00H]
	PUSH	DS
	PUSH	SS
	PUSH	SS
	POP	ES
	POP	DS
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	DS
	POP	EDI
	POP	ESI
	MOV	EAX,DWORD [EBP+08H]
L_412:
	POP	EDI
	POP	ESI
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 840:	static void near PaintOverLap(WINDOW wnd, RECT rc)
;
_PaintOverLap:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	LEA	EDI,[EBP+0CH]
L_424:
;
; Line 841:	{
;
;
; Line 842:	if (isVisible(wnd))    {
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	NEAR	L_425
;
; Line 844:	isBorder = isTitle = FALSE;
;
	MOV	DWORD [EBP-08H],00H
	MOV	EBX,00H
;
; Line 845:	isData = TRUE;
;
	MOV	DWORD [EBP-04H],01H
;
; Line 846:	if (TestAttribute(wnd, HASBORDER))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_427
;
; Line 847:	isBorder =  RectLeft(rc) == 0 &&
;
	CMP	DWORD [SS:EDI+00H],BYTE 00H
	JNE	SHORT	L_430
	MOV	EAX,DWORD [SS:EDI+04H]
	CMP	EAX,DWORD [ESI+01CH]
	JL	SHORT	L_429
L_430:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_429:
	SUB	EAX,EAX
	INC	EAX
	NOP
	MOV	EBX,EAX
;
; Line 849:	isBorder |= RectLeft(rc) < WindowWidth(wnd) &&
;
	MOV	EAX,DWORD [SS:EDI+00H]
	CMP	EAX,DWORD [ESI+020H]
	JGE	SHORT	L_432
	MOV	EAX,DWORD [ESI+020H]
	DEC	EAX
	CMP	DWORD [SS:EDI+08H],EAX
	JL	SHORT	L_432
	MOV	EAX,DWORD [SS:EDI+04H]
	CMP	EAX,DWORD [ESI+01CH]
	JL	SHORT	L_431
L_432:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_431:
	SUB	EAX,EAX
	INC	EAX
	NOP
	OR	EBX,EAX
;
; Line 852:	isBorder |= RectTop(rc) == 0 &&
;
	CMP	DWORD [SS:EDI+04H],BYTE 00H
	JNE	SHORT	L_434
	MOV	EAX,DWORD [SS:EDI+00H]
	CMP	EAX,DWORD [ESI+020H]
	JL	SHORT	L_433
L_434:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_433:
	SUB	EAX,EAX
	INC	EAX
	NOP
	OR	EBX,EAX
;
; Line 854:	isBorder |= RectTop(rc) < WindowHeight(wnd) &&
;
	MOV	EAX,DWORD [SS:EDI+04H]
	CMP	EAX,DWORD [ESI+01CH]
	JGE	SHORT	L_436
	MOV	EAX,DWORD [ESI+01CH]
	DEC	EAX
	CMP	DWORD [SS:EDI+0CH],EAX
	JL	SHORT	L_436
	MOV	EAX,DWORD [SS:EDI+00H]
	CMP	EAX,DWORD [ESI+020H]
	JL	SHORT	L_435
L_436:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_435:
	SUB	EAX,EAX
	INC	EAX
	NOP
	OR	EBX,EAX
	JMP	SHORT	L_428
L_427:
;
; Line 858:	else if (TestAttribute(wnd, HASTITLEBAR))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_437
;
; Line 859:	isTitle = RectTop(rc) == 0 &&
;
	CMP	DWORD [SS:EDI+04H],BYTE 00H
	JNE	SHORT	L_440
	CMP	DWORD [SS:EDI+08H],BYTE 00H
	JLE	SHORT	L_440
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_441
	MOV	EAX,01H
	JMP	SHORT	L_442
L_441:
	MOV	EAX,00H
L_442:
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	CMP	DWORD [SS:EDI+00H],ECX
	JL	SHORT	L_439
L_440:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_439:
	SUB	EAX,EAX
	INC	EAX
	NOP
	MOV	DWORD [EBP-08H],EAX
L_437:
L_428:
;
; Line 863:	if (RectLeft(rc) >= WindowWidth(wnd)-BorderAdj(wnd))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_445
	MOV	EAX,01H
	JMP	SHORT	L_446
L_445:
	MOV	EAX,00H
L_446:
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	CMP	DWORD [SS:EDI+00H],ECX
	JL	SHORT	L_443
;
; Line 864:	isData = FALSE;
;
	MOV	DWORD [EBP-04H],00H
L_443:
;
; Line 865:	if (RectTop(rc) >= WindowHeight(wnd)-BottomBorderAdj(wnd))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_449
	MOV	EAX,01H
	JMP	SHORT	L_450
L_449:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_451
	MOV	EAX,01H
	JMP	SHORT	L_452
L_451:
	MOV	EAX,00H
L_452:
L_450:
	MOV	ECX,DWORD [ESI+01CH]
	SUB	ECX,EAX
	CMP	DWORD [SS:EDI+04H],ECX
	JL	SHORT	L_447
;
; Line 866:	isData = FALSE;
;
	MOV	DWORD [EBP-04H],00H
L_447:
;
; Line 867:	if (TestAttribute(wnd, HASBORDER))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_453
;
; Line 868:	if (RectRight(rc) == 0)
;
	CMP	DWORD [SS:EDI+08H],BYTE 00H
	JNE	SHORT	L_455
;
; Line 869:	isData = FALSE;
;
	MOV	DWORD [EBP-04H],00H
L_455:
;
; Line 870:	if (RectBottom(rc) == 0)
;
	CMP	DWORD [SS:EDI+0CH],BYTE 00H
	JNE	SHORT	L_457
;
; Line 871:	isData = FALSE;
;
	MOV	DWORD [EBP-04H],00H
L_457:
L_453:
;
; Line 873:	if (TestAttribute(wnd, SHADOW))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 01H
	JE	SHORT	L_459
;
; Line 874:	isBorder |= RectRight(rc) == WindowWidth(wnd) ||
;
	MOV	EAX,DWORD [SS:EDI+08H]
	CMP	EAX,DWORD [ESI+020H]
	JE	SHORT	L_461
	MOV	EAX,DWORD [SS:EDI+0CH]
	CMP	EAX,DWORD [ESI+01CH]
	JE	SHORT	L_461
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_461:
	SUB	EAX,EAX
	INC	EAX
	NOP
	OR	EBX,EAX
L_459:
;
; Line 876:	if (isData)	{
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	SHORT	L_462
;
; Line 877:	wnd->wasCleared = FALSE;
;
	MOV	DWORD [ESI+064H],00H
;
; Line 878:	SendMessage(wnd, PAINT, (PARAM) &rc, TRUE);
;
	PUSH	BYTE 01H
	PUSH	EDI
	PUSH	BYTE 09H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_462:
;
; Line 880:	if (isBorder)
;
	TEST	EBX,EBX
	JE	SHORT	L_464
;
; Line 881:	SendMessage(wnd, BORDER, (PARAM) &rc, 0);
;
	PUSH	BYTE 00H
	PUSH	EDI
	PUSH	BYTE 0AH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_465
L_464:
;
; Line 882:	else if (isTitle)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JE	SHORT	L_466
;
; Line 883:	DisplayTitle(wnd, &rc);
;
	PUSH	EDI
	PUSH	ESI
	CALL	_DisplayTitle
	ADD	ESP,BYTE 08H
L_466:
L_465:
L_425:
;
; Line 885:	}
;
L_423:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 888:	static void PaintOver(WINDOW wnd)
;
_PaintOver:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 034H
	PUSH	EBX
	PUSH	ESI
	LEA	ESI,[EBP-020H]
	MOV	EBX,DWORD [EBP+08H]
L_469:
;
; Line 889:	{
;
;
; Line 891:	wrc = adjShadow(HiddenWindow);
;
	PUSH	DWORD [_HiddenWindow]
	LEA	EAX,[EBP-030H]
	PUSH	EAX
	CALL	_adjShadow
	ADD	ESP,BYTE 08H
;
; Line 892:	rc = adjShadow(wnd);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_adjShadow
	ADD	ESP,BYTE 08H
;
; Line 893:	rc = subRectangle(rc, wrc);
;
	PUSH	DWORD [EBP-030H+0CH]
	PUSH	DWORD [EBP-030H+08H]
	PUSH	DWORD [EBP-030H+04H]
	PUSH	DWORD [EBP-030H+00H]
	PUSH	DWORD [SS:ESI+00H+0CH]
	PUSH	DWORD [SS:ESI+00H+08H]
	PUSH	DWORD [SS:ESI+00H+04H]
	PUSH	DWORD [SS:ESI+00H+00H]
	PUSH	ESI
	CALL	_subRectangle
	ADD	ESP,BYTE 024H
;
; Line 894:	if (ValidRect(rc))
;
	CMP	DWORD [SS:ESI+08H],BYTE 00H
	JNE	SHORT	L_472
	CMP	DWORD [SS:ESI+00H],BYTE 00H
	JNE	SHORT	L_472
	CMP	DWORD [SS:ESI+04H],BYTE 00H
	JNE	SHORT	L_472
	CMP	DWORD [SS:ESI+0CH],BYTE 00H
	JE	SHORT	L_470
L_472:
;
; Line 895:	PaintOverLap(wnd, RelativeWindowRect(wnd, rc));
;
	PUSH	DWORD [SS:ESI+00H+0CH]
	PUSH	DWORD [SS:ESI+00H+08H]
	PUSH	DWORD [SS:ESI+00H+04H]
	PUSH	DWORD [SS:ESI+00H+00H]
	PUSH	EBX
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_RelativeWindowRect
	ADD	ESP,BYTE 018H
	PUSH	DWORD [EAX+00H+0CH]
	PUSH	DWORD [EAX+00H+08H]
	PUSH	DWORD [EAX+00H+04H]
	PUSH	DWORD [EAX+00H+00H]
	PUSH	EBX
	CALL	_PaintOverLap
	ADD	ESP,BYTE 014H
L_470:
;
; Line 896:	}
;
L_468:
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 898:	static void PaintOverChildren(WINDOW pwnd)
;
_PaintOverChildren:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
L_474:
;
; Line 899:	{
;
;
; Line 900:	WINDOW cwnd = FirstWindow(pwnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EBX,DWORD [EAX+040H]
	JMP	SHORT	L_475
L_477:
;
; Line 902:	if (cwnd != HiddenWindow)    {
;
	CMP	EBX,DWORD [_HiddenWindow]
	JE	SHORT	L_478
;
; Line 903:	PaintOver(cwnd);
;
	PUSH	EBX
	CALL	_PaintOver
	POP	ECX
;
; Line 904:	PaintOverChildren(cwnd);
;
	PUSH	EBX
	CALL	_PaintOverChildren
	POP	ECX
L_478:
;
; Line 906:	cwnd = NextWindow(cwnd);
;
	MOV	EBX,DWORD [EBX+048H]
L_475:
;
; Line 901:	while (cwnd != NULL)    {
;
	TEST	EBX,EBX
	JNE	SHORT	L_477
L_476:
;
; Line 908:	}
;
L_473:
	POP	EBX
	POP	EBP
	RET
;
; Line 910:	static void PaintOverParents(WINDOW wnd)
;
_PaintOverParents:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
L_481:
;
; Line 911:	{
;
;
; Line 912:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EBX,DWORD [EAX+03CH]
;
; Line 913:	if (pwnd != NULL)    {
;
	TEST	EBX,EBX
	JE	SHORT	L_482
;
; Line 914:	PaintOverParents(pwnd);
;
	PUSH	EBX
	CALL	_PaintOverParents
	POP	ECX
;
; Line 915:	PaintOver(pwnd);
;
	PUSH	EBX
	CALL	_PaintOver
	POP	ECX
;
; Line 916:	PaintOverChildren(pwnd);
;
	PUSH	EBX
	CALL	_PaintOverChildren
	POP	ECX
L_482:
;
; Line 918:	}
;
L_480:
	POP	EBX
	POP	EBP
	RET
;
; Line 920:	static void near PaintOverLappers(WINDOW wnd)
;
_PaintOverLappers:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [EBP+08H]
L_485:
;
; Line 921:	{
;
;
; Line 922:	HiddenWindow = wnd;
;
	MOV	DWORD [_HiddenWindow],EBX
;
; Line 923:	PaintOverParents(wnd);
;
	PUSH	EBX
	CALL	_PaintOverParents
	POP	ECX
;
; Line 924:	}
;
L_484:
	POP	EBX
	POP	EBP
	RET
;
; Line 926:	static void near PaintUnderLappers(WINDOW wnd)
;
_PaintUnderLappers:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD _HiddenWindow
L_487:
;
; Line 927:	{
;
;
; Line 928:	WINDOW hwnd = NextWindow(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EBX,DWORD [EAX+048H]
	JMP	SHORT	L_488
L_490:
;
; Line 931:	WINDOW pwnd = GetParent(hwnd);
;
	MOV	ESI,DWORD [EBX+03CH]
;
; Line 934:	if (isVisible(hwnd) && hwnd != wnd)    {
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_491
	CMP	EBX,DWORD [EBP+08H]
	JE	SHORT	L_491
	JMP	SHORT	L_493
L_495:
;
; Line 937:	if (pwnd == wnd)
;
	CMP	ESI,DWORD [EBP+08H]
	JE	SHORT	L_494
;
; Line 938:	break;
;
L_496:
;
; Line 939:	pwnd = GetParent(pwnd);
;
	MOV	ESI,DWORD [ESI+03CH]
L_493:
;
; Line 936:	while (pwnd != NULL)    {
;
	TEST	ESI,ESI
	JNE	SHORT	L_495
L_494:
;
; Line 942:	if (pwnd == NULL)    {
;
	TEST	ESI,ESI
	JNE	SHORT	L_498
;
; Line 944:	pwnd = GetParent(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EAX+03CH]
	JMP	SHORT	L_500
L_502:
;
; Line 946:	if (pwnd == hwnd)
;
	CMP	ESI,EBX
	JE	SHORT	L_501
;
; Line 947:	break;
;
L_503:
;
; Line 948:	pwnd = GetParent(pwnd);
;
	MOV	ESI,DWORD [ESI+03CH]
L_500:
;
; Line 945:	while (pwnd != NULL)    {
;
	TEST	ESI,ESI
	JNE	SHORT	L_502
L_501:
;
; Line 951:	if (pwnd == NULL)    {
;
	TEST	ESI,ESI
	JNE	SHORT	L_505
;
; Line 952:	HiddenWindow = GetAncestor(hwnd);
;
	PUSH	EBX
	CALL	_GetAncestor
	POP	ECX
	MOV	DWORD [EDI+00H],EAX
;
; Line 953:	ClearVisible(HiddenWindow);
;
	MOV	EAX,DWORD [EDI+00H]
	AND	DWORD [EAX+054H],BYTE 0FFFFFFBFH
;
; Line 954:	PaintOver(wnd);
;
	PUSH	DWORD [EBP+08H]
	CALL	_PaintOver
	POP	ECX
;
; Line 955:	SetVisible(HiddenWindow);
;
	MOV	EAX,DWORD [EDI+00H]
	BTS	DWORD [EAX+054H],06H
L_505:
L_498:
L_491:
;
; Line 960:	hwnd = NextWindow(hwnd);
;
	MOV	EBX,DWORD [EBX+048H]
L_488:
;
; Line 929:	while (hwnd != NULL)    {
;
	TEST	EBX,EBX
	JNE	SHORT	L_490
L_489:
;
; Line 964:	hwnd = FirstWindow(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EBX,DWORD [EAX+040H]
	JMP	SHORT	L_507
L_509:
;
; Line 966:	PaintUnderLappers(hwnd);
;
	PUSH	EBX
	CALL	_PaintUnderLappers
	POP	ECX
;
; Line 967:	hwnd = NextWindow(hwnd);
;
	MOV	EBX,DWORD [EBX+048H]
L_507:
;
; Line 965:	while (hwnd != NULL)    {
;
	TEST	EBX,EBX
	JNE	SHORT	L_509
L_508:
;
; Line 969:	}
;
L_486:
	POP	EDI
	POP	ESI
	POP	EBX
	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_511:
;
; Line 974:	{
;
;
; Line 978:	Bht = RectBottom(rc) - RectTop(rc) + 1;
;
	MOV	EAX,DWORD [SS:ESI+0CH]
	SUB	EAX,DWORD [SS:ESI+04H]
	INC	EAX
	MOV	DWORD [_Bht],EAX
;
; Line 979:	Bwd = RectRight(rc) - RectLeft(rc) + 1;
;
	MOV	EAX,DWORD [SS:ESI+08H]
	SUB	EAX,DWORD [SS: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]
	PUSH	DS
	PUSH	SS
	PUSH	SS
	POP	ES
	POP	DS
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	DS
	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 [SS: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	EDI,DWORD [_Bwd]
	SHL	EDI,02H
	ADD	EDI,DWORD [_Bsave]
	MOV	EBX,01H
	JMP	SHORT	L_514
L_512:
;
; Line 989:	*cp++ = GetVideoChar(RectLeft(rc),RectTop(rc)+i);
;
	MOV	EAX,DWORD [SS:ESI+04H]
	ADD	EAX,EBX
	PUSH	EAX
	PUSH	DWORD [SS: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 [SS:ESI+04H]
	ADD	EAX,EBX
	PUSH	EAX
	PUSH	DWORD [SS: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_513:
	INC	EBX
L_514:
	MOV	EAX,DWORD [_Bht]
	DEC	EAX
	CMP	EBX,EAX
	JL	SHORT	L_512
L_515:
;
; Line 992:	}
;
L_510:
	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_517:
;
; Line 995:	{
;
;
; Line 996:	if (Bsave != NULL)    {
;
	CMP	DWORD [_Bsave],BYTE 00H
	JE	NEAR	L_518
;
; Line 1000:	lrc = rc;
;
	LEA	EAX,[ESI+00H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP+08H]
	MOV	EDI,EAX
	PUSH	ES
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	ES
	POP	EDI
	POP	ESI
;
; Line 1001:	RectBottom(lrc) = RectTop(lrc);
;
	MOV	EAX,DWORD [SS:ESI+04H]
	MOV	DWORD [SS:ESI+0CH],EAX
;
; Line 1002:	storevideo(lrc, Bsave);
;
	PUSH	DWORD [_Bsave]
	PUSH	DWORD [SS:ESI+00H+0CH]
	PUSH	DWORD [SS:ESI+00H+08H]
	PUSH	DWORD [SS:ESI+00H+04H]
	PUSH	DWORD [SS:ESI+00H+00H]
	CALL	_storevideo
	ADD	ESP,BYTE 014H
;
; Line 1003:	RectTop(lrc) = RectBottom(lrc) = RectBottom(rc);
;
	MOV	EAX,DWORD [EBP+014H]
	MOV	DWORD [SS:ESI+0CH],EAX
	MOV	DWORD [SS:ESI+04H],EAX
;
; Line 1004:	storevideo(lrc, Bsave + Bwd);
;
	MOV	EAX,DWORD [_Bwd]
	SHL	EAX,01H
	ADD	EAX,DWORD [_Bsave]
	PUSH	EAX
	PUSH	DWORD [SS:ESI+00H+0CH]
	PUSH	DWORD [SS:ESI+00H+08H]
	PUSH	DWORD [SS:ESI+00H+04H]
	PUSH	DWORD [SS:ESI+00H+00H]
	CALL	_storevideo
	ADD	ESP,BYTE 014H
;
; Line 1005:	cp = Bsave + Bwd * 2;
;
	MOV	EDI,DWORD [_Bwd]
	SHL	EDI,02H
	ADD	EDI,DWORD [_Bsave]
	MOV	EBX,01H
	JMP	SHORT	L_522
L_520:
;
; 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_521:
	INC	EBX
L_522:
	MOV	EAX,DWORD [_Bht]
	DEC	EAX
	CMP	EBX,EAX
	JL	SHORT	L_520
L_523:
;
; Line 1010:	free(Bsave);
;
	PUSH	DWORD [_Bsave]
	CALL	_free
	POP	ECX
;
; Line 1011:	Bsave = NULL;
;
	MOV	DWORD [_Bsave],00H
L_518:
;
; Line 1013:	}
;
L_516:
	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_525:
;
; Line 1016:	{
;
;
; Line 1018:	rc = WindowRect(wnd);
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	LEA	EDI,[EBP-010H]
	PUSH	SS
	POP	ES
	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_526
;
; Line 1020:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EBX,DWORD [ESI+03CH]
	JMP	SHORT	L_528
L_530:
;
; 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	ECX,[EBP-010H]
	PUSH	ECX
	CALL	_subRectangle
	ADD	ESP,BYTE 024H
;
; Line 1023:	pwnd = GetParent(pwnd);
;
	MOV	EBX,DWORD [EBX+03CH]
L_528:
;
; Line 1021:	while (pwnd != NULL)    {
;
	TEST	EBX,EBX
	JNE	SHORT	L_530
L_529:
L_526:
;
; Line 1026:	return InsideRect(x, y, rc);
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-010H]
	JL	SHORT	L_532
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD [EBP-08H]
	JG	SHORT	L_532
	CMP	EDI,DWORD [EBP-0CH]
	JL	SHORT	L_533
	CMP	EDI,DWORD [EBP-04H]
	JLE	SHORT	L_531
L_533:
L_532:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_531:
	SUB	EAX,EAX
	INC	EAX
	NOP
L_524:
	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_535:
;
; Line 1030:	{
;
;
; Line 1031:	CLASS tclass = GetClass(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EBX,DWORD [EAX+00H]
	JMP	SHORT	L_536
L_538:
;
; Line 1033:	if (tclass == Class)
;
	CMP	EBX,DWORD [EBP+0CH]
	JNE	SHORT	L_539
;
; Line 1034:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_534
L_539:
;
; Line 1035:	tclass = (classdefs[tclass].base);
;
	MOV	EAX,EBX
	IMUL	EAX,BYTE 0CH
	MOV	EBX,DWORD [EAX+_classdefs+00H]
L_536:
;
; Line 1032:	while (tclass != -1)    {
;
	CMP	EBX,BYTE 0FFFFFFFFH
	JNE	SHORT	L_538
L_537:
;
; Line 1037:	return FALSE;
;
	MOV	EAX,00H
L_534:
	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_542:
;
; Line 1042:	{
;
;
; Line 1043:	if (wnd != NULL)    {
;
	TEST	ESI,ESI
	JE	SHORT	L_543
	JMP	SHORT	L_545
L_547:
;
; Line 1045:	if (GetClass(GetParent(wnd)) == APPLICATION)
;
	MOV	EAX,DWORD [ESI+03CH]
	CMP	DWORD [EAX+00H],BYTE 01H
	JE	SHORT	L_546
;
; Line 1046:	break;
;
L_548:
;
; Line 1047:	wnd = GetParent(wnd);
;
	MOV	ESI,DWORD [ESI+03CH]
L_545:
;
; Line 1044:	while (GetParent(wnd) != NULL)    {
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	JNE	SHORT	L_547
L_546:
L_543:
;
; Line 1050:	return wnd;
;
	MOV	EAX,ESI
L_541:
	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_551:
;
; Line 1054:	{
;
	JMP	SHORT	L_552
L_554:
;
; Line 1056:	if (isHidden(wnd))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 040H
	JNE	SHORT	L_555
;
; Line 1057:	return FALSE;
;
	MOV	EAX,00H
	JMP	SHORT	L_550
L_555:
;
; Line 1058:	wnd = GetParent(wnd);
;
	MOV	ESI,DWORD [ESI+03CH]
L_552:
;
; Line 1055:	while (wnd != NULL)    {
;
	TEST	ESI,ESI
	JNE	SHORT	L_554
L_553:
;
; Line 1060:	return TRUE;
;
	MOV	EAX,01H
L_550:
	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_558:
;
; Line 1065:	{
;
;
; Line 1067:	rc = WindowRect(wnd);
;
	PUSH	ESI
	PUSH	EDI
	ADD	ESI,BYTE 0CH
	PUSH	ES
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	ES
	POP	EDI
	POP	ESI
;
; Line 1068:	if (TestAttribute(wnd, SHADOW))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 01H
	JE	SHORT	L_559
;
; Line 1069:	RectBottom(rc)++;
;
	INC	DWORD [SS:EDI+0CH]
;
; Line 1070:	RectRight(rc)++;
;
	INC	DWORD [SS:EDI+08H]
L_559:
;
; Line 1072:	return ClipRectangle(wnd, rc);
;
	PUSH	DWORD [SS:EDI+00H+0CH]
	PUSH	DWORD [SS:EDI+00H+08H]
	PUSH	DWORD [SS:EDI+00H+04H]
	PUSH	DWORD [SS:EDI+00H+00H]
	PUSH	ESI
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_ClipRectangle
	ADD	ESP,BYTE 018H
	MOV	ECX,EAX
	MOV	EAX,DWORD [EBP+08H]
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[ECX+00H]
	LEA	EDI,[EAX+00H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,04H
	REP	MOVSD
	POP	EDI
	POP	ESI
	MOV	EAX,DWORD [EBP+08H]
L_557:
	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_562:
;
; 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 [SS:EDI+0CH]
	SUB	EAX,DWORD [SS:EDI+04H]
	INC	EAX
	MOV	DWORD [EBP-04H],EAX
;
; Line 1084:	wd = RectRight(rc) - RectLeft(rc) + 1;
;
	MOV	EBX,DWORD [SS:EDI+08H]
	SUB	EBX,DWORD [SS:EDI+00H]
	INC	EBX
;
; 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 [SS:EDI+00H+0CH]
	PUSH	DWORD [SS:EDI+00H+08H]
	PUSH	DWORD [SS:EDI+00H+04H]
	PUSH	DWORD [SS:EDI+00H+00H]
	CALL	_getvideo
	ADD	ESP,BYTE 014H
;
; Line 1088:	}
;
L_561:
	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_564:
;
; Line 1092:	{
;
;
; Line 1093:	if (wnd->videosave != NULL)    {
;
	CMP	DWORD [ESI+058H],BYTE 00H
	JE	SHORT	L_565
;
; 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_565:
;
; Line 1101:	}
;
L_563:
	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_568:
;
; Line 1105:	{
;
	JMP	SHORT	L_569
L_571:
;
; Line 1107:	if (wnd == awnd)
;
	CMP	EBX,DWORD [EBP+0CH]
	JNE	SHORT	L_572
;
; Line 1108:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_567
L_572:
;
; Line 1109:	wnd = GetParent(wnd);
;
	MOV	EBX,DWORD [EBX+03CH]
L_569:
;
; Line 1106:	while (wnd != NULL)	{
;
	TEST	EBX,EBX
	JNE	SHORT	L_571
L_570:
;
; Line 1111:	return FALSE;
;
	MOV	EAX,00H
L_567:
	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_575:
;
; Line 1117:	{
;
;
; Line 1118:	if (wnd->TextChanged != s) {
;
	CMP	DWORD [ESI+0E4H],EDI
	JE	SHORT	L_576
;
; 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_578
;
; Line 1123:	flag = TRUE;
;
	MOV	EBX,01H
;
; Line 1124:	SetVisible(wnd);
;
	BTS	DWORD [ESI+054H],06H
L_578:
;
; 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+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
;
; Line 1127:	if (flag)
;
	TEST	EBX,EBX
	JE	SHORT	L_580
;
; Line 1129:	ClearVisible(wnd);
;
	AND	DWORD [ESI+054H],BYTE 0FFFFFFBFH
L_580:
L_576:
;
; Line 1132:	}
;
L_574:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
SECTION _DATA

_px	DD	0FFFFFFFFH

_py	DD	0FFFFFFFFH

_dwnd	DD	017H,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
	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	02H,_PictureProc+0,00H
	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	09H,00H,04001H,09H,00H
	DD	04001H,09H,_HelpBoxProc+0
	DD	04A82H,02H,_StatusBarProc+0
	DD	0800H,04H,_EditorProc+0
	DD	00H,0FFFFFFFFH,00H,00H,0FFFFFFFFH
	DD	00H,04000H

L_82	DD	00H,00H,00H,00H

L_217	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	_SetNextFocus]
[EXTERN	_ListBoxProc]
[EXTERN	_RelativeWindowRect]
[EXTERN	_PutVideoChar]
[EXTERN	_PictureProc]
[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]
