	SECTION _TEXT CLASS=CODE USE32
	SECTION _DATA CLASS=DATA USE32
	SECTION _BSS  CLASS=BSS USE32
	SECTION _CONST  CLASS=CONST USE32
	SECTION _STRING  CLASS=STRING USE32
	SECTION cstartup CLASS=INITDATA USE32
	SECTION crundown CLASS=EXITDATA USE32
	SECTION cppinit  CLASS=CPPINIT USE32
	SECTION cppexit  CLASS=CPPEXIT USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
[GLOBAL	_access]
;
; Line 11:	{
;
_access:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	MOV	ESI,DWORD [EBP+08H]
;
; Line 13:		switch(__level) {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,DWORD 00H
	JE	SHORT	L_5
	CMP	EAX,DWORD 02H
	JE	NEAR	L_7
	CMP	EAX,DWORD 04H
	JE	SHORT	L_6
	CMP	EAX,DWORD 06H
	JE	SHORT	L_8
	JMP	L_3
L_5:
L_6:
;
; Line 16:				file = fopen(__file,"rb") ;
;
	PUSH	DWORD L_1
	PUSH	ESI
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 17:				break ;
;
	JMP	L_4
L_7:
L_8:
;
; Line 20:				file = fopen(__file,"r+") ;
;
	PUSH	DWORD L_2
	PUSH	ESI
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 21:				break ;
;
	JMP	L_4
L_3:
;
; Line 23:				return -1 ;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_10
L_4:
;
; Line 25:		if (file)
;
	TEST	EBX,EBX
	JE	SHORT	L_11
;
; Line 26:			fclose(file) ;
;
	PUSH	EBX
	CALL	_fclose
	POP	ECX
L_11:
;
; Line 27:		return file ? 0 : -1 ;
;
	TEST	EBX,EBX
	JE	SHORT	L_13
	MOV	EAX,00H
	JMP	L_14
L_13:
	MOV	EAX,0FFFFFFFFH
L_14:
L_10:
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_chdir]
;
; Line 30:	{
;
_chdir:
	PUSH	EBP
	MOV	EBP,ESP
;
; Line 31:		return _dos_setpwd(__path);
;
	PUSH	DWORD [EBP+08H]
	CALL	__dos_setpwd
	POP	ECX
L_15:
	POP	EBP
	RET
[GLOBAL	_findfirst]
;
; Line 36:	{
;
_findfirst:
	PUSH	EBP
	MOV	EBP,ESP
;
; Line 37:		return _dos_findfirst(__path,__attrib | 0x00         ,__ffblk);
;
	PUSH	DWORD [EBP+0CH]
	PUSH	DWORD [EBP+010H]
	PUSH	DWORD [EBP+08H]
	CALL	__dos_findfirst
	ADD	ESP,BYTE 0CH
L_16:
	POP	EBP
	RET
[GLOBAL	_findnext]
;
; Line 40:	{
;
_findnext:
	PUSH	EBP
	MOV	EBP,ESP
;
; Line 41:		return _dos_findnext(__ffblk);
;
	PUSH	DWORD [EBP+08H]
	CALL	__dos_findnext
	POP	ECX
L_17:
	POP	EBP
	RET
[GLOBAL	_fnmerge]
;
; Line 48:	{
;
_fnmerge:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+018H]
;
; Line 50:		if (__drive[0]) {
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	BYTE [EAX+00H],BYTE 00H
	JE	SHORT	L_18
;
; Line 51:			__path[0] = __drive[0];
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ESI+00H],AL
;
; Line 52:			__path[1] = ':';
;
	MOV	BYTE [ESI+01H],03AH
;
; Line 53:			__path[2] = 0;
;
	MOV	BYTE [ESI+02H],00H
;
; Line 54:			p = __path+2;
;
	LEA	EBX,[ESI+02H]
;
; Line 55:		}
;
L_18:
;
; Line 56:		if (__dir[0]) {
;
	MOV	EAX,DWORD [EBP+010H]
	CMP	BYTE [EAX+00H],BYTE 00H
	JE	NEAR	L_20
;
; Line 57:			if (__dir[0] != '\\')
;
	MOV	EAX,DWORD [EBP+010H]
	MOVSX	EAX,BYTE [EAX+00H]
	CMP	EAX,BYTE 05CH
	JE	SHORT	L_22
;
; Line 58:				*p++ = '\\';
;
	MOV	EAX,EBX
	INC	EBX
	MOV	BYTE [EAX+00H],05CH
L_22:
;
; Line 59:			strcpy(p,__dir);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+010H]
	MOV	EDI,EBX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 60:			p = p + strlen(p);
;
	PUSH	EDI
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	ADD	EBX,EAX
;
; Line 61:		}
;
L_20:
;
; Line 62:		strcpy(p,__name);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+014H]
	MOV	EDI,EBX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 63:		p = p + strlen(p);
;
	PUSH	EDI
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	ADD	EBX,EAX
;
; Line 64:		if (__ext[0] && __ext[0] != '.')
;
	CMP	BYTE [EDI+00H],BYTE 00H
	JE	SHORT	L_24
	MOVSX	EAX,BYTE [EDI+00H]
	CMP	EAX,BYTE 02EH
	JE	SHORT	L_24
;
; Line 65:			*p++ = '.';
;
	MOV	EAX,EBX
	INC	EBX
	MOV	BYTE [EAX+00H],02EH
L_24:
;
; Line 66:		strcpy(p,__ext);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EDI
	MOV	EDI,EBX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 67:	}
