	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 10:	static int CreateWindowMsg(WINDOW wnd)
;
_CreateWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_2:
;
; Line 11:	{
;
;
; Line 17:	ClearAttribute(wnd, HASTITLEBAR     |                         VSCROLLBAR     |                         MOVEABLE     |                         SIZEABLE     |                         HSCROLLBAR);
;
	AND	DWORD [ESI+054H],0FFFFFEC9H
;
; Line 19:	adj = SCREENHEIGHT-1-wnd->rc.bt;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_5
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_3
L_5:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_4
L_3:
	MOV	EAX,019H
L_4:
	DEC	EAX
	SUB	EAX,DWORD [ESI+018H]
	MOV	EBX,EAX
;
; Line 20:	if (adj < 0)	{
;
	TEST	EBX,EBX
	JGE	SHORT	L_6
;
; Line 21:	wnd->rc.tp += adj;
;
	ADD	DWORD [ESI+010H],EBX
;
; Line 22:	wnd->rc.bt += adj;
;
	ADD	DWORD [ESI+018H],EBX
L_6:
;
; Line 24:	adj = SCREENWIDTH-1-wnd->rc.rt;
;
	MOV	EAX,04AH
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	MOVZX	EAX,AL
	DEC	EAX
	SUB	EAX,DWORD [ESI+014H]
	MOV	EBX,EAX
;
; Line 25:	if (adj < 0)	{
;
	TEST	EBX,EBX
	JGE	SHORT	L_8
;
; Line 26:	wnd->rc.lf += adj;
;
	ADD	DWORD [ESI+0CH],EBX
;
; Line 27:	wnd->rc.rt += adj;
;
	ADD	DWORD [ESI+014H],EBX
L_8:
;
; Line 29:	rtn = BaseWndProc(POPDOWNMENU, wnd, CREATE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 03H
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+054H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	EDI,EAX
;
; Line 30:	SendMessage(wnd, CAPTURE_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02EH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 31:	SendMessage(wnd, CAPTURE_KEYBOARD, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 016H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 32:	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 33:	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 34:	wnd->oldFocus = inFocus;
;
	MOV	EAX,DWORD [_inFocus]
	MOV	DWORD [ESI+0118H],EAX
;
; Line 35:	inFocus = wnd;
;
	MOV	DWORD [_inFocus],ESI
;
; Line 36:	return rtn;
;
	MOV	EAX,EDI
L_1:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
;
; Line 40:	static void LeftButtonMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_LeftButtonMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 048H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+010H]
	MOV	EDI,DWORD [EBP+0CH]
L_11:
;
; Line 41:	{
;
;
; Line 42:	int my = (int) p2 - GetTop(wnd);
;
	MOV	EAX,EBX
	SUB	EAX,DWORD [ESI+010H]
	MOV	DWORD [EBP-044H],EAX
;
; Line 43:	if (InsideRect(p1, p2, ClientRect(wnd)))    {
;
	PUSH	ESI
	LEA	EAX,[EBP-040H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	CMP	EDI,DWORD [EAX+00H]
	JL	SHORT	L_12
	PUSH	ESI
	LEA	EAX,[EBP-030H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	CMP	EDI,DWORD [EAX+08H]
	JG	SHORT	L_12
	PUSH	ESI
	LEA	EAX,[EBP-020H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	CMP	EBX,DWORD [EAX+04H]
	JL	SHORT	L_12
	PUSH	ESI
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	CMP	EBX,DWORD [EAX+0CH]
	JG	SHORT	L_12
;
; Line 44:	if (my != py)    {
;
	MOV	EAX,DWORD [EBP-044H]
	CMP	EAX,DWORD [_py]
	JE	SHORT	L_14
;
; Line 45:	SendMessage(wnd, LB_SELECTION,
;
	PUSH	BYTE 01H
	MOV	EAX,DWORD [ESI+094H]
	ADD	EAX,DWORD [EBP-044H]
	DEC	EAX
	PUSH	EAX
	PUSH	BYTE 040H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 47:	py = my;
;
	MOV	EAX,DWORD [EBP-044H]
	MOV	DWORD [_py],EAX
L_14:
	JMP	SHORT	L_13
L_12:
;
; Line 50:	else if ((int)p2 == GetTop(GetParent(wnd)))
;
	MOV	EAX,DWORD [ESI+03CH]
	CMP	EBX,DWORD [EAX+010H]
	JNE	SHORT	L_16
;
; Line 51:	if (GetClass(GetParent(wnd)) == MENUBAR)
;
	MOV	EAX,DWORD [ESI+03CH]
	CMP	DWORD [EAX+00H],BYTE 05H
	JNE	SHORT	L_18
;
; Line 52:	PostMessage(GetParent(wnd), LEFT_BUTTON, p1, p2);
;
	PUSH	EBX
	PUSH	EDI
	PUSH	BYTE 024H
	PUSH	DWORD [ESI+03CH]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_18:
L_16:
L_13:
;
; Line 53:	}
;
L_10:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 56:	static BOOL ButtonReleasedMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_ButtonReleasedMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 048H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+010H]
L_21:
;
; Line 57:	{
;
;
; Line 58:	py = -1;
;
	MOV	DWORD [_py],0FFFFFFFFH
;
; Line 59:	if (InsideRect((int)p1, (int)p2, ClientRect(wnd)))    {
;
	PUSH	ESI
	LEA	EAX,[EBP-040H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	MOV	ECX,DWORD [EBP+0CH]
	CMP	ECX,DWORD [EAX+00H]
	JL	NEAR	L_22
	PUSH	ESI
	LEA	EAX,[EBP-030H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	MOV	ECX,DWORD [EBP+0CH]
	CMP	ECX,DWORD [EAX+08H]
	JG	NEAR	L_22
	PUSH	ESI
	LEA	EAX,[EBP-020H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	CMP	EBX,DWORD [EAX+04H]
	JL	NEAR	L_22
	PUSH	ESI
	LEA	EAX,[EBP-010H]
	PUSH	EAX
	CALL	_ClientRect
	ADD	ESP,BYTE 08H
	CMP	EBX,DWORD [EAX+0CH]
	JG	NEAR	L_22
;
; Line 60:	int sel = (int)p2 - GetClientTop(wnd);
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_24
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_24
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_24
	MOV	EAX,03H
	JMP	SHORT	L_25
L_24:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_29
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_28
L_29:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_26
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_26
L_28:
	MOV	EAX,02H
	JMP	SHORT	L_27
L_26:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_30
	MOV	EAX,01H
	JMP	SHORT	L_31
L_30:
	MOV	EAX,00H
L_31:
L_27:
L_25:
	ADD	EAX,DWORD [ESI+010H]
	MOV	ECX,EBX
	SUB	ECX,EAX
	MOV	DWORD [EBP-048H],ECX
;
; Line 61:	if (TextLine(wnd, sel)->ch != LINE)
;
	MOV	EAX,DWORD [ESI+0C4H]
	MOV	ECX,DWORD [EBP-048H]
	MOV	ECX,DWORD [EAX+ECX*4+00H]
	MOV	EAX,DWORD [ESI+098H]
	MOVZX	EAX,BYTE [EAX+ECX*2+00H]
	CMP	EAX,0C4H
	JE	SHORT	L_32
;
; Line 62:	SendMessage(wnd, LB_CHOOSE, wnd->selection, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD [ESI+0C8H]
	PUSH	BYTE 041H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_32:
	JMP	SHORT	L_23
L_22:
;
; Line 65:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EDI,DWORD [ESI+03CH]
;
; Line 66:	if (GetClass(pwnd) == MENUBAR && (int)p2==GetTop(pwnd))
;
	CMP	DWORD [EDI+00H],BYTE 05H
	JNE	SHORT	L_34
	CMP	EBX,DWORD [EDI+010H]
	JNE	SHORT	L_34
;
; Line 67:	return FALSE;
;
	MOV	EAX,00H
	JMP	SHORT	L_20
L_34:
;
; Line 68:	if ((int)p1 == GetLeft(pwnd)+2)
;
	MOV	EAX,DWORD [EDI+0CH]
	ADD	EAX,BYTE 02H
	CMP	DWORD [EBP+0CH],EAX
	JNE	SHORT	L_36
;
; Line 69:	return FALSE;
;
	MOV	EAX,00H
	JMP	SHORT	L_20
L_36:
;
; Line 70:	SendMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 71:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_20
L_23:
;
; Line 73:	return FALSE;
;
	MOV	EAX,00H
L_20:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 77:	static void PaintMsg(WINDOW wnd)
;
_PaintMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,013CH
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD _keys
L_41:
;
; Line 78:	{
;
;
; Line 80:	unsigned char sep[80], *cp = sep;
;
	LEA	EAX,[EBP-0FCH]
	MOV	DWORD [EBP-0ACH],EAX
;
; Line 85:	ActivePopDown = pd1 = wnd->mnu->Selections;
;
	MOV	EAX,DWORD [ESI+0110H]
	ADD	EAX,BYTE 014H
	MOV	DWORD [EBP-04H],EAX
	MOV	DWORD [EBP-08H],EAX
;
; Line 86:	wd = MenuWidth(ActivePopDown)-2;
;
	PUSH	DWORD [EBP-08H]
	CALL	_MenuWidth
	POP	ECX
	SUB	EAX,BYTE 02H
	MOV	DWORD [EBP-0100H],EAX
	JMP	SHORT	L_42
L_44:
;
; Line 88:	*cp++ = LINE;
;
	MOV	EAX,DWORD [EBP-0ACH]
	INC	DWORD [EBP-0ACH]
	MOV	BYTE [EAX+00H],0C4H
L_42:
;
; Line 87:	while (wd--)
;
	MOV	EAX,DWORD [EBP-0100H]
	DEC	DWORD [EBP-0100H]
	TEST	EAX,EAX
	JNE	SHORT	L_44
L_43:
;
; Line 89:	*cp = '\0';
;
	MOV	EAX,DWORD [EBP-0ACH]
	MOV	BYTE [EAX+00H],00H
;
; Line 90:	SendMessage(wnd, CLEARTEXT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 033H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 91:	wnd->selection = wnd->mnu->Selection;
;
	MOV	EAX,DWORD [ESI+0110H]
	MOV	EAX,DWORD [EAX+010H]
	MOV	DWORD [ESI+0C8H],EAX
	JMP	NEAR	L_45
L_47:
;
; Line 93:	if (*pd1->SelectionTitle == LINE)
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	EAX,DWORD [EAX+00H]
	MOVZX	EAX,BYTE [EAX+00H]
	CMP	EAX,0C4H
	JNE	SHORT	L_48
;
; Line 94:	SendMessage(wnd, ADDTEXT, (PARAM) sep, 0);
;
	PUSH	BYTE 00H
	LEA	EAX,[EBP-0FCH]
	PUSH	EAX
	PUSH	BYTE 030H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	NEAR	L_49
L_48:
;
; Line 97:	int fg = wnd->WindowColors [STD_COLOR] [FG];
;
	MOVSX	EAX,BYTE [ESI+034H]
	MOV	DWORD [EBP-0108H],EAX
	MOV	DWORD [EBP-010CH],00H
	JMP	SHORT	L_52
L_50:
;
; Line 99:	sel[i].ch = 0;
;
	MOV	EAX,DWORD [EBP-010CH]
	MOV	BYTE [EBP+EAX*2-0A8H],00H
;
; Line 98:	for (i=0; i < 80; i++)
;
L_51:
	INC	DWORD [EBP-010CH]
L_52:
	CMP	DWORD [EBP-010CH],BYTE 050H
	JL	SHORT	L_50
L_53:
;
; Line 100:	if (pd1->Attrib & INACTIVE)
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 01H
	JE	SHORT	L_54
;
; Line 103:	fg = wnd->WindowColors [HILITE_COLOR] [FG];
;
	MOVSX	EAX,BYTE [ESI+03AH]
	MOV	DWORD [EBP-0108H],EAX
L_54:
;
; Line 104:	sel[0].attrib = clr(fg, wnd->WindowColors[STD_COLOR] [BG]) ;
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	OR	EAX,DWORD [EBP-0108H]
	MOV	BYTE [EBP-0A7H],AL
;
; Line 105:	if (pd1->Attrib & CHECKED)
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 02H
	JE	SHORT	L_56
;
; Line 107:	sel[0].ch = CHECKMARK;
;
	CALL	_isVGA
	TEST	EAX,EAX
	JNE	SHORT	L_62
	CALL	_isEGA
	TEST	EAX,EAX
	JE	SHORT	L_60
L_62:
	MOV	EAX,084H
	MOVZX	ECX,WORD [___seg0040]
	MOV	EDX,ECX
	MOV	FS,DX
	MOVSX	EAX,BYTE [FS:EAX+00H]
	INC	EAX
	JMP	SHORT	L_61
L_60:
	MOV	EAX,019H
L_61:
	CMP	EAX,BYTE 019H
	JNE	SHORT	L_58
	MOV	EAX,0FBH
	JMP	SHORT	L_59
L_58:
	MOV	EAX,04H
L_59:
	MOV	BYTE [EBP-0A8H],AL
	JMP	SHORT	L_57
L_56:
;
; Line 109:	sel[0].ch = ' ';
;
	MOV	BYTE [EBP-0A8H],020H
L_57:
;
; Line 110:	len=CopyCommand(sel+1,pd1->SelectionTitle,
;
	MOVSX	EAX,BYTE [ESI+035H]
	PUSH	EAX
	PUSH	DWORD [EBP-0108H]
	MOV	EAX,DWORD [EBP-04H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 01H
	PUSH	EAX
	MOV	EAX,DWORD [EBP-04H]
	PUSH	DWORD [EAX+00H]
	LEA	EAX,[EBP-0A6H]
	PUSH	EAX
	CALL	_CopyCommand
	ADD	ESP,BYTE 014H
	MOV	DWORD [EBP-0110H],EAX
;
; Line 114:	pos = len + 1;
;
	MOV	EBX,DWORD [EBP-0110H]
	INC	EBX
;
; Line 115:	if (pd1->Accelerator)    {
;
	MOV	EAX,DWORD [EBP-04H]
	CMP	DWORD [EAX+08H],BYTE 00H
	JE	NEAR	L_63
;
; Line 118:	int wd1 = 2+SelectionWidth(ActivePopDown) -
;
	PUSH	DWORD [EBP-08H]
	CALL	_SelectionWidth
	POP	ECX
	ADD	EAX,BYTE 02H
	PUSH	EAX
	MOV	EAX,DWORD [EBP-04H]
	PUSH	DWORD [EAX+00H]
	CALL	_strlen
	POP	ECX
	MOV	ECX,EAX
	POP	EAX
	SUB	EAX,ECX
	MOV	DWORD [EBP-0138H],EAX
;
; Line 120:	int key = pd1->Accelerator;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	EAX,DWORD [EAX+08H]
	MOV	DWORD [EBP-0134H],EAX
;
; Line 122:	if (key > 0 && key < 27)	{
;
	CMP	DWORD [EBP-0134H],BYTE 00H
	JLE	SHORT	L_65
	CMP	DWORD [EBP-0134H],BYTE 01BH
	JGE	SHORT	L_65
;
; Line 124:	sprintf(keybuf, "[Ctrl+%c]", key-1+'A');
;
	MOV	EAX,DWORD [EBP-0134H]
	ADD	EAX,BYTE 040H
	PUSH	EAX
	PUSH	DWORD L_38
	LEA	EAX,[EBP-0130H]
	PUSH	EAX
	CALL	_sprintf
	ADD	ESP,BYTE 0CH
	JMP	SHORT	L_66
L_65:
	MOV	DWORD [EBP-013CH],00H
	JMP	SHORT	L_69
L_67:
;
; Line 128:	if (keys[i].keycode == key)   {
;
	MOV	EAX,DWORD [EBP-013CH]
	MOV	EAX,DWORD [EDI+EAX*8+00H]
	CMP	EAX,DWORD [EBP-0134H]
	JNE	SHORT	L_71
;
; Line 129:	sprintf(keybuf, "[%s]",
;
	MOV	EAX,DWORD [EBP-013CH]
	LEA	EAX,[EDI+EAX*8+00H]
	PUSH	DWORD [EAX+04H]
	PUSH	DWORD L_39
	LEA	EAX,[EBP-0130H]
	PUSH	EAX
	CALL	_sprintf
	ADD	ESP,BYTE 0CH
;
; Line 131:	break;
;
	JMP	SHORT	L_70
L_71:
;
; Line 127:	for (i = 0; keys[i].keylabel; i++)    {
;
L_68:
	INC	DWORD [EBP-013CH]
L_69:
	MOV	EAX,DWORD [EBP-013CH]
	LEA	EAX,[EDI+EAX*8+00H]
	CMP	DWORD [EAX+04H],BYTE 00H
	JNE	SHORT	L_67
L_70:
L_66:
	JMP	SHORT	L_73
L_75:
;
; Line 137:	sel[pos].ch = ' ';
;
	MOV	BYTE [EBP+EBX*2-0A8H],020H
;
; Line 138:	sel[pos].attrib = clr(fg, wnd->WindowColors[STD_COLOR] [BG]) ;
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	OR	EAX,DWORD [EBP-0108H]
	LEA	ECX,[EBP+EBX*2-0A8H]
	MOV	BYTE [ECX+01H],AL
;
; Line 139:	pos++;
;
	INC	EBX
L_73:
;
; Line 135:	while (wd1--)
;
	MOV	EAX,DWORD [EBP-0138H]
	DEC	DWORD [EBP-0138H]
	TEST	EAX,EAX
	JNE	SHORT	L_75
L_74:
;
; Line 141:	wd1 = strlen(keybuf);
;
	LEA	EAX,[EBP-0130H]
	PUSH	EAX
	CALL	_strlen
	POP	ECX
	MOV	DWORD [EBP-0138H],EAX
;
; Line 142:	i = 0;
;
	MOV	DWORD [EBP-013CH],00H
	JMP	SHORT	L_76
L_78:
;
; Line 145:	sel[pos].ch = keybuf[i++];
;
	MOV	EAX,DWORD [EBP-013CH]
	INC	DWORD [EBP-013CH]
	MOV	AL,BYTE [EBP+EAX-0130H]
	MOV	BYTE [EBP+EBX*2-0A8H],AL
;
; Line 146:	sel[pos].attrib = clr(fg, wnd->WindowColors[STD_COLOR] [BG]) ;
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	OR	EAX,DWORD [EBP-0108H]
	LEA	ECX,[EBP+EBX*2-0A8H]
	MOV	BYTE [ECX+01H],AL
;
; Line 147:	pos++;
;
	INC	EBX
L_76:
;
; Line 143:	while (wd1--)
;
	MOV	EAX,DWORD [EBP-0138H]
	DEC	DWORD [EBP-0138H]
	TEST	EAX,EAX
	JNE	SHORT	L_78
L_77:
L_63:
;
; Line 150:	if (pd1->Attrib & CASCADED)    {
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 08H
	JE	SHORT	L_79
;
; Line 152:	if (!pd1->Accelerator)    {
;
	MOV	EAX,DWORD [EBP-04H]
	CMP	DWORD [EAX+08H],BYTE 00H
	JNE	SHORT	L_81
;
; Line 153:	wd = MenuWidth(ActivePopDown)-pos-2;
;
	PUSH	DWORD [EBP-08H]
	CALL	_MenuWidth
	POP	ECX
	SUB	EAX,EBX
	SUB	EAX,BYTE 02H
	MOV	DWORD [EBP-0100H],EAX
	JMP	SHORT	L_83
L_85:
;
; Line 156:	sel[pos].ch = ' ';
;
	MOV	BYTE [EBP+EBX*2-0A8H],020H
;
; Line 157:	sel[pos].attrib = clr(fg, wnd->WindowColors[STD_COLOR] [BG]) ;
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	OR	EAX,DWORD [EBP-0108H]
	LEA	ECX,[EBP+EBX*2-0A8H]
	MOV	BYTE [ECX+01H],AL
;
; Line 158:	pos++;
;
	INC	EBX
L_83:
;
; Line 154:	while (wd--)
;
	MOV	EAX,DWORD [EBP-0100H]
	DEC	DWORD [EBP-0100H]
	TEST	EAX,EAX
	JNE	SHORT	L_85
L_84:
L_81:
;
; Line 161:	sel[pos-1].ch = CASCADEPOINTER;
;
	MOV	EAX,EBX
	DEC	EAX
	MOV	BYTE [EBP+EAX*2-0A8H],010H
	JMP	SHORT	L_80
L_79:
;
; Line 165:	sel[pos].ch = ' ';
;
	MOV	BYTE [EBP+EBX*2-0A8H],020H
;
; Line 166:	sel[pos].attrib = clr(fg, wnd->WindowColors[STD_COLOR] [BG]) ;
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	OR	EAX,DWORD [EBP-0108H]
	LEA	ECX,[EBP+EBX*2-0A8H]
	MOV	BYTE [ECX+01H],AL
;
; Line 167:	pos++;
;
	INC	EBX
L_80:
;
; Line 169:	sel[pos].ch = '\0';
;
	MOV	BYTE [EBP+EBX*2-0A8H],00H
;
; Line 170:	SendMessage(wnd, ADDTEXT, (PARAM) sel, 1);
;
	PUSH	BYTE 01H
	LEA	EAX,[EBP-0A8H]
	PUSH	EAX
	PUSH	BYTE 030H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_49:
;
; Line 172:	pd1++;
;
	ADD	DWORD [EBP-04H],BYTE 014H
L_45:
;
; Line 92:	while (pd1->SelectionTitle != NULL)    {
;
	MOV	EAX,DWORD [EBP-04H]
	CMP	DWORD [EAX+00H],BYTE 00H
	JNE	NEAR	L_47
L_46:
;
; Line 174:	}
;
L_40:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 177:	static int BorderMsg(WINDOW wnd)
;
_BorderMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_87:
;
; Line 178:	{
;
;
; Line 179:	int i, rtn = TRUE;
;
	MOV	EDI,01H
;
; Line 181:	if (wnd->mnu != NULL)    {
;
	CMP	DWORD [ESI+0110H],BYTE 00H
	JE	NEAR	L_88
;
; Line 182:	currFocus = inFocus;
;
	MOV	EAX,DWORD [_inFocus]
	MOV	DWORD [EBP-04H],EAX
;
; Line 183:	inFocus = NULL;
;
	MOV	DWORD [_inFocus],00H
;
; Line 184:	rtn = BaseWndProc(POPDOWNMENU, wnd, BORDER, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 0AH
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+054H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	EDI,EAX
;
; Line 185:	inFocus = currFocus;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	DWORD [_inFocus],EAX
	MOV	EBX,00H
	JMP	SHORT	L_92
L_90:
;
; Line 187:	if (TextLine(wnd, i)->ch == LINE)    {
;
	MOV	EAX,DWORD [ESI+0C4H]
	MOV	EAX,DWORD [EAX+EBX*4+00H]
	MOV	ECX,DWORD [ESI+098H]
	MOVZX	EAX,BYTE [ECX+EAX*2+00H]
	CMP	EAX,0C4H
	JNE	SHORT	L_94
;
; Line 188:	wputch(wnd, LEDGE, 0, i+1);
;
	MOV	EAX,EBX
	INC	EAX
	PUSH	EAX
	PUSH	BYTE 00H
	PUSH	DWORD 0C3H
	PUSH	ESI
	CALL	_wputch
	ADD	ESP,BYTE 010H
;
; Line 189:	wputch(wnd, REDGE, WindowWidth(wnd)-1, i+1);
;
	MOV	EAX,EBX
	INC	EAX
	PUSH	EAX
	MOV	EAX,DWORD [ESI+020H]
	DEC	EAX
	PUSH	EAX
	PUSH	DWORD 0B4H
	PUSH	ESI
	CALL	_wputch
	ADD	ESP,BYTE 010H
L_94:
;
; Line 186:	for (i = 0; i < ClientHeight(wnd); i++)    {
;
L_91:
	INC	EBX
L_92:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_96
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_96
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_96
	MOV	EAX,03H
	JMP	SHORT	L_97
L_96:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_101
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_100
L_101:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_98
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_98
L_100:
	MOV	EAX,02H
	JMP	SHORT	L_99
L_98:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_102
	MOV	EAX,01H
	JMP	SHORT	L_103
L_102:
	MOV	EAX,00H
L_103:
L_99:
L_97:
	MOV	ECX,DWORD [ESI+01CH]
	SUB	ECX,EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_104
	MOV	EAX,01H
	JMP	SHORT	L_105
L_104:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_106
	MOV	EAX,01H
	JMP	SHORT	L_107
L_106:
	MOV	EAX,00H
L_107:
L_105:
	SUB	ECX,EAX
	CMP	EBX,ECX
	JL	NEAR	L_90
L_93:
L_88:
;
; Line 193:	return rtn;
;
	MOV	EAX,EDI
L_86:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 197:	static void LBChooseMsg(WINDOW wnd, PARAM p1)
;
_LBChooseMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+0CH]
L_109:
;
; Line 198:	{
;
;
; Line 199:	struct PopDown *ActivePopDown = wnd->mnu->Selections;
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EAX,DWORD [EAX+0110H]
	ADD	EAX,BYTE 014H
	MOV	DWORD [EBP-04H],EAX
;
; Line 200:	if (ActivePopDown != NULL)    {
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	SHORT	L_110
;
; Line 201:	int *attr = &(ActivePopDown+(int)p1)->Attrib;
;
	MOV	ESI,EBX
	IMUL	ESI,BYTE 014H
	ADD	ESI,DWORD [EBP-04H]
	ADD	ESI,BYTE 0CH
;
; Line 202:	wnd->mnu->Selection = (int)p1;
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EAX,DWORD [EAX+0110H]
	MOV	DWORD [EAX+010H],EBX
;
; Line 203:	if (!(*attr & INACTIVE))    {
;
	MOV	EAX,DWORD [ESI+00H]
	AND	EAX,BYTE 01H
	JNE	SHORT	L_112
;
; Line 204:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EDI,DWORD [EAX+03CH]
;
; Line 205:	if (*attr & TOGGLE)
;
	MOV	EAX,DWORD [ESI+00H]
	AND	EAX,BYTE 04H
	JE	SHORT	L_114
;
; Line 206:	*attr ^= CHECKED;
;
	BTC	DWORD [ESI+00H],01H
L_114:
;
; Line 207:	if (pwnd != NULL)	{
;
	TEST	EDI,EDI
	JE	SHORT	L_116
;
; Line 208:	CurrentMenuSelection = p1;
;
	MOV	DWORD [_CurrentMenuSelection],EBX
;
; Line 209:	PostMessage(pwnd, COMMAND,
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [EBP-04H]
	MOV	ECX,EBX
	IMUL	ECX,BYTE 014H
	LEA	EAX,[EAX+ECX+00H]
	PUSH	DWORD [EAX+04H]
	PUSH	BYTE 02H
	PUSH	EDI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_116:
	JMP	SHORT	L_113
L_112:
;
; Line 214:	beep();
;
	CALL	_beep
L_113:
L_110:
;
; Line 216:	}
;
L_108:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 219:	static BOOL KeyboardMsg(WINDOW wnd, PARAM p1, PARAM p2)
;
_KeyboardMsg:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 01CH
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+010H]
L_119:
;
; Line 220:	{
;
;
; Line 221:	struct PopDown *ActivePopDown = wnd->mnu->Selections;
;
	MOV	EAX,DWORD [ESI+0110H]
	ADD	EAX,BYTE 014H
	MOV	DWORD [EBP-04H],EAX
;
; Line 222:	if (wnd->mnu != NULL)    {
;
	CMP	DWORD [ESI+0110H],BYTE 00H
	JE	NEAR	L_120
;
; Line 223:	if (ActivePopDown != NULL)    {
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	NEAR	L_122
;
; Line 224:	int c = (int)p1;
;
	MOV	EBX,DWORD [EBP+0CH]
;
; Line 225:	int sel = 0;
;
	MOV	DWORD [EBP-014H],00H
;
; Line 227:	struct PopDown *pd = ActivePopDown;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	DWORD [EBP-0CH],EAX
;
; Line 229:	if ((c & OFFSET) == 0)
;
	MOV	EAX,EBX
	AND	EAX,01000H
	JNE	SHORT	L_124
;
; Line 230:	c = tolower(c);
;
	PUSH	EBX
	CALL	_tolower
	POP	ECX
	MOV	EBX,EAX
L_124:
;
; Line 231:	a = AltConvert(c);
;
	PUSH	EBX
	CALL	_AltConvert
	POP	ECX
	MOV	DWORD [EBP-010H],EAX
;
; Line 233:	if (a)
;
	CMP	DWORD [EBP-010H],BYTE 00H
	JE	SHORT	L_126
;
; Line 234:	return FALSE;
;
	MOV	EAX,00H
	JMP	NEAR	L_118
L_126:
	JMP	SHORT	L_128
L_130:
;
; Line 237:	char *cp = strchr(pd->SelectionTitle,
;
	PUSH	BYTE 07EH
	MOV	EAX,DWORD [EBP-0CH]
	PUSH	DWORD [EAX+00H]
	CALL	_strchr
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP-01CH],EAX
;
; Line 239:	int sc = tolower(*(cp+1));
;
	MOV	EAX,DWORD [EBP-01CH]
	MOVSX	EAX,BYTE [EAX+01H]
	PUSH	EAX
	CALL	_tolower
	POP	ECX
	MOV	DWORD [EBP-018H],EAX
;
; Line 240:	if ((cp && sc == c) ||
;
	CMP	DWORD [EBP-01CH],BYTE 00H
	JE	SHORT	L_134
	CMP	DWORD [EBP-018H],EBX
	JE	SHORT	L_133
L_134:
	CMP	DWORD [EBP-010H],BYTE 00H
	JE	SHORT	L_135
	MOV	EAX,DWORD [EBP-018H]
	CMP	EAX,DWORD [EBP-010H]
	JE	SHORT	L_133
L_135:
	MOV	EAX,DWORD [EBP-0CH]
	CMP	DWORD [EAX+08H],EBX
	JNE	SHORT	L_131
L_133:
;
; Line 243:	PostMessage(wnd, LB_SELECTION, sel, 0);
;
	PUSH	BYTE 00H
	PUSH	DWORD [EBP-014H]
	PUSH	BYTE 040H
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 244:	PostMessage(wnd, LB_CHOOSE, sel, TRUE);
;
	PUSH	BYTE 01H
	PUSH	DWORD [EBP-014H]
	PUSH	BYTE 041H
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 245:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_118
L_131:
;
; Line 247:	pd++, sel++;
;
	ADD	DWORD [EBP-0CH],BYTE 014H
	INC	DWORD [EBP-014H]
L_128:
;
; Line 236:	while (pd->SelectionTitle != NULL)    {
;
	MOV	EAX,DWORD [EBP-0CH]
	CMP	DWORD [EAX+00H],BYTE 00H
	JNE	SHORT	L_130
L_129:
L_122:
L_120:
;
; Line 251:	switch ((int)p1)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD 010C8H
	JE	NEAR	L_142
	JG	SHORT	L_147
	CMP	EAX,DWORD 010BBH
	JE	SHORT	L_138
	JG	SHORT	L_148
	CMP	EAX,BYTE 01BH
	JE	NEAR	L_139
	JG	NEAR	L_137
	CMP	EAX,BYTE 0DH
	JE	NEAR	L_146
	JMP	NEAR	L_137
L_148:
	CMP	EAX,DWORD 010C7H
	JE	NEAR	L_144
	JMP	NEAR	L_137
L_147:
	CMP	EAX,DWORD 010CFH
	JE	NEAR	L_145
	JG	SHORT	L_149
	CMP	EAX,DWORD 010CDH
	JE	SHORT	L_140
	JG	NEAR	L_137
	CMP	EAX,DWORD 010CBH
	JE	SHORT	L_141
	JMP	NEAR	L_137
L_149:
	CMP	EAX,DWORD 010D0H
	JE	NEAR	L_143
	JMP	NEAR	L_137
L_138:
;
; Line 253:	if (ActivePopDown == NULL)
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JNE	SHORT	L_150
;
; Line 254:	SendMessage(GetParent(wnd), KEYBOARD, p1, p2);
;
	PUSH	EDI
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 015H
	PUSH	DWORD [ESI+03CH]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
	JMP	SHORT	L_151
L_150:
;
; Line 256:	DisplayHelp(wnd,
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	ECX,DWORD [ESI+0C8H]
	IMUL	ECX,BYTE 014H
	LEA	EAX,[EAX+ECX+00H]
	PUSH	DWORD [EAX+010H]
	PUSH	ESI
	CALL	_DisplayHelp
	ADD	ESP,BYTE 08H
L_151:
;
; Line 258:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_118
L_139:
;
; Line 260:	SendMessage(wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 261:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_118
L_140:
;
; Line 263:	case BS:
;
L_141:
;
; Line 264:	if (GetClass(GetParent(wnd)) == MENUBAR)
;
	MOV	EAX,DWORD [ESI+03CH]
	CMP	DWORD [EAX+00H],BYTE 05H
	JNE	SHORT	L_152
;
; Line 265:	PostMessage(GetParent(wnd), KEYBOARD, p1, p2);
;
	PUSH	EDI
	PUSH	DWORD [EBP+0CH]
	PUSH	BYTE 015H
	PUSH	DWORD [ESI+03CH]
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
L_152:
;
; Line 266:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_118
L_142:
;
; Line 268:	if (wnd->selection == 0)    {
;
	CMP	DWORD [ESI+0C8H],BYTE 00H
	JNE	NEAR	L_154
;
; Line 269:	if (wnd->wlines == ClientHeight(wnd))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_158
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_158
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_158
	MOV	EAX,03H
	JMP	SHORT	L_159
L_158:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_163
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_162
L_163:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_160
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_160
L_162:
	MOV	EAX,02H
	JMP	SHORT	L_161
L_160:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_164
	MOV	EAX,01H
	JMP	SHORT	L_165
L_164:
	MOV	EAX,00H
L_165:
L_161:
L_159:
	MOV	ECX,DWORD [ESI+01CH]
	SUB	ECX,EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_166
	MOV	EAX,01H
	JMP	SHORT	L_167
L_166:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_168
	MOV	EAX,01H
	JMP	SHORT	L_169
L_168:
	MOV	EAX,00H
L_169:
L_167:
	SUB	ECX,EAX
	CMP	DWORD [ESI+090H],ECX
	JNE	SHORT	L_156
;
; Line 270:	PostMessage(wnd, LB_SELECTION,
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [ESI+090H]
	DEC	EAX
	PUSH	EAX
	PUSH	BYTE 040H
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 272:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_118
L_156:
L_154:
;
; Line 275:	break;
;
	JMP	NEAR	L_136
L_143:
;
; Line 277:	if (wnd->selection == wnd->wlines-1)    {
;
	MOV	EAX,DWORD [ESI+090H]
	DEC	EAX
	CMP	DWORD [ESI+0C8H],EAX
	JNE	NEAR	L_170
;
; Line 278:	if (wnd->wlines == ClientHeight(wnd))    {
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_174
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_174
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_174
	MOV	EAX,03H
	JMP	SHORT	L_175
L_174:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_179
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_178
L_179:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_176
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_176
L_178:
	MOV	EAX,02H
	JMP	SHORT	L_177
L_176:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_180
	MOV	EAX,01H
	JMP	SHORT	L_181
L_180:
	MOV	EAX,00H
L_181:
L_177:
L_175:
	MOV	ECX,DWORD [ESI+01CH]
	SUB	ECX,EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_182
	MOV	EAX,01H
	JMP	SHORT	L_183
L_182:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_184
	MOV	EAX,01H
	JMP	SHORT	L_185
L_184:
	MOV	EAX,00H
L_185:
L_183:
	SUB	ECX,EAX
	CMP	DWORD [ESI+090H],ECX
	JNE	SHORT	L_172
;
; Line 279:	PostMessage(wnd, LB_SELECTION, 0, FALSE);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 040H
	PUSH	ESI
	CALL	_PostMessage
	ADD	ESP,BYTE 010H
;
; Line 280:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_118
L_172:
L_170:
;
; Line 283:	break;
;
	JMP	SHORT	L_136
L_144:
;
; Line 285:	case END:
;
L_145:
;
; Line 286:	case '\r':
;
L_146:
;
; Line 287:	break;
;
	JMP	SHORT	L_136
L_137:
;
; Line 289:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_118
L_136:
;
; Line 291:	return FALSE;
;
	MOV	EAX,00H
L_118:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 295:	static int CloseWindowMsg(WINDOW wnd)
;
_CloseWindowMsg:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_187:
;
; Line 296:	{
;
;
; Line 298:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EDI,DWORD [ESI+03CH]
;
; Line 299:	SendMessage(wnd, RELEASE_MOUSE, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 02FH
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 300:	SendMessage(wnd, RELEASE_KEYBOARD, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 017H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 301:	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 302:	inFocus = wnd->oldFocus;
;
	MOV	EAX,DWORD [ESI+0118H]
	MOV	DWORD [_inFocus],EAX
;
; Line 303:	rtn = BaseWndProc(POPDOWNMENU, wnd, CLOSE_WINDOW, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 07H
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+054H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	EBX,EAX
;
; Line 304:	SendMessage(pwnd, CLOSE_POPDOWN, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 03FH
	PUSH	EDI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 305:	return rtn;
;
	MOV	EAX,EBX
L_186:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_PopDownProc]
;
; Line 309:	int PopDownProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
;
_PopDownProc:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EBX,DWORD [EBP+010H]
	MOV	EDI,DWORD [EBP+014H]
L_189:
;
; Line 310:	{
;
;
; Line 311:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 024H
	JE	NEAR	L_193
	JA	SHORT	L_203
	CMP	EAX,BYTE 09H
	JE	NEAR	L_198
	JA	SHORT	L_204
	CMP	EAX,BYTE 07H
	JE	NEAR	L_202
	JA	NEAR	L_191
	CMP	EAX,BYTE 03H
	JE	SHORT	L_192
	JMP	NEAR	L_191
L_204:
	CMP	EAX,BYTE 015H
	JE	NEAR	L_201
	JA	NEAR	L_191
	CMP	EAX,BYTE 0AH
	JE	NEAR	L_199
	JMP	NEAR	L_191
L_203:
	CMP	EAX,BYTE 03EH
	JE	NEAR	L_197
	JA	SHORT	L_205
	CMP	EAX,BYTE 027H
	JE	NEAR	L_196
	JA	NEAR	L_191
	CMP	EAX,BYTE 025H
	JE	SHORT	L_194
	JMP	NEAR	L_191
L_205:
	CMP	EAX,BYTE 041H
	JE	NEAR	L_200
	JA	NEAR	L_191
	CMP	EAX,BYTE 040H
	JE	SHORT	L_195
	JMP	NEAR	L_191
L_192:
;
; Line 313:	return CreateWindowMsg(wnd);
;
	PUSH	ESI
	CALL	_CreateWindowMsg
	POP	ECX
	JMP	NEAR	L_188
L_193:
;
; Line 315:	LeftButtonMsg(wnd, p1, p2);
;
	PUSH	EDI
	PUSH	EBX
	PUSH	ESI
	CALL	_LeftButtonMsg
	ADD	ESP,BYTE 0CH
;
; Line 316:	return FALSE;
;
	MOV	EAX,00H
	JMP	NEAR	L_188
L_194:
;
; Line 318:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_188
L_195:
;
; Line 320:	if (TextLine(wnd, (int)p1)->ch == LINE)
;
	MOV	EAX,DWORD [ESI+0C4H]
	MOV	EAX,DWORD [EAX+EBX*4+00H]
	MOV	ECX,DWORD [ESI+098H]
	MOVZX	EAX,BYTE [ECX+EAX*2+00H]
	CMP	EAX,0C4H
	JNE	SHORT	L_206
;
; Line 321:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_188
L_206:
;
; Line 322:	wnd->mnu->Selection = (int)p1;
;
	MOV	EAX,DWORD [ESI+0110H]
	MOV	DWORD [EAX+010H],EBX
;
; Line 323:	break;
;
	JMP	NEAR	L_190
L_196:
;
; Line 325:	if (ButtonReleasedMsg(wnd, p1, p2))
;
	PUSH	EDI
	PUSH	EBX
	PUSH	ESI
	CALL	_ButtonReleasedMsg
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_208
;
; Line 326:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_188
L_208:
;
; Line 327:	break;
;
	JMP	SHORT	L_190
L_197:
;
; Line 329:	wnd->mnu = (void *) p1;
;
	MOV	DWORD [ESI+0110H],EBX
;
; Line 330:	wnd->selection = wnd->mnu->Selection;
;
	MOV	EAX,DWORD [ESI+0110H]
	MOV	EAX,DWORD [EAX+010H]
	MOV	DWORD [ESI+0C8H],EAX
;
; Line 331:	break;
;
	JMP	SHORT	L_190
L_198:
;
; Line 333:	if (wnd->mnu == NULL)
;
	CMP	DWORD [ESI+0110H],BYTE 00H
	JNE	SHORT	L_210
;
; Line 334:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_188
L_210:
;
; Line 335:	PaintMsg(wnd);
;
	PUSH	ESI
	CALL	_PaintMsg
	POP	ECX
;
; Line 336:	break;
;
	JMP	SHORT	L_190
L_199:
;
; Line 338:	return BorderMsg(wnd);
;
	PUSH	ESI
	CALL	_BorderMsg
	POP	ECX
	JMP	SHORT	L_188
L_200:
;
; Line 340:	LBChooseMsg(wnd, p1);
;
	PUSH	EBX
	PUSH	ESI
	CALL	_LBChooseMsg
	ADD	ESP,BYTE 08H
;
; Line 341:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_188
L_201:
;
; Line 343:	if (KeyboardMsg(wnd, p1, p2))
;
	PUSH	EDI
	PUSH	EBX
	PUSH	ESI
	CALL	_KeyboardMsg
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_212
;
; Line 344:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_188
L_212:
;
; Line 345:	break;
;
	JMP	SHORT	L_190
L_202:
;
; Line 347:	return CloseWindowMsg(wnd);
;
	PUSH	ESI
	CALL	_CloseWindowMsg
	POP	ECX
	JMP	SHORT	L_188
L_191:
;
; Line 349:	break;
;
	JMP	SHORT	L_190
L_190:
;
; Line 351:	return BaseWndProc(POPDOWNMENU, wnd, msg, p1, p2);
;
	PUSH	EDI
	PUSH	EBX
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+054H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
L_188:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_MenuHeight]
;
; Line 355:	int MenuHeight(struct PopDown *pd)
;
_MenuHeight:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
L_215:
;
; Line 356:	{
;
;
; Line 357:	int ht = 0;
;
	MOV	EBX,00H
	JMP	SHORT	L_216
L_218:
;
; Line 359:	ht++;
;
	INC	EBX
L_216:
;
; Line 358:	while (pd[ht].SelectionTitle != NULL)
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	ECX,EBX
	IMUL	ECX,BYTE 014H
	CMP	DWORD [EAX+ECX+00H],BYTE 00H
	JNE	SHORT	L_218
L_217:
;
; Line 360:	return ht+2;
;
	MOV	EAX,EBX
	ADD	EAX,BYTE 02H
L_214:
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_MenuWidth]
;
; Line 364:	int MenuWidth(struct PopDown *pd)
;
_MenuWidth:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD _keys
L_220:
;
; Line 365:	{
;
;
; Line 366:	int wd = 0, i;
;
	MOV	DWORD [EBP-04H],00H
;
; Line 367:	int len = 0;
;
	MOV	EBX,00H
;
; Line 369:	wd = SelectionWidth(pd);
;
	PUSH	DWORD [EBP+08H]
	CALL	_SelectionWidth
	POP	ECX
	MOV	DWORD [EBP-04H],EAX
	JMP	SHORT	L_221
L_223:
;
; Line 371:	if (pd->Accelerator)    {
;
	MOV	EAX,DWORD [EBP+08H]
	CMP	DWORD [EAX+08H],BYTE 00H
	JE	SHORT	L_224
	MOV	ESI,00H
	JMP	SHORT	L_228
L_226:
;
; Line 373:	if (keys[i].keycode == pd->Accelerator)    {
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	ECX,DWORD [EDI+ESI*8+00H]
	CMP	ECX,DWORD [EAX+08H]
	JNE	SHORT	L_230
;
; Line 374:	len = max(len, 2+strlen(keys[i].keylabel));
;
	LEA	EAX,[EDI+ESI*8+00H]
	PUSH	DWORD [EAX+04H]
	CALL	_strlen
	POP	ECX
	ADD	EAX,BYTE 02H
	CMP	EBX,EAX
	JLE	SHORT	L_232
	MOV	EAX,EBX
	JMP	SHORT	L_233
L_232:
	LEA	EAX,[EDI+ESI*8+00H]
	PUSH	DWORD [EAX+04H]
	CALL	_strlen
	POP	ECX
	ADD	EAX,BYTE 02H
L_233:
	MOV	EBX,EAX
;
; Line 375:	break;
;
	JMP	SHORT	L_229
L_230:
;
; Line 372:	for (i = 0; keys[i].keylabel; i++)
;
L_227:
	INC	ESI
L_228:
	LEA	EAX,[EDI+ESI*8+00H]
	CMP	DWORD [EAX+04H],BYTE 00H
	JNE	SHORT	L_226
L_229:
L_224:
;
; Line 378:	if (pd->Attrib & CASCADED)
;
	MOV	EAX,DWORD [EBP+08H]
	MOV	EAX,DWORD [EAX+0CH]
	AND	EAX,BYTE 08H
	JE	SHORT	L_234
;
; Line 379:	len = max(len, 2);
;
	CMP	EBX,BYTE 02H
	JLE	SHORT	L_236
	MOV	EAX,EBX
	JMP	SHORT	L_237
L_236:
	MOV	EAX,02H
L_237:
	MOV	EBX,EAX
L_234:
;
; Line 380:	pd++;
;
	ADD	DWORD [EBP+08H],BYTE 014H
L_221:
;
; Line 370:	while (pd->SelectionTitle != NULL)    {
;
	MOV	EAX,DWORD [EBP+08H]
	CMP	DWORD [EAX+00H],BYTE 00H
	JNE	SHORT	L_223
L_222:
;
; Line 382:	return wd+5+len;
;
	MOV	EAX,DWORD [EBP-04H]
	ADD	EAX,BYTE 05H
	ADD	EAX,EBX
L_219:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
;
; Line 386:	static int SelectionWidth(struct PopDown *pd)
;
_SelectionWidth:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
L_239:
;
; Line 387:	{
;
;
; Line 388:	int wd = 0;
;
	MOV	EBX,00H
	JMP	SHORT	L_240
L_242:
;
; Line 390:	int len = strlen(pd->SelectionTitle)-1;
;
	PUSH	DWORD [EDI+00H]
	CALL	_strlen
	POP	ECX
	DEC	EAX
	MOV	ESI,EAX
;
; Line 391:	wd = max(wd, len);
;
	CMP	EBX,ESI
	JLE	SHORT	L_243
	MOV	EAX,EBX
	JMP	SHORT	L_244
L_243:
	MOV	EAX,ESI
L_244:
	MOV	EBX,EAX
;
; Line 392:	pd++;
;
	ADD	EDI,BYTE 014H
L_240:
;
; Line 389:	while (pd->SelectionTitle != NULL)    {
;
	CMP	DWORD [EDI+00H],BYTE 00H
	JNE	SHORT	L_242
L_241:
;
; Line 394:	return wd;
;
	MOV	EAX,EBX
L_238:
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_CopyCommand]
;
; Line 398:	int CopyCommand(ATTRCHR *dest, unsigned char *src,
;
_CopyCommand:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 0CH
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+0CH]
L_246:
;
; Line 400:	{
;
;
; Line 401:	ATTRCHR *d = dest;
;
	MOV	DWORD [EBP-08H],ESI
;
; Line 402:	int sattr = clr(fg, bg), hattr;
;
	MOV	EAX,DWORD [EBP+018H]
	SAL	EAX,04H
	OR	EAX,DWORD [EBP+014H]
	MOV	DWORD [EBP-04H],EAX
;
; Line 403:	if (skipcolor)
;
	CMP	DWORD [EBP+010H],BYTE 00H
	JE	SHORT	L_247
;
; Line 404:	hattr = sattr;
;
	MOV	EBX,DWORD [EBP-04H]
	JMP	SHORT	L_248
L_247:
;
; Line 406:	hattr = clr(cfg.clr[POPDOWNMENU][HILITE_COLOR][BG], bg);
;
	MOV	EAX,DWORD [EBP+018H]
	SAL	EAX,04H
	MOVZX	ECX,BYTE [_cfg+094H]
	OR	ECX,EAX
	MOV	EBX,ECX
L_248:
	JMP	SHORT	L_249
L_251:
;
; Line 408:	if (*src == SHORTCUTCHAR)    {
;
	MOVZX	EAX,BYTE [EDI+00H]
	CMP	EAX,BYTE 07EH
	JNE	SHORT	L_252
;
; Line 409:	src++;
;
	INC	EDI
;
; Line 410:	dest->ch = *src++;
;
	MOV	EAX,EDI
	INC	EDI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ESI+00H],AL
;
; Line 411:	dest->attrib = hattr;
;
	MOV	BYTE [ESI+01H],BL
	JMP	SHORT	L_253
L_252:
;
; Line 415:	dest->ch = *src++;
;
	MOV	EAX,EDI
	INC	EDI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ESI+00H],AL
;
; Line 416:	dest->attrib = sattr;
;
	MOV	EAX,DWORD [EBP-04H]
	MOV	BYTE [ESI+01H],AL
L_253:
;
; Line 418:	dest++;
;
	ADD	ESI,BYTE 02H
L_249:
;
; Line 407:	while (*src && *src != '\n')    {
;
	CMP	BYTE [EDI+00H],BYTE 00H
	JE	SHORT	L_254
	MOVZX	EAX,BYTE [EDI+00H]
	CMP	EAX,BYTE 0AH
	JNE	SHORT	L_251
L_254:
L_250:
;
; Line 421:	return (int) (dest - d);
;
	MOV	EAX,ESI
	SUB	EAX,DWORD [EBP-08H]
	SHR	EAX,01H
L_245:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
SECTION _STRING
L_39:
	DB	05BH,025H,073H,05DH,00H
L_38:
	DB	05BH,043H,074H,072H,06CH,02BH,025H,063H,05DH,00H
SECTION _DATA

_py	DD	0FFFFFFFFH
SECTION _BSS
[GLOBAL	_CurrentMenuSelection]

_CurrentMenuSelection	RESB	04H
SECTION _CONST

SECTION _TEXT
[EXTERN	_sprintf]
[EXTERN	_wputch]
[EXTERN	_ClientRect]
[EXTERN	_inFocus]
[EXTERN	_AltConvert]
[EXTERN	_strlen]
[EXTERN	_isEGA]
[EXTERN	_cfg]
[EXTERN	_isVGA]
[EXTERN	_tolower]
[EXTERN	_beep]
[EXTERN	_keys]
[EXTERN	_classdefs]
[EXTERN	_SendMessage]
[EXTERN	_DisplayHelp]
[EXTERN	_PostMessage]
[EXTERN	___seg0040]
[EXTERN	_strchr]
