	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 24:	static int SetFocusMsg(WINDOW wnd, PARAM p1)
;
_SetFocusMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+0CH]
L_2:
;
; Line 25:	{
;
;
; Line 27:	rtn = BaseWndProc(MENUBAR, wnd, SETFOCUS, p1, 0);
;
	PUSH	BYTE 00H
	PUSH	EBX
	PUSH	BYTE 08H
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+03CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	EDI,EAX
;
; Line 28:	if (!(int)p1)
;
	TEST	EBX,EBX
	JNE	SHORT	L_3
;
; Line 29:	SendMessage(GetParent(wnd), ADDSTATUS, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 04DH
	PUSH	DWORD [ESI+03CH]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_4
L_3:
;
; Line 31:	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_4:
;
; Line 32:	return rtn;
;
	MOV	EAX,EDI
L_1:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 36:	static void BuildMenuMsg(WINDOW wnd, PARAM p1)
;
_BuildMenuMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_6:
;
; Line 37:	{
;
;
; Line 38:	int offset = 3;
;
	MOV	EBX,03H
;
; Line 39:	reset_menubar(wnd);
;
	PUSH	ESI
	CALL	_reset_menubar
	POP	ECX
;
; Line 40:	mctr = 0;
;
	MOV	DWORD [_mctr],00H
;
; Line 41:	ActiveMenuBar = (MBAR *) p1;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	DWORD [_ActiveMenuBar],EAX
;
; Line 42:	ActiveMenu = ActiveMenuBar->PullDown;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	ADD	EAX,BYTE 04H
	MOV	DWORD [_ActiveMenu],EAX
	JMP	NEAR	L_7
L_9:
;
; Line 46:	if (tstrlen(GetText(wnd)+offset) <
;
	MOV	EAX,DWORD [_ActiveMenu]
	PUSH	DWORD [EAX+00H]
	CALL	_strlen
	POP	ECX
	ADD	EAX,BYTE 03H
	PUSH	EAX
	MOV	EAX,EBX
	SHL	EAX,01H
	ADD	EAX,DWORD [ESI+098H]
	PUSH	EAX
	CALL	_tstrlen
	POP	ECX
	MOV	ECX,EAX
	POP	EAX
	CMP	ECX,EAX
	JC	NEAR	L_8
;
; Line 48:	break;
;
L_10:
;
; Line 49:	GetText(wnd) = DFrealloc(GetText(wnd),
;
	PUSH	DWORD [ESI+098H]
	CALL	_tstrlen
	POP	ECX
	ADD	EAX,BYTE 05H
	SHL	EAX,01H
	PUSH	EAX
	PUSH	DWORD [ESI+098H]
	CALL	_DFrealloc
	ADD	ESP,BYTE 08H
	MOV	DWORD [ESI+098H],EAX
;
; Line 51:	memmove(GetText(wnd) + offset+4, GetText(wnd) + offset,
;
	MOV	EAX,EBX
	SHL	EAX,01H
	ADD	EAX,DWORD [ESI+098H]
	PUSH	EAX
	CALL	_tstrlen
	POP	ECX
	INC	EAX
	SHL	EAX,01H
	PUSH	EAX
	MOV	EAX,EBX
	SHL	EAX,01H
	ADD	EAX,DWORD [ESI+098H]
	PUSH	EAX
	MOV	EAX,EBX
	SHL	EAX,01H
	ADD	EAX,DWORD [ESI+098H]
	ADD	EAX,BYTE 08H
	PUSH	EAX
	CALL	_memmove
	ADD	ESP,BYTE 0CH
;
; Line 53:	CopyCommand(GetText(wnd)+offset,ActiveMenu->Title,FALSE,
;
	MOVSX	EAX,BYTE [ESI+035H]
	PUSH	EAX
	MOVSX	EAX,BYTE [ESI+034H]
	PUSH	EAX
	PUSH	BYTE 00H
	MOV	EAX,DWORD [_ActiveMenu]
	PUSH	DWORD [EAX+00H]
	MOV	EAX,EBX
	SHL	EAX,01H
	ADD	EAX,DWORD [ESI+098H]
	PUSH	EAX
	CALL	_CopyCommand
	ADD	ESP,BYTE 014H
;
; Line 55:	menu[mctr].x1 = offset;
;
	MOV	EAX,DWORD [_mctr]
	IMUL	EAX,BYTE 09H
	MOV	DWORD [EAX+_menu+00H],EBX
;
; Line 56:	offset += strlen(ActiveMenu->Title) + (MSPACE);
;
	MOV	EAX,DWORD [_ActiveMenu]
	PUSH	DWORD [EAX+00H]
	CALL	_strlen
	POP	ECX
	ADD	EAX,BYTE 02H
	ADD	EBX,EAX
;
; Line 57:	menu[mctr].x2 = offset-MSPACE - 1;
;
	MOV	EAX,EBX
	ADD	EAX,BYTE 0FFFFFFFDH
	MOV	ECX,DWORD [_mctr]
	IMUL	ECX,BYTE 09H
	MOV	DWORD [ECX+04H+_menu+00H],EAX
;
; Line 58:	cp = strchr(ActiveMenu->Title, SHORTCUTCHAR);
;
	PUSH	BYTE 07EH
	MOV	EAX,DWORD [_ActiveMenu]
	PUSH	DWORD [EAX+00H]
	CALL	_strchr
	ADD	ESP,BYTE 08H
	MOV	EDI,EAX
;
; Line 59:	if (cp)
;
	TEST	EDI,EDI
	JE	SHORT	L_12
;
; Line 60:	menu[mctr].sc = tolower(*(cp+1));
;
	MOVSX	EAX,BYTE [EDI+01H]
	PUSH	EAX
	CALL	_tolower
	POP	ECX
	MOV	ECX,DWORD [_mctr]
	IMUL	ECX,BYTE 09H
	MOV	BYTE [ECX+08H+_menu+00H],AL
L_12:
;
; Line 61:	mctr++;
;
	INC	DWORD [_mctr]
;
; Line 62:	ActiveMenu++;
;
	ADD	DWORD [_ActiveMenu],01B8H
L_7:
;
; Line 43:	while (ActiveMenu->Title != NULL &&
;
	MOV	EAX,DWORD [_ActiveMenu]
	CMP	DWORD [EAX+00H],BYTE 00H
	JE	SHORT	L_14
	MOV	EAX,DWORD [_ActiveMenu]
	CMP	DWORD [EAX+00H],BYTE 0FFFFFFFFH
	JNE	NEAR	L_9
L_14:
L_8:
;
; Line 64:	ActiveMenu = ActiveMenuBar->PullDown;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	ADD	EAX,BYTE 04H
	MOV	DWORD [_ActiveMenu],EAX
;
; Line 65:	}
;
L_5:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 68:	static void PaintMsg(WINDOW wnd)
;
_PaintMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_16:
;
; Line 69:	{
;
;
; Line 70:	if (Selecting)
;
	CMP	DWORD [_Selecting],BYTE 00H
	JNE	NEAR	L_15
;
; Line 71:	return;
;
L_17:
;
; Line 72:	if (wnd == inFocus)
;
	CMP	ESI,DWORD [_inFocus]
	JNE	SHORT	L_19
;
; Line 73:	SendMessage(GetParent(wnd), ADDSTATUS, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 04DH
	PUSH	DWORD [ESI+03CH]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_19:
;
; Line 74:	twputs(wnd, GetText(wnd), 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	DWORD [ESI+098H]
	PUSH	ESI
	CALL	_twputs
	ADD	ESP,BYTE 010H
;
; Line 75:	if (ActiveMenuBar->ActiveSelection != -1 &&
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	CMP	DWORD [EAX+00H],BYTE 0FFFFFFFFH
	JE	NEAR	L_21
	CMP	ESI,DWORD [_inFocus]
	JE	SHORT	L_23
	CMP	DWORD [_mwnd],BYTE 00H
	JE	NEAR	L_21
L_23:
;
; Line 82:	sel = DFmalloc(200 * sizeof(ATTRCHR));
;
	PUSH	DWORD 0190H
	CALL	_DFmalloc
	POP	ECX
	MOV	DWORD [EBP-014H],EAX
;
; Line 83:	offset=menu[ActiveMenuBar->ActiveSelection].x1;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	EAX,DWORD [EAX+00H]
	IMUL	EAX,BYTE 09H
	MOV	EAX,DWORD [EAX+_menu+00H]
	MOV	DWORD [EBP-0CH],EAX
;
; Line 84:	offset1=menu[ActiveMenuBar->ActiveSelection].x2;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	EAX,DWORD [EAX+00H]
	IMUL	EAX,BYTE 09H
	MOV	EAX,DWORD [EAX+04H+_menu+00H]
	MOV	DWORD [EBP-08H],EAX
;
; Line 85:	GetText(wnd)[offset1].ch = '\0';
;
	MOV	EAX,DWORD [ESI+098H]
	MOV	ECX,DWORD [EBP-08H]
	MOV	BYTE [EAX+ECX*2+00H],00H
	MOV	EBX,00H
	JMP	SHORT	L_26
L_24:
;
; Line 88:	sel[i].ch = 0;
;
	MOV	EAX,DWORD [EBP-014H]
	MOV	BYTE [EAX+EBX*2+00H],00H
;
; Line 86:	for (i=0; i < 200; i++)
;
L_25:
	INC	EBX
L_26:
	CMP	EBX,0C8H
	JL	SHORT	L_24
L_27:
;
; Line 90:	len = offset1 - offset;
;
	MOV	EAX,DWORD [EBP-08H]
	SUB	EAX,DWORD [EBP-0CH]
	MOV	DWORD [EBP-04H],EAX
;
; Line 91:	memcpy(sel, GetText(wnd) + offset, (len + 1) * sizeof(ATTRCHR));
;
	MOV	EAX,DWORD [EBP-04H]
	INC	EAX
	SHL	EAX,01H
	PUSH	EAX
	MOV	EAX,DWORD [EBP-0CH]
	SHL	EAX,01H
	ADD	EAX,DWORD [ESI+098H]
	PUSH	EAX
	PUSH	DWORD [EBP-014H]
	CALL	_memcpy
	ADD	ESP,BYTE 0CH
	MOV	EBX,00H
	JMP	SHORT	L_30
L_28:
;
; Line 94:	sel[i].attrib = clr((sel[i].attrib & 0xf), SelectBackground(wnd));
;
	MOV	EAX,DWORD [EBP-014H]
	LEA	EAX,[EAX+EBX*2+00H]
	MOVZX	EAX,BYTE [EAX+01H]
	AND	EAX,BYTE 0FH
	MOVSX	ECX,BYTE [ESI+037H]
	SAL	ECX,04H
	OR	EAX,ECX
	MOV	ECX,DWORD [EBP-014H]
	LEA	ECX,[ECX+EBX*2+00H]
	MOV	BYTE [ECX+01H],AL
;
; Line 92:	for (i=0; i < len + 1; i++)
;
L_29:
	INC	EBX
L_30:
	MOV	EAX,DWORD [EBP-04H]
	INC	EAX
	CMP	EBX,EAX
	JL	SHORT	L_28
L_31:
;
; Line 96:	twputs(wnd, sel, offset, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD [EBP-0CH]
	PUSH	DWORD [EBP-014H]
	PUSH	ESI
	CALL	_twputs
	ADD	ESP,BYTE 010H
;
; Line 97:	GetText(wnd)[offset1].ch = ' ';
;
	MOV	EAX,DWORD [ESI+098H]
	MOV	ECX,DWORD [EBP-08H]
	MOV	BYTE [EAX+ECX*2+00H],020H
;
; Line 98:	if (mwnd == NULL && wnd == inFocus) {
;
	CMP	DWORD [_mwnd],BYTE 00H
	JNE	SHORT	L_32
	CMP	ESI,DWORD [_inFocus]
	JNE	SHORT	L_32
;
; Line 99:	char *st = ActiveMenu
;
	MOV	EAX,DWORD [_ActiveMenu]
	MOV	ECX,DWORD [_ActiveMenuBar]
	MOV	ECX,DWORD [ECX+00H]
	IMUL	ECX,DWORD 01B8H
	LEA	EAX,[EAX+ECX+00H]
	MOV	EDI,DWORD [EAX+08H]
;
; Line 101:	if (st != NULL)
;
	TEST	EDI,EDI
	JE	SHORT	L_34
;
; Line 102:	SendMessage(GetParent(wnd), ADDSTATUS,
;
	PUSH	BYTE 00H
	PUSH	EDI
	PUSH	BYTE 04DH
	PUSH	DWORD [ESI+03CH]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_34:
L_32:
;
; Line 105:	free(sel);
;
	PUSH	DWORD [EBP-014H]
	CALL	_free
	POP	ECX
L_21:
;
; Line 107:	}
;
L_15:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 110:	static void KeyboardMsg(WINDOW wnd, PARAM p1)
;
_KeyboardMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
L_37:
;
; Line 111:	{
;
;
; Line 116:	int c = tolower((int)p1);
;
	PUSH	DWORD [EBP+0CH]
	CALL	_tolower
	POP	ECX
	MOV	DWORD [EBP-0CH],EAX
;
; Line 117:	int a = AltConvert((int)p1);
;
	PUSH	DWORD [EBP+0CH]
	CALL	_AltConvert
	POP	ECX
	MOV	DWORD [EBP-08H],EAX
	MOV	DWORD [EBP-04H],00H
	JMP	SHORT	L_40
L_38:
;
; Line 120:	if ((inFocus == wnd && menu[j].sc == c) ||
;
	CMP	DWORD [_inFocus],EBX
	JNE	SHORT	L_45
	MOV	EAX,DWORD [EBP-04H]
	IMUL	EAX,BYTE 09H
	MOVSX	EAX,BYTE [EAX+08H+_menu+00H]
	CMP	EAX,DWORD [EBP-0CH]
	JE	SHORT	L_44
L_45:
	CMP	DWORD [EBP-08H],BYTE 00H
	JE	SHORT	L_42
	MOV	EAX,DWORD [EBP-04H]
	IMUL	EAX,BYTE 09H
	MOVSX	EAX,BYTE [EAX+08H+_menu+00H]
	CMP	EAX,DWORD [EBP-08H]
	JNE	SHORT	L_42
L_44:
;
; Line 122:	if (mwnd)
;
	CMP	DWORD [_mwnd],BYTE 00H
	JE	SHORT	L_46
;
; Line 123:	SendMessage(mwnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	DWORD [_mwnd]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_46:
;
; Line 124:	SendMessage(wnd, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 125:	SendMessage(wnd, MB_SELECTION, j, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD [EBP-04H]
	PUSH	BYTE 03DH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 126:	return;
;
	JMP	NEAR	L_36
L_42:
;
; Line 119:	for (j = 0; j < mctr; j++)    {
;
L_39:
	INC	DWORD [EBP-04H]
L_40:
	MOV	EAX,DWORD [EBP-04H]
	CMP	EAX,DWORD [_mctr]
	JL	NEAR	L_38
L_41:
;
; Line 131:	mnu = ActiveMenu;
;
	MOV	ESI,DWORD [_ActiveMenu]
	JMP	NEAR	L_48
L_50:
;
; Line 133:	struct PopDown *pd = mnu->Selections;
;
	MOV	EAX,ESI
	ADD	EAX,BYTE 014H
	MOV	DWORD [EBP-014H],EAX
;
; Line 134:	if (mnu->PrepMenu)
;
	CMP	DWORD [ESI+04H],BYTE 00H
	JE	SHORT	L_51
;
; Line 135:	(*(mnu->PrepMenu))(GetDocFocus(), mnu);
;
	PUSH	ESI
	CALL	_GetDocFocus
	PUSH	EAX
	CALL	DWORD [ESI+04H]
	ADD	ESP,BYTE 08H
L_51:
	JMP	SHORT	L_53
L_55:
;
; Line 137:	if (pd->Accelerator == (int) p1)    {
;
	MOV	EAX,DWORD [EBP-014H]
	MOV	EAX,DWORD [EAX+08H]
	CMP	EAX,DWORD [EBP+0CH]
	JNE	SHORT	L_56
;
; Line 138:	if (pd->Attrib & INACTIVE)
;
	MOV	EAX,DWORD [EBP-014H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 01H
	JE	SHORT	L_58
;
; Line 139:	beep();
;
	CALL	_beep
	JMP	SHORT	L_59
L_58:
;
; Line 141:	if (pd->Attrib & TOGGLE)
;
	MOV	EAX,DWORD [EBP-014H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 04H
	JE	SHORT	L_60
;
; Line 142:	pd->Attrib ^= CHECKED;
;
	MOV	EAX,DWORD [EBP-014H]
	BTC	DWORD [EAX+0CH],01H
L_60:
;
; Line 143:	SendMessage(GetDocFocus(),
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	CALL	_GetDocFocus
	PUSH	EAX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 145:	PostMessage(GetParent(wnd),
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [EBP-014H]
	PUSH	DWORD [EAX+04H]
	PUSH	BYTE 02H
	PUSH	DWORD [EBX+03CH]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_59:
;
; Line 148:	return;
;
	JMP	NEAR	L_36
L_56:
;
; Line 150:	pd++;
;
	ADD	DWORD [EBP-014H],BYTE 014H
L_53:
;
; Line 136:	while (pd->SelectionTitle != NULL)    {
;
	MOV	EAX,DWORD [EBP-014H]
	CMP	DWORD [EAX+00H],BYTE 00H
	JNE	SHORT	L_55
L_54:
;
; Line 152:	mnu++;
;
	ADD	ESI,01B8H
L_48:
;
; Line 132:	while (mnu->Title != (void *)-1)    {
;
	CMP	DWORD [ESI+00H],BYTE 0FFFFFFFFH
	JNE	NEAR	L_50
L_49:
;
; Line 154:	switch ((int)p1)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD 010C4H
	JE	NEAR	L_66
	JG	SHORT	L_70
	CMP	EAX,BYTE 01BH
	JE	NEAR	L_67
	JG	SHORT	L_71
	CMP	EAX,BYTE 0DH
	JE	NEAR	L_65
	JMP	NEAR	L_63
L_71:
	CMP	EAX,DWORD 010BBH
	JE	SHORT	L_64
	JMP	NEAR	L_63
L_70:
	CMP	EAX,DWORD 010CDH
	JE	NEAR	L_68
	JG	NEAR	L_63
	CMP	EAX,DWORD 010CBH
	JE	NEAR	L_69
	JMP	NEAR	L_63
L_64:
;
; Line 156:	if (ActiveMenu == NULL || ActiveMenuBar == NULL)
;
	CMP	DWORD [_ActiveMenu],BYTE 00H
	JE	SHORT	L_74
	CMP	DWORD [_ActiveMenuBar],BYTE 00H
	JNE	SHORT	L_72
L_74:
;
; Line 157:	break;
;
	JMP	NEAR	L_62
L_72:
;
; Line 158:	sel = ActiveMenuBar->ActiveSelection;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	EDI,DWORD [EAX+00H]
;
; Line 159:	if (sel == -1)	{
;
	CMP	EDI,BYTE 0FFFFFFFFH
	JNE	SHORT	L_75
;
; Line 160:	BaseWndProc(MENUBAR, wnd, KEYBOARD, F1, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD 010BBH
	PUSH	BYTE 015H
	PUSH	EBX
	MOV	EAX,DWORD [_classdefs+03CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
;
; Line 161:	return;
;
	JMP	NEAR	L_36
L_75:
;
; Line 163:	mnu = ActiveMenu+sel;
;
	MOV	ESI,EDI
	IMUL	ESI,DWORD 01B8H
	ADD	ESI,DWORD [_ActiveMenu]
;
; Line 164:	if (mwnd == NULL ||
;
	CMP	DWORD [_mwnd],BYTE 00H
	JE	SHORT	L_79
	CMP	DWORD [ESI+014H],BYTE 00H
	JNE	SHORT	L_77
L_79:
;
; Line 166:	DisplayHelp(wnd,mnu->Title);
;
	PUSH	DWORD [ESI+00H]
	PUSH	EBX
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
;
; Line 167:	return;
;
	JMP	NEAR	L_36
L_77:
;
; Line 169:	break;
;
	JMP	NEAR	L_62
L_65:
;
; Line 171:	if (mwnd == NULL &&
;
	CMP	DWORD [_mwnd],BYTE 00H
	JNE	SHORT	L_80
	MOV	EAX,DWORD [_ActiveMenuBar]
	CMP	DWORD [EAX+00H],BYTE 0FFFFFFFFH
	JE	SHORT	L_80
;
; Line 173:	SendMessage(wnd, MB_SELECTION,
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [_ActiveMenuBar]
	PUSH	DWORD [EAX+00H]
	PUSH	BYTE 03DH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_80:
;
; Line 175:	break;
;
	JMP	NEAR	L_62
L_66:
;
; Line 177:	if (wnd != inFocus && mwnd == NULL)    {
;
	CMP	EBX,DWORD [_inFocus]
	JE	SHORT	L_82
	CMP	DWORD [_mwnd],BYTE 00H
	JNE	SHORT	L_82
;
; Line 178:	SendMessage(wnd, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 179:	if ( ActiveMenuBar->ActiveSelection == -1)
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	CMP	DWORD [EAX+00H],BYTE 0FFFFFFFFH
	JNE	SHORT	L_84
;
; Line 180:	ActiveMenuBar->ActiveSelection = 0;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	DWORD [EAX+00H],00H
L_84:
;
; Line 181:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 182:	break;
;
	JMP	NEAR	L_62
L_82:
;
; Line 185:	case ESC:
;
L_67:
;
; Line 186:	if (inFocus == wnd && mwnd == NULL)    {
;
	CMP	DWORD [_inFocus],EBX
	JNE	SHORT	L_86
	CMP	DWORD [_mwnd],BYTE 00H
	JNE	SHORT	L_86
;
; Line 187:	ActiveMenuBar->ActiveSelection = -1;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	DWORD [EAX+00H],0FFFFFFFFH
;
; Line 188:	SendMessage(GetDocFocus(),SETFOCUS,TRUE,0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	CALL	_GetDocFocus
	PUSH	EAX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 189:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_86:
;
; Line 191:	break;
;
	JMP	NEAR	L_62
L_68:
;
; Line 193:	ActiveMenuBar->ActiveSelection++;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	INC	DWORD [EAX+00H]
;
; Line 194:	if (ActiveMenuBar->ActiveSelection == mctr)
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	EAX,DWORD [EAX+00H]
	CMP	EAX,DWORD [_mctr]
	JNE	SHORT	L_88
;
; Line 195:	ActiveMenuBar->ActiveSelection = 0;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	DWORD [EAX+00H],00H
L_88:
;
; Line 196:	if (mwnd != NULL)
;
	CMP	DWORD [_mwnd],BYTE 00H
	JE	SHORT	L_90
;
; Line 197:	SendMessage(wnd, MB_SELECTION,
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [_ActiveMenuBar]
	PUSH	DWORD [EAX+00H]
	PUSH	BYTE 03DH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_91
L_90:
;
; Line 200:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_91:
;
; Line 201:	break;
;
	JMP	SHORT	L_62
L_69:
;
; Line 203:	if (ActiveMenuBar->ActiveSelection == 0 ||
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	CMP	DWORD [EAX+00H],BYTE 00H
	JE	SHORT	L_94
	MOV	EAX,DWORD [_ActiveMenuBar]
	CMP	DWORD [EAX+00H],BYTE 0FFFFFFFFH
	JNE	SHORT	L_92
L_94:
;
; Line 205:	ActiveMenuBar->ActiveSelection = mctr;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	ECX,DWORD [_mctr]
	MOV	DWORD [EAX+00H],ECX
L_92:
;
; Line 206:	--ActiveMenuBar->ActiveSelection;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	DEC	DWORD [EAX+00H]
;
; Line 207:	if (mwnd != NULL)
;
	CMP	DWORD [_mwnd],BYTE 00H
	JE	SHORT	L_95
;
; Line 208:	SendMessage(wnd, MB_SELECTION,
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [_ActiveMenuBar]
	PUSH	DWORD [EAX+00H]
	PUSH	BYTE 03DH
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_96
L_95:
;
; Line 211:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_96:
;
; Line 212:	break;
;
	JMP	SHORT	L_62
L_63:
;
; Line 214:	break;
;
	JMP	SHORT	L_62
L_62:
;
; Line 216:	}
;
L_36:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 219:	static void LeftButtonMsg(WINDOW wnd, PARAM p1)
;
_LeftButtonMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
L_98:
;
; Line 220:	{
;
;
; Line 222:	int mx = (int) p1 - GetLeft(wnd);
;
	MOV	ESI,DWORD [EBP+0CH]
	SUB	ESI,DWORD [EDI+0CH]
	MOV	EBX,00H
	JMP	SHORT	L_101
L_99:
;
; Line 225:	if (mx >= menu[i].x1 &&
;
	MOV	EAX,EBX
	IMUL	EAX,BYTE 09H
	CMP	ESI,DWORD [EAX+_menu+00H]
	JL	SHORT	L_103
	MOV	EAX,EBX
	IMUL	EAX,BYTE 09H
	CMP	ESI,DWORD [EAX+04H+_menu+00H]
	JNG	SHORT	L_102
;
; Line 227:	break;
;
L_103:
;
; Line 224:	for (i = 0; i < mctr; i++)
;
L_100:
	INC	EBX
L_101:
	CMP	EBX,DWORD [_mctr]
	JL	SHORT	L_99
L_102:
;
; Line 228:	if (i < mctr)
;
	CMP	EBX,DWORD [_mctr]
	JGE	SHORT	L_105
;
; Line 229:	if (i != ActiveMenuBar->ActiveSelection || mwnd == NULL)
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	CMP	EBX,DWORD [EAX+00H]
	JNE	SHORT	L_109
	CMP	DWORD [_mwnd],BYTE 00H
	JNE	SHORT	L_107
L_109:
;
; Line 230:	SendMessage(wnd, MB_SELECTION, i, 0);
;
	PUSH	BYTE 00H
	PUSH	EBX
	PUSH	BYTE 03DH
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_107:
L_105:
;
; Line 231:	}
;
L_97:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 234:	static void SelectionMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_SelectionMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
L_111:
;
; Line 235:	{
;
;
; Line 239:	if (!p2)	{
;
	CMP	DWORD [EBP+010H],BYTE 00H
	JNE	SHORT	L_112
;
; Line 240:	ActiveMenuBar->ActiveSelection = -1;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	DWORD [EAX+00H],0FFFFFFFFH
;
; Line 241:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_112:
;
; Line 243:	Selecting = TRUE;
;
	MOV	DWORD [_Selecting],01H
;
; Line 244:	mnu = ActiveMenu+(int)p1;
;
	MOV	ESI,DWORD [EBP+0CH]
	IMUL	ESI,DWORD 01B8H
	ADD	ESI,DWORD [_ActiveMenu]
;
; Line 245:	if (mnu->PrepMenu != NULL)
;
	CMP	DWORD [ESI+04H],BYTE 00H
	JE	SHORT	L_114
;
; Line 246:	(*(mnu->PrepMenu))(GetDocFocus(), mnu);
;
	PUSH	ESI
	CALL	_GetDocFocus
	PUSH	EAX
	CALL	DWORD [ESI+04H]
	ADD	ESP,BYTE 08H
L_114:
;
; Line 247:	wd = MenuWidth(mnu->Selections);
;
	MOV	EAX,ESI
	ADD	EAX,BYTE 014H
	PUSH	EAX
	CALL	_MenuWidth
	POP	ECX
	MOV	DWORD [EBP-0CH],EAX
;
; Line 248:	if (p2)    {
;
	CMP	DWORD [EBP+010H],BYTE 00H
	JE	SHORT	L_116
;
; Line 249:	int brd = GetRight(wnd);
;
	MOV	EAX,DWORD [EDI+014H]
	MOV	DWORD [EBP-014H],EAX
;
; Line 250:	mx = GetLeft(mwnd) + WindowWidth(mwnd) - 1;
;
	MOV	EAX,DWORD [_mwnd]
	MOV	ECX,DWORD [_mwnd]
	MOV	EAX,DWORD [EAX+0CH]
	ADD	EAX,DWORD [ECX+020H]
	DEC	EAX
	MOV	DWORD [EBP-08H],EAX
;
; Line 251:	if (mx + wd > brd)
;
	MOV	EAX,DWORD [EBP-08H]
	ADD	EAX,DWORD [EBP-0CH]
	CMP	EAX,DWORD [EBP-014H]
	JLE	SHORT	L_118
;
; Line 252:	mx = brd - wd;
;
	MOV	EAX,DWORD [EBP-014H]
	SUB	EAX,DWORD [EBP-0CH]
	MOV	DWORD [EBP-08H],EAX
L_118:
;
; Line 253:	my = GetTop(mwnd) + mwnd->selection;
;
	MOV	EAX,DWORD [_mwnd]
	MOV	ECX,DWORD [_mwnd]
	MOV	EAX,DWORD [EAX+010H]
	ADD	EAX,DWORD [ECX+0C8H]
	MOV	DWORD [EBP-04H],EAX
	JMP	SHORT	L_117
L_116:
;
; Line 256:	int offset = menu[(int)p1].x1 ;
;
	MOV	EAX,DWORD [EBP+0CH]
	IMUL	EAX,BYTE 09H
	MOV	EBX,DWORD [EAX+_menu+00H]
;
; Line 257:	if (mwnd != NULL)
;
	CMP	DWORD [_mwnd],BYTE 00H
	JE	SHORT	L_120
;
; Line 258:	SendMessage(mwnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	DWORD [_mwnd]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_120:
;
; Line 259:	ActiveMenuBar->ActiveSelection = (int) p1;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	ECX,DWORD [EBP+0CH]
	MOV	DWORD [EAX+00H],ECX
;
; Line 260:	if (offset > WindowWidth(wnd)-wd)
;
	MOV	EAX,DWORD [EDI+020H]
	SUB	EAX,DWORD [EBP-0CH]
	CMP	EBX,EAX
	JLE	SHORT	L_122
;
; Line 261:	offset = WindowWidth(wnd)-wd;
;
	MOV	EBX,DWORD [EDI+020H]
	SUB	EBX,DWORD [EBP-0CH]
L_122:
;
; Line 262:	mx = GetLeft(wnd)+offset;
;
	MOV	EAX,DWORD [EDI+0CH]
	ADD	EAX,EBX
	MOV	DWORD [EBP-08H],EAX
;
; Line 263:	my = GetTop(wnd)+1;
;
	MOV	EAX,DWORD [EDI+010H]
	INC	EAX
	MOV	DWORD [EBP-04H],EAX
L_117:
;
; Line 265:	mwnd = CreateWindow(POPDOWNMENU, NULL,
;
	PUSH	BYTE 01H
	PUSH	BYTE 00H
	PUSH	EDI
	PUSH	BYTE 00H
	PUSH	DWORD [EBP-0CH]
	MOV	EAX,ESI
	ADD	EAX,BYTE 014H
	PUSH	EAX
	CALL	_MenuHeight
	POP	ECX
	PUSH	EAX
	PUSH	DWORD [EBP-04H]
	PUSH	DWORD [EBP-08H]
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	CALL	_CreateWindow
	ADD	ESP,BYTE 028H
	MOV	DWORD [_mwnd],EAX
;
; Line 273:	if (!p2)	{
;
	CMP	DWORD [EBP+010H],BYTE 00H
	JNE	SHORT	L_124
;
; Line 274:	Selecting = FALSE;
;
	MOV	DWORD [_Selecting],00H
;
; Line 275:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 276:	Selecting = TRUE;
;
	MOV	DWORD [_Selecting],01H
L_124:
;
; Line 278:	if (mnu->Selections[0].SelectionTitle != NULL)    {
;
	CMP	DWORD [ESI+014H],BYTE 00H
	JE	SHORT	L_126
;
; Line 279:	SendMessage(mwnd, BUILD_SELECTIONS, (PARAM) mnu, 0);
;
	PUSH	BYTE 00H
	PUSH	ESI
	PUSH	BYTE 03EH
	PUSH	DWORD [_mwnd]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 280:	SendMessage(mwnd, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	DWORD [_mwnd]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 281:	SendMessage(mwnd, SHOW_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 05H
	PUSH	DWORD [_mwnd]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_126:
;
; Line 283:	Selecting = FALSE;
;
	MOV	DWORD [_Selecting],00H
;
; Line 284:	}
;
L_110:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 287:	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+0CH]
	MOV	EDI,DWORD _mwnd
L_129:
;
; Line 288:	{
;
;
; Line 289:	if (p1 == ID_HELP)	{
;
	CMP	EBX,BYTE 036H
	JNE	SHORT	L_130
;
; Line 290:	BaseWndProc(MENUBAR, wnd, COMMAND, p1, p2);
;
	PUSH	DWORD [EBP+010H]
	PUSH	EBX
	PUSH	BYTE 02H
	PUSH	DWORD [EBP+08H]
	MOV	EAX,DWORD [_classdefs+03CH]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
;
; Line 291:	return;
;
	JMP	NEAR	L_128
L_130:
;
; Line 293:	if (isCascadedCommand(ActiveMenuBar, (int)p1))    {
;
	PUSH	EBX
	PUSH	DWORD [_ActiveMenuBar]
	CALL	_isCascadedCommand
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JE	SHORT	L_132
;
; Line 295:	MENU *mnu = ActiveMenu+mctr;
;
	MOV	ESI,DWORD [_mctr]
	IMUL	ESI,DWORD 01B8H
	ADD	ESI,DWORD [_ActiveMenu]
	JMP	SHORT	L_134
L_136:
;
; Line 297:	if (mnu->CascadeId == (int) p1)    {
;
	CMP	DWORD [ESI+0CH],EBX
	JNE	SHORT	L_137
;
; Line 298:	if (casc < MAXCASCADES)    {
;
	CMP	DWORD [_casc],BYTE 03H
	JGE	SHORT	L_139
;
; Line 299:	Cascaders[casc++] = mwnd;
;
	MOV	EAX,DWORD [_casc]
	INC	DWORD [_casc]
	MOV	ECX,DWORD [EDI+00H]
	MOV	DWORD [EAX*4+_Cascaders+00H],ECX
;
; Line 300:	SendMessage(wnd, MB_SELECTION,
;
	PUSH	BYTE 01H
	MOV	EAX,ESI
	SUB	EAX,DWORD [_ActiveMenu]
	CDQ
	IDIV	DWORD [L_141]
	PUSH	EAX
	PUSH	BYTE 03DH
	PUSH	DWORD [EBP+08H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_139:
;
; Line 303:	break;
;
	JMP	SHORT	L_135
L_137:
;
; Line 305:	mnu++;
;
	ADD	ESI,01B8H
L_134:
;
; Line 296:	while (mnu->Title != (void *)-1)    {
;
	CMP	DWORD [ESI+00H],BYTE 0FFFFFFFFH
	JNE	SHORT	L_136
L_135:
	JMP	SHORT	L_133
L_132:
;
; Line 309:	if (mwnd != NULL)
;
	CMP	DWORD [EDI+00H],BYTE 00H
	JE	SHORT	L_142
;
; Line 310:	SendMessage(mwnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	DWORD [EDI+00H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_142:
;
; Line 311:	SendMessage(GetDocFocus(), SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	CALL	_GetDocFocus
	PUSH	EAX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 312:	PostMessage(GetParent(wnd), COMMAND, p1, p2);
;
	PUSH	DWORD [EBP+010H]
	PUSH	EBX
	PUSH	BYTE 02H
	MOV	EAX,DWORD [EBP+08H]
	PUSH	DWORD [EAX+03CH]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_133:
;
; Line 314:	}
;
L_128:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 317:	static void ClosePopdownMsg(WINDOW wnd)
;
_ClosePopdownMsg:
	PUSH	EBP
	MOV	EBP,ESP
L_145:
;
; Line 318:	{
;
;
; Line 319:	if (casc > 0)
;
	CMP	DWORD [_casc],BYTE 00H
	JLE	SHORT	L_146
;
; Line 320:	SendMessage(Cascaders[--casc], CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	DEC	DWORD [_casc]
	MOV	EAX,DWORD [_casc]
	PUSH	DWORD [EAX*4+_Cascaders+00H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_147
L_146:
;
; Line 322:	mwnd = NULL;
;
	MOV	DWORD [_mwnd],00H
;
; Line 323:	ActiveMenuBar->ActiveSelection = -1;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	DWORD [EAX+00H],0FFFFFFFFH
;
; Line 324:	if (!Selecting)	{
;
	CMP	DWORD [_Selecting],BYTE 00H
	JNE	SHORT	L_148
;
; Line 325:	SendMessage(GetDocFocus(), SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	CALL	_GetDocFocus
	PUSH	EAX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 326:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	DWORD [EBP+08H]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_148:
L_147:
;
; Line 329:	}
;
L_144:
	POP	EBP
	RET
;
; Line 332:	static void CloseWindowMsg(WINDOW wnd)
;
_CloseWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_151:
;
; Line 333:	{
;
;
; Line 334:	if (GetText(wnd) != NULL)    {
;
	CMP	DWORD [ESI+098H],BYTE 00H
	JE	SHORT	L_152
;
; Line 335:	free(GetText(wnd));
;
	PUSH	DWORD [ESI+098H]
	CALL	_free
	POP	ECX
;
; Line 336:	GetText(wnd) = NULL;
;
	MOV	DWORD [ESI+098H],00H
L_152:
;
; Line 338:	mctr = 0;
;
	MOV	DWORD [_mctr],00H
;
; Line 339:	ActiveMenuBar->ActiveSelection = -1;
;
	MOV	EAX,DWORD [_ActiveMenuBar]
	MOV	DWORD [EAX+00H],0FFFFFFFFH
;
; Line 340:	ActiveMenu = NULL;
;
	MOV	DWORD [_ActiveMenu],00H
;
; Line 341:	ActiveMenuBar = NULL;
;
	MOV	DWORD [_ActiveMenuBar],00H
;
; Line 342:	}
;
L_150:
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_MenuBarProc]
;
; Line 345:	int MenuBarProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
;
_MenuBarProc:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+010H]
	MOV	EDI,DWORD _classdefs
L_155:
;
; Line 346:	{
;
;
; Line 349:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 011H
	JE	NEAR	L_167
	JA	SHORT	L_170
	CMP	EAX,BYTE 08H
	JE	NEAR	L_159
	JA	SHORT	L_171
	CMP	EAX,BYTE 03H
	JE	SHORT	L_158
	JA	SHORT	L_172
	CMP	EAX,BYTE 02H
	JE	NEAR	L_166
	JMP	NEAR	L_157
L_172:
	CMP	EAX,BYTE 07H
	JE	NEAR	L_169
	JMP	NEAR	L_157
L_171:
	CMP	EAX,BYTE 0AH
	JE	NEAR	L_162
	JA	NEAR	L_157
	CMP	EAX,BYTE 09H
	JE	SHORT	L_161
	JMP	NEAR	L_157
L_170:
	CMP	EAX,BYTE 03CH
	JE	SHORT	L_160
	JA	SHORT	L_173
	CMP	EAX,BYTE 024H
	JE	NEAR	L_164
	JA	NEAR	L_157
	CMP	EAX,BYTE 015H
	JE	NEAR	L_163
	JMP	NEAR	L_157
L_173:
	CMP	EAX,BYTE 03FH
	JE	NEAR	L_168
	JA	NEAR	L_157
	CMP	EAX,BYTE 03DH
	JE	NEAR	L_165
	JMP	NEAR	L_157
L_158:
;
; Line 351:	reset_menubar(wnd);
;
	PUSH	ESI
	CALL	_reset_menubar
	POP	ECX
;
; Line 352:	break;
;
	JMP	NEAR	L_156
L_159:
;
; Line 354:	return SetFocusMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_SetFocusMsg
	ADD	ESP,BYTE 08H
	JMP	NEAR	L_154
L_160:
;
; Line 356:	BuildMenuMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_BuildMenuMsg
	ADD	ESP,BYTE 08H
;
; Line 357:	break;
;
	JMP	NEAR	L_156
L_161:
;
; Line 359:	if (!isVisible(wnd) || GetText(wnd) == NULL)
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	SHORT	L_176
	CMP	DWORD [ESI+098H],BYTE 00H
	JNE	SHORT	L_174
L_176:
;
; Line 360:	break;
;
	JMP	NEAR	L_156
L_174:
;
; Line 361:	PaintMsg(wnd);
;
	PUSH	ESI
	CALL	_PaintMsg
	POP	ECX
;
; Line 362:	return FALSE;
;
	MOV	EAX,00H
	JMP	NEAR	L_154
L_162:
;
; Line 364:	if (mwnd == NULL)
;
	CMP	DWORD [_mwnd],BYTE 00H
	JNE	SHORT	L_177
;
; Line 365:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_177:
;
; Line 366:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_154
L_163:
;
; Line 368:	KeyboardMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_KeyboardMsg
	ADD	ESP,BYTE 08H
;
; Line 369:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_154
L_164:
;
; Line 371:	LeftButtonMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_LeftButtonMsg
	ADD	ESP,BYTE 08H
;
; Line 372:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_154
L_165:
;
; Line 374:	SelectionMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_SelectionMsg
	ADD	ESP,BYTE 0CH
;
; Line 375:	break;
;
	JMP	SHORT	L_156
L_166:
;
; Line 377:	CommandMsg(wnd, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	PUSH	ESI
	CALL	_CommandMsg
	ADD	ESP,BYTE 0CH
;
; Line 378:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_154
L_167:
;
; Line 380:	return InsideRect(p1, p2, WindowRect(wnd));
;
	CMP	EBX,DWORD [ESI+0CH]
	JL	SHORT	L_180
	CMP	EBX,DWORD [ESI+014H]
	JG	SHORT	L_180
	MOV	EAX,DWORD [EBP+014H]
	CMP	EAX,DWORD [ESI+010H]
	JL	SHORT	L_181
	MOV	EAX,DWORD [EBP+014H]
	CMP	EAX,DWORD [ESI+018H]
	JLE	SHORT	L_179
L_181:
L_180:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_179:
	SUB	EAX,EAX
	INC	EAX
	NOP
	JMP	SHORT	L_154
L_168:
;
; Line 382:	ClosePopdownMsg(wnd);
;
	PUSH	ESI
	CALL	_ClosePopdownMsg
	POP	ECX
;
; Line 383:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_154
L_169:
;
; Line 385:	rtn = BaseWndProc(MENUBAR, wnd, msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	ESI
	MOV	EAX,DWORD [EDI+03CH]
	IMUL	EAX,BYTE 0CH
	LEA	EAX,[EDI+EAX+00H]
	CALL	DWORD [EAX+04H]
	ADD	ESP,BYTE 010H
	MOV	DWORD [EBP-04H],EAX
;
; Line 386:	CloseWindowMsg(wnd);
;
	PUSH	ESI
	CALL	_CloseWindowMsg
	POP	ECX
;
; Line 387:	return rtn;
;
	MOV	EAX,DWORD [EBP-04H]
	JMP	SHORT	L_154
L_157:
;
; Line 389:	break;
;
	JMP	SHORT	L_156
L_156:
;
; Line 391:	return BaseWndProc(MENUBAR, wnd, msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	EBX
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	ESI
	MOV	EAX,DWORD [EDI+03CH]
	IMUL	EAX,BYTE 0CH
	LEA	EAX,[EDI+EAX+00H]
	CALL	DWORD [EAX+04H]
	ADD	ESP,BYTE 010H
L_154:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 395:	static void reset_menubar(WINDOW wnd)
;
_reset_menubar:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_183:
;
; Line 396:	{
;
;
; Line 397:	ATTRCHR * cp = GetText(wnd) = DFrealloc(GetText(wnd), (SCREENWIDTH+5) * sizeof(ATTRCHR));
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	ADD	EAX,BYTE 05H
	SHL	EAX,01H
	PUSH	EAX
	PUSH	DWORD [ESI+098H]
	CALL	_DFrealloc
	ADD	ESP,BYTE 08H
	MOV	DWORD [ESI+098H],EAX
	MOV	EDI,EAX
;
; Line 398:	int attr = clr(WndForeground(wnd), WndBackground(wnd));
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	MOVSX	ECX,BYTE [ESI+034H]
	OR	ECX,EAX
	MOV	DWORD [EBP-04H],ECX
	MOV	EBX,00H
	JMP	SHORT	L_186
L_184:
;
; Line 402:	cp->ch = ' ';
;
	MOV	BYTE [EDI+00H],020H
;
; Line 403:	cp->attrib = attr;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	BYTE [EDI+01H],AL
;
; Line 404:	cp++;
;
	ADD	EDI,BYTE 02H
;
; Line 400:	for (i=0; i < SCREENWIDTH +5; i++)
;
L_185:
	INC	EBX
L_186:
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	ADD	EAX,BYTE 05H
	CMP	EBX,EAX
	JL	SHORT	L_184
L_187:
;
; Line 406:	(GetText(wnd)+WindowWidth(wnd))->ch = '\0';
;
	MOV	EAX,DWORD [ESI+098H]
	MOV	ECX,DWORD [ESI+020H]
	MOV	BYTE [EAX+ECX*2+00H],00H
;
; Line 407:	}
;
L_182:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 409:	static WINDOW GetDocFocus(void)
;
_GetDocFocus:
	PUSH	ESI
L_189:
;
; Line 410:	{
;
;
; Line 411:	WINDOW wnd = ApplicationWindow;
;
	MOV	ESI,DWORD [_ApplicationWindow]
;
; Line 412:	if (wnd != NULL)	{
;
	TEST	ESI,ESI
	JE	SHORT	L_190
;
; Line 413:	wnd = LastWindow(wnd);
;
	MOV	ESI,DWORD [ESI+044H]
	JMP	SHORT	L_192
L_194:
;
; Line 416:	wnd = PrevWindow(wnd);
;
	MOV	ESI,DWORD [ESI+04CH]
L_192:
;
; Line 414:	while (wnd != NULL && (GetClass(wnd) == MENUBAR ||
;
	TEST	ESI,ESI
	JE	SHORT	L_195
	CMP	DWORD [ESI+00H],BYTE 05H
	JE	SHORT	L_194
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_194
L_195:
L_193:
;
; Line 417:	if (wnd != NULL)
;
	TEST	ESI,ESI
	JE	SHORT	L_196
	JMP	SHORT	L_198
L_200:
;
; Line 419:	wnd = wnd->childfocus;
;
	MOV	ESI,DWORD [ESI+050H]
L_198:
;
; Line 418:	while (wnd->childfocus != NULL)
;
	CMP	DWORD [ESI+050H],BYTE 00H
	JNE	SHORT	L_200
L_199:
L_196:
L_190:
;
; Line 421:	return wnd ? wnd : ApplicationWindow;
;
	TEST	ESI,ESI
	JE	SHORT	L_201
	MOV	EAX,ESI
	JMP	SHORT	L_202
L_201:
	MOV	EAX,DWORD [_ApplicationWindow]
L_202:
L_188:
	POP	ESI
	RET
SECTION _BSS

_menu	RESB	05AH
	RESB	02H

_mctr	RESB	04H
[GLOBAL	_ActiveMenuBar]

_ActiveMenuBar	RESB	04H

_ActiveMenu	RESB	04H

_mwnd	RESB	04H

_Selecting	RESB	04H

_Cascaders	RESB	0CH

_casc	RESB	04H
SECTION _CONST

	TIMES $$-$ & 3 NOP
L_141:
	DD	01b8H

SECTION _TEXT
[EXTERN	_MenuHeight]
[EXTERN	_CreateWindow]
[EXTERN	_DFrealloc]
[EXTERN	_inFocus]
[EXTERN	_AltConvert]
[EXTERN	_isVisible]
[EXTERN	_strlen]
[EXTERN	_tstrlen]
[EXTERN	_memcpy]
[EXTERN	_twputs]
[EXTERN	_memmove]
[EXTERN	_DFmalloc]
[EXTERN	_MenuWidth]
[EXTERN	_tolower]
[EXTERN	_beep]
[EXTERN	_isCascadedCommand]
[EXTERN	_free]
[EXTERN	_ApplicationWindow]
[EXTERN	_classdefs]
[EXTERN	_SendMessage]
[EXTERN	_DisplayHelp]
[EXTERN	_PostMessage]
[EXTERN	___seg0040]
[EXTERN	_strchr]
[EXTERN	_CopyCommand]