;
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_fnsplit]
;
; Line 73:	{
;
_fnsplit:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,0104H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+0CH]
	MOV	EBX,DWORD [EBP+014H]
;
; Line 74:		char buf[256],*p,*q =buf;
;
	LEA	EAX,[EBP+0FFFFFEFCH]
	MOV	DWORD [EBP+0FFFFFFFCH],EAX
;
; Line 75:		strcpy(buf,__path);
;
	LEA	EAX,[EBP+0FFFFFEFCH]
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,EAX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
	LEA	ECX,[EBP+0FFFFFEFCH]
;
; Line 76:		p = strrchr(buf,'.');
;
	PUSH	BYTE 02EH
	LEA	EAX,[EBP+0FFFFFEFCH]
	PUSH	EAX
	CALL	_strrchr
	ADD	ESP,BYTE 08H
	MOV	ESI,EAX
;
; Line 77:		if (*(p-1) != '.') {
;
	LEA	EAX,[ESI+0FFFFFFFFH]
	MOVSX	EAX,BYTE [EAX+00H]
	CMP	EAX,BYTE 02EH
	JE	NEAR	L_26
;
; Line 78:			strcpy(__ext,p);
;
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD [EBP+018H]
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 79:			*p=0;
;
	MOV	BYTE [ESI+00H],00H
;
; Line 80:		}
;
	JMP	L_27
L_26:
;
; Line 81:		else __ext[0] = 0;
;
	MOV	EAX,DWORD [EBP+018H]
	MOV	BYTE [EAX+00H],00H
L_27:
;
; Line 83:		if (buf[1] == ':') {
;
	MOVSX	EAX,BYTE [EBP+0FFFFFEFDH]
	CMP	EAX,BYTE 03AH
	JNE	NEAR	L_28
;
; Line 84:			strncpy(__drive,buf,2);
;
	PUSH	BYTE 02H
	LEA	EAX,[EBP+0FFFFFEFCH]
	PUSH	EAX
	PUSH	EDI
	CALL	_strncpy
	ADD	ESP,BYTE 0CH
;
; Line 85:			__drive[2] = 0;
;
	MOV	BYTE [EDI+02H],00H
;
; Line 86:			q += 2;
;
	ADD	DWORD [EBP+0FFFFFFFCH],BYTE 02H
;
; Line 87:		}
;
	JMP	L_29
L_28:
;
; Line 89:			__drive[0] = 0;
;
	MOV	BYTE [EDI+00H],00H
L_29:
;
; Line 91:		p = strrchr(buf,'\\');
;
	PUSH	BYTE 05CH
	LEA	EAX,[EBP+0FFFFFEFCH]
	PUSH	EAX
	CALL	_strrchr
	ADD	ESP,BYTE 08H
	MOV	ESI,EAX
