	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 60:	static int CreateWindowMsg(WINDOW wnd)
;
_CreateWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 0CH
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_11:
;
; Line 61:	{
;
;
; Line 63:	ApplicationWindow = wnd;
;
	MOV	DWORD [_ApplicationWindow],ESI
;
; Line 64:	ScreenHeight = SCREENHEIGHT;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_14
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_12
L_14:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_13
L_12:
	MOV	EAX,019H
L_13:
	MOV	DWORD [_ScreenHeight],EAX
;
; Line 65:	getcwd(Cwd, 260);
;
	PUSH	DWORD 0104H
	PUSH	DWORD _Cwd
	CALL	_getcwd
	ADD	ESP,BYTE 08H
;
; Line 66:	wnd->condition = wnd->oldcondition = ISMAXIMIZED; 
;
	MOV	DWORD [ESI+060H],02H
	MOV	DWORD [ESI+05CH],02H
;
; Line 67:	if (!DisplayModified)    {
;
	CMP	DWORD [_DisplayModified],BYTE 00H
	JNE	NEAR	L_15
;
; Line 70:	ct = FindCommand(&Display, ID_SNOWY, CHECKBOX);
;
	PUSH	BYTE 0FH
	PUSH	BYTE 03FH
	PUSH	DWORD _Display
	CALL	_FindCommand
	ADD	ESP,BYTE 0CH
	MOV	DWORD [EBP-08H],EAX
;
; Line 71:	if (!isVGA())    {
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	NEAR	L_17
;
; Line 73:	if (isEGA())
;
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_19
;
; Line 74:	ct1 = FindCommand(&Display,ID_50LINES,RADIOBUTTON);
;
	PUSH	BYTE 0EH
	PUSH	BYTE 045H
	PUSH	DWORD _Display
	CALL	_FindCommand
	ADD	ESP,BYTE 0CH
	MOV	DWORD [EBP-04H],EAX
	JMP	SHORT	L_20
L_19:
;
; Line 77:	ct2 = FindCommand(&Display,ID_COLOR,RADIOBUTTON)-1;
;
	PUSH	BYTE 0EH
	PUSH	BYTE 040H
	PUSH	DWORD _Display
	CALL	_FindCommand
	ADD	ESP,BYTE 0CH
	SUB	EAX,BYTE 030H
	MOV	DWORD [EBP-0CH],EAX
;
; Line 78:	if (ct2)	{
;
	CMP	DWORD [EBP-0CH],BYTE 00H
	JE	SHORT	L_21
;
; Line 79:	ct2->dwnd.w++;
;
	MOV	EAX,DWORD [EBP-0CH]
	INC	DWORD [EAX+010H]
	MOV	EBX,00H
	JMP	SHORT	L_25
L_23:
;
; Line 81:	(ct2+i)->dwnd.x += 8;
;
	MOV	EAX,DWORD [EBP-0CH]
	MOV	ECX,EBX
	IMUL	ECX,BYTE 030H
	LEA	EAX,[EAX+ECX+00H]
	ADD	DWORD [EAX+04H],BYTE 08H
;
; Line 80:	for (i = 0; i < 7; i++)
;
L_24:
	INC	EBX
L_25:
	CMP	EBX,BYTE 07H
	JL	SHORT	L_23
L_26:
L_21:
;
; Line 83:	ct1 = FindCommand(&Display,ID_25LINES,RADIOBUTTON)-1;
;
	PUSH	BYTE 0EH
	PUSH	BYTE 043H
	PUSH	DWORD _Display
	CALL	_FindCommand
	ADD	ESP,BYTE 0CH
	SUB	EAX,BYTE 030H
	MOV	DWORD [EBP-04H],EAX
L_20:
;
; Line 85:	if (ct && ct1)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JE	SHORT	L_27
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	SHORT	L_27
	MOV	EBX,00H
	JMP	SHORT	L_31
L_29:
;
; Line 87:	*ct1++ = *ct++;
;
	MOV	EAX,DWORD [EBP-08H]
	ADD	DWORD [EBP-08H],BYTE 030H
	MOV	ECX,DWORD [EBP-04H]
	ADD	DWORD [EBP-04H],BYTE 030H
	PUSH	ESI
	PUSH	EDI
	PUSH	ECX
	LEA	ESI,[EAX+00H]
	LEA	EDI,[ECX+00H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,0CH
	REP	MOVSD
	POP	ECX
	POP	EDI
	POP	ESI
;
; Line 86:	for (i = 0; i < 6; i++)
;
L_30:
	INC	EBX
L_31:
	CMP	EBX,BYTE 06H
	JL	SHORT	L_29
L_32:
L_27:
L_17:
;
; Line 89:	if (isVGA() || isEGA())    {
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_35
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_33
L_35:
;
; Line 91:	ct = FindCommand(&Display, ID_SNOWY, CHECKBOX);
;
	PUSH	BYTE 0FH
	PUSH	BYTE 03FH
	PUSH	DWORD _Display
	CALL	_FindCommand
	ADD	ESP,BYTE 0CH
	MOV	DWORD [EBP-08H],EAX
;
; Line 92:	if (ct != NULL)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JE	SHORT	L_36
	MOV	EBX,00H
	JMP	SHORT	L_40
L_38:
;
; Line 94:	*(ct+i) = *(ct+2+i);
;
	MOV	EAX,DWORD [EBP-08H]
	MOV	ECX,EBX
	IMUL	ECX,BYTE 030H
	LEA	EAX,[EAX+ECX+060H]
	MOV	ECX,DWORD [EBP-08H]
	MOV	EDX,EBX
	IMUL	EDX,BYTE 030H
	PUSH	ESI
	PUSH	EDI
	PUSH	ECX
	LEA	ESI,[EAX+00H]
	LEA	EDI,[ECX+EDX+00H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,0CH
	REP	MOVSD
	POP	ECX
	POP	EDI
	POP	ESI
;
; Line 93:	for (i = 0; i < 4; i++)
;
L_39:
	INC	EBX
L_40:
	CMP	EBX,BYTE 04H
	JL	SHORT	L_38
L_41:
L_36:
L_33:
;
; Line 96:	DisplayModified = TRUE;
;
	MOV	DWORD [_DisplayModified],01H
L_15:
;
; Line 99:	if (cfg.Border)
;
	CMP	DWORD [024H+_cfg],BYTE 00H
	JE	SHORT	L_42
;
; Line 100:	SetCheckBox(&Display, ID_BORDER);
;
	PUSH	BYTE 01H
	PUSH	BYTE 0FH
	PUSH	BYTE 03BH
	PUSH	DWORD _Display
	CALL	_ControlSetting
	ADD	ESP,BYTE 010H
L_42:
;
; Line 101:	if (cfg.Title)
;
	CMP	DWORD [028H+_cfg],BYTE 00H
	JE	SHORT	L_44
;
; Line 102:	SetCheckBox(&Display, ID_TITLE);
;
	PUSH	BYTE 01H
	PUSH	BYTE 0FH
	PUSH	BYTE 03CH
	PUSH	DWORD _Display
	CALL	_ControlSetting
	ADD	ESP,BYTE 010H
L_44:
;
; Line 103:	if (cfg.StatusBar)
;
	CMP	DWORD [02CH+_cfg],BYTE 00H
	JE	SHORT	L_46
;
; Line 104:	SetCheckBox(&Display, ID_STATUSBAR);
;
	PUSH	BYTE 01H
	PUSH	BYTE 0FH
	PUSH	BYTE 03DH
	PUSH	DWORD _Display
	CALL	_ControlSetting
	ADD	ESP,BYTE 010H
L_46:
;
; Line 105:	if (cfg.Texture)
;
	CMP	DWORD [030H+_cfg],BYTE 00H
	JE	SHORT	L_48
;
; Line 106:	SetCheckBox(&Display, ID_TEXTURE);
;
	PUSH	BYTE 01H
	PUSH	BYTE 0FH
	PUSH	BYTE 03EH
	PUSH	DWORD _Display
	CALL	_ControlSetting
	ADD	ESP,BYTE 010H
L_48:
;
; Line 108:	if (cfg.mono == 1)
;
	MOVSX	EAX,BYTE [0BH+_cfg]
	CMP	EAX,BYTE 01H
	JNE	SHORT	L_50
;
; Line 109:	PushRadioButton(&Display, ID_MONO);
;
	PUSH	BYTE 041H
	PUSH	DWORD _Display
	CALL	_PushRadioButton
	ADD	ESP,BYTE 08H
	JMP	SHORT	L_51
L_50:
;
; Line 110:	else if (cfg.mono == 2)
;
	MOVSX	EAX,BYTE [0BH+_cfg]
	CMP	EAX,BYTE 02H
	JNE	SHORT	L_52
;
; Line 111:	PushRadioButton(&Display, ID_REVERSE);
;
	PUSH	BYTE 042H
	PUSH	DWORD _Display
	CALL	_PushRadioButton
	ADD	ESP,BYTE 08H
	JMP	SHORT	L_53
L_52:
;
; Line 113:	PushRadioButton(&Display, ID_COLOR);
;
	PUSH	BYTE 040H
	PUSH	DWORD _Display
	CALL	_PushRadioButton
	ADD	ESP,BYTE 08H
L_53:
L_51:
;
; Line 114:	if (cfg.ScreenLines == 25)
;
	CMP	DWORD [034H+_cfg],BYTE 019H
	JNE	SHORT	L_54
;
; Line 115:	PushRadioButton(&Display, ID_25LINES);
;
	PUSH	BYTE 043H
	PUSH	DWORD _Display
	CALL	_PushRadioButton
	ADD	ESP,BYTE 08H
	JMP	SHORT	L_55
L_54:
;
; Line 116:	else if (cfg.ScreenLines == 43)
;
	CMP	DWORD [034H+_cfg],BYTE 02BH
	JNE	SHORT	L_56
;
; Line 117:	PushRadioButton(&Display, ID_43LINES);
;
	PUSH	BYTE 044H
	PUSH	DWORD _Display
	CALL	_PushRadioButton
	ADD	ESP,BYTE 08H
	JMP	SHORT	L_57
L_56:
;
; Line 118:	else if (cfg.ScreenLines == 50)
;
	CMP	DWORD [034H+_cfg],BYTE 032H
	JNE	SHORT	L_58
;
; Line 119:	PushRadioButton(&Display, ID_50LINES);
;
	PUSH	BYTE 045H
	PUSH	DWORD _Display
	CALL	_PushRadioButton
	ADD	ESP,BYTE 08H
L_58:
L_57:
L_55:
;
; Line 120:	if (cfg.snowy)
;
	CMP	DWORD [010H+_cfg],BYTE 00H
	JE	SHORT	L_60
;
; Line 121:	SetCheckBox(&Display, ID_SNOWY);
;
	PUSH	BYTE 01H
	PUSH	BYTE 0FH
	PUSH	BYTE 03FH
	PUSH	DWORD _Display
	CALL	_ControlSetting
	ADD	ESP,BYTE 010H
L_60:
;
; Line 122:	if (SCREENHEIGHT != cfg.ScreenLines)    {
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_66
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_64
L_66:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_65
L_64:
	MOV	EAX,019H
L_65:
	CMP	EAX,DWORD [034H+_cfg]
	JE	NEAR	L_62
;
; Line 123:	SetScreenHeight(cfg.ScreenLines);
;
	PUSH	DWORD [034H+_cfg]
	CALL	_SetScreenHeight
	POP	ECX
;
; Line 124:	if (WindowHeight(wnd) == ScreenHeight ||
;
	MOV	EAX,DWORD [ESI+01CH]
	CMP	EAX,DWORD [_ScreenHeight]
	JE	SHORT	L_69
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_72
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_70
L_72:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_71
L_70:
	MOV	EAX,019H
L_71:
	DEC	EAX
	CMP	EAX,DWORD [ESI+018H]
	JGE	SHORT	L_67
L_69:
;
; Line 126:	WindowHeight(wnd) = SCREENHEIGHT;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_75
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_73
L_75:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_74
L_73:
	MOV	EAX,019H
L_74:
	MOV	DWORD [ESI+01CH],EAX
;
; Line 127:	GetBottom(wnd) = GetTop(wnd)+WindowHeight(wnd)-1;
;
	MOV	EAX,DWORD [ESI+010H]
	ADD	EAX,DWORD [ESI+01CH]
	DEC	EAX
	MOV	DWORD [ESI+018H],EAX
;
; Line 128:	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_67:
L_62:
;
; Line 131:	SelectColors(wnd);
;
	PUSH	ESI
	CALL	_SelectColors
	POP	ECX
;
; Line 133:	SelectBorder(wnd);
;
	PUSH	ESI
	CALL	_SelectBorder
	POP	ECX
;
; Line 134:	SelectTitle(wnd);
;
	PUSH	ESI
	CALL	_SelectTitle
	POP	ECX
;
; Line 135:	SelectStatusBar(wnd);
;
	PUSH	ESI
	CALL	_SelectStatusBar
	POP	ECX
;
; Line 137:	rtn = BaseWndProc(APPLICATION, wnd, CREATE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 03H
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+0CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	EDI,EAX
;
; Line 138:	if (wnd->extension != NULL)
;
	CMP	DWORD [ESI+06CH],BYTE 00H
	JE	SHORT	L_76
;
; Line 139:	CreateMenu(wnd);
;
	PUSH	ESI
	CALL	_CreateMenu
	POP	ECX
L_76:
;
; Line 140:	CreateStatusBar(wnd);
;
	PUSH	ESI
	CALL	_CreateStatusBar
	POP	ECX
;
; Line 141:	CreateTabBar(wnd);
;
	PUSH	ESI
	CALL	_CreateTabBar
	POP	ECX
;
; Line 142:	SendMessage(NULL, SHOW_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02AH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 143:	return rtn;
;
	MOV	EAX,EDI
L_10:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 147:	static void AddStatusMsg(WINDOW wnd, PARAM p1)
;
_AddStatusMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+0CH]
L_79:
;
; Line 148:	{
;
;
; Line 149:	if (wnd->StatusBar != NULL)    {
;
	CMP	DWORD [ESI+084H],BYTE 00H
	JE	SHORT	L_80
;
; Line 150:	if (p1 && *(char *)p1)
;
	TEST	EDI,EDI
	JE	SHORT	L_82
	CMP	BYTE [EDI+00H],BYTE 00H
	JE	SHORT	L_82
;
; Line 151:	SendMessage(wnd->StatusBar, SETTEXT, p1, 0);
;
	PUSH	BYTE 00H
	PUSH	EDI
	PUSH	BYTE 034H
	PUSH	DWORD [ESI+084H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_83
L_82:
;
; Line 153:	SendMessage(wnd->StatusBar, CLEARTEXT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 033H
	PUSH	DWORD [ESI+084H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_83:
;
; Line 154:	SendMessage(wnd->StatusBar, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	DWORD [ESI+084H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_80:
;
; Line 156:	}
;
L_78:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
;
; Line 159:	static void SetFocusMsg(WINDOW wnd, BOOL p1)
;
_SetFocusMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EBP+0CH]
L_85:
;
; Line 160:	{
;
;
; Line 161:	if (p1)
;
	TEST	ESI,ESI
	JE	SHORT	L_86
;
; Line 162:	SendMessage(inFocus, SETFOCUS, FALSE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 08H
	PUSH	DWORD [_inFocus]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_86:
;
; Line 163:	inFocus = p1 ? wnd : NULL;
;
	TEST	ESI,ESI
	JE	SHORT	L_88
	MOV	EAX,EBX
	JMP	SHORT	L_89
L_88:
	MOV	EAX,00H
L_89:
	MOV	DWORD [_inFocus],EAX
;
; Line 164:	SendMessage(NULL, HIDE_CURSOR, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01AH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 165:	if (isVisible(wnd))
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_90
;
; Line 166:	SendMessage(wnd, BORDER, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0AH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_91
L_90:
;
; Line 168:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_91:
;
; Line 169:	}
;
L_84:
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 172:	static void SizeMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_SizeMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EBP+0CH]
L_93:
;
; Line 173:	{
;
;
; Line 175:	WasVisible = isVisible(wnd);
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	MOV	EDI,EAX
;
; Line 176:	if (WasVisible)
;
	TEST	EDI,EDI
	JE	SHORT	L_94
;
; Line 177:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_94:
;
; Line 178:	if (p1-GetLeft(wnd) < 30)
;
	MOV	EAX,ESI
	SUB	EAX,DWORD [EBX+0CH]
	CMP	EAX,BYTE 01EH
	JGE	SHORT	L_96
;
; Line 179:	p1 = GetLeft(wnd) + 30;
;
	MOV	ESI,DWORD [EBX+0CH]
	ADD	ESI,BYTE 01EH
L_96:
;
; Line 180:	BaseWndProc(APPLICATION, wnd, SIZE, p1, p2);
;
	PUSH	DWORD [EBP+010H]
	PUSH	ESI
	PUSH	BYTE 0DH
	PUSH	EBX
	MOV	EAX,DWORD [_classdefs+0CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
;
; Line 181:	CreateMenu(wnd);
;
	PUSH	EBX
	CALL	_CreateMenu
	POP	ECX
;
; Line 182:	CreateStatusBar(wnd);
;
	PUSH	EBX
	CALL	_CreateStatusBar
	POP	ECX
;
; Line 183:	CreateTabBar(wnd);
;
	PUSH	EBX
	CALL	_CreateTabBar
	POP	ECX
;
; Line 184:	if (WasVisible)
;
	TEST	EDI,EDI
	JE	SHORT	L_98
;
; Line 185:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_98:
;
; Line 186:	}
;
L_92:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 189:	static int KeyboardMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_KeyboardMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+0CH]
	MOV	EDI,DWORD [EBP+010H]
L_101:
;
; Line 190:	{
;
;
; Line 191:	if (WindowMoving || WindowSizing || (int) p1 == F1)
;
	CMP	DWORD [_WindowMoving],BYTE 00H
	JNE	SHORT	L_104
	CMP	DWORD [_WindowSizing],BYTE 00H
	JNE	SHORT	L_104
	CMP	EBX,010BBH
	JNE	SHORT	L_102
L_104:
;
; Line 192:	return BaseWndProc(APPLICATION, wnd, KEYBOARD, p1, p2);
;
	PUSH	EDI
	PUSH	EBX
	PUSH	BYTE 015H
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+0CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_100
L_102:
;
; Line 193:	switch ((int) p1)    {
;
	CMP	EBX,DWORD 01082H
	JE	SHORT	L_109
	CMP	EBX,DWORD 010EBH
	JE	SHORT	L_107
	CMP	EBX,DWORD 010EDH
	JE	SHORT	L_108
	JMP	SHORT	L_106
L_107:
;
; Line 195:	if (TestAttribute(wnd, CONTROLBOX))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_110
;
; Line 196:	PostMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_110:
;
; Line 197:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_100
L_108:
;
; Line 200:	SetNextFocus();
;
	CALL	_SetNextFocus
;
; Line 201:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_100
L_109:
;
; Line 204:	if (TestAttribute(wnd, CONTROLBOX))
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0200H
	JE	SHORT	L_112
;
; Line 205:	BuildSystemMenu(wnd);
;
	PUSH	ESI
	CALL	_BuildSystemMenu
	POP	ECX
L_112:
;
; Line 206:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_100
L_106:
;
; Line 208:	break;
;
	JMP	SHORT	L_105
L_105:
;
; Line 210:	PostMessage(wnd->MenuBarWnd, KEYBOARD, p1, p2);
;
	PUSH	EDI
	PUSH	EBX
	PUSH	BYTE 015H
	PUSH	DWORD [ESI+080H]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 211:	return TRUE;
;
	MOV	EAX,01H
L_100:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 215:	static void ShiftChangedMsg(WINDOW wnd, PARAM p1)
;
_ShiftChangedMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD _AltDown
L_115:
;
; Line 216:	{
;
;
; Line 218:	if ((int)p1 & ALTKEY)
;
	MOV	EAX,DWORD [EBP+0CH]
	AND	EAX,BYTE 08H
	JE	SHORT	L_116
;
; Line 219:	AltDown = TRUE;
;
	MOV	DWORD [EDI+00H],01H
	JMP	SHORT	L_117
L_116:
;
; Line 220:	else if (AltDown)    {
;
	CMP	DWORD [EDI+00H],BYTE 00H
	JE	SHORT	L_118
;
; Line 221:	AltDown = FALSE;
;
	MOV	DWORD [EDI+00H],00H
;
; Line 222:	if (wnd->MenuBarWnd != inFocus)
;
	MOV	EAX,DWORD [ESI+080H]
	CMP	EAX,DWORD [_inFocus]
	JE	SHORT	L_120
;
; Line 223:	SendMessage(NULL, HIDE_CURSOR, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01AH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_120:
;
; Line 224:	SendMessage(wnd->MenuBarWnd, KEYBOARD, F10, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD 010C4H
	PUSH	BYTE 015H
	PUSH	DWORD [ESI+080H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_118:
L_117:
;
; Line 226:	}
;
L_114:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
;
; Line 229:	static void CommandMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_CommandMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD _inFocus
	MOV	EDI,DWORD [EBP+010H]
L_127:
;
; Line 230:	{
;
;
; Line 231:	switch ((int)p1)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 020H
	JE	NEAR	L_132
	JG	SHORT	L_149
	CMP	EAX,BYTE 01BH
	JE	NEAR	L_140
	JG	SHORT	L_150
	CMP	EAX,BYTE 017H
	JE	NEAR	L_135
	JG	SHORT	L_151
	CMP	EAX,BYTE 08H
	JE	NEAR	L_137
	JG	NEAR	L_129
	CMP	EAX,BYTE 07H
	JE	NEAR	L_136
	JMP	NEAR	L_129
L_151:
	CMP	EAX,BYTE 01AH
	JE	NEAR	L_139
	JMP	NEAR	L_129
L_150:
	CMP	EAX,BYTE 01EH
	JE	NEAR	L_143
	JG	SHORT	L_152
	CMP	EAX,BYTE 01DH
	JE	NEAR	L_141
	JG	NEAR	L_129
	CMP	EAX,BYTE 01CH
	JE	NEAR	L_142
	JMP	NEAR	L_129
L_152:
	CMP	EAX,BYTE 01FH
	JE	NEAR	L_131
	JMP	NEAR	L_129
L_149:
	CMP	EAX,BYTE 026H
	JE	NEAR	L_146
	JG	SHORT	L_153
	CMP	EAX,BYTE 024H
	JE	NEAR	L_144
	JG	SHORT	L_154
	CMP	EAX,BYTE 022H
	JE	NEAR	L_134
	JG	NEAR	L_129
	CMP	EAX,BYTE 021H
	JE	NEAR	L_133
	JMP	NEAR	L_129
L_154:
	CMP	EAX,BYTE 025H
	JE	NEAR	L_145
	JMP	NEAR	L_129
L_153:
	CMP	EAX,BYTE 029H
	JE	NEAR	L_138
	JG	SHORT	L_155
	CMP	EAX,BYTE 028H
	JE	NEAR	L_148
	JG	NEAR	L_129
	CMP	EAX,BYTE 027H
	JE	NEAR	L_147
	JMP	NEAR	L_129
L_155:
	CMP	EAX,BYTE 036H
	JE	SHORT	L_130
	JMP	NEAR	L_129
L_130:
;
; Line 233:	DisplayHelp(wnd, DFlatApplication);
;
	PUSH	DWORD _DFlatApplication
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 234:	break;
;
	JMP	NEAR	L_128
L_131:
;
; Line 236:	DisplayHelp(wnd, "HelpHelp");
;
	PUSH	DWORD L_122
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 237:	break;
;
	JMP	NEAR	L_128
L_132:
;
; Line 239:	DisplayHelp(wnd, "ExtHelp");
;
	PUSH	DWORD L_123
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 240:	break;
;
	JMP	NEAR	L_128
L_133:
;
; Line 242:	DisplayHelp(wnd, "KeysHelp");
;
	PUSH	DWORD L_124
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 243:	break;
;
	JMP	NEAR	L_128
L_134:
;
; Line 245:	DisplayHelp(wnd, "HelpIndex");
;
	PUSH	DWORD L_125
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 246:	break;
;
	JMP	NEAR	L_128
L_135:
;
; Line 249:	MessageLog(wnd);
;
	PUSH	EBX
	CALL	_MessageLog
	POP	ECX
;
; Line 250:	break;
;
	JMP	NEAR	L_128
L_136:
;
; Line 254:	ShellDOS(wnd);
;
	PUSH	EBX
	CALL	_ShellDOS
	POP	ECX
;
; Line 255:	break;
;
	JMP	NEAR	L_128
L_137:
;
; Line 258:	case ID_SYSCLOSE:
;
L_138:
;
; Line 259:	PostMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	EBX
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 260:	break;
;
	JMP	NEAR	L_128
L_139:
;
; Line 262:	if (DialogBox(wnd, &Display, TRUE, NULL))    {
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	DWORD _Display
	PUSH	EBX
	CALL	_DialogBox
	ADD	ESP,BYTE 010H
	TEST	EAX,EAX
	JE	NEAR	L_156
;
; Line 263:	if (inFocus == wnd->MenuBarWnd || inFocus == wnd->StatusBar)
;
	MOV	EAX,DWORD [ESI+00H]
	CMP	EAX,DWORD [EBX+080H]
	JE	SHORT	L_160
	MOV	EAX,DWORD [ESI+00H]
	CMP	EAX,DWORD [EBX+084H]
	JNE	SHORT	L_158
L_160:
;
; Line 264:	oldFocus = ApplicationWindow;
;
	MOV	EAX,DWORD [_ApplicationWindow]
	MOV	DWORD [_oldFocus],EAX
	JMP	SHORT	L_159
L_158:
;
; Line 266:	oldFocus = inFocus;
;
	MOV	EAX,DWORD [ESI+00H]
	MOV	DWORD [_oldFocus],EAX
L_159:
;
; Line 267:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 268:	SelectColors(wnd);
;
	PUSH	EBX
	CALL	_SelectColors
	POP	ECX
;
; Line 269:	SelectLines(wnd);
;
	PUSH	EBX
	CALL	_SelectLines
	POP	ECX
;
; Line 271:	SelectBorder(wnd);
;
	PUSH	EBX
	CALL	_SelectBorder
	POP	ECX
;
; Line 272:	SelectTitle(wnd);
;
	PUSH	EBX
	CALL	_SelectTitle
	POP	ECX
;
; Line 273:	SelectStatusBar(wnd);
;
	PUSH	EBX
	CALL	_SelectStatusBar
	POP	ECX
;
; Line 274:	SelectTexture();
;
	CALL	_SelectTexture
;
; Line 276:	CreateMenu(wnd);
;
	PUSH	EBX
	CALL	_CreateMenu
	POP	ECX
;
; Line 277:	CreateStatusBar(wnd);
;
	PUSH	EBX
	CALL	_CreateStatusBar
	POP	ECX
;
; Line 278:	CreateTabBar(wnd);
;
	PUSH	EBX
	CALL	_CreateTabBar
	POP	ECX
;
; Line 279:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 280:	SendMessage(oldFocus, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	DWORD [_oldFocus]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_156:
;
; Line 282:	break;
;
	JMP	SHORT	L_128
L_140:
;
; Line 284:	SaveConfig();
;
	CALL	_SaveConfig
;
; Line 285:	break;
;
	JMP	SHORT	L_128
L_141:
;
; Line 288:	ChooseWindow(wnd, CurrentMenuSelection-2);
;
	MOV	EAX,DWORD [_CurrentMenuSelection]
	SUB	EAX,BYTE 02H
	PUSH	EAX
	PUSH	EBX
	CALL	_ChooseWindow
	ADD	ESP,BYTE 08H
;
; Line 289:	break;
;
	JMP	SHORT	L_128
L_142:
;
; Line 291:	CloseAll(wnd, FALSE);
;
	PUSH	BYTE 00H
	PUSH	EBX
	CALL	_CloseAll
	ADD	ESP,BYTE 08H
;
; Line 292:	break;
;
	JMP	SHORT	L_128
L_143:
;
; Line 294:	MoreWindows(wnd);
;
	PUSH	EBX
	CALL	_MoreWindows
	POP	ECX
;
; Line 295:	break;
;
	JMP	SHORT	L_128
L_144:
;
; Line 300:	case ID_SYSMOVE:
;
L_145:
;
; Line 301:	case ID_SYSSIZE:
;
L_146:
;
; Line 303:	case ID_SYSMINIMIZE:
;
L_147:
;
; Line 306:	case ID_SYSMAXIMIZE:
;
L_148:
;
; Line 308:	BaseWndProc(APPLICATION, wnd, COMMAND, p1, p2);
;
	PUSH	EDI
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 02H
	PUSH	EBX
	MOV	EAX,DWORD [_classdefs+0CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
;
; Line 309:	break;
;
	JMP	SHORT	L_128
L_129:
;
; Line 311:	if (inFocus != wnd->MenuBarWnd && inFocus != wnd)
;
	MOV	EAX,DWORD [ESI+00H]
	CMP	EAX,DWORD [EBX+080H]
	JE	SHORT	L_161
	CMP	DWORD [ESI+00H],EBX
	JE	SHORT	L_161
;
; Line 312:	PostMessage(inFocus, COMMAND, p1, p2);
;
	PUSH	EDI
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 02H
	PUSH	DWORD [ESI+00H]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_161:
;
; Line 313:	break;
;
	JMP	SHORT	L_128
L_128:
;
; Line 315:	}
;
L_126:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 318:	static int CloseWindowMsg(WINDOW wnd)
;
_CloseWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_164:
;
; Line 319:	{
;
;
; Line 322:	CloseAll(wnd, TRUE);
;
	PUSH	BYTE 01H
	PUSH	ESI
	CALL	_CloseAll
	ADD	ESP,BYTE 08H
;
; Line 323:	WindowSel = 0;
;
	MOV	DWORD [_WindowSel],00H
;
; Line 325:	PostMessage(NULL, STOP, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 00H
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 326:	rtn = BaseWndProc(APPLICATION, wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+0CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	EBX,EAX
;
; Line 327:	if (ScreenHeight != SCREENHEIGHT)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_169
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_167
L_169:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_168
L_167:
	MOV	EAX,019H
L_168:
	CMP	DWORD [_ScreenHeight],EAX
	JE	SHORT	L_165
;
; Line 328:	SetScreenHeight(ScreenHeight);
;
	PUSH	DWORD [_ScreenHeight]
	CALL	_SetScreenHeight
	POP	ECX
L_165:
;
; Line 329:	UnLoadHelpFile();
;
	CALL	_UnLoadHelpFile
;
; Line 330:	DisplayModified = FALSE;
;
	MOV	DWORD [_DisplayModified],00H
;
; Line 331:	ApplicationWindow = NULL;
;
	MOV	DWORD [_ApplicationWindow],00H
;
; Line 332:	setdisk(toupper(*Cwd) - 'A');
;
	MOVSX	EAX,BYTE [_Cwd]
	PUSH	EAX
	CALL	_toupper
	POP	ECX
	SUB	EAX,BYTE 041H
	PUSH	EAX
	CALL	_setdisk
	POP	ECX
;
; Line 333:	chdir(Cwd+2);
;
	MOV	EAX,DWORD 02H+_Cwd
	PUSH	EAX
	CALL	_chdir
	POP	ECX
;
; Line 334:	return rtn;
;
	MOV	EAX,EBX
L_163:
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_ApplicationProc]
;
; Line 338:	int ApplicationProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
;
_ApplicationProc:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EBP+010H]
L_171:
;
; Line 339:	{
;
;
; Line 340:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 0FH
	JE	NEAR	L_182
	JA	SHORT	L_188
	CMP	EAX,BYTE 07H
	JE	NEAR	L_187
	JA	SHORT	L_189
	CMP	EAX,BYTE 03H
	JE	NEAR	L_174
	JA	SHORT	L_190
	CMP	EAX,BYTE 02H
	JE	NEAR	L_186
	JMP	NEAR	L_173
L_190:
	CMP	EAX,BYTE 06H
	JE	SHORT	L_175
	JMP	NEAR	L_173
L_189:
	CMP	EAX,BYTE 09H
	JE	NEAR	L_185
	JA	SHORT	L_191
	CMP	EAX,BYTE 08H
	JE	NEAR	L_180
	JMP	NEAR	L_173
L_191:
	CMP	EAX,BYTE 0DH
	JE	NEAR	L_181
	JMP	NEAR	L_173
L_188:
	CMP	EAX,BYTE 046H
	JE	SHORT	L_178
	JA	SHORT	L_192
	CMP	EAX,BYTE 01EH
	JE	NEAR	L_184
	JA	SHORT	L_193
	CMP	EAX,BYTE 015H
	JE	NEAR	L_183
	JMP	NEAR	L_173
L_193:
	CMP	EAX,BYTE 045H
	JE	SHORT	L_177
	JMP	NEAR	L_173
L_192:
	CMP	EAX,BYTE 04DH
	JE	SHORT	L_176
	JA	NEAR	L_173
	CMP	EAX,BYTE 047H
	JE	SHORT	L_179
	JMP	NEAR	L_173
L_174:
;
; Line 342:	return CreateWindowMsg(wnd);
;
	PUSH	EBX
	CALL	_CreateWindowMsg
	POP	ECX
	JMP	NEAR	L_170
L_175:
;
; Line 344:	if (wnd == inFocus)
;
	CMP	EBX,DWORD [_inFocus]
	JNE	SHORT	L_194
;
; Line 345:	inFocus = NULL;
;
	MOV	DWORD [_inFocus],00H
L_194:
;
; Line 346:	break;
;
	JMP	NEAR	L_172
L_176:
;
; Line 348:	AddStatusMsg(wnd, p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_AddStatusMsg
	ADD	ESP,BYTE 08H
;
; Line 349:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_170
L_177:
;
; Line 351:	case TAB_REMOVE:
;
L_178:
;
; Line 352:	case TAB_SELECT:
;
L_179:
;
; Line 353:	if (wnd->TabBar)
;
	CMP	DWORD [EBX+088H],BYTE 00H
	JE	SHORT	L_196
;
; Line 354:	return SendMessage(wnd->TabBar, msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	DWORD [EBX+088H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	NEAR	L_170
L_196:
;
; Line 355:	return FALSE;
;
	MOV	EAX,00H
	JMP	NEAR	L_170
L_180:
;
; Line 357:	if ((int)p1 == (inFocus != wnd))    {
;
	CMP	DWORD [_inFocus],EBX
	SETNE	AL
	MOVZX	EAX,AL
	CMP	ESI,EAX
	JNE	SHORT	L_198
;
; Line 358:	SetFocusMsg(wnd, (BOOL) p1);
;
	MOV	EAX,ESI
	MOVSX	EAX,AX
	PUSH	EAX
	PUSH	EBX
	CALL	_SetFocusMsg
	ADD	ESP,BYTE 08H
;
; Line 359:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_170
L_198:
;
; Line 361:	break;
;
	JMP	NEAR	L_172
L_181:
;
; Line 363:	SizeMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_SizeMsg
	ADD	ESP,BYTE 0CH
;
; Line 364:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_170
L_182:
;
; Line 367:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_170
L_183:
;
; Line 370:	return KeyboardMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_KeyboardMsg
	ADD	ESP,BYTE 0CH
	JMP	NEAR	L_170
L_184:
;
; Line 372:	ShiftChangedMsg(wnd, p1);
;
	PUSH	ESI
	PUSH	EBX
	CALL	_ShiftChangedMsg
	ADD	ESP,BYTE 08H
;
; Line 373:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_170
L_185:
;
; Line 375:	if (isVisible(wnd))    {
;
	PUSH	EBX
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_200
;
; Line 376:	int cl = cfg.Texture ? APPLCHAR : ' ';
;
	CMP	DWORD [030H+_cfg],BYTE 00H
	JE	SHORT	L_202
	MOV	EAX,0B0H
	JMP	SHORT	L_203
L_202:
	MOV	EAX,020H
L_203:
	MOV	EDI,EAX
;
; Line 377:	ClearWindow(wnd, (RECT *)p1, cl);
;
	PUSH	EDI
	PUSH	ESI
	PUSH	EBX
	CALL	_ClearWindow
	ADD	ESP,BYTE 0CH
L_200:
;
; Line 379:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_170
L_186:
;
; Line 381:	CommandMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	PUSH	EBX
	CALL	_CommandMsg
	ADD	ESP,BYTE 0CH
;
; Line 382:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_170
L_187:
;
; Line 384:	return CloseWindowMsg(wnd);
;
	PUSH	EBX
	CALL	_CloseWindowMsg
	POP	ECX
	JMP	SHORT	L_170
L_173:
;
; Line 386:	break;
;
	JMP	SHORT	L_172
L_172:
;
; Line 388:	return BaseWndProc(APPLICATION, wnd, msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	EBX
	MOV	EAX,DWORD [_classdefs+0CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
L_170:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 392:	static void SwitchCursor(void)
;
_SwitchCursor:
L_205:
;
; Line 393:	{
;
;
; Line 394:	SendMessage(NULL, SAVE_CURSOR, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01CH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 395:	SwapCursorStack();
;
	CALL	_SwapCursorStack
;
; Line 396:	SendMessage(NULL, RESTORE_CURSOR, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01DH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 397:	}
;
L_204:
	RET
;
; Line 400:	static void ShellDOS(WINDOW wnd)
;
_ShellDOS:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [EBP+08H]
L_209:
;
; Line 401:	{
;
;
; Line 402:	oldFocus = inFocus;
;
	MOV	EAX,DWORD [_inFocus]
	MOV	DWORD [_oldFocus],EAX
;
; Line 403:	SendMessage(wnd, HIDE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 404:	SwitchCursor();
;
	CALL	_SwitchCursor
;
; Line 405:	if (ScreenHeight != SCREENHEIGHT)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_214
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_212
L_214:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_213
L_212:
	MOV	EAX,019H
L_213:
	CMP	DWORD [_ScreenHeight],EAX
	JE	SHORT	L_210
;
; Line 406:	SetScreenHeight(ScreenHeight);
;
	PUSH	DWORD [_ScreenHeight]
	CALL	_SetScreenHeight
	POP	ECX
L_210:
;
; Line 407:	SendMessage(NULL, HIDE_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02BH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 408:	printf("To return to %s, execute the DOS exit command.",
;
	PUSH	DWORD _DFlatApplication
	PUSH	DWORD L_206
	CALL	_printf
	ADD	ESP,BYTE 08H
;
; Line 410:	fflush(stdout);
;
	PUSH	DWORD [___stdout]
	CALL	_fflush
	POP	ECX
;
; Line 411:	ConsoleBackgroundMode(FALSE);
;
	PUSH	BYTE 00H
	CALL	_ConsoleBackgroundMode
	POP	ECX
;
; Line 412:	spawnl(P_WAIT, getenv("COMSPEC"), NULL);
;
	PUSH	BYTE 00H
	PUSH	DWORD L_207
	CALL	_getenv
	POP	ECX
	PUSH	EAX
	PUSH	BYTE 00H
	CALL	_spawnl
	ADD	ESP,BYTE 0CH
;
; Line 413:	ConsoleBackgroundMode(TRUE);
;
	PUSH	BYTE 01H
	CALL	_ConsoleBackgroundMode
	POP	ECX
;
; Line 414:	if (SCREENHEIGHT != cfg.ScreenLines)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_219
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_217
L_219:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_218
L_217:
	MOV	EAX,019H
L_218:
	CMP	EAX,DWORD [034H+_cfg]
	JE	SHORT	L_215
;
; Line 415:	SetScreenHeight(cfg.ScreenLines);
;
	PUSH	DWORD [034H+_cfg]
	CALL	_SetScreenHeight
	POP	ECX
L_215:
;
; Line 416:	SwitchCursor();
;
	CALL	_SwitchCursor
;
; Line 417:	SendMessage(wnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 418:	SendMessage(oldFocus, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	DWORD [_oldFocus]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 419:	SendMessage(NULL, SHOW_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02AH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 420:	}
;
L_208:
	POP	EBX
	POP	EBP
	RET
;
; Line 424:	static void CreateMenu(WINDOW wnd)
;
_CreateMenu:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_221:
;
; Line 425:	{
;
;
; Line 426:	AddAttribute(wnd, HASMENUBAR);
;
	BTS	DWORD [ESI+054H],03H
;
; Line 427:	if (wnd->MenuBarWnd != NULL)
;
	CMP	DWORD [ESI+080H],BYTE 00H
	JE	SHORT	L_222
;
; Line 428:	SendMessage(wnd->MenuBarWnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	DWORD [ESI+080H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_222:
;
; Line 429:	wnd->MenuBarWnd = CreateWindow(MENUBAR,
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	ESI
	PUSH	BYTE 00H
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_224
	MOV	EAX,01H
	JMP	SHORT	L_225
L_224:
	MOV	EAX,00H
L_225:
	SHL	EAX,01H
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	PUSH	ECX
	PUSH	BYTE 01H
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_226
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_226
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_226
	MOV	EAX,03H
	JMP	SHORT	L_227
L_226:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_231
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_230
L_231:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_228
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_228
L_230:
	MOV	EAX,02H
	JMP	SHORT	L_229
L_228:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_232
	MOV	EAX,01H
	JMP	SHORT	L_233
L_232:
	MOV	EAX,00H
L_233:
L_229:
L_227:
	ADD	EAX,DWORD [ESI+010H]
	DEC	EAX
	MOV	ECX,DWORD [ESI+054H]
	AND	ECX,010000H
	JNE	SHORT	L_234
	SUB	ECX,ECX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_234:
	SUB	ECX,ECX
	INC	ECX
	NOP
	SUB	EAX,ECX
	PUSH	EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_235
	MOV	EAX,01H
	JMP	SHORT	L_236
L_235:
	MOV	EAX,00H
L_236:
	ADD	EAX,DWORD [ESI+0CH]
	PUSH	EAX
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	CALL	_CreateWindow
	ADD	ESP,BYTE 028H
	MOV	DWORD [ESI+080H],EAX
;
; Line 439:	SendMessage(wnd->MenuBarWnd,BUILDMENU,
;
	PUSH	BYTE 00H
	PUSH	DWORD [ESI+06CH]
	PUSH	BYTE 03CH
	PUSH	DWORD [ESI+080H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 441:	AddAttribute(wnd->MenuBarWnd, VISIBLE);
;
	MOV	EAX,DWORD [ESI+080H]
	BTS	DWORD [EAX+054H],06H
;
; Line 442:	}
;
L_220:
	POP	ESI
	POP	EBP
	RET
;
; Line 445:	static void CreateStatusBar(WINDOW wnd)
;
_CreateStatusBar:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_238:
;
; Line 446:	{
;
;
; Line 447:	if (wnd->StatusBar != NULL)    {
;
	CMP	DWORD [ESI+084H],BYTE 00H
	JE	SHORT	L_239
;
; Line 448:	SendMessage(wnd->StatusBar, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	DWORD [ESI+084H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 449:	wnd->StatusBar = NULL;
;
	MOV	DWORD [ESI+084H],00H
L_239:
;
; Line 451:	if (TestAttribute(wnd, HASSTATUSBAR))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_241
;
; Line 452:	wnd->StatusBar = CreateWindow(STATUSBAR,
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	ESI
	PUSH	BYTE 00H
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_243
	MOV	EAX,01H
	JMP	SHORT	L_244
L_243:
	MOV	EAX,00H
L_244:
	SHL	EAX,01H
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	PUSH	ECX
	PUSH	BYTE 01H
	PUSH	DWORD [ESI+018H]
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_245
	MOV	EAX,01H
	JMP	SHORT	L_246
L_245:
	MOV	EAX,00H
L_246:
	ADD	EAX,DWORD [ESI+0CH]
	PUSH	EAX
	PUSH	BYTE 00H
	PUSH	BYTE 014H
	CALL	_CreateWindow
	ADD	ESP,BYTE 028H
	MOV	DWORD [ESI+084H],EAX
;
; Line 462:	AddAttribute(wnd->StatusBar, VISIBLE);
;
	MOV	EAX,DWORD [ESI+084H]
	BTS	DWORD [EAX+054H],06H
L_241:
;
; Line 464:	}
;
L_237:
	POP	ESI
	POP	EBP
	RET
;
; Line 467:	static void CreateTabBar(WINDOW wnd)
;
_CreateTabBar:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_248:
;
; Line 468:	{
;
;
; Line 469:	if (wnd->TabBar != NULL)    {
;
	CMP	DWORD [ESI+088H],BYTE 00H
	JE	SHORT	L_249
;
; Line 470:	SendMessage(wnd->TabBar, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	DWORD [ESI+088H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 471:	wnd->TabBar = NULL;
;
	MOV	DWORD [ESI+088H],00H
L_249:
;
; Line 473:	if (TestAttribute(wnd, HASTABBAR))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	NEAR	L_251
;
; Line 474:	wnd->TabBar = CreateWindow(TABBAR,
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	ESI
	PUSH	BYTE 00H
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_253
	MOV	EAX,01H
	JMP	SHORT	L_254
L_253:
	MOV	EAX,00H
L_254:
	SHL	EAX,01H
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	PUSH	ECX
	PUSH	BYTE 01H
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_255
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_255
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_255
	MOV	EAX,03H
	JMP	SHORT	L_256
L_255:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_260
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_259
L_260:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_257
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_257
L_259:
	MOV	EAX,02H
	JMP	SHORT	L_258
L_257:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_261
	MOV	EAX,01H
	JMP	SHORT	L_262
L_261:
	MOV	EAX,00H
L_262:
L_258:
L_256:
	ADD	EAX,DWORD [ESI+010H]
	DEC	EAX
	PUSH	EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_263
	MOV	EAX,01H
	JMP	SHORT	L_264
L_263:
	MOV	EAX,00H
L_264:
	ADD	EAX,DWORD [ESI+0CH]
	PUSH	EAX
	PUSH	BYTE 00H
	PUSH	BYTE 06H
	CALL	_CreateWindow
	ADD	ESP,BYTE 028H
	MOV	DWORD [ESI+088H],EAX
;
; Line 484:	AddAttribute(wnd->TabBar, VISIBLE);
;
	MOV	EAX,DWORD [ESI+088H]
	BTS	DWORD [EAX+054H],06H
L_251:
;
; Line 486:	}
;
L_247:
	POP	ESI
	POP	EBP
	RET
;
; Line 489:	static char *WindowName(WINDOW wnd)
;
_WindowName:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_267:
;
; Line 490:	{
;
;
; Line 491:	if (GetTitle(wnd) == NULL)    {
;
	CMP	DWORD [ESI+04H],BYTE 00H
	JNE	SHORT	L_268
;
; Line 492:	if (GetClass(wnd) == DIALOG)
;
	CMP	DWORD [ESI+00H],BYTE 09H
	JNE	SHORT	L_270
;
; Line 493:	return ((DBOX *)(wnd->extension))->HelpName;
;
	MOV	EAX,DWORD [ESI+06CH]
	MOV	EAX,DWORD [EAX+00H]
	JMP	SHORT	L_266
L_270:
;
; Line 495:	return "Untitled";
;
	MOV	EAX,DWORD L_265
	JMP	SHORT	L_266
L_271:
	JMP	SHORT	L_269
L_268:
;
; Line 498:	return GetTitle(wnd);
;
	MOV	EAX,DWORD [ESI+04H]
L_269:
;
; Line 499:	}
;
L_266:
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_PrepWindowMenu]
;
; Line 502:	void PrepWindowMenu(void *w, struct Menu *mnu)
;
_PrepWindowMenu:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 010H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
L_274:
;
; Line 503:	{
;
;
; Line 504:	WINDOW wnd = w;
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	DWORD [EBP-0CH],EAX
;
; Line 505:	struct PopDown *p0 = mnu->Selections;
;
	MOV	EAX,DWORD [EBP+0CH]
	ADD	EAX,BYTE 014H
	MOV	DWORD [EBP-08H],EAX
;
; Line 506:	struct PopDown *pd = mnu->Selections + 2;
;
	MOV	EDI,DWORD [EBP+0CH]
	ADD	EDI,BYTE 03CH
;
; Line 507:	struct PopDown *ca = mnu->Selections + 13;
;
	MOV	EAX,DWORD [EBP+0CH]
	ADD	EAX,0118H
	MOV	DWORD [EBP-04H],EAX
;
; Line 508:	int MenuNo = 0;
;
	MOV	EBX,00H
;
; Line 510:	mnu->Selection = 0;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [EAX+010H],00H
;
; Line 511:	oldFocus = NULL;
;
	MOV	DWORD [_oldFocus],00H
;
; Line 512:	if (GetClass(wnd) != APPLICATION)    {
;
	MOV	EAX,DWORD [EBP-0CH]
	CMP	DWORD [EAX+00H],BYTE 01H
	JE	NEAR	L_275
;
; Line 513:	oldFocus = wnd;
;
	MOV	EAX,DWORD [EBP-0CH]
	MOV	DWORD [_oldFocus],EAX
;
; Line 515:	if (ApplicationWindow == NULL)
;
	CMP	DWORD [_ApplicationWindow],BYTE 00H
	JE	NEAR	L_273
;
; Line 516:	return;
;
L_277:
;
; Line 517:	cwnd = FirstWindow(ApplicationWindow);
;
	MOV	EAX,DWORD [_ApplicationWindow]
	MOV	ESI,DWORD [EAX+040H]
	JMP	SHORT	L_279
L_281:
;
; Line 520:	if (isVisible(cwnd) && GetClass(cwnd) != MENUBAR &&
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_282
	CMP	DWORD [ESI+00H],BYTE 05H
	JE	SHORT	L_282
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_282
;
; Line 523:	strncpy(Menus[MenuNo]+4, WindowName(cwnd), 20);
;
	PUSH	BYTE 014H
	PUSH	ESI
	CALL	_WindowName
	POP	ECX
	PUSH	EAX
	MOV	EAX,DWORD [EBX*4+_Menus+00H]
	ADD	EAX,BYTE 04H
	PUSH	EAX
	CALL	_strncpy
	ADD	ESP,BYTE 0CH
;
; Line 524:	pd->SelectionTitle = Menus[MenuNo];
;
	MOV	EAX,DWORD [EBX*4+_Menus+00H]
	MOV	DWORD [EDI+00H],EAX
;
; Line 525:	if (cwnd == oldFocus)    {
;
	CMP	ESI,DWORD [_oldFocus]
	JNE	SHORT	L_284
;
; Line 527:	pd->Attrib |= CHECKED;
;
	BTS	DWORD [EDI+0CH],01H
;
; Line 528:	mnu->Selection = MenuNo+2;
;
	MOV	EAX,EBX
	ADD	EAX,BYTE 02H
	MOV	ECX,DWORD [EBP+0CH]
	MOV	DWORD [ECX+010H],EAX
	JMP	SHORT	L_285
L_284:
;
; Line 531:	pd->Attrib &= ~CHECKED;
;
	AND	DWORD [EDI+0CH],BYTE 0FFFFFFFDH
L_285:
;
; Line 532:	pd++;
;
	ADD	EDI,BYTE 014H
;
; Line 533:	MenuNo++;
;
	INC	EBX
L_282:
;
; Line 535:	cwnd = NextWindow(cwnd);
;
	MOV	ESI,DWORD [ESI+048H]
L_279:
;
; Line 519:	while (cwnd != NULL && MenuNo < 9)    {
;
	TEST	ESI,ESI
	JE	SHORT	L_286
	CMP	EBX,BYTE 09H
	JL	SHORT	L_281
L_286:
L_280:
L_275:
;
; Line 538:	if (MenuNo)
;
	TEST	EBX,EBX
	JE	SHORT	L_287
;
; Line 539:	p0->SelectionTitle = "~Close all";
;
	MOV	EAX,DWORD L_272
	MOV	ECX,DWORD [EBP-08H]
	MOV	DWORD [ECX+00H],EAX
	JMP	SHORT	L_288
L_287:
;
; Line 541:	p0->SelectionTitle = NULL;
;
	MOV	EAX,DWORD [EBP-08H]
	MOV	DWORD [EAX+00H],00H
L_288:
;
; Line 542:	if (MenuNo >= 9)    {
;
	CMP	EBX,BYTE 09H
	JL	SHORT	L_289
;
; Line 543:	*pd++ = *ca;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	ECX,EDI
	ADD	EDI,BYTE 014H
	PUSH	ESI
	PUSH	EDI
	PUSH	ECX
	LEA	ESI,[EAX+00H]
	LEA	EDI,[ECX+00H]
	PUSH	SS
	POP	ES
	CLD
	MOV	ECX,05H
	REP	MOVSD
	POP	ECX
	POP	EDI
	POP	ESI
;
; Line 544:	if (mnu->Selection == 0)
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	DWORD [EAX+010H],BYTE 00H
	JNE	SHORT	L_291
;
; Line 545:	mnu->Selection = 11;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [EAX+010H],0BH
L_291:
L_289:
;
; Line 547:	pd->SelectionTitle = NULL;
;
	MOV	DWORD [EDI+00H],00H
;
; Line 548:	}
;
L_273:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 551:	static int WindowPrep(WINDOW wnd,MESSAGE msg,PARAM p1,PARAM p2)
;
_WindowPrep:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
	MOV	EBX,DWORD _classdefs
L_294:
;
; Line 552:	{
;
;
; Line 553:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 02H
	JE	NEAR	L_298
	CMP	EAX,BYTE 048H
	JE	SHORT	L_297
	JMP	NEAR	L_296
L_297:
;
; Line 556:	WINDOW cwnd = ControlWindow(&Windows,ID_WINDOWLIST);
;
	PUSH	BYTE 033H
	PUSH	DWORD _Windows
	CALL	_ControlWindow
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP-08H],EAX
;
; Line 557:	int sel = 0;
;
	MOV	DWORD [EBP-04H],00H
;
; Line 558:	if (cwnd == NULL)
;
	CMP	DWORD [EBP-08H],BYTE 00H
	JNE	SHORT	L_299
;
; Line 559:	return FALSE;
;
	MOV	EAX,00H
	JMP	NEAR	L_293
L_299:
;
; Line 560:	wnd1 = FirstWindow(ApplicationWindow);
;
	MOV	EAX,DWORD [_ApplicationWindow]
	MOV	ESI,DWORD [EAX+040H]
	JMP	SHORT	L_301
L_303:
;
; Line 562:	if (isVisible(wnd1) && wnd1 != wnd &&
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_304
	CMP	ESI,EDI
	JE	SHORT	L_304
	CMP	DWORD [ESI+00H],BYTE 05H
	JE	SHORT	L_304
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_304
;
; Line 565:	if (wnd1 == oldFocus)
;
	CMP	ESI,DWORD [_oldFocus]
	JNE	SHORT	L_306
;
; Line 566:	WindowSel = sel;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	DWORD [_WindowSel],EAX
L_306:
;
; Line 567:	SendMessage(cwnd, ADDTEXT,
;
	PUSH	BYTE 00H
	PUSH	ESI
	CALL	_WindowName
	POP	ECX
	PUSH	EAX
	PUSH	BYTE 030H
	PUSH	DWORD [EBP-08H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 569:	sel++;
;
	INC	DWORD [EBP-04H]
L_304:
;
; Line 571:	wnd1 = NextWindow(wnd1);
;
	MOV	ESI,DWORD [ESI+048H]
L_301:
;
; Line 561:	while (wnd1 != NULL)	{
;
	TEST	ESI,ESI
	JNE	SHORT	L_303
L_302:
;
; Line 573:	SendMessage(cwnd, LB_SETSELECTION, WindowSel, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD [_WindowSel]
	PUSH	BYTE 044H
	PUSH	DWORD [EBP-08H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 574:	AddAttribute(cwnd, VSCROLLBAR);
;
	MOV	EAX,DWORD [EBP-08H]
	BTS	DWORD [EAX+054H],04H
;
; Line 575:	PostMessage(cwnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	DWORD [EBP-08H]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 576:	break;
;
	JMP	SHORT	L_295
L_298:
;
; Line 579:	switch ((int) p1)    {
;
	MOV	EAX,DWORD [EBP+010H]
	CMP	EAX,BYTE 033H
	JE	SHORT	L_311
	CMP	EAX,BYTE 034H
	JE	SHORT	L_310
	JMP	SHORT	L_309
L_310:
;
; Line 581:	if ((int)p2 == 0)
;
	CMP	DWORD [EBP+014H],BYTE 00H
	JNE	SHORT	L_312
;
; Line 582:	WindowSel = SendMessage(
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 042H
	PUSH	BYTE 033H
	PUSH	DWORD _Windows
	CALL	_ControlWindow
	ADD	ESP,BYTE 08H
	PUSH	EAX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	MOV	DWORD [_WindowSel],EAX
L_312:
;
; Line 586:	break;
;
	JMP	SHORT	L_308
L_311:
;
; Line 588:	if ((int) p2 == LB_CHOOSE)
;
	CMP	DWORD [EBP+014H],BYTE 041H
	JNE	SHORT	L_314
;
; Line 589:	SendMessage(wnd, COMMAND, ID_OK, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 034H
	PUSH	BYTE 02H
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_314:
;
; Line 590:	break;
;
	JMP	SHORT	L_308
L_309:
;
; Line 592:	break;
;
	JMP	SHORT	L_308
L_308:
;
; Line 594:	break;
;
	JMP	SHORT	L_295
L_296:
;
; Line 596:	break;
;
	JMP	SHORT	L_295
L_295:
;
; Line 598:	return DefaultWndProc(wnd, msg, p1, p2);
;
	MOV	EAX,DWORD [EDI+00H]
	IMUL	EAX,BYTE 0CH
	LEA	EAX,[EBX+EAX+00H]
	CMP	DWORD [EAX+04H],BYTE 00H
	JNE	SHORT	L_316
	PUSH	DWORD [EBP+014H]
	PUSH	DWORD [EBP+010H]
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	EDI
	MOV	EAX,DWORD [EDI+00H]
	IMUL	EAX,BYTE 0CH
	MOV	EAX,DWORD [EBX+EAX+00H]
	IMUL	EAX,BYTE 0CH
	LEA	EAX,[EBX+EAX+00H]
	CALL	DWORD [EAX+04H]
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_317
L_316:
	PUSH	DWORD [EBP+014H]
	PUSH	DWORD [EBP+010H]
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	EDI
	MOV	EAX,DWORD [EDI+00H]
	IMUL	EAX,BYTE 0CH
	LEA	EAX,[EBX+EAX+00H]
	CALL	DWORD [EAX+04H]
	ADD	ESP,BYTE 010H
L_317:
L_293:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 602:	static void MoreWindows(WINDOW wnd)
;
_MoreWindows:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [EBP+08H]
L_319:
;
; Line 603:	{
;
;
; Line 604:	if (DialogBox(wnd, &Windows, TRUE, WindowPrep))
;
	PUSH	DWORD _WindowPrep
	PUSH	BYTE 01H
	PUSH	DWORD _Windows
	PUSH	EBX
	CALL	_DialogBox
	ADD	ESP,BYTE 010H
	TEST	EAX,EAX
	JE	SHORT	L_320
;
; Line 605:	ChooseWindow(wnd, WindowSel);
;
	PUSH	DWORD [_WindowSel]
	PUSH	EBX
	CALL	_ChooseWindow
	ADD	ESP,BYTE 08H
L_320:
;
; Line 606:	}
;
L_318:
	POP	EBX
	POP	EBP
	RET
;
; Line 610:	static void ChooseWindow(WINDOW wnd, int WindowNo)
;
_ChooseWindow:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
L_323:
;
; Line 611:	{
;
;
; Line 612:	WINDOW cwnd = FirstWindow(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EAX+040H]
	JMP	SHORT	L_324
L_326:
;
; Line 614:	if (isVisible(cwnd) &&
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_327
	CMP	DWORD [ESI+00H],BYTE 05H
	JE	SHORT	L_327
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_327
;
; Line 617:	if (WindowNo-- == 0)
;
	MOV	EAX,DWORD [EBP+0CH]
	DEC	DWORD [EBP+0CH]
	TEST	EAX,EAX
	JE	SHORT	L_325
;
; Line 618:	break;
;
L_329:
L_327:
;
; Line 619:	cwnd = NextWindow(cwnd);
;
	MOV	ESI,DWORD [ESI+048H]
L_324:
;
; Line 613:	while (cwnd != NULL)	{
;
	TEST	ESI,ESI
	JNE	SHORT	L_326
L_325:
;
; Line 621:	if (cwnd != NULL)    {
;
	TEST	ESI,ESI
	JE	SHORT	L_331
;
; Line 622:	SendMessage(cwnd, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 623:	if (cwnd->condition == ISMINIMIZED)
;
	CMP	DWORD [ESI+05CH],BYTE 01H
	JNE	SHORT	L_333
;
; Line 624:	SendMessage(cwnd, RESTORE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 010H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_333:
L_331:
;
; Line 626:	}
;
L_322:
	POP	ESI
	POP	EBP
	RET
;
; Line 629:	static void CloseAll(WINDOW wnd, int closing)
;
_CloseAll:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
L_336:
;
; Line 630:	{
;
;
; Line 632:	SendMessage(wnd, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 633:	wnd1 = LastWindow(wnd);
;
	MOV	ESI,DWORD [EDI+044H]
	JMP	SHORT	L_337
L_339:
;
; Line 635:	wnd2 = PrevWindow(wnd1);
;
	MOV	EBX,DWORD [ESI+04CH]
;
; Line 636:	if (isVisible(wnd1) &&
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_340
	CMP	DWORD [ESI+00H],BYTE 05H
	JE	SHORT	L_340
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_340
	CMP	DWORD [ESI+00H],BYTE 06H
	JE	SHORT	L_340
;
; Line 639:	ClearVisible(wnd1);
;
	AND	DWORD [ESI+054H],BYTE 0FFFFFFBFH
;
; Line 640:	SendMessage(wnd1, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_340:
;
; Line 642:	wnd1 = wnd2;
;
	MOV	ESI,EBX
L_337:
;
; Line 634:	while (wnd1 != NULL)	{
;
	TEST	ESI,ESI
	JNE	SHORT	L_339
L_338:
;
; Line 644:	if (!closing)
;
	CMP	DWORD [EBP+0CH],BYTE 00H
	JNE	SHORT	L_342
;
; Line 645:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_342:
;
; Line 646:	}
;
L_335:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 650:	static void DoWindowColors(WINDOW wnd)
;
_DoWindowColors:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
L_345:
;
; Line 651:	{
;
;
; Line 653:	InitWindowColors(wnd);
;
	PUSH	EDI
	CALL	_InitWindowColors
	POP	ECX
;
; Line 654:	cwnd = FirstWindow(wnd);
;
	MOV	ESI,DWORD [EDI+040H]
	JMP	SHORT	L_346
L_348:
;
; Line 656:	DoWindowColors(cwnd);
;
	PUSH	ESI
	CALL	_DoWindowColors
	POP	ECX
;
; Line 657:	if (GetClass(cwnd) == TEXT && GetText(cwnd) != NULL)
;
	CMP	DWORD [ESI+00H],BYTE 0DH
	JNE	SHORT	L_349
	CMP	DWORD [ESI+098H],BYTE 00H
	JE	SHORT	L_349
;
; Line 658:	SendMessage(cwnd, CLEARTEXT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 033H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_349:
;
; Line 659:	cwnd = NextWindow(cwnd);
;
	MOV	ESI,DWORD [ESI+048H]
L_346:
;
; Line 655:	while (cwnd != NULL)	{
;
	TEST	ESI,ESI
	JNE	SHORT	L_348
L_347:
;
; Line 661:	}
;
L_344:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
;
; Line 664:	static void SelectColors(WINDOW wnd)
;
_SelectColors:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	ESI,DWORD _cfg
	MOV	EBX,DWORD _Display
L_352:
;
; Line 665:	{
;
;
; Line 666:	if (RadioButtonSetting(&Display, ID_MONO))
;
	PUSH	BYTE 041H
	PUSH	EBX
	CALL	_RadioButtonSetting
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JE	SHORT	L_353
;
; Line 667:	cfg.mono = 1;
;
	MOV	BYTE [ESI+0BH],01H
	JMP	SHORT	L_354
L_353:
;
; Line 668:	else if (RadioButtonSetting(&Display, ID_REVERSE))
;
	PUSH	BYTE 042H
	PUSH	EBX
	CALL	_RadioButtonSetting
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JE	SHORT	L_355
;
; Line 669:	cfg.mono = 2;
;
	MOV	BYTE [ESI+0BH],02H
	JMP	SHORT	L_356
L_355:
;
; Line 671:	cfg.mono = 0;
;
	MOV	BYTE [ESI+0BH],00H
L_356:
L_354:
;
; Line 672:	cfg.snowy = CheckBoxSetting(&Display, ID_SNOWY);
;
	PUSH	BYTE 03FH
	PUSH	EBX
	CALL	_CheckBoxSetting
	ADD	ESP,BYTE 08H
	MOV	DWORD [ESI+010H],EAX
;
; Line 673:	get_videomode();
;
	CALL	_get_videomode
;
; Line 674:	if ((ismono() || video_mode == 2) && cfg.mono == 0)
;
	CMP	DWORD [_video_mode],BYTE 07H
	JE	SHORT	L_359
	CMP	DWORD [_video_mode],BYTE 02H
	JNE	SHORT	L_357
L_359:
	MOVSX	EAX,BYTE [ESI+0BH]
	TEST	EAX,EAX
	JNE	SHORT	L_357
;
; Line 675:	cfg.mono = 1;
;
	MOV	BYTE [ESI+0BH],01H
L_357:
;
; Line 677:	if (cfg.mono == 1)
;
	MOVSX	EAX,BYTE [ESI+0BH]
	CMP	EAX,BYTE 01H
	JNE	SHORT	L_360
;
; Line 678:	memcpy(cfg.clr, bw, sizeof bw);
;
	PUSH	DWORD 0C0H
	PUSH	DWORD _bw
	MOV	EAX,ESI
	ADD	EAX,BYTE 055H
	PUSH	EAX
	CALL	_memcpy
	ADD	ESP,BYTE 0CH
	JMP	SHORT	L_361
L_360:
;
; Line 679:	else if (cfg.mono == 2)
;
	MOVSX	EAX,BYTE [ESI+0BH]
	CMP	EAX,BYTE 02H
	JNE	SHORT	L_362
;
; Line 680:	memcpy(cfg.clr, reverse, sizeof reverse);
;
	PUSH	DWORD 0C0H
	PUSH	DWORD _reverse
	MOV	EAX,ESI
	ADD	EAX,BYTE 055H
	PUSH	EAX
	CALL	_memcpy
	ADD	ESP,BYTE 0CH
	JMP	SHORT	L_363
L_362:
;
; Line 682:	memcpy(cfg.clr, color, sizeof color);
;
	PUSH	DWORD 0C0H
	PUSH	DWORD _color
	MOV	EAX,ESI
	ADD	EAX,BYTE 055H
	PUSH	EAX
	CALL	_memcpy
	ADD	ESP,BYTE 0CH
L_363:
L_361:
;
; Line 683:	DoWindowColors(wnd);
;
	PUSH	DWORD [EBP+08H]
	CALL	_DoWindowColors
	POP	ECX
;
; Line 684:	}
;
L_351:
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 687:	static void SelectLines(WINDOW wnd)
;
_SelectLines:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD ___seg0040
	MOV	EBX,DWORD _cfg
L_365:
;
; Line 688:	{
;
;
; Line 689:	cfg.ScreenLines = 25;
;
	MOV	DWORD [EBX+034H],019H
;
; Line 690:	if (isEGA() || isVGA())    {
;
	CALL	_isEGA
	TEST	EAX,EAX
	JNE	SHORT	L_368
	CALL	_isVGA
	TEST	EAX,EAX
	JE	SHORT	L_366
L_368:
;
; Line 691:	if (RadioButtonSetting(&Display, ID_43LINES))
;
	PUSH	BYTE 044H
	PUSH	DWORD _Display
	CALL	_RadioButtonSetting
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JE	SHORT	L_369
;
; Line 692:	cfg.ScreenLines = 43;
;
	MOV	DWORD [EBX+034H],02BH
	JMP	SHORT	L_370
L_369:
;
; Line 693:	else if (RadioButtonSetting(&Display, ID_50LINES))
;
	PUSH	BYTE 045H
	PUSH	DWORD _Display
	CALL	_RadioButtonSetting
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JE	SHORT	L_371
;
; Line 694:	cfg.ScreenLines = 50;
;
	MOV	DWORD [EBX+034H],032H
L_371:
L_370:
L_366:
;
; Line 696:	if (SCREENHEIGHT != cfg.ScreenLines)    {
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_377
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_375
L_377:
	MOV	EAX,084H
	MOVZX	ECX,WORD [EDI+00H]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_376
L_375:
	MOV	EAX,019H
L_376:
	CMP	EAX,DWORD [EBX+034H]
	JE	NEAR	L_373
;
; Line 697:	SetScreenHeight(cfg.ScreenLines);
;
	PUSH	DWORD [EBX+034H]
	CALL	_SetScreenHeight
	POP	ECX
;
; Line 699:	if (wnd->condition == ISMAXIMIZED)	{
;
	CMP	DWORD [ESI+05CH],BYTE 02H
	JNE	SHORT	L_378
;
; Line 700:	SendMessage(wnd, SIZE, (PARAM) GetRight(wnd),
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_382
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_380
L_382:
	MOV	EAX,084H
	MOVZX	ECX,WORD [EDI+00H]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_381
L_380:
	MOV	EAX,019H
L_381:
	DEC	EAX
	PUSH	EAX
	PUSH	DWORD [ESI+014H]
	PUSH	BYTE 0DH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 702:	return;
;
	JMP	NEAR	L_364
L_378:
;
; Line 705:	if (WindowHeight(wnd) > SCREENHEIGHT)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_387
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_385
L_387:
	MOV	EAX,084H
	MOVZX	ECX,WORD [EDI+00H]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_386
L_385:
	MOV	EAX,019H
L_386:
	CMP	DWORD [ESI+01CH],EAX
	JLE	SHORT	L_383
;
; Line 706:	SendMessage(wnd, SIZE, (PARAM) GetRight(wnd),
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_390
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_388
L_390:
	MOV	EAX,084H
	MOVZX	ECX,WORD [EDI+00H]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_389
L_388:
	MOV	EAX,019H
L_389:
	ADD	EAX,DWORD [ESI+010H]
	DEC	EAX
	PUSH	EAX
	PUSH	DWORD [ESI+014H]
	PUSH	BYTE 0DH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_383:
;
; Line 709:	if (GetTop(wnd) >= SCREENHEIGHT-1)
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_395
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_393
L_395:
	MOV	EAX,084H
	MOVZX	ECX,WORD [EDI+00H]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_394
L_393:
	MOV	EAX,019H
L_394:
	DEC	EAX
	CMP	DWORD [ESI+010H],EAX
	JL	SHORT	L_391
;
; Line 710:	SendMessage(wnd, MOVE, (PARAM) GetLeft(wnd),
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_398
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_396
L_398:
	MOV	EAX,084H
	MOVZX	ECX,WORD [EDI+00H]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_397
L_396:
	MOV	EAX,019H
L_397:
	SUB	EAX,DWORD [ESI+01CH]
	PUSH	EAX
	PUSH	DWORD [ESI+0CH]
	PUSH	BYTE 0CH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_391:
L_373:
;
; Line 713:	}
;
L_364:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 716:	static void SetScreenHeight(int height)
;
_SetScreenHeight:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [EBP+08H]
L_400:
;
; Line 717:	{
;
;
; Line 718:	if (isEGA() || isVGA())    {
;
	CALL	_isEGA
	TEST	EAX,EAX
	JNE	SHORT	L_403
	CALL	_isVGA
	TEST	EAX,EAX
	JE	NEAR	L_401
L_403:
;
; Line 719:	SendMessage(NULL, SAVE_CURSOR, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01CH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 720:	switch (height)    {
;
	CMP	EBX,BYTE 019H
	JE	SHORT	L_406
	CMP	EBX,BYTE 02BH
	JE	SHORT	L_407
	CMP	EBX,BYTE 032H
	JE	SHORT	L_408
	JMP	SHORT	L_405
L_406:
;
; Line 722:	Set25();
;
	CALL	_Set25
;
; Line 723:	break;
;
	JMP	SHORT	L_404
L_407:
;
; Line 725:	Set43();
;
	CALL	_Set43
;
; Line 726:	break;
;
	JMP	SHORT	L_404
L_408:
;
; Line 728:	Set50();
;
	CALL	_Set50
;
; Line 729:	break;
;
	JMP	SHORT	L_404
L_405:
;
; Line 731:	break;
;
	JMP	SHORT	L_404
L_404:
;
; Line 733:	pokeb(__seg0040, 0x84,  height-1);
;
	MOV	EAX,EBX
	DEC	EAX
	MOV	ECX,084H
	MOVZX	EDX,WORD [___seg0040]
	MOV	FS,DX
	MOV	BYTE [FS:ECX+00H],AL
;
; Line 734:	SendMessage(NULL, RESTORE_CURSOR, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 01DH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 735:	SendMessage(NULL, RESET_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 020H
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 736:	SendMessage(NULL, SHOW_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02AH
	PUSH	BYTE 00H
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_401:
;
; Line 738:	}
;
L_399:
	POP	EBX
	POP	EBP
	RET
;
; Line 743:	static void SelectTexture(void)
;
_SelectTexture:
L_410:
;
; Line 744:	{
;
;
; Line 745:	cfg.Texture = CheckBoxSetting(&Display, ID_TEXTURE);
;
	PUSH	BYTE 03EH
	PUSH	DWORD _Display
	CALL	_CheckBoxSetting
	ADD	ESP,BYTE 08H
	MOV	DWORD [030H+_cfg],EAX
;
; Line 746:	}
;
L_409:
	RET
;
; Line 749:	static void SelectBorder(WINDOW wnd)
;
_SelectBorder:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_412:
;
; Line 750:	{
;
;
; Line 751:	cfg.Border = CheckBoxSetting(&Display, ID_BORDER);
;
	PUSH	BYTE 03BH
	PUSH	DWORD _Display
	CALL	_CheckBoxSetting
	ADD	ESP,BYTE 08H
	MOV	DWORD [024H+_cfg],EAX
;
; Line 752:	if (cfg.Border)
;
	CMP	DWORD [024H+_cfg],BYTE 00H
	JE	SHORT	L_413
;
; Line 753:	AddAttribute(wnd, HASBORDER);
;
	BTS	DWORD [ESI+054H],0EH
	JMP	SHORT	L_414
L_413:
;
; Line 755:	ClearAttribute(wnd, HASBORDER);
;
	AND	DWORD [ESI+054H],0FFFFBFFFH
L_414:
;
; Line 756:	}
;
L_411:
	POP	ESI
	POP	EBP
	RET
;
; Line 759:	static void SelectStatusBar(WINDOW wnd)
;
_SelectStatusBar:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_416:
;
; Line 760:	{
;
;
; Line 761:	cfg.StatusBar = CheckBoxSetting(&Display, ID_STATUSBAR);
;
	PUSH	BYTE 03DH
	PUSH	DWORD _Display
	CALL	_CheckBoxSetting
	ADD	ESP,BYTE 08H
	MOV	DWORD [02CH+_cfg],EAX
;
; Line 762:	if (cfg.StatusBar)
;
	CMP	DWORD [02CH+_cfg],BYTE 00H
	JE	SHORT	L_417
;
; Line 763:	AddAttribute(wnd, HASSTATUSBAR);
;
	BTS	DWORD [ESI+054H],0FH
	JMP	SHORT	L_418
L_417:
;
; Line 765:	ClearAttribute(wnd, HASSTATUSBAR);
;
	AND	DWORD [ESI+054H],0FFFF7FFFH
L_418:
;
; Line 766:	}
;
L_415:
	POP	ESI
	POP	EBP
	RET
;
; Line 769:	static void SelectTitle(WINDOW wnd)
;
_SelectTitle:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_420:
;
; Line 770:	{
;
;
; Line 771:	cfg.Title = CheckBoxSetting(&Display, ID_TITLE);
;
	PUSH	BYTE 03CH
	PUSH	DWORD _Display
	CALL	_CheckBoxSetting
	ADD	ESP,BYTE 08H
	MOV	DWORD [028H+_cfg],EAX
;
; Line 772:	if (cfg.Title)
;
	CMP	DWORD [028H+_cfg],BYTE 00H
	JE	SHORT	L_421
;
; Line 773:	AddAttribute(wnd, HASTITLEBAR);
;
	BTS	DWORD [ESI+054H],08H
	JMP	SHORT	L_422
L_421:
;
; Line 775:	ClearAttribute(wnd, HASTITLEBAR);
;
	AND	DWORD [ESI+054H],0FFFFFEFFH
L_422:
;
; Line 776:	}
;
L_419:
	POP	ESI
	POP	EBP
	RET
SECTION _STRING
L_272:
	DB	07EH,043H,06CH,06FH,073H,065H,020H,061H,06CH,06CH,00H
L_265:
	DB	055H,06EH,074H,069H,074H,06CH,065H,064H,00H
L_207:
	DB	043H,04FH,04DH,053H,050H,045H,043H,00H
L_206:
	DB	054H,06FH,020H,072H,065H,074H,075H,072H,06EH,020H,074H,06FH
	DB	020H,025H,073H,02CH,020H,065H,078H,065H,063H,075H,074H,065H
	DB	020H,074H,068H,065H,020H,044H,04FH,053H,020H,065H,078H,069H
	DB	074H,020H,063H,06FH,06DH,06DH,061H,06EH,064H,02EH,00H
L_125:
	DB	048H,065H,06CH,070H,049H,06EH,064H,065H,078H,00H
L_124:
	DB	04BH,065H,079H,073H,048H,065H,06CH,070H,00H
L_123:
	DB	045H,078H,074H,048H,065H,06CH,070H,00H
L_122:
	DB	048H,065H,06CH,070H,048H,065H,06CH,070H,00H
L_9:
	DB	07EH,039H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_8:
	DB	07EH,038H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_7:
	DB	07EH,037H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_6:
	DB	07EH,036H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_5:
	DB	07EH,035H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_4:
	DB	07EH,034H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_3:
	DB	07EH,033H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_2:
	DB	07EH,032H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
L_1:
	DB	07EH,031H,02EH,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H,020H
	DB	020H,00H
SECTION _DATA

_DisplayModified	DD	00H

_Menus	DD	L_1,L_2,L_3,L_4,L_5,L_6,L_7
	DD	L_8,L_9
SECTION _BSS

_ScreenHeight	RESB	04H
[GLOBAL	_ApplicationWindow]

_ApplicationWindow	RESB	04H

_oldFocus	RESB	04H

_WindowSel	RESB	04H

_Cwd	RESB	0104H
[GLOBAL	_Argv]

_Argv	RESB	04H
SECTION _CONST

SECTION _TEXT
[EXTERN	_color]
[EXTERN	_SetNextFocus]
[EXTERN	_SwapCursorStack]
[EXTERN	_DFlatApplication]
[EXTERN	_MessageLog]
[EXTERN	_WindowMoving]
[EXTERN	_Windows]
[EXTERN	_InitWindowColors]
[EXTERN	_CreateWindow]
[EXTERN	_PushRadioButton]
[EXTERN	_AltDown]
[EXTERN	_WindowSizing]
[EXTERN	_getcwd]
[EXTERN	_printf]
[EXTERN	_inFocus]
[EXTERN	_chdir]
[EXTERN	_isVisible]
[EXTERN	___stdout]
[EXTERN	_ConsoleBackgroundMode]
[EXTERN	_FindCommand]
[EXTERN	_strncpy]
[EXTERN	_UnLoadHelpFile]
[EXTERN	_DialogBox]
[EXTERN	_get_videomode]
[EXTERN	_ClearWindow]
[EXTERN	_isEGA]
[EXTERN	_memcpy]
[EXTERN	_ControlSetting]
[EXTERN	_setdisk]
[EXTERN	_cfg]
[EXTERN	_fflush]
[EXTERN	_video_mode]
[EXTERN	_getenv]
[EXTERN	_ControlWindow]
[EXTERN	_BuildSystemMenu]
[EXTERN	_reverse]
[EXTERN	_CurrentMenuSelection]
[EXTERN	_isVGA]
[EXTERN	_Display]
[EXTERN	_CheckBoxSetting]
[EXTERN	_classdefs]
[EXTERN	_Set25]
[EXTERN	_Set43]
[EXTERN	_bw]
[EXTERN	_Set50]
[EXTERN	_SendMessage]
[EXTERN	_DisplayHelp]
[EXTERN	_PostMessage]
[EXTERN	___seg0040]
[EXTERN	_SaveConfig]
[EXTERN	_RadioButtonSetting]
[EXTERN	_spawnl]
[EXTERN	_toupper]
