	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	_tmpnam]
;
; Line 10:	{
;
_tmpnam:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 010H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,DWORD _ibuf
	MOV	EBX,DWORD [EBP+08H]
;
; Line 17:		int i,q=0;
;
	MOV	DWORD [EBP+0FFFFFFF8H],00H
;
; Line 19:		time(&time1);
;
	LEA	EAX,[EBP+0FFFFFFF0H]
	PUSH	EAX
	CALL	_time
	POP	ECX
;
; Line 20:		ltime = localtime(&time1);
;
	LEA	EAX,[EBP+0FFFFFFF0H]
	PUSH	EAX
	CALL	_localtime
	POP	ECX
	MOV	ESI,EAX
	JMP	L_2
L_4:
;
; Line 22:			ibuf[0] = (char)(ltime->tm_year/26);
;
	MOV	EAX,DWORD [ESI+014H]
	CDQ
	IDIV	DWORD [L_5]
	MOV	BYTE [EDI+00H],AL
;
; Line 23:			ibuf[1] = (char)ltime->tm_mon;
;
	MOV	EAX,DWORD [ESI+010H]
	MOV	BYTE [EDI+01H],AL
;
; Line 24:			ibuf[2] = (char)ltime->tm_mday;
;
	MOV	EAX,DWORD [ESI+0CH]
	MOV	BYTE [EDI+02H],AL
;
; Line 25:			ibuf[3] = (char)ltime->tm_hour;
;
	MOV	EAX,DWORD [ESI+08H]
	MOV	BYTE [EDI+03H],AL
;
; Line 26:			ibuf[4] = (char)(ltime->tm_min/36);
;
	MOV	EAX,DWORD [ESI+04H]
	CDQ
	IDIV	DWORD [L_6]
	MOV	BYTE [EDI+04H],AL
;
; Line 27:			ibuf[5] = (char)(ltime->tm_min%36);
;
	MOV	EAX,DWORD [ESI+04H]
	CDQ
	IDIV	DWORD [L_6]
	MOV	BYTE [EDI+05H],DL
;
; Line 28:			ibuf[6] = (char)(ltime->tm_sec/36);
;
	MOV	EAX,DWORD [ESI+00H]
	CDQ
	IDIV	DWORD [L_6]
	MOV	BYTE [EDI+06H],AL
;
; Line 29:			ibuf[7] = (char)(ltime->tm_sec%36);
;
	MOV	EAX,DWORD [ESI+00H]
	CDQ
	IDIV	DWORD [L_6]
	MOV	BYTE [EDI+07H],DL
;
; Line 30:			ibuf[8] = '.';
;
	MOV	BYTE [EDI+08H],02EH
;
; Line 31:			ibuf[9] = 'T';
;
	MOV	BYTE [EDI+09H],054H
;
; Line 32:			ibuf[10] = 'M';
;
	MOV	BYTE [EDI+0AH],04DH
;
; Line 33:			ibuf[11] = 'P';
;
	MOV	BYTE [EDI+0BH],050H
;
; Line 34:			ibuf[12] = 0;
;
	MOV	BYTE [EDI+0CH],00H
	MOV	DWORD [EBP+0FFFFFFF4H],00H
	JMP	L_9
L_7:
;
; Line 36:				ibuf[i] += 'A';
;
	MOV	EAX,DWORD [EBP+0FFFFFFF4H]
	ADD	BYTE [EDI+EAX+00H],BYTE 041H
;
; Line 37:				if (ibuf[i] > 'Z')
;
	MOV	EAX,DWORD [EBP+0FFFFFFF4H]
	MOVSX	EAX,BYTE [EDI+EAX+00H]
	CMP	EAX,BYTE 05AH
	JLE	SHORT	L_11
;
; Line 38:					ibuf[i]+= '0' - 'A';
;
	MOV	EAX,DWORD [EBP+0FFFFFFF4H]
	ADD	BYTE [EDI+EAX+00H],BYTE 0FFFFFFEFH
L_11:
;
; Line 39:			}
;
;
; Line 35:			for (i=0; i < 8; i++) {
;
L_8:
	INC	DWORD [EBP+0FFFFFFF4H]
L_9:
	CMP	DWORD [EBP+0FFFFFFF4H],BYTE 08H
	JL	NEAR	L_7
L_10:
;
; Line 40:			fil = fopen(ibuf,"rb");
;
	PUSH	DWORD L_1
	PUSH	EDI
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP+0FFFFFFFCH],EAX
;
; Line 41:			if (!fil)
;
	CMP	DWORD [EBP+0FFFFFFFCH],BYTE 00H
	JE	NEAR	L_3
;
; Line 42:			  break;
;
L_13:
;
; Line 43:			fclose(fil);
;
	PUSH	DWORD [EBP+0FFFFFFFCH]
	CALL	_fclose
	POP	ECX
;
; Line 44:			if (q % 26 == 0) {
;
	MOV	EAX,DWORD [EBP+0FFFFFFF8H]
	CDQ
	IDIV	DWORD [L_5]
	TEST	EDX,EDX
	JNE	SHORT	L_15
;
; Line 45:				ltime->tm_mon++;
;
	INC	DWORD [ESI+010H]
;
; Line 46:				if (ltime->tm_mon > 11)
;
	CMP	DWORD [ESI+010H],BYTE 0BH
	JLE	SHORT	L_17
;
; Line 47:					ltime->tm_mon = 0;
;
	MOV	DWORD [ESI+010H],00H
L_17:
;
; Line 48:			}
;
L_15:
;
; Line 49:			q++;
;
	INC	DWORD [EBP+0FFFFFFF8H]
;
; Line 50:			ltime->tm_year++;
;
	INC	DWORD [ESI+014H]
;
; Line 51:		}
;
L_2:
;
; Line 21:		while (1) {
;
	JMP	L_4
L_3:
;
; Line 52:		if (buf) {
;
	TEST	EBX,EBX
	JE	NEAR	L_19
;
; Line 53:			strcpy(buf,ibuf);
;
	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 54:			return buf;
;
	MOV	EAX,EBX
	JMP	L_21
L_19:
;
; Line 57:			return &ibuf;
;
	MOV	EAX,EDI
L_20:
;
; Line 58:	}
;
L_21:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_tmpfile]
;
; Line 60:	{
;
_tmpfile:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
;
; Line 62:		FILE *stream = fopen(tmpnam(buf),"wb+");
;
	PUSH	DWORD L_22
	LEA	EAX,[EBP+0FFFFFFECH]
	PUSH	EAX
	CALL	_tmpnam
	POP	ECX
	PUSH	EAX
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 63:		if (stream)
;
	TEST	EBX,EBX
	JE	SHORT	L_23
;
; Line 64:			stream->istemp = 1;
;
	MOV	DWORD [EBX+019H],01H
L_23:
;
; Line 65:		return stream;
;
	MOV	EAX,EBX
L_25:
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET

	TIMES $$-$ & 3 NOP
L_6:
	DD	024H
L_5:
	DD	01aH

SECTION _STRING
L_22:
	DB	077H,062H,02BH,00H
L_1:
	DB	072H,062H,00H
SECTION _DATA
SECTION _BSS

_ibuf	RESB	0100H

SECTION _TEXT
[EXTERN	_time]
[EXTERN	_fopen]
[EXTERN	_localtime]
[EXTERN	_fclose]
