	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	_CheckBoxProc]
;
; Line 5:	int CheckBoxProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
;
_CheckBoxProc:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 010H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EBP+010H]
	LEA	EDI,[EBP-010H]
L_3:
;
; Line 6:	{
;
;
; Line 8:	CTLWINDOW *ct = GetControl(wnd);
;
	MOV	EAX,DWORD [EBX+0108H]
	MOV	DWORD [EBP-04H],EAX
;
; Line 9:	if (ct != NULL)    {
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	NEAR	L_4
;
; Line 10:	switch (msg)    {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 0CH
	JE	SHORT	L_9
	JA	SHORT	L_13
	CMP	EAX,BYTE 09H
	JE	SHORT	L_10
	JA	NEAR	L_7
	CMP	EAX,BYTE 08H
	JE	SHORT	L_8
	JMP	NEAR	L_7
L_13:
	CMP	EAX,BYTE 024H
	JE	NEAR	L_12
	JA	NEAR	L_7
	CMP	EAX,BYTE 015H
	JE	NEAR	L_11
	JMP	NEAR	L_7
L_8:
;
; Line 12:	if (!(int)p1)
;
	TEST	ESI,ESI
	JNE	SHORT	L_14
;
; Line 13:	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_14:
;
; Line 14:	case MOVE:
;
L_9:
;
; Line 15:	rtn = BaseWndProc(CHECKBOX, wnd, msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	EBX
	MOV	EAX,DWORD [_classdefs+0B4H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
	MOV	DWORD [EBP-08H],EAX
;
; Line 16:	SetFocusCursor(wnd);
;
	PUSH	EBX
	CALL	_SetFocusCursor
	POP	ECX
;
; Line 17:	return rtn;
;
	MOV	EAX,DWORD [EBP-08H]
	JMP	SHORT	L_2
L_10:
;
; Line 19:	char cb[] = "[ ]";
;
	MOV	EAX,DWORD [L_1]
	MOV	DWORD [SS:EDI+00H],EAX
;
; Line 20:	if (ct->setting)
;
	MOV	EAX,DWORD [EBP-04H]
	CMP	DWORD [EAX+028H],BYTE 00H
	JE	SHORT	L_16
;
; Line 21:	cb[1] = 'X';
;
	MOV	BYTE [SS:EDI+01H],058H
L_16:
;
; Line 22:	SendMessage(wnd, CLEARTEXT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 033H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 23:	SendMessage(wnd, ADDTEXT, (PARAM) cb, 0);
;
	PUSH	BYTE 00H
	PUSH	EDI
	PUSH	BYTE 030H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 24:	SetFocusCursor(wnd);
;
	PUSH	EBX
	CALL	_SetFocusCursor
	POP	ECX
;
; Line 25:	break;
;
	JMP	SHORT	L_6
L_11:
;
; Line 28:	if ((int)p1 != ' ')
;
	CMP	ESI,BYTE 020H
	JNE	SHORT	L_6
;
; Line 29:	break;
;
L_18:
;
; Line 30:	case LEFT_BUTTON:
;
L_12:
;
; Line 31:	ct->setting ^= ON;
;
	MOV	EAX,DWORD [EBP-04H]
	BTC	DWORD [EAX+028H],00H
;
; Line 32:	SendMessage(wnd, PAINT, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 09H
	PUSH	EBX
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 33:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_2
L_7:
;
; Line 35:	break;
;
	JMP	SHORT	L_6
L_6:
L_4:
;
; Line 38:	return BaseWndProc(CHECKBOX, wnd, msg, p1, p2);
;
	PUSH	DWORD [EBP+014H]
	PUSH	ESI
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	EBX
	MOV	EAX,DWORD [_classdefs+0B4H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
L_2:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_CheckBoxSetting]
;
; Line 41:	BOOL CheckBoxSetting(DBOX *db, enum commands cmd)
;
_CheckBoxSetting:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	ESI
L_21:
;
; Line 42:	{
;
;
; Line 43:	CTLWINDOW *ct = FindCommand(db, cmd, CHECKBOX);
;
	PUSH	BYTE 0FH
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	DWORD [EBP+08H]
	CALL	_FindCommand
	ADD	ESP,BYTE 0CH
	MOV	ESI,EAX
;
; Line 44:	return ct ? (ct->wnd ? (ct->setting==ON) : (ct->isetting==ON)) : FALSE;
;
	TEST	ESI,ESI
	JE	SHORT	L_22
	CMP	DWORD [ESI+02CH],BYTE 00H
	JE	SHORT	L_24
	CMP	DWORD [ESI+028H],BYTE 01H
	SETE	AL
	MOVZX	EAX,AL
	JMP	SHORT	L_25
L_24:
	CMP	DWORD [ESI+024H],BYTE 01H
	SETE	AL
	MOVZX	EAX,AL
L_25:
	JMP	SHORT	L_23
L_22:
	MOV	EAX,00H
L_23:
L_20:
	POP	ESI
	POP	EBP
	RET
SECTION _DATA

L_1	DB	05BH,020H,05DH,00H
SECTION _CONST

SECTION _TEXT
[EXTERN	_FindCommand]
[EXTERN	_classdefs]
[EXTERN	_SetFocusCursor]
[EXTERN	_SendMessage]
