	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	__ll_spawn]
;
; Line 11:	{
;
__ll_spawn:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 058H
;
; Line 15:		memset(&si,0,sizeof(si)) ;
;
	MOV	EAX,00H
	MOV	ECX,044H
	LEA	EDX,[EBP+0FFFFFFB8H]
	PUSH	EDI
	PUSH	EAX
	MOV	EDI,EDX
	CLD
	REPNZ	STOSB
	POP	EAX
	POP	EDI
;
; Line 16:		if (CreateProcessA(file,parms,0,0,0,
;
	LEA	EAX,[EBP+0FFFFFFA8H]
	PUSH	EAX
	LEA	EAX,[EBP+0FFFFFFB8H]
	PUSH	EAX
	PUSH	BYTE 00H
	PUSH	DWORD [EBP+010H]
	PUSH	BYTE 020H
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	DWORD [EBP+0CH]
	PUSH	DWORD [EBP+08H]
	CALL	CreateProcessA
	TEST	EAX,EAX
	JE	NEAR	L_1
;
; Line 20:			WaitForSingleObject(pi.hProcess,0xFFFFFFFF);
;
	PUSH	BYTE 0FFFFFFFFH
	PUSH	DWORD [EBP+0FFFFFFA8H]
	CALL	WaitForSingleObject
;
; Line 21:			GetExitCodeProcess(pi.hProcess,&rv) ;
;
	LEA	EAX,[EBP+0FFFFFFFCH]
	PUSH	EAX
	PUSH	DWORD [EBP+0FFFFFFA8H]
	CALL	GetExitCodeProcess
;
; Line 22:			CloseHandle(pi.hProcess);
;
	PUSH	DWORD [EBP+0FFFFFFA8H]
	CALL	CloseHandle
;
; Line 23:			CloseHandle(pi.hThread) ;
;
	PUSH	DWORD [EBP+0FFFFFFACH]
	CALL	CloseHandle
;
; Line 24:			return 0 ;
;
	MOV	EAX,00H
	JMP	L_3
L_1:
;
; Line 26:			return 1 ;
;
	MOV	EAX,01H
L_2:
;
; Line 28:	}
;
L_3:
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_system]
;
; Line 30:	{
;
_system:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 064H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	LEA	ESI,[EBP+0FFFFFF9CH]
;
; Line 33:		a = getenv("COMSPEC");
;
	PUSH	DWORD L_4
	CALL	_getenv
	POP	ECX
	MOV	EBX,EAX
;
; Line 34:		if (!a)
;
	TEST	EBX,EBX
	JNE	SHORT	L_7
;
; Line 35:			a = searchpath("cmd.exe");
;
	PUSH	DWORD L_5
	CALL	_searchpath
	POP	ECX
	MOV	EBX,EAX
L_7:
;
; Line 36:		if (!string) {
;
	CMP	DWORD [EBP+08H],BYTE 00H
	JNE	NEAR	L_9
;
; Line 37:			if (!a)
;
	TEST	EBX,EBX
	JNE	SHORT	L_11
;
; Line 38:				return 0;
;
	MOV	EAX,00H
	JMP	L_13
L_11:
;
; Line 40:				if (f = fopen(a,"r")) {
;
	PUSH	DWORD L_6
	PUSH	EBX
	CALL	_fopen
	ADD	ESP,BYTE 08H
	MOV	EDI,EAX
	TEST	EAX,EAX
	JE	SHORT	L_14
;
; Line 41:					fclose(f);
;
	PUSH	EDI
	CALL	_fclose
	POP	ECX
;
; Line 42:					return 1;
;
	MOV	EAX,01H
	JMP	L_13
L_14:
;
; Line 45:					return 0;
;
	MOV	EAX,00H
	JMP	L_13
L_15:
L_12:
;
; Line 46:		}
;
L_9:
;
; Line 47:		if (!a) {
;
	TEST	EBX,EBX
	JNE	SHORT	L_16
;
; Line 48:			errno = 2       ;
;
	MOV	DWORD [_errno],02H
;
; Line 49:			return -1;
;
	MOV	EAX,0FFFFFFFFH
	JMP	L_13
L_16:
;
; Line 51:		buf[0] = ' ';
;
	MOV	BYTE [ESI+00H],020H
;
; Line 52:		buf[1] = '-';
;
	MOV	BYTE [ESI+01H],02DH
;
; Line 53:		buf[2] = 'C';
;
	MOV	BYTE [ESI+02H],043H
;
; Line 54:		strcpy(buf+3,string);
;
	LEA	EAX,[ESI+00H]
	ADD	EAX,BYTE 03H
	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,[ESI+00H]
	ADD	ECX,BYTE 03H
;
; Line 55:		spawnlp(0,a,a,buf,0);
;
	PUSH	BYTE 00H
	PUSH	ESI
	PUSH	EBX
	PUSH	EBX
	PUSH	BYTE 00H
	CALL	_spawnlp
	ADD	ESP,BYTE 014H
;
; Line 56:		return 0;
;
	MOV	EAX,00H
L_13:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET

SECTION _STRING
L_6:
	DB	072H,00H
L_5:
	DB	063H,06DH,064H,02EH,065H,078H,065H,00H
L_4:
	DB	043H,04FH,04DH,053H,050H,045H,043H,00H

SECTION _TEXT
[EXTERN	_fopen]
[EXTERN	_getenv]
[EXTERN	WaitForSingleObject]
[EXTERN	CloseHandle]
[EXTERN	_fclose]
[EXTERN	_searchpath]
[EXTERN	CreateProcessA]
[EXTERN	_spawnlp]
[EXTERN	GetExitCodeProcess]

SECTION _DATA
[EXTERN	_errno]