;
; Line 92:		if (p) {
;
	TEST	ESI,ESI
	JE	NEAR	L_30
;
; Line 93:			strcpy(__name,p+1);
;
	LEA	EAX,[ESI+01H]
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EAX
	MOV	EDI,EBX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 94:			*(p+1) = 0;
;
	MOV	BYTE [ESI+01H],00H
;
; Line 95:		}
;
	JMP	L_31
L_30:
;
; Line 96:		else __name[0] = 0;
;
	MOV	BYTE [EBX+00H],00H
L_31:
;
; Line 98:		strcpy(__dir,q);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+0FFFFFFFCH]
	MOV	EDI,DWORD [EBP+010H]
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 99:		return 0;
;
	MOV	EAX,00H
L_32:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_getcurdir]
;
; Line 102:	{
;
_getcurdir:
	PUSH	EBP
	MOV	EBP,ESP
;
; Line 103:		return _dos_getpwd(__directory,__drive);
;
	PUSH	DWORD [EBP+08H]
	PUSH	DWORD [EBP+0CH]
	CALL	__dos_getpwd
	ADD	ESP,BYTE 08H
L_33:
	POP	EBP
	RET
[GLOBAL	_getcwd]
;
; Line 106:	{
;
_getcwd:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,0108H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP+0FFFFFEFCH]
	MOV	EDI,DWORD [EBP+08H]
;
; Line 109:		drv = getdisk();
;
	CALL	_getdisk
	MOV	EBX,EAX
;
; Line 110:		rv = _dos_getpwd(ibuf+3,drv+1);
;
	LEA	EAX,[EBX+01H]
	PUSH	EAX
	LEA	EAX,[ESI+00H]
	ADD	EAX,BYTE 03H
	PUSH	EAX
	CALL	__dos_getpwd
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP+0FFFFFEF8H],EAX
;
; Line 111:		ibuf[0] = drv + 'A';
;
	LEA	EAX,[EBX+041H]
	MOV	BYTE [ESI+00H],AL
;
; Line 112:		ibuf[1] = ':';
;
	MOV	BYTE [ESI+01H],03AH
;
; Line 113:		ibuf[2] = '\\';
;
	MOV	BYTE [ESI+02H],05CH
;
; Line 114:		memcpy(__buf,ibuf,__buflen);
;
	MOV	ECX,DWORD [EBP+0CH]
	PUSH	ESI
	PUSH	EDI
	CLD
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 115:		__buf[__buflen-1] = 0;
;
	MOV	EAX,DWORD [EBP+0CH]
	MOV	BYTE [EDI+EAX+0FFFFFFFFH+00H],00H
;
; Line 116:		return rv;
;
	MOV	EAX,DWORD [EBP+0FFFFFEF8H]
