	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
[GLOBAL	_SetNextFocus]
;
; Line 6:	void SetNextFocus()
;
_SetNextFocus:
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD _inFocus
L_2:
;
; Line 7:	{
;
;
; Line 8:	if (inFocus != NULL)    {
;
	CMP	DWORD [EDI+00H],BYTE 00H
	JE	SHORT	L_3
;
; Line 9:	WINDOW wnd1 = inFocus, pwnd;
;
	MOV	ESI,DWORD [EDI+00H]
	JMP	SHORT	L_5
L_7:
;
; Line 11:	pwnd = GetParent(wnd1);
;
	MOV	EBX,DWORD [ESI+03CH]
;
; Line 12:	if (NextWindow(wnd1) != NULL)
;
	CMP	DWORD [ESI+048H],BYTE 00H
	JE	SHORT	L_8
;
; Line 13:	wnd1 = NextWindow(wnd1);
;
	MOV	ESI,DWORD [ESI+048H]
	JMP	SHORT	L_9
L_8:
;
; Line 14:	else if (pwnd != NULL)
;
	TEST	EBX,EBX
	JE	SHORT	L_10
;
; Line 15:	wnd1 = FirstWindow(pwnd);
;
	MOV	ESI,DWORD [EBX+040H]
L_10:
L_9:
;
; Line 16:	if (wnd1 == NULL || wnd1 == inFocus)	{
;
	TEST	ESI,ESI
	JE	SHORT	L_14
	CMP	ESI,DWORD [EDI+00H]
	JNE	SHORT	L_12
L_14:
;
; Line 17:	wnd1 = pwnd;
;
	MOV	ESI,EBX
;
; Line 18:	break;
;
	JMP	SHORT	L_6
L_12:
;
; Line 20:	if (GetClass(wnd1) == STATUSBAR || GetClass(wnd1) == MENUBAR)
;
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_17
	CMP	DWORD [ESI+00H],BYTE 05H
	JNE	SHORT	L_15
L_17:
;
; Line 21:	continue;
;
	JMP	SHORT	L_5
L_15:
;
; Line 22:	if (isVisible(wnd1))
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JNE	SHORT	L_6
;
; Line 23:	break;
;
L_18:
L_5:
;
; Line 10:	while (TRUE)    {
;
	JMP	SHORT	L_7
L_6:
;
; Line 25:	if (wnd1 != NULL)	{
;
	TEST	ESI,ESI
	JE	SHORT	L_20
	JMP	SHORT	L_22
L_24:
;
; Line 27:	wnd1 = wnd1->childfocus;
;
	MOV	ESI,DWORD [ESI+050H]
L_22:
;
; Line 26:	while (wnd1->childfocus != NULL)
;
	CMP	DWORD [ESI+050H],BYTE 00H
	JNE	SHORT	L_24
L_23:
;
; Line 28:	if (wnd1->condition != ISCLOSING)
;
	CMP	DWORD [ESI+05CH],BYTE 03H
	JE	SHORT	L_25
;
; Line 29:	SendMessage(wnd1, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_25:
L_20:
L_3:
;
; Line 32:	}
;
L_1:
	POP	EDI
	POP	ESI
	POP	EBX
	RET
[GLOBAL	_SetPrevFocus]
;
; Line 35:	void SetPrevFocus()
;
_SetPrevFocus:
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD _inFocus
L_28:
;
; Line 36:	{
;
;
; Line 37:	if (inFocus != NULL)    {
;
	CMP	DWORD [EDI+00H],BYTE 00H
	JE	SHORT	L_29
;
; Line 38:	WINDOW wnd1 = inFocus, pwnd;
;
	MOV	ESI,DWORD [EDI+00H]
	JMP	SHORT	L_31
L_33:
;
; Line 40:	pwnd = GetParent(wnd1);
;
	MOV	EBX,DWORD [ESI+03CH]
;
; Line 41:	if (PrevWindow(wnd1) != NULL)
;
	CMP	DWORD [ESI+04CH],BYTE 00H
	JE	SHORT	L_34
;
; Line 42:	wnd1 = PrevWindow(wnd1);
;
	MOV	ESI,DWORD [ESI+04CH]
	JMP	SHORT	L_35
L_34:
;
; Line 43:	else if (pwnd != NULL)
;
	TEST	EBX,EBX
	JE	SHORT	L_36
;
; Line 44:	wnd1 = LastWindow(pwnd);
;
	MOV	ESI,DWORD [EBX+044H]
L_36:
L_35:
;
; Line 45:	if (wnd1 == NULL || wnd1 == inFocus)	{
;
	TEST	ESI,ESI
	JE	SHORT	L_40
	CMP	ESI,DWORD [EDI+00H]
	JNE	SHORT	L_38
L_40:
;
; Line 46:	wnd1 = pwnd;
;
	MOV	ESI,EBX
;
; Line 47:	break;
;
	JMP	SHORT	L_32
L_38:
;
; Line 49:	if (GetClass(wnd1) == STATUSBAR)
;
	CMP	DWORD [ESI+00H],BYTE 014H
	JE	SHORT	L_31
;
; Line 50:	continue;
;
L_41:
;
; Line 51:	if (isVisible(wnd1))
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JNE	SHORT	L_32
;
; Line 52:	break;
;
L_43:
L_31:
;
; Line 39:	while (TRUE)    {
;
	JMP	SHORT	L_33
L_32:
;
; Line 54:	if (wnd1 != NULL)	{
;
	TEST	ESI,ESI
	JE	SHORT	L_45
	JMP	SHORT	L_47
L_49:
;
; Line 56:	wnd1 = wnd1->childfocus;
;
	MOV	ESI,DWORD [ESI+050H]
L_47:
;
; Line 55:	while (wnd1->childfocus != NULL)
;
	CMP	DWORD [ESI+050H],BYTE 00H
	JNE	SHORT	L_49
L_48:
;
; Line 57:	if (wnd1->condition != ISCLOSING)
;
	CMP	DWORD [ESI+05CH],BYTE 03H
	JE	SHORT	L_50
;
; Line 58:	SendMessage(wnd1, SETFOCUS, TRUE, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 01H
	PUSH	BYTE 08H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
L_50:
L_45:
L_29:
;
; Line 61:	}
;
L_27:
	POP	EDI
	POP	ESI
	POP	EBX
	RET
[GLOBAL	_ReFocus]
;
; Line 64:	void ReFocus(WINDOW wnd)
;
_ReFocus:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
L_53:
;
; Line 65:	{
;
;
; Line 66:	if (GetParent(wnd) != NULL)	{
;
	CMP	DWORD [ESI+03CH],BYTE 00H
	JE	SHORT	L_54
;
; Line 67:	RemoveWindow(wnd);
;
	PUSH	ESI
	CALL	_RemoveWindow
	POP	ECX
;
; Line 68:	AppendWindow(wnd);
;
	PUSH	ESI
	CALL	_AppendWindow
	POP	ECX
;
; Line 69:	ReFocus(GetParent(wnd));
;
	PUSH	DWORD [ESI+03CH]
	CALL	_ReFocus
	POP	ECX
L_54:
;
; Line 71:	}
;
L_52:
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_RemoveWindow]
;
; Line 74:	void RemoveWindow(WINDOW wnd)
;
_RemoveWindow:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_57:
;
; Line 75:	{
;
;
; Line 76:	if (wnd != NULL)    {
;
	TEST	ESI,ESI
	JE	SHORT	L_58
;
; Line 77:	WINDOW pwnd = GetParent(wnd);
;
	MOV	EDI,DWORD [ESI+03CH]
;
; Line 78:	if (PrevWindow(wnd) != NULL)
;
	CMP	DWORD [ESI+04CH],BYTE 00H
	JE	SHORT	L_60
;
; Line 79:	NextWindow(PrevWindow(wnd)) = NextWindow(wnd);
;
	MOV	EAX,DWORD [ESI+04CH]
	MOV	ECX,DWORD [ESI+048H]
	MOV	DWORD [EAX+048H],ECX
L_60:
;
; Line 80:	if (NextWindow(wnd) != NULL)
;
	CMP	DWORD [ESI+048H],BYTE 00H
	JE	SHORT	L_62
;
; Line 81:	PrevWindow(NextWindow(wnd)) = PrevWindow(wnd);
;
	MOV	EAX,DWORD [ESI+048H]
	MOV	ECX,DWORD [ESI+04CH]
	MOV	DWORD [EAX+04CH],ECX
L_62:
;
; Line 82:	if (pwnd != NULL)	{
;
	TEST	EDI,EDI
	JE	SHORT	L_64
;
; Line 83:	if (wnd == FirstWindow(pwnd))
;
	CMP	ESI,DWORD [EDI+040H]
	JNE	SHORT	L_66
;
; Line 84:	FirstWindow(pwnd) = NextWindow(wnd);
;
	MOV	EAX,DWORD [ESI+048H]
	MOV	DWORD [EDI+040H],EAX
L_66:
;
; Line 85:	if (wnd == LastWindow(pwnd))
;
	CMP	ESI,DWORD [EDI+044H]
	JNE	SHORT	L_68
;
; Line 86:	LastWindow(pwnd) = PrevWindow(wnd);
;
	MOV	EAX,DWORD [ESI+04CH]
	MOV	DWORD [EDI+044H],EAX
L_68:
L_64:
L_58:
;
; Line 89:	}
;
L_56:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_AppendWindow]
;
; Line 92:	void AppendWindow(WINDOW wnd)
;
_AppendWindow:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
L_71:
;
; Line 93:	{
;
;
; Line 94:	if (wnd != NULL)    {
;
	TEST	EDI,EDI
	JE	SHORT	L_72
;
; Line 95:	WINDOW pwnd = GetParent(wnd);
;
	MOV	ESI,DWORD [EDI+03CH]
;
; Line 96:	if (pwnd != NULL)	{
;
	TEST	ESI,ESI
	JE	SHORT	L_74
;
; Line 97:	if (FirstWindow(pwnd) == NULL)
;
	CMP	DWORD [ESI+040H],BYTE 00H
	JNE	SHORT	L_76
;
; Line 98:	FirstWindow(pwnd) = wnd;
;
	MOV	DWORD [ESI+040H],EDI
L_76:
;
; Line 99:	if (LastWindow(pwnd) != NULL)
;
	CMP	DWORD [ESI+044H],BYTE 00H
	JE	SHORT	L_78
;
; Line 100:	NextWindow(LastWindow(pwnd)) = wnd;
;
	MOV	EAX,DWORD [ESI+044H]
	MOV	DWORD [EAX+048H],EDI
L_78:
;
; Line 101:	PrevWindow(wnd) = LastWindow(pwnd);
;
	MOV	EAX,DWORD [ESI+044H]
	MOV	DWORD [EDI+04CH],EAX
;
; Line 102:	LastWindow(pwnd) = wnd;
;
	MOV	DWORD [ESI+044H],EDI
L_74:
;
; Line 104:	NextWindow(wnd) = NULL;
;
	MOV	DWORD [EDI+048H],00H
L_72:
;
; Line 106:	}
;
L_70:
	POP	EDI
	POP	ESI
	POP	EBP
	RET
[GLOBAL	_SkipApplicationControls]
;
; Line 110:	void SkipApplicationControls(void)
;
_SkipApplicationControls:
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
L_81:
;
; Line 111:	{
;
;
; Line 112:	BOOL EmptyAppl = FALSE;
;
	MOV	ESI,00H
;
; Line 113:	int ct = 0;
;
	MOV	EDI,00H
	JMP	SHORT	L_82
L_84:
;
; Line 115:	CLASS cl = GetClass(inFocus);
;
	MOV	EAX,DWORD [_inFocus]
	MOV	EBX,DWORD [EAX+00H]
;
; Line 116:	if (cl == MENUBAR || cl == STATUSBAR)	{
;
	CMP	EBX,BYTE 05H
	JE	SHORT	L_87
	CMP	EBX,BYTE 014H
	JNE	SHORT	L_85
L_87:
;
; Line 117:	SetPrevFocus();
;
	CALL	_SetPrevFocus
;
; Line 118:	EmptyAppl = (cl == MENUBAR && ct++);
;
	CMP	EBX,BYTE 05H
	JNE	SHORT	L_89
	MOV	EAX,EDI
	INC	EDI
	TEST	EAX,EAX
	JNE	SHORT	L_88
L_89:
	SUB	EAX,EAX
; TEST EAX,IMMED (branches around next four bytes of code)
	DB	0A9H
L_88:
	SUB	EAX,EAX
	INC	EAX
	NOP
	MOV	ESI,EAX
	JMP	SHORT	L_86
L_85:
;
; Line 121:	break;
;
	JMP	SHORT	L_83
L_86:
L_82:
;
; Line 114:	while (!EmptyAppl && inFocus != NULL)	{
;
	TEST	ESI,ESI
	JNE	SHORT	L_90
	CMP	DWORD [_inFocus],BYTE 00H
	JNE	SHORT	L_84
L_90:
L_83:
;
; Line 123:	}
;
L_80:
	POP	EDI
	POP	ESI
	POP	EBX
	RET
SECTION _CONST

SECTION _TEXT
[EXTERN	_inFocus]
[EXTERN	_isVisible]
[EXTERN	_SendMessage]