L_34:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_getdisk]
;
; Line 119:	{
;
_getdisk:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 04H
;
; Line 121:		_dos_getdrive(&drv);
;
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	__dos_getdrive
	POP	ECX
;
; Line 122:		return drv-1;
;
	MOV	EAX,DWORD [EBP+0FFFFFFFCH]
	DEC	EAX
L_35:
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_mkdir]
;
; Line 125:	{
;
_mkdir:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 038H
	PUSH	EBX
	PUSH	ESI
	LEA	ESI,[EBP+0FFFFFFC8H]
	MOV	EBX,DWORD [EBP+08H]
;
; Line 128:		if (dpmi_alloc_real_memory(&sel,&para,0x8))
;
	PUSH	BYTE 08H
	LEA	EAX,[EBP+0FFFFFFFEH]
	PUSH	EAX
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	_dpmi_alloc_real_memory
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_36
;
; Line 129:			return 8;
;
	MOV	EAX,08H
	JMP	L_38
L_36:
;
; Line 130:		dpmi_copy_from_ds(sel,0,__path,strlen(__path)+1);
;
	PUSH	EDI
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	INC	EAX
	PUSH	EAX
	PUSH	EBX
	PUSH	BYTE 00H
	MOVZX	EAX,WORD [EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	_dpmi_copy_from_ds
	ADD	ESP,BYTE 010H
;
; Line 131:		regs.b.ah = 0x39;
;
	MOV	BYTE [ESI+01DH],039H
;
; Line 132:		regs.h.flags = 0x72;
;
	MOV	WORD [ESI+020H],072H
;
; Line 133:		regs.h.ss = 0;
;
	MOV	WORD [ESI+030H],00H
;
; Line 134:		regs.h.sp = 0;
;
	MOV	WORD [ESI+02EH],00H
;
; Line 135:		regs.h.ds = para;
;
	MOV	AX,WORD [EBP+0FFFFFFFEH]
	MOV	WORD [ESI+024H],AX
;
; Line 136:		regs.h.dx = 0;
;
	MOV	WORD [ESI+014H],00H
;
; Line 137:		dpmi_simulate_real_interrupt(0x21,&regs);
;
	PUSH	ESI
	PUSH	BYTE 021H
	CALL	_dpmi_simulate_real_interrupt
	ADD	ESP,BYTE 08H
;
; Line 138:		dpmi_dealloc_real_memory(sel);
;
	MOVZX	EAX,WORD [EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	_dpmi_dealloc_real_memory
	POP	ECX
;
; Line 139:		if (regs.h.flags & 1) {
;
	MOVZX	EAX,WORD [ESI+020H]
	AND	EAX,BYTE 01H
	JE	SHORT	L_39
;
; Line 140:			_dos_errno = regs.b.al;
;
	MOVZX	EAX,BYTE [ESI+01CH]
	MOV	DWORD [__dos_errno],EAX
;
; Line 141:			errno = 2       ;
;
	MOV	DWORD [_errno],02H
;
; Line 142:			return -1;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_38
L_39:
;
; Line 144:		return 0;
;
	MOV	EAX,00H
L_38:
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_mktemp]
;
; Line 147:	{
;
_mktemp:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
;
; Line 148:		int len = strlen(__template),i,j,k,l,m;
;
	PUSH	EDI
	MOV	EDI,ESI
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	MOV	DWORD [EBP+0FFFFFFECH],EAX
;
; Line 150:		if (len < 6) return 0;
;
	CMP	DWORD [EBP+0FFFFFFECH],BYTE 06H
	JGE	SHORT	L_42
	MOV	EAX,00H
	JMP	L_44
L_42:
;
; Line 151:		len = len - 6;
;
	SUB	DWORD [EBP+0FFFFFFECH],BYTE 06H
;
; Line 152:		if ((p =strchr(__template,'.')) && p < __template + len)
;
	PUSH	BYTE 02EH
	PUSH	ESI
	CALL	_strchr
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP+0FFFFFFFCH],EAX
	TEST	EAX,EAX
	JE	SHORT	L_45
	MOV	EAX,ESI
	ADD	EAX,DWORD [EBP+0FFFFFFECH]
	CMP	DWORD [EBP+0FFFFFFFCH],EAX
	JNC	SHORT	L_45
;
; Line 153:			return 0;
;
	MOV	EAX,00H
	JMP	L_44
L_45:
;
; Line 154:		strcpy(__template+len,"AA.AAA");
;
	MOV	EAX,DWORD L_41
	MOV	ECX,ESI
	ADD	ECX,DWORD [EBP+0FFFFFFECH]
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EAX
	MOV	EDI,ECX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
	MOV	ECX,ESI
	ADD	ECX,DWORD [EBP+0FFFFFFECH]
	MOV	DWORD [EBP+0FFFFFFF0H],00H
	JMP	L_49
L_47:
	MOV	DWORD [EBP+0FFFFFFF4H],00H
	JMP	L_53
L_51:
	MOV	DWORD [EBP+0FFFFFFF8H],00H
	JMP	L_57
L_55:
	MOV	EDI,00H
	JMP	L_61
L_59:
	MOV	EBX,00H
	JMP	L_65
L_63:
;
; Line 160:							if (!fopen(__template,"rb"))
;
	PUSH	DWORD L_1
	PUSH	ESI
	CALL	_fopen
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JNE	SHORT	L_67
;
; Line 161:								return __template;
;
	MOV	EAX,ESI
	JMP	L_44
L_67:
;
; Line 162:							fclose(__template);
;
	PUSH	ESI
	CALL	_fclose
	POP	ECX
;
; Line 163:							__template[l+5]++;
;
	INC	BYTE [ESI+EDI+05H]
;
; Line 164:						}
;
;
; Line 159:						for (m=0; m < 26; m++) {
;
L_64:
	INC	EBX
L_65:
	CMP	EBX,BYTE 01AH
	JL	NEAR	L_63
L_66:
;
; Line 165:						__template[l+5] = 'A';
;
	MOV	BYTE [ESI+EDI+05H+00H],041H
;
; Line 166:						__template[l+4]++;
;
	INC	BYTE [ESI+EDI+04H]
;
; Line 167:					}
;
;
; Line 158:					for (l=0; l < 26; l++) {
;
L_60:
	INC	EDI
L_61:
	CMP	EDI,BYTE 01AH
	JL	NEAR	L_59
L_62:
;
; Line 168:					__template[l+4] = 'A';
;
	MOV	BYTE [ESI+EDI+04H+00H],041H
;
; Line 169:					__template[l+3]++;
;
	INC	BYTE [ESI+EDI+03H]
;
; Line 170:				}
;
;
; Line 157:				for (k=0; k < 26; k++) {
;
L_56:
	INC	DWORD [EBP+0FFFFFFF8H]
L_57:
	CMP	DWORD [EBP+0FFFFFFF8H],BYTE 01AH
	JL	NEAR	L_55
L_58:
;
; Line 171:				__template[l+3] = 'A';
;
	MOV	BYTE [ESI+EDI+03H+00H],041H
;
; Line 172:				__template[l+1]++;
;
	INC	BYTE [ESI+EDI+01H]
;
; Line 173:			}
;
;
; Line 156:			for (j=0; j < 26; j++) {
;
L_52:
	INC	DWORD [EBP+0FFFFFFF4H]
L_53:
	CMP	DWORD [EBP+0FFFFFFF4H],BYTE 01AH
	JL	NEAR	L_51
L_54:
;
; Line 174:			__template[l+1] = 'A';
;
	MOV	BYTE [ESI+EDI+01H+00H],041H
;
; Line 175:			__template[l+0]++;
;
	INC	BYTE [ESI+EDI+00H]
;
; Line 176:		}
;
;
; Line 155:		for (i=0; i < 26; i++) {
;
L_48:
	INC	DWORD [EBP+0FFFFFFF0H]
L_49:
	CMP	DWORD [EBP+0FFFFFFF0H],BYTE 01AH
	JL	NEAR	L_47
L_50:
;
; Line 178:		return 0 ;
;
	MOV	EAX,00H
L_44:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_rmdir]
;
; Line 182:	{
;
_rmdir:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 038H
	PUSH	EBX
	PUSH	ESI
	LEA	ESI,[EBP+0FFFFFFC8H]
	MOV	EBX,DWORD [EBP+08H]
;
; Line 185:		if (dpmi_alloc_real_memory(&sel,&para,0x8))
;
	PUSH	BYTE 08H
	LEA	EAX,[EBP+0FFFFFFFEH]
	PUSH	EAX
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	_dpmi_alloc_real_memory
	ADD	ESP,BYTE 0CH
	TEST	EAX,EAX
	JE	SHORT	L_69
;
; Line 186:			return 8;
;
	MOV	EAX,08H
	JMP	L_71
L_69:
;
; Line 187:		dpmi_copy_from_ds(sel,0,__path,strlen(__path)+1);
;
	PUSH	EDI
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	INC	EAX
	PUSH	EAX
	PUSH	EBX
	PUSH	BYTE 00H
	MOVZX	EAX,WORD [EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	_dpmi_copy_from_ds
	ADD	ESP,BYTE 010H
;
; Line 188:		regs.b.ah = 0x3a;
;
	MOV	BYTE [ESI+01DH],03AH
;
; Line 189:		regs.h.flags = 0x72;
;
	MOV	WORD [ESI+020H],072H
;
; Line 190:		regs.h.ss = 0;
;
	MOV	WORD [ESI+030H],00H
;
; Line 191:		regs.h.sp = 0;
;
	MOV	WORD [ESI+02EH],00H
;
; Line 192:		regs.h.ds = para;
;
	MOV	AX,WORD [EBP+0FFFFFFFEH]
	MOV	WORD [ESI+024H],AX
;
; Line 193:		regs.h.dx = 0;
;
	MOV	WORD [ESI+014H],00H
;
; Line 194:		dpmi_simulate_real_interrupt(0x21,&regs);
;
	PUSH	ESI
	PUSH	BYTE 021H
	CALL	_dpmi_simulate_real_interrupt
	ADD	ESP,BYTE 08H
;
; Line 195:		dpmi_dealloc_real_memory(sel);
;
	MOVZX	EAX,WORD [EBP+0FFFFFFFCH]
	PUSH	EAX
	CALL	_dpmi_dealloc_real_memory
	POP	ECX
;
; Line 196:		if (regs.h.flags & 1) {
;
	MOVZX	EAX,WORD [ESI+020H]
	AND	EAX,BYTE 01H
	JE	SHORT	L_72
;
; Line 197:			_dos_errno = regs.b.al;
;
	MOVZX	EAX,BYTE [ESI+01CH]
	MOV	DWORD [__dos_errno],EAX
;
; Line 198:			errno = 2       ;
;
	MOV	DWORD [_errno],02H
;
; Line 199:			return -1;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_71
L_72:
;
; Line 201:		return 0;
;
	MOV	EAX,00H
L_71:
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	__searchenv]
;
; Line 204:	{
;
__searchenv:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+010H]
;
; Line 205:		char *path = getenv(inpath),*p=path,*q;
;
	PUSH	DWORD [EBP+0CH]
	CALL	_getenv
	POP	ECX
	MOV	DWORD [EBP+0FFFFFFF8H],EAX
	MOV	ESI,DWORD [EBP+0FFFFFFF8H]
;
; Line 207:		strcpy(output,file);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,EBX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 208:		t = fopen(output,"rb");
;
	PUSH	DWORD L_1
	PUSH	EBX
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP+0FFFFFFFCH],EAX
;
; Line 209:		if (t) {
;
	CMP	DWORD [EBP+0FFFFFFFCH],BYTE 00H
	JE	NEAR	L_75
;
; Line 210:			fclose(t);
;
	PUSH	DWORD [EBP+0FFFFFFFCH]
	CALL	_fclose
	POP	ECX
;
; Line 211:			if (!strchr(output,'\\')) {
;
	PUSH	BYTE 05CH
	PUSH	EBX
	CALL	_strchr
	ADD	ESP,BYTE 08H
	TEST	EAX,EAX
	JNE	NEAR	L_77
;
; Line 212:				getcwd(output,255);
;
	PUSH	DWORD 0FFH
	PUSH	EBX
	CALL	_getcwd
	ADD	ESP,BYTE 08H
;
; Line 213:				strcat(output,"\\");
;
	MOV	EAX,DWORD L_74
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EAX
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 214:				strcat(output,file) ;
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 215:			}
;
L_77:
;
; Line 216:			return ;
;
	JMP	L_79
L_75:
	JMP	L_80
L_82:
;
; Line 219:			q = output;
;
	MOV	EDI,EBX
	JMP	L_83
L_85:
;
; Line 221:				*q++=*p++;
;
	MOV	EAX,ESI
	INC	ESI
	MOV	ECX,EDI
	INC	EDI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ECX+00H],AL
L_83:
;
; Line 220:			while (*p != ';' && *p)
;
	MOVSX	EAX,BYTE [ESI+00H]
	CMP	EAX,BYTE 03BH
	JE	SHORT	L_86
	CMP	BYTE [ESI+00H],BYTE 00H
	JNE	NEAR	L_85
L_86:
L_84:
;
; Line 222:			if (*p) p++;
;
	CMP	BYTE [ESI+00H],BYTE 00H
	JE	SHORT	L_87
	INC	ESI
L_87:
;
; Line 223:			if (*(q-1) != '\\')
;
	LEA	EAX,[EDI+0FFFFFFFFH]
	MOVSX	EAX,BYTE [EAX+00H]
	CMP	EAX,BYTE 05CH
	JE	SHORT	L_89
;
; Line 224:				*q++ = '\\';
;
	MOV	EAX,EDI
	INC	EDI
	MOV	BYTE [EAX+00H],05CH
L_89:
;
; Line 225:			strcpy(q,file);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
;
; Line 226:			if ((t = fopen(output,"rb")) != 0) {
;
	PUSH	DWORD L_1
	PUSH	EBX
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP+0FFFFFFFCH],EAX
	TEST	EAX,EAX
	JE	SHORT	L_91
;
; Line 227:				fclose(t);
;
	PUSH	DWORD [EBP+0FFFFFFFCH]
	CALL	_fclose
	POP	ECX
;
; Line 229:				return ;
;
	JMP	L_79
L_91:
;
; Line 231:		}
;
L_80:
;
; Line 218:		else while (*p) {
;
	CMP	BYTE [ESI+00H],BYTE 00H
	JNE	NEAR	L_82
L_81:
L_76:
;
; Line 232:		*output = 0 ;
;
	MOV	BYTE [EBX+00H],00H
;
; Line 233:		return ;
;
L_79:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_searchpath]
;
; Line 236:	{
;
_searchpath:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	MOV	EBX,DWORD [EBP+08H]
;
; Line 238:		_searchenv(__file,"PATH",buf) ;
;
	LEA	EAX,[L_93]
	PUSH	EAX
	PUSH	DWORD L_94
	PUSH	EBX
	CALL	__searchenv
	ADD	ESP,BYTE 0CH
;
; Line 239:		if (buf[0])	{
;
	CMP	BYTE [L_93],BYTE 00H
	JE	NEAR	L_95
;
; Line 240:			if (strcmp(buf,__file))
;
	LEA	EAX,[L_93]
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EBX
	MOV	EDI,EAX
	XCHG	ESI,EDI
	CLD
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	REPZ	CMPSB
	MOV	ECX,00H
	JE	SHORT	L_100
	JS	SHORT	L_99
	MOV	ECX,01H
	JMP	L_100
L_99:
	MOV	ECX,0FFFFFFFFH
L_100:
	POP	EDI
	POP	ESI
	TEST	ECX,ECX
	JE	NEAR	L_97
;
; Line 241:				strcat(buf,__file) ;
;
	LEA	EAX,[L_93]
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EBX
	MOV	EDI,EAX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
	LEA	ECX,[L_93]
L_97:
;
; Line 242:			return buf ;
;
	LEA	EAX,[L_93]
	JMP	L_101
L_95:
;
; Line 244:		return 0 ;
;
	MOV	EAX,00H
L_101:
	POP	EBX
	POP	EBP
	RET
[GLOBAL	_setdisk]
;
; Line 247:	{
;
_setdisk:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 04H
;
; Line 249:		return _dos_setdrive(__drive, &nd);
;
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	PUSH	DWORD [EBP+08H]
	CALL	__dos_setdrive
	ADD	ESP,BYTE 08H
L_102:
	MOV	ESP,EBP
	POP	EBP
	RET

SECTION _STRING
L_94:
	DB	050H,041H,054H,048H,00H
L_74:
	DB	05CH,00H
L_41:
	DB	041H,041H,02EH,041H,041H,041H,00H
L_2:
	DB	072H,02BH,00H
L_1:
	DB	072H,062H,00H
SECTION _DATA
SECTION _BSS

L_93	RESB	0100H

SECTION _TEXT
[EXTERN	_dpmi_simulate_real_interrupt]
[EXTERN	_strncpy]
[EXTERN	_fopen]
[EXTERN	__dos_findnext]
[EXTERN	_getenv]
[EXTERN	_dpmi_alloc_real_memory]
[EXTERN	_fclose]
[EXTERN	_strrchr]
[EXTERN	_dpmi_dealloc_real_memory]
[EXTERN	__dos_findfirst]
[EXTERN	__dos_setpwd]
[EXTERN	__dos_getdrive]
[EXTERN	_strchr]
[EXTERN	__dos_getpwd]
[EXTERN	_dpmi_copy_from_ds]
[EXTERN	__dos_setdrive]

SECTION _DATA
[EXTERN	__dos_errno]
[EXTERN	_errno]
