	TITLE	tlp3cb.c
	.386P
include listing.inc
if @Version gt 510
.model FLAT
else
_TEXT	SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT	ENDS
_DATA	SEGMENT DWORD USE32 PUBLIC 'DATA'
_DATA	ENDS
CONST	SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST	ENDS
_BSS	SEGMENT DWORD USE32 PUBLIC 'BSS'
_BSS	ENDS
_TLS	SEGMENT DWORD USE32 PUBLIC 'TLS'
_TLS	ENDS
_LDATA	SEGMENT DWORD USE32 PUBLIC 'LCODE'
_LDATA	ENDS
_LTEXT	SEGMENT PARA USE32 PUBLIC 'LCODE'
_LTEXT	ENDS
FLAT	GROUP _DATA, CONST, _BSS, _LDATA
	ASSUME	CS: FLAT, DS: FLAT, SS: FLAT
endif
_LDATA	SEGMENT
_?answer@?1??TLP3VendorIoctl@@9@9 DB 'Vendor IOCTL', 00H
_LDATA	ENDS
PUBLIC	_TLP3ConfigureLigthSerialPort
EXTRN	_CCODE__VCOMM_SetCommState:NEAR
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_actionmask$ = -8
_bRet$ = -4
_TLP3ConfigureLigthSerialPort PROC NEAR
; File tlp3cb.c
; Line 44
	push	ebp
	mov	ebp, esp
	sub	esp, 8
; Line 60
	mov	DWORD PTR _actionmask$[ebp], 599	; 00000257H
; Line 65
	mov	eax, DWORD PTR _actionmask$[ebp]
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+708]
	add	edx, 92					; 0000005cH
	push	edx
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	edx, DWORD PTR [ecx+88]
	push	edx
	call	_CCODE__VCOMM_SetCommState
	add	esp, 12					; 0000000cH
	mov	DWORD PTR _bRet$[ebp], eax
; Line 75
	mov	eax, DWORD PTR _bRet$[ebp]
; Line 76
	mov	esp, ebp
	pop	ebp
	ret	0
_TLP3ConfigureLigthSerialPort ENDP
_LTEXT	ENDS
PUBLIC	_TLP3CardTracking
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_TLP3CardTracking PROC NEAR
; Line 98
	push	ebp
	mov	ebp, esp
; Line 99
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	DWORD PTR [ecx+736], 1
; Line 100
	mov	eax, 259				; 00000103H
; Line 101
	pop	ebp
	ret	0
_TLP3CardTracking ENDP
_LTEXT	ENDS
PUBLIC	_TLP3ReaderPower
EXTRN	_CCODE__VCOMM_WriteComm:NEAR
EXTRN	_CCODE__VCOMM_ReadComm:NEAR
EXTRN	_CCODE__CONFIGMG_Yield:NEAR
EXTRN	_CCODE__VCOMM_ClearCommError:NEAR
EXTRN	_CCODE__VCOMM_EscapeCommFunction:NEAR
EXTRN	_CCODE__VCOMM_PurgeComm:NEAR
EXTRN	_TLP3Delay:NEAR
EXTRN	_SysCopyMemory@12:NEAR
_LTEXT	SEGMENT
_readerExtension$ = -24
_hCommPort$ = -16
_status$ = -40
_dwNumBytesWritten$ = -12
_dwError$ = -36
_dwBytesRead$ = -52
_dwBytesRead$19482 = -60
_dummy$19483 = -56
_dwBytesRead$19504 = -68
_dummy$19505 = -64
_SmartcardExtension$ = 8
_numTries$ = -32
_step$ = -48
_waitTime$ = -44
_minWaitTime$ = -8
_numTry$ = -28
_bDone$ = -20
_bRet$ = -4
_TLP3ReaderPower PROC NEAR
; Line 125
	push	ebp
	mov	ebp, esp
	sub	esp, 76					; 0000004cH
; Line 126
	mov	DWORD PTR _numTry$[ebp], 0
; Line 127
	mov	DWORD PTR _bDone$[ebp], 0
; Line 128
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	DWORD PTR _readerExtension$[ebp], ecx
; Line 129
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	eax, DWORD PTR [edx+88]
	mov	DWORD PTR _hCommPort$[ebp], eax
; Line 130
	mov	DWORD PTR _status$[ebp], 0
; Line 143
	mov	ecx, DWORD PTR _readerExtension$[ebp]
	mov	BYTE PTR [ecx+115], 2
; Line 144
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	BYTE PTR [edx+116], 2
; Line 147
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+592]
	mov	DWORD PTR [eax+96], edx
; Line 149
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_TLP3ConfigureLigthSerialPort
	add	esp, 4
	mov	DWORD PTR _bRet$[ebp], eax
; Line 152
	cmp	DWORD PTR _bRet$[ebp], 0
	jne	SHORT $L19463
; Line 154
	mov	eax, -1073741436			; c0000184H
	jmp	$L19448
$L19463:
; Line 158
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [ecx+732], 0
; Line 161
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+720], 0
; Line 168
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	BYTE PTR [ecx+20], 1
; Line 171
	push	1
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_PurgeComm
	add	esp, 8
	mov	DWORD PTR _bRet$[ebp], eax
; Line 174
	push	0
	mov	eax, DWORD PTR _hCommPort$[ebp]
	push	eax
	call	_CCODE__VCOMM_PurgeComm
	add	esp, 8
	mov	DWORD PTR _bRet$[ebp], eax
; Line 177
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	BYTE PTR [ecx+352], 0
; Line 179
	mov	DWORD PTR _step$[ebp], 0
	jmp	SHORT $L19466
$L19467:
	mov	edx, DWORD PTR _step$[ebp]
	add	edx, 1
	mov	DWORD PTR _step$[ebp], edx
$L19466:
	cmp	DWORD PTR _status$[ebp], 0
	jne	$L19468
	cmp	DWORD PTR _bDone$[ebp], 0
	jne	$L19468
; Line 183
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [eax+552], 2
	jne	SHORT $L19469
	cmp	DWORD PTR _step$[ebp], 0
	jne	SHORT $L19469
; Line 185
	mov	DWORD PTR _step$[ebp], 4
$L19469:
; Line 188
	mov	ecx, DWORD PTR _step$[ebp]
	mov	DWORD PTR -72+[ebp], ecx
	cmp	DWORD PTR -72+[ebp], 10			; 0000000aH
	ja	$L19471
	mov	edx, DWORD PTR -72+[ebp]
	jmp	DWORD PTR $L19773[edx*4]
$L19474:
; Line 198
	push	0
	push	0
	push	4
	mov	eax, DWORD PTR _hCommPort$[ebp]
	push	eax
	call	_CCODE__VCOMM_EscapeCommFunction
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 201
	cmp	DWORD PTR _bRet$[ebp], 1
	je	SHORT $L19475
; Line 208
	lea	ecx, DWORD PTR _dwError$[ebp]
	push	ecx
	push	0
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_ClearCommError
	add	esp, 12					; 0000000cH
$L19475:
; Line 215
	mov	DWORD PTR _waitTime$[ebp], 1000		; 000003e8H
; Line 216
	jmp	$L19471
$L19477:
; Line 220
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+732], 1
; Line 223
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+724]
	mov	BYTE PTR [edx], 79			; 0000004fH
; Line 230
	lea	eax, DWORD PTR _dwNumBytesWritten$[ebp]
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+732]
	push	edx
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+724]
	push	ecx
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_WriteComm
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 233
	mov	DWORD PTR _waitTime$[ebp], 100		; 00000064H
; Line 234
	jmp	$L19471
$L19478:
; Line 238
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+720], 1
; Line 240
	mov	DWORD PTR _numTries$[ebp], 0
	mov	DWORD PTR _bRet$[ebp], 0
	jmp	SHORT $L19479
$L19480:
	mov	ecx, DWORD PTR _numTries$[ebp]
	add	ecx, 1
	mov	DWORD PTR _numTries$[ebp], ecx
$L19479:
	cmp	DWORD PTR _numTries$[ebp], 10		; 0000000aH
	jae	SHORT $L19481
; Line 245
	lea	edx, DWORD PTR _dwBytesRead$19482[ebp]
	push	edx
	push	1
	lea	eax, DWORD PTR _dummy$19483[ebp]
	push	eax
	mov	ecx, DWORD PTR _hCommPort$[ebp]
	push	ecx
	call	_CCODE__VCOMM_ReadComm
	add	esp, 16					; 00000010H
; Line 247
	cmp	DWORD PTR _dwBytesRead$19482[ebp], 0
	je	SHORT $L19484
; Line 249
	mov	DWORD PTR _bRet$[ebp], 1
; Line 250
	jmp	SHORT $L19481
$L19484:
; Line 253
	push	1
	push	1000					; 000003e8H
	call	_CCODE__CONFIGMG_Yield
	add	esp, 8
; Line 254
	jmp	SHORT $L19480
$L19481:
; Line 258
	mov	DWORD PTR _waitTime$[ebp], 1000		; 000003e8H
; Line 259
	jmp	$L19471
$L19485:
; Line 268
	push	0
	push	0
	push	3
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_EscapeCommFunction
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 271
	cmp	DWORD PTR _bRet$[ebp], 1
	je	SHORT $L19486
; Line 278
	lea	eax, DWORD PTR _dwError$[ebp]
	push	eax
	push	0
	mov	ecx, DWORD PTR _hCommPort$[ebp]
	push	ecx
	call	_CCODE__VCOMM_ClearCommError
	add	esp, 12					; 0000000cH
$L19486:
; Line 281
	mov	DWORD PTR _waitTime$[ebp], 10000	; 00002710H
; Line 282
	jmp	$L19471
$L19488:
; Line 285
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [edx+552], 0
	jne	SHORT $L19489
; Line 288
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [eax+576], 2
	jbe	SHORT $L19490
; Line 291
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [ecx+576], 2
$L19490:
; Line 295
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+396], 0
; Line 297
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	BYTE PTR [ecx+20], 0
; Line 299
	mov	DWORD PTR _bDone$[ebp], 1
; Line 300
	jmp	$L19471
$L19489:
; Line 309
	push	0
	push	0
	push	4
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_EscapeCommFunction
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 312
	cmp	DWORD PTR _bRet$[ebp], 1
	je	SHORT $L19491
; Line 319
	lea	eax, DWORD PTR _dwError$[ebp]
	push	eax
	push	0
	mov	ecx, DWORD PTR _hCommPort$[ebp]
	push	ecx
	call	_CCODE__VCOMM_ClearCommError
	add	esp, 12					; 0000000cH
$L19491:
; Line 323
	mov	DWORD PTR _waitTime$[ebp], 1000		; 000003e8H
; Line 324
	jmp	$L19471
$L19493:
; Line 328
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+732], 1
; Line 329
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+552]
	mov	DWORD PTR -76+[ebp], ecx
	cmp	DWORD PTR -76+[ebp], 1
	je	SHORT $L19498
	cmp	DWORD PTR -76+[ebp], 2
	je	SHORT $L19499
	jmp	SHORT $L19495
$L19498:
; Line 333
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+724]
	mov	BYTE PTR [eax], 67			; 00000043H
; Line 334
	jmp	SHORT $L19495
$L19499:
; Line 338
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+724]
	mov	BYTE PTR [edx], 87			; 00000057H
$L19495:
; Line 347
	lea	eax, DWORD PTR _dwNumBytesWritten$[ebp]
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+732]
	push	edx
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+724]
	push	ecx
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_WriteComm
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 350
	mov	DWORD PTR _waitTime$[ebp], 100		; 00000064H
; Line 351
	jmp	$L19471
$L19500:
; Line 355
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+720], 1
; Line 357
	mov	DWORD PTR _numTries$[ebp], 0
	mov	DWORD PTR _bRet$[ebp], 0
	jmp	SHORT $L19501
$L19502:
	mov	ecx, DWORD PTR _numTries$[ebp]
	add	ecx, 1
	mov	DWORD PTR _numTries$[ebp], ecx
$L19501:
	cmp	DWORD PTR _numTries$[ebp], 10		; 0000000aH
	jae	SHORT $L19503
; Line 362
	lea	edx, DWORD PTR _dwBytesRead$19504[ebp]
	push	edx
	push	1
	lea	eax, DWORD PTR _dummy$19505[ebp]
	push	eax
	mov	ecx, DWORD PTR _hCommPort$[ebp]
	push	ecx
	call	_CCODE__VCOMM_ReadComm
	add	esp, 16					; 00000010H
; Line 364
	cmp	DWORD PTR _dwBytesRead$19504[ebp], 0
	je	SHORT $L19506
; Line 366
	mov	DWORD PTR _bRet$[ebp], 1
; Line 367
	jmp	SHORT $L19503
$L19506:
; Line 370
	push	1
	push	1000					; 000003e8H
	call	_CCODE__CONFIGMG_Yield
	add	esp, 8
; Line 371
	jmp	SHORT $L19502
$L19503:
; Line 375
	mov	DWORD PTR _waitTime$[ebp], 1000		; 000003e8H
; Line 376
	jmp	$L19471
$L19507:
; Line 385
	push	0
	push	0
	push	3
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_EscapeCommFunction
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 388
	cmp	DWORD PTR _bRet$[ebp], 1
	je	SHORT $L19508
; Line 395
	lea	eax, DWORD PTR _dwError$[ebp]
	push	eax
	push	0
	mov	ecx, DWORD PTR _hCommPort$[ebp]
	push	ecx
	call	_CCODE__VCOMM_ClearCommError
	add	esp, 12					; 0000000cH
$L19508:
; Line 398
	mov	DWORD PTR _waitTime$[ebp], 10000	; 00002710H
; Line 399
	jmp	$L19471
$L19510:
; Line 414
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx+352]
	mov	ecx, 33					; 00000021H
	sub	ecx, eax
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+720], ecx
; Line 421
	lea	eax, DWORD PTR _dwBytesRead$[ebp]
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+720]
	push	edx
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+712]
	push	ecx
	mov	edx, DWORD PTR _hCommPort$[ebp]
	push	edx
	call	_CCODE__VCOMM_ReadComm
	add	esp, 16					; 00000010H
	mov	DWORD PTR _bRet$[ebp], eax
; Line 422
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR _dwBytesRead$[ebp]
	mov	DWORD PTR [eax+720], ecx
; Line 424
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [edx+720], 0
	jne	SHORT $L19511
; Line 426
	lea	eax, DWORD PTR _dwError$[ebp]
	push	eax
	push	0
	mov	ecx, DWORD PTR _hCommPort$[ebp]
	push	ecx
	call	_CCODE__VCOMM_ClearCommError
	add	esp, 12					; 0000000cH
; Line 427
	mov	DWORD PTR _bRet$[ebp], 0
$L19511:
; Line 429
	mov	DWORD PTR _waitTime$[ebp], 50000	; 0000c350H
; Line 430
	jmp	$L19471
$L19513:
; Line 433
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [edx+720], 0
	je	$L19514
; Line 443
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	xor	ecx, ecx
	mov	cl, BYTE PTR [eax+352]
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	add	ecx, DWORD PTR [edx+720]
	cmp	ecx, 33					; 00000021H
	jb	SHORT $L19515
; Line 445
	mov	DWORD PTR _status$[ebp], -1073741804	; c0000014H
; Line 446
	mov	DWORD PTR _bDone$[ebp], 1
; Line 447
	jmp	$L19471
$L19515:
; Line 456
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+720]
	push	ecx
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+712]
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+352]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	lea	ecx, DWORD PTR [eax+edx+288]
	push	ecx
	call	_SysCopyMemory@12
; Line 459
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	cl, BYTE PTR [edx+352]
	add	cl, BYTE PTR [eax+720]
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	BYTE PTR [edx+352], cl
; Line 463
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_SmartcardUpdateCardCapabilities
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 465
	jmp	SHORT $L19518
$L19514:
; Line 467
	mov	DWORD PTR _status$[ebp], 258		; 00000102H
$L19518:
; Line 470
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19521
	cmp	DWORD PTR _numTry$[ebp], 100		; 00000064H
	jae	SHORT $L19521
; Line 472
	mov	ecx, DWORD PTR _numTry$[ebp]
	add	ecx, 1
	mov	DWORD PTR _numTry$[ebp], ecx
; Line 474
	mov	DWORD PTR _step$[ebp], 7
; Line 476
	mov	DWORD PTR _status$[ebp], 0
; Line 477
	jmp	$L19467
$L19521:
; Line 480
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19524
; Line 482
	mov	DWORD PTR _bDone$[ebp], 1
; Line 483
	jmp	$L19471
$L19524:
; Line 486
	mov	DWORD PTR _waitTime$[ebp], 0
$L19525:
; Line 491
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [edx+576], 1
	ja	SHORT $L19526
; Line 493
	mov	DWORD PTR _status$[ebp], -2147483620	; 8000001cH
$L19526:
; Line 496
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19529
; Line 498
	mov	DWORD PTR _bDone$[ebp], 1
; Line 499
	jmp	$L19471
$L19529:
; Line 503
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [eax+540], 0
	je	SHORT $L19530
; Line 509
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+352]
	push	edx
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	add	eax, 288				; 00000120H
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+540]
	push	edx
	call	_SysCopyMemory@12
; Line 513
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+528]
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx+352]
	mov	DWORD PTR [ecx], eax
$L19530:
; Line 520
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+280]
	test	edx, edx
	je	SHORT $L19531
; Line 522
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	BYTE PTR [eax+115], 1
$L19531:
; Line 532
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+436]
	cmp	edx, 1
	jne	SHORT $L19532
; Line 534
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	BYTE PTR [eax+116], 0
$L19532:
; Line 539
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+396]
	and	edx, 2
	test	edx, edx
	je	SHORT $L19533
; Line 543
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [eax+416]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+148], eax
; Line 546
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [eax+412]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+140], eax
; Line 548
	jmp	SHORT $L19535
$L19533:
; Line 549
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+396]
	and	ecx, 1
	test	ecx, ecx
	je	SHORT $L19535
; Line 553
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+404]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+148], eax
; Line 555
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [eax+404]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+140], eax
$L19535:
; Line 559
	mov	DWORD PTR _minWaitTime$[ebp], 50	; 00000032H
; Line 562
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	ecx, DWORD PTR [eax+148]
	cmp	ecx, DWORD PTR _minWaitTime$[ebp]
	jae	SHORT $L19536
; Line 565
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	eax, DWORD PTR _minWaitTime$[ebp]
	mov	DWORD PTR [edx+148], eax
$L19536:
; Line 569
	mov	ecx, DWORD PTR _readerExtension$[ebp]
	mov	edx, DWORD PTR [ecx+140]
	cmp	edx, DWORD PTR _minWaitTime$[ebp]
	jae	SHORT $L19537
; Line 572
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	ecx, DWORD PTR _minWaitTime$[ebp]
	mov	DWORD PTR [eax+140], ecx
$L19537:
; Line 575
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3ConfigureLigthSerialPort
	add	esp, 4
	mov	DWORD PTR _bRet$[ebp], eax
; Line 579
	mov	DWORD PTR _bDone$[ebp], 1
$L19471:
; Line 583
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19539
; Line 585
	jmp	SHORT $L19468
$L19539:
; Line 588
	cmp	DWORD PTR _waitTime$[ebp], 0
	je	SHORT $L19542
; Line 590
	cmp	DWORD PTR _waitTime$[ebp], 1000		; 000003e8H
	jb	SHORT $L19541
; Line 592
	mov	eax, DWORD PTR _waitTime$[ebp]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	push	eax
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3Delay
	add	esp, 8
; Line 594
	jmp	SHORT $L19542
$L19541:
; Line 596
	push	1
	mov	eax, DWORD PTR _waitTime$[ebp]
	push	eax
	call	_CCODE__CONFIGMG_Yield
	add	esp, 8
$L19542:
; Line 599
	jmp	$L19467
$L19468:
; Line 601
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	jne	SHORT $L19544
; Line 603
	mov	DWORD PTR _status$[ebp], -1073741804	; c0000014H
$L19544:
; Line 606
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+708]
	mov	BYTE PTR [edx+20], 0
; Line 615
	mov	eax, DWORD PTR _status$[ebp]
$L19448:
; Line 616
	mov	esp, ebp
	pop	ebp
	ret	0
$L19773:
	DD	$L19474
	DD	$L19477
	DD	$L19478
	DD	$L19485
	DD	$L19488
	DD	$L19493
	DD	$L19500
	DD	$L19507
	DD	$L19510
	DD	$L19513
	DD	$L19525
_TLP3ReaderPower ENDP
_SmartcardExtension$ = 8
_SmartcardUpdateCardCapabilities PROC NEAR
; File ..\..\inc\smclib.h
; Line 1080
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1081
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1082
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	13					; 0000000dH
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1083
	add	sp, 4
; Line 1084
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardUpdateCardCapabilities ENDP
_LTEXT	ENDS
PUBLIC	_TLP3SerialIo
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_currentByte$ = -28
_numBytesRead$ = -20
_waitCounter$ = -4
_timeout$ = -16
_status$ = -24
_requestBuffer$ = -8
_requestBufferLength$ = -32
_timout$ = -12
_numBytesWritten$19570 = -36
_dwError$19587 = -52
_Comstat$19588 = -48
_TLP3SerialIo PROC NEAR
; File tlp3cb.c
; Line 636
	push	ebp
	mov	ebp, esp
	sub	esp, 56					; 00000038H
; Line 637
	mov	DWORD PTR _currentByte$[ebp], 0
; Line 638
	mov	DWORD PTR _status$[ebp], 0
; Line 639
	mov	DWORD PTR _requestBuffer$[ebp], 0
; Line 640
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+732]
	mov	DWORD PTR _requestBufferLength$[ebp], ecx
; Line 644
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+708]
	mov	ecx, DWORD PTR [eax+140]
	mov	DWORD PTR _timout$[ebp], ecx
; Line 658
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [edx+720]
	cmp	ecx, DWORD PTR [eax+716]
	ja	SHORT $L19560
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [edx+732]
	cmp	ecx, DWORD PTR [eax+728]
	jbe	SHORT $L19559
$L19560:
; Line 667
	mov	eax, -1073741789			; c0000023H
	jmp	$L19548
$L19559:
; Line 671
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+708]
	mov	ecx, DWORD PTR [eax+16]
	mov	DWORD PTR -56+[ebp], ecx
	cmp	DWORD PTR -56+[ebp], 3215264		; 00310fa0H
	je	$L19578
	cmp	DWORD PTR -56+[ebp], 3215268		; 00310fa4H
	je	SHORT $L19566
	jmp	$L19563
$L19566:
; Line 677
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [edx+388], 0
	je	SHORT $L19571
; Line 684
	mov	DWORD PTR _requestBufferLength$[ebp], 1
$L19571:
; Line 688
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+724]
	add	ecx, DWORD PTR _currentByte$[ebp]
	mov	DWORD PTR _requestBuffer$[ebp], ecx
	mov	edx, DWORD PTR _currentByte$[ebp]
	add	edx, 1
	mov	DWORD PTR _currentByte$[ebp], edx
; Line 695
	lea	eax, DWORD PTR _numBytesWritten$19570[ebp]
	push	eax
	mov	ecx, DWORD PTR _requestBufferLength$[ebp]
	push	ecx
	mov	edx, DWORD PTR _requestBuffer$[ebp]
	push	edx
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	edx, DWORD PTR [ecx+88]
	push	edx
	call	_CCODE__VCOMM_WriteComm
	add	esp, 16					; 00000010H
; Line 700
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [eax+388], 0
	je	SHORT $L19572
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR _currentByte$[ebp]
	cmp	edx, DWORD PTR [ecx+732]
	jae	SHORT $L19572
; Line 706
	push	1
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+388]
	add	ecx, 2000				; 000007d0H
	push	ecx
	call	_CCODE__CONFIGMG_Yield
	add	esp, 8
; Line 708
	mov	DWORD PTR _status$[ebp], -1073741802	; c0000016H
; Line 710
	jmp	SHORT $L19575
$L19572:
; Line 712
	mov	DWORD PTR _status$[ebp], 0
$L19575:
; Line 715
	cmp	DWORD PTR _status$[ebp], -1073741802	; c0000016H
	je	$L19566
; Line 717
	jmp	$L19563
$L19578:
; Line 722
	mov	DWORD PTR _currentByte$[ebp], 0
$L19580:
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR _currentByte$[ebp]
	cmp	eax, DWORD PTR [edx+720]
	jae	$L19581
; Line 724
	cmp	DWORD PTR _currentByte$[ebp], 0
	je	SHORT $L19583
	cmp	DWORD PTR _numBytesRead$[ebp], 0
	je	SHORT $L19585
$L19583:
; Line 727
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+396]
	and	edx, 1
	test	edx, edx
	je	SHORT $L19584
; Line 730
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [eax+404]
	xor	edx, edx
	mov	ecx, 10000				; 00002710H
	div	ecx
	mov	DWORD PTR _waitCounter$[ebp], eax
; Line 732
	jmp	SHORT $L19585
$L19584:
; Line 734
	mov	eax, DWORD PTR _timeout$[ebp]
	xor	edx, edx
	mov	ecx, 10					; 0000000aH
	div	ecx
	mov	DWORD PTR _waitCounter$[ebp], eax
$L19585:
; Line 743
	lea	edx, DWORD PTR _numBytesRead$[ebp]
	push	edx
	push	1
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+712]
	add	ecx, DWORD PTR _currentByte$[ebp]
	push	ecx
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+708]
	mov	ecx, DWORD PTR [eax+88]
	push	ecx
	call	_CCODE__VCOMM_ReadComm
	add	esp, 16					; 00000010H
; Line 745
	cmp	DWORD PTR _numBytesRead$[ebp], 0
	jne	SHORT $L19586
; Line 757
	lea	edx, DWORD PTR _dwError$19587[ebp]
	push	edx
	lea	eax, DWORD PTR _Comstat$19588[ebp]
	push	eax
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+708]
	mov	eax, DWORD PTR [edx+88]
	push	eax
	call	_CCODE__VCOMM_ClearCommError
	add	esp, 12					; 0000000cH
; Line 759
	push	10					; 0000000aH
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_TLP3Delay
	add	esp, 8
; Line 761
	mov	edx, DWORD PTR _waitCounter$[ebp]
	sub	edx, 1
	mov	DWORD PTR _waitCounter$[ebp], edx
	cmp	DWORD PTR _waitCounter$[ebp], 0
	jne	SHORT $L19589
; Line 764
	mov	DWORD PTR _status$[ebp], 258		; 00000102H
; Line 765
	jmp	SHORT $L19581
$L19589:
; Line 768
	jmp	SHORT $L19591
$L19586:
; Line 770
	mov	eax, DWORD PTR _currentByte$[ebp]
	add	eax, 1
	mov	DWORD PTR _currentByte$[ebp], eax
$L19591:
; Line 772
	jmp	$L19580
$L19581:
$L19563:
; Line 776
	mov	eax, DWORD PTR _status$[ebp]
$L19548:
; Line 777
	mov	esp, ebp
	pop	ebp
	ret	0
_TLP3SerialIo ENDP
_LTEXT	ENDS
PUBLIC	_TLP3TransmitT0
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_requestBuffer$ = -12
_replyBuffer$ = -8
_requestLength$ = -4
_replyLength$ = -24
_serialIoControlCode$ = -44
_bytesToSend$ = -40
_bytesToRead$ = -20
_currentByte$ = -36
_restartWorkWaitingTime$ = -28
_status$ = -32
_bLoopcontinue$ = -16
_procByte$19611 = -48
_TLP3TransmitT0 PROC NEAR
; Line 798
	push	ebp
	mov	ebp, esp
	sub	esp, 48					; 00000030H
; Line 799
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+724]
	mov	DWORD PTR _requestBuffer$[ebp], ecx
; Line 800
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+712]
	mov	DWORD PTR _replyBuffer$[ebp], eax
; Line 801
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	add	ecx, 732				; 000002dcH
	mov	DWORD PTR _requestLength$[ebp], ecx
; Line 802
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	add	edx, 720				; 000002d0H
	mov	DWORD PTR _replyLength$[ebp], edx
; Line 803
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	add	ecx, 16					; 00000010H
	mov	DWORD PTR _serialIoControlCode$[ebp], ecx
; Line 804
	mov	DWORD PTR _currentByte$[ebp], 0
; Line 805
	mov	BYTE PTR _restartWorkWaitingTime$[ebp], 0
; Line 807
	mov	DWORD PTR _bLoopcontinue$[ebp], 1
; Line 816
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_SmartcardT0Request
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 818
	cmp	DWORD PTR _status$[ebp], 0
	jne	$L19635
; Line 824
	mov	eax, DWORD PTR _requestLength$[ebp]
	mov	ecx, DWORD PTR [eax]
	mov	DWORD PTR _bytesToSend$[ebp], ecx
; Line 825
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+740]
	add	eax, 2
	mov	DWORD PTR _bytesToRead$[ebp], eax
; Line 830
	mov	ecx, DWORD PTR _requestLength$[ebp]
	mov	DWORD PTR [ecx], 5
$L19608:
; Line 841
	mov	edx, DWORD PTR _restartWorkWaitingTime$[ebp]
	and	edx, 255				; 000000ffH
	test	edx, edx
	jne	$L19612
; Line 853
	mov	eax, DWORD PTR _serialIoControlCode$[ebp]
	mov	DWORD PTR [eax], 3215268		; 00310fa4H
; Line 854
	mov	ecx, DWORD PTR _requestBuffer$[ebp]
	add	ecx, DWORD PTR _currentByte$[ebp]
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+724], ecx
; Line 856
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 858
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19614
; Line 860
	jmp	$L19631
$L19614:
; Line 867
	mov	ecx, DWORD PTR _serialIoControlCode$[ebp]
	mov	DWORD PTR [ecx], 3215264		; 00310fa0H
; Line 868
	mov	edx, DWORD PTR _replyLength$[ebp]
	mov	eax, DWORD PTR _requestLength$[ebp]
	mov	ecx, DWORD PTR [eax]
	mov	DWORD PTR [edx], ecx
; Line 869
	mov	edx, DWORD PTR _requestBuffer$[ebp]
	add	edx, DWORD PTR _currentByte$[ebp]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+712], edx
; Line 871
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 873
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19616
; Line 875
	jmp	$L19631
$L19616:
; Line 878
	mov	edx, DWORD PTR _requestLength$[ebp]
	mov	eax, DWORD PTR _currentByte$[ebp]
	add	eax, DWORD PTR [edx]
	mov	DWORD PTR _currentByte$[ebp], eax
; Line 879
	mov	ecx, DWORD PTR _requestLength$[ebp]
	mov	edx, DWORD PTR _bytesToSend$[ebp]
	sub	edx, DWORD PTR [ecx]
	mov	DWORD PTR _bytesToSend$[ebp], edx
$L19612:
; Line 883
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	lea	ecx, DWORD PTR _procByte$19611[ebp]
	mov	DWORD PTR [eax+712], ecx
; Line 884
	mov	edx, DWORD PTR _serialIoControlCode$[ebp]
	mov	DWORD PTR [edx], 3215264		; 00310fa0H
; Line 885
	mov	eax, DWORD PTR _replyLength$[ebp]
	mov	DWORD PTR [eax], 1
; Line 887
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 889
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19618
; Line 891
	jmp	$L19631
$L19618:
; Line 894
	mov	BYTE PTR _restartWorkWaitingTime$[ebp], 0
; Line 900
	mov	edx, DWORD PTR _procByte$19611[ebp]
	and	edx, 255				; 000000ffH
	mov	eax, DWORD PTR _requestBuffer$[ebp]
	xor	ecx, ecx
	mov	cl, BYTE PTR [eax+1]
	cmp	edx, ecx
	je	SHORT $L19620
	mov	edx, DWORD PTR _procByte$19611[ebp]
	and	edx, 255				; 000000ffH
	mov	eax, DWORD PTR _requestBuffer$[ebp]
	xor	ecx, ecx
	mov	cl, BYTE PTR [eax+1]
	add	ecx, 1
	cmp	edx, ecx
	jne	SHORT $L19619
$L19620:
; Line 909
	mov	edx, DWORD PTR _requestLength$[ebp]
	mov	eax, DWORD PTR _bytesToSend$[ebp]
	mov	DWORD PTR [edx], eax
; Line 912
	jmp	$L19629
$L19619:
; Line 913
	mov	ecx, DWORD PTR _procByte$19611[ebp]
	and	ecx, 255				; 000000ffH
	mov	edx, DWORD PTR _requestBuffer$[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx+1]
	not	eax
	and	eax, 255				; 000000ffH
	cmp	ecx, eax
	je	SHORT $L19625
	mov	ecx, DWORD PTR _procByte$19611[ebp]
	and	ecx, 255				; 000000ffH
	mov	edx, DWORD PTR _requestBuffer$[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx+1]
	add	eax, 1
	not	eax
	and	eax, 255				; 000000ffH
	cmp	ecx, eax
	jne	SHORT $L19624
$L19625:
; Line 923
	mov	ecx, DWORD PTR _requestLength$[ebp]
	mov	DWORD PTR [ecx], 1
; Line 926
	jmp	$L19629
$L19624:
; Line 928
	mov	edx, DWORD PTR _procByte$19611[ebp]
	and	edx, 255				; 000000ffH
	cmp	edx, 96					; 00000060H
	je	SHORT $L19628
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	xor	ecx, ecx
	mov	cl, BYTE PTR [eax+280]
	test	ecx, ecx
	je	SHORT $L19627
	mov	edx, DWORD PTR _procByte$19611[ebp]
	and	edx, 255				; 000000ffH
	cmp	edx, 249				; 000000f9H
	jne	SHORT $L19627
$L19628:
; Line 943
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [eax+404]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	push	eax
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3Delay
	add	esp, 8
; Line 949
	mov	BYTE PTR _restartWorkWaitingTime$[ebp], 1
; Line 951
	jmp	SHORT $L19629
$L19627:
; Line 958
	mov	eax, DWORD PTR _replyBuffer$[ebp]
	mov	cl, BYTE PTR _procByte$19611[ebp]
	mov	BYTE PTR [eax], cl
; Line 960
	mov	edx, DWORD PTR _serialIoControlCode$[ebp]
	mov	DWORD PTR [edx], 3215264		; 00310fa0H
; Line 961
	mov	eax, DWORD PTR _replyLength$[ebp]
	mov	DWORD PTR [eax], 1
; Line 962
	mov	DWORD PTR _bytesToSend$[ebp], 0
; Line 963
	mov	DWORD PTR _bytesToRead$[ebp], 0
; Line 969
	mov	ecx, DWORD PTR _replyBuffer$[ebp]
	add	ecx, 1
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+712], ecx
; Line 971
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 973
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [ecx+720], 2
$L19629:
; Line 984
	cmp	DWORD PTR _bytesToSend$[ebp], 0
	jne	SHORT $L19632
	mov	edx, DWORD PTR _restartWorkWaitingTime$[ebp]
	and	edx, 255				; 000000ffH
	test	edx, edx
	je	SHORT $L19631
$L19632:
	cmp	DWORD PTR _status$[ebp], 0
	je	$L19608
$L19631:
; Line 986
	cmp	DWORD PTR _status$[ebp], 0
	jne	SHORT $L19635
; Line 988
	cmp	DWORD PTR _bytesToRead$[ebp], 0
	je	SHORT $L19635
; Line 990
	mov	eax, DWORD PTR _serialIoControlCode$[ebp]
	mov	DWORD PTR [eax], 3215264		; 00310fa0H
; Line 991
	mov	ecx, DWORD PTR _replyLength$[ebp]
	mov	edx, DWORD PTR _bytesToRead$[ebp]
	mov	DWORD PTR [ecx], edx
; Line 994
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR _replyBuffer$[ebp]
	mov	DWORD PTR [eax+712], ecx
; Line 996
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
$L19635:
; Line 1012
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR _requestBuffer$[ebp]
	mov	DWORD PTR [eax+724], ecx
; Line 1014
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR _replyBuffer$[ebp]
	mov	DWORD PTR [edx+712], eax
; Line 1016
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	jne	SHORT $L19637
; Line 1019
	mov	DWORD PTR _status$[ebp], -1073741643	; c00000b5H
$L19637:
; Line 1022
	cmp	DWORD PTR _status$[ebp], 0
	jne	SHORT $L19640
; Line 1024
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_SmartcardT0Reply
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
$L19640:
; Line 1034
	mov	eax, DWORD PTR _status$[ebp]
; Line 1035
	mov	esp, ebp
	pop	ebp
	ret	0
_TLP3TransmitT0 ENDP
_SmartcardExtension$ = 8
_SmartcardT0Reply PROC NEAR
; File ..\..\inc\smclib.h
; Line 1036
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1037
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1038
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	9
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1039
	add	sp, 4
; Line 1040
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardT0Reply ENDP
_SmartcardExtension$ = 8
_SmartcardT0Request PROC NEAR
; Line 1047
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1048
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1049
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	10					; 0000000aH
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1050
	add	sp, 4
; Line 1051
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardT0Request ENDP
_LTEXT	ENDS
PUBLIC	_TLP3Transmit
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_status$ = -8
_bLoopcontinue$ = -4
_requestBuffer$19649 = -20
_replyBuffer$19650 = -16
_requestLength$19651 = -12
_replyLength$19652 = -24
_serialIoControlCode$19653 = -28
_ulMicroseconds$19679 = -32
_i$19689 = -36
_TLP3Transmit PROC NEAR
; File tlp3cb.c
; Line 1057
	push	ebp
	mov	ebp, esp
	sub	esp, 44					; 0000002cH
; Line 1059
	mov	DWORD PTR _bLoopcontinue$[ebp], 1
$L19646:
; Line 1072
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+724]
	mov	DWORD PTR _requestBuffer$19649[ebp], ecx
; Line 1073
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+712]
	mov	DWORD PTR _replyBuffer$19650[ebp], eax
; Line 1074
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	add	ecx, 732				; 000002dcH
	mov	DWORD PTR _requestLength$19651[ebp], ecx
; Line 1075
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	add	edx, 720				; 000002d0H
	mov	DWORD PTR _replyLength$19652[ebp], edx
; Line 1076
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	add	ecx, 16					; 00000010H
	mov	DWORD PTR _serialIoControlCode$19653[ebp], ecx
; Line 1081
	mov	edx, DWORD PTR _requestLength$19651[ebp]
	mov	DWORD PTR [edx], 0
; Line 1084
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+396]
	mov	DWORD PTR -40+[ebp], ecx
	cmp	DWORD PTR -40+[ebp], 1
	je	SHORT $L19659
	cmp	DWORD PTR -40+[ebp], 2
	je	SHORT $L19660
	cmp	DWORD PTR -40+[ebp], 65536		; 00010000H
	je	SHORT $L19658
	jmp	SHORT $L19661
$L19658:
; Line 1086
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_SmartcardRawRequest
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1087
	jmp	SHORT $L19655
$L19659:
; Line 1094
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_TLP3TransmitT0
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1095
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
; Line 1096
	jmp	SHORT $L19655
$L19660:
; Line 1099
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_SmartcardT1Request
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1100
	jmp	SHORT $L19655
$L19661:
; Line 1103
	mov	DWORD PTR _status$[ebp], -1073741808	; c0000010H
; Line 1104
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19655:
; Line 1108
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19664
; Line 1110
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19664:
; Line 1113
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19667
; Line 1119
	mov	edx, DWORD PTR _replyLength$19652[ebp]
	mov	DWORD PTR [edx], 0
; Line 1120
	mov	eax, DWORD PTR _serialIoControlCode$19653[ebp]
	mov	DWORD PTR [eax], 3215268		; 00310fa4H
; Line 1122
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1124
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19667
; Line 1126
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19667:
; Line 1131
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19670
; Line 1137
	mov	edx, DWORD PTR _serialIoControlCode$19653[ebp]
	mov	DWORD PTR [edx], 3215264		; 00310fa0H
; Line 1138
	mov	eax, DWORD PTR _replyLength$19652[ebp]
	mov	ecx, DWORD PTR _requestLength$19651[ebp]
	mov	edx, DWORD PTR [ecx]
	mov	DWORD PTR [eax], edx
; Line 1140
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1142
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19670
; Line 1144
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19670:
; Line 1148
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	$L19673
; Line 1151
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+396]
	mov	DWORD PTR -44+[ebp], edx
	cmp	DWORD PTR -44+[ebp], 2
	je	SHORT $L19677
	cmp	DWORD PTR -44+[ebp], 65536		; 00010000H
	je	SHORT $L19676
	jmp	$L19693
$L19676:
; Line 1154
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_SmartcardRawReply
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1155
	jmp	$L19673
$L19677:
; Line 1161
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+776]
	test	edx, edx
	je	SHORT $L19678
; Line 1169
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	xor	ecx, ecx
	mov	cl, BYTE PTR [eax+776]
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	imul	ecx, DWORD PTR [edx+416]
	add	ecx, 2000				; 000007d0H
	mov	DWORD PTR _ulMicroseconds$19679[ebp], ecx
; Line 1174
	mov	eax, DWORD PTR _ulMicroseconds$19679[ebp]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	push	eax
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3Delay
	add	esp, 8
$L19678:
; Line 1180
	mov	eax, DWORD PTR _replyLength$19652[ebp]
	mov	DWORD PTR [eax], 3
; Line 1182
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1188
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	je	$L19686
; Line 1191
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19683
; Line 1193
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
; Line 1194
	jmp	$L19673
$L19683:
; Line 1204
	mov	edx, DWORD PTR _replyBuffer$19650[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx+2]
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+411]
	and	edx, 1
	neg	edx
	sbb	edx, edx
	neg	edx
	add	edx, 1
	add	eax, edx
	mov	ecx, DWORD PTR _replyLength$19652[ebp]
	mov	DWORD PTR [ecx], eax
; Line 1207
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+712]
	add	eax, 3
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [ecx+712], eax
; Line 1209
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1211
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+712]
	sub	ecx, 3
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+712], ecx
; Line 1212
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+720]
	add	ecx, 3
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+720], ecx
; Line 1214
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19686
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	je	SHORT $L19686
; Line 1216
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
; Line 1217
	jmp	SHORT $L19673
$L19686:
; Line 1221
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	jne	SHORT $L19688
; Line 1233
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+720], 0
$L19688:
; Line 1246
	mov	DWORD PTR _i$19689[ebp], 0
	jmp	SHORT $L19690
$L19691:
	mov	ecx, DWORD PTR _i$19689[ebp]
	add	ecx, 1
	mov	DWORD PTR _i$19689[ebp], ecx
$L19690:
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR _i$19689[ebp]
	cmp	eax, DWORD PTR [edx+720]
	jae	SHORT $L19692
; Line 1247
	jmp	SHORT $L19691
$L19692:
; Line 1255
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_SmartcardT1Reply
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1256
	jmp	SHORT $L19673
$L19693:
; Line 1259
	mov	DWORD PTR _status$[ebp], -1073741808	; c0000010H
; Line 1260
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19673:
; Line 1265
	cmp	DWORD PTR _status$[ebp], -1073741802	; c0000016H
	jne	SHORT $L19696
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	jne	$L19646
$L19696:
; Line 1268
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19699
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19701
$L19699:
; Line 1271
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	jne	SHORT $L19701
; Line 1274
	mov	DWORD PTR _status$[ebp], -1073741643	; c00000b5H
$L19701:
; Line 1285
	mov	eax, DWORD PTR _status$[ebp]
; Line 1286
	mov	esp, ebp
	pop	ebp
	ret	0
_TLP3Transmit ENDP
_SmartcardExtension$ = 8
_SmartcardRawReply PROC NEAR
; File ..\..\inc\smclib.h
; Line 1014
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1015
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1016
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	7
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1017
	add	sp, 4
; Line 1018
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardRawReply ENDP
_SmartcardExtension$ = 8
_SmartcardRawRequest PROC NEAR
; Line 1025
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1026
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1027
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	8
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1028
	add	sp, 4
; Line 1029
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardRawRequest ENDP
_SmartcardExtension$ = 8
_SmartcardT1Reply PROC NEAR
; Line 1058
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1059
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1060
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	11					; 0000000bH
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1061
	add	sp, 4
; Line 1062
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardT1Reply ENDP
_SmartcardExtension$ = 8
_SmartcardT1Request PROC NEAR
; Line 1069
	push	ebp
	mov	ebp, esp
	push	ebx
	push	esi
	push	edi
; Line 1070
	push	DWORD PTR _SmartcardExtension$[ebp]
; Line 1071
	DB	-51					; ffffffcdH
	DB	32					; 00000020H
	DB	12					; 0000000cH
	DB	0
	DB	78					; 0000004eH
	DB	0
; Line 1072
	add	sp, 4
; Line 1073
	pop	edi
	pop	esi
	pop	ebx
	pop	ebp
	ret	0
_SmartcardT1Request ENDP
_LTEXT	ENDS
PUBLIC	_TLP3VendorIoctl
EXTRN	_CCODE__lstrcpyn:NEAR
EXTRN	_CCODE__lstrlen:NEAR
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_status$ = -4
_TLP3VendorIoctl PROC NEAR
; File tlp3cb.c
; Line 1292
	push	ebp
	mov	ebp, esp
	push	ecx
; Line 1305
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [eax+540], 0
	je	SHORT $L19710
	push	OFFSET FLAT:_?answer@?1??TLP3VendorIoctl@@9@9
	call	_CCODE__lstrlen
	add	esp, 4
	add	eax, 1
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [ecx+544], eax
	jb	SHORT $L19710
; Line 1310
	push	4
	push	OFFSET FLAT:_?answer@?1??TLP3VendorIoctl@@9@9
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+540]
	push	eax
	call	_CCODE__lstrcpyn
	add	esp, 12					; 0000000cH
; Line 1312
	push	OFFSET FLAT:_?answer@?1??TLP3VendorIoctl@@9@9
	call	_CCODE__lstrlen
	add	esp, 4
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+528]
	mov	DWORD PTR [edx], eax
; Line 1313
	mov	DWORD PTR _status$[ebp], 0
; Line 1316
	jmp	SHORT $L19712
$L19710:
; Line 1319
	mov	DWORD PTR _status$[ebp], -1073741789	; c0000023H
$L19712:
; Line 1331
	mov	eax, DWORD PTR _status$[ebp]
; Line 1332
	mov	esp, ebp
	pop	ebp
	ret	0
_TLP3VendorIoctl ENDP
_LTEXT	ENDS
PUBLIC	_TLP3SetProtocol
EXTRN	_SysCompareMemory@12:NEAR
_LTEXT	SEGMENT
_SmartcardExtension$ = 8
_status$ = -28
_bLoopcontinue$ = -24
_ptsRequest$ = -12
_ptsReply$ = -32
_serialConfigData$ = -16
_readerExtension$ = -20
_minWaitTime$ = -8
_newProtocol$ = -4
_TLP3SetProtocol PROC NEAR
; Line 1357
	push	ebp
	mov	ebp, esp
	sub	esp, 32					; 00000020H
; Line 1359
	mov	DWORD PTR _bLoopcontinue$[ebp], 1
; Line 1364
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+724]
	mov	DWORD PTR _ptsRequest$[ebp], ecx
; Line 1365
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+712]
	mov	DWORD PTR _ptsReply$[ebp], eax
; Line 1367
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+708]
	add	edx, 92					; 0000005cH
	mov	DWORD PTR _serialConfigData$[ebp], edx
; Line 1369
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	DWORD PTR _readerExtension$[ebp], ecx
; Line 1386
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	cmp	DWORD PTR [edx+576], 6
	jne	SHORT $L19725
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [eax+396]
	and	edx, DWORD PTR [ecx+552]
	test	edx, edx
	je	SHORT $L19725
; Line 1388
	mov	DWORD PTR _status$[ebp], 0
; Line 1389
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19725:
; Line 1425
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	$L19730
; Line 1431
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+552]
	mov	DWORD PTR _newProtocol$[ebp], ecx
$L19729:
; Line 1433
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	$L19730
; Line 1436
	mov	edx, DWORD PTR _ptsRequest$[ebp]
	mov	BYTE PTR [edx], 255			; 000000ffH
; Line 1441
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+392]
	and	ecx, DWORD PTR _newProtocol$[ebp]
	and	ecx, 2
	test	ecx, ecx
	je	SHORT $L19731
; Line 1444
	mov	edx, DWORD PTR _ptsRequest$[ebp]
	mov	BYTE PTR [edx+1], 17			; 00000011H
; Line 1445
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+396], 2
; Line 1448
	jmp	SHORT $L19734
$L19731:
; Line 1450
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+392]
	and	edx, DWORD PTR _newProtocol$[ebp]
	and	edx, 1
	test	edx, edx
	je	SHORT $L19733
; Line 1454
	mov	eax, DWORD PTR _ptsRequest$[ebp]
	mov	BYTE PTR [eax+1], 16			; 00000010H
; Line 1455
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [ecx+396], 1
; Line 1458
	jmp	SHORT $L19734
$L19733:
; Line 1461
	mov	DWORD PTR _status$[ebp], -1073741808	; c0000010H
; Line 1462
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19734:
; Line 1466
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19738
; Line 1471
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx+425]
	shl	eax, 4
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+426]
	or	eax, edx
	mov	ecx, DWORD PTR _ptsRequest$[ebp]
	mov	BYTE PTR [ecx+2], al
; Line 1474
	mov	edx, DWORD PTR _ptsRequest$[ebp]
	xor	eax, eax
	mov	al, BYTE PTR [edx]
	mov	ecx, DWORD PTR _ptsRequest$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+1]
	xor	eax, edx
	mov	ecx, DWORD PTR _ptsRequest$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+2]
	xor	eax, edx
	mov	ecx, DWORD PTR _ptsRequest$[ebp]
	mov	BYTE PTR [ecx+3], al
; Line 1476
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [edx+732], 4
; Line 1477
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+708]
	mov	DWORD PTR [ecx+16], 3215268		; 00310fa4H
; Line 1479
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1481
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19738
; Line 1483
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19738:
; Line 1488
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19741
; Line 1491
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+720], 4
; Line 1492
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+708]
	mov	DWORD PTR [edx+16], 3215264		; 00310fa0H
; Line 1494
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	push	eax
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1496
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19741
; Line 1498
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19741:
; Line 1503
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19745
; Line 1506
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	push	ecx
	call	_TLP3SerialIo
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1509
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19745
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	je	SHORT $L19745
; Line 1511
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
$L19745:
; Line 1516
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	SHORT $L19749
; Line 1519
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	je	SHORT $L19748
	push	4
	mov	edx, DWORD PTR _ptsReply$[ebp]
	push	edx
	mov	eax, DWORD PTR _ptsRequest$[ebp]
	push	eax
	call	_SysCompareMemory@12
	test	eax, eax
	jne	SHORT $L19748
; Line 1522
	jmp	SHORT $L19730
$L19748:
; Line 1526
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	xor	edx, edx
	mov	dl, BYTE PTR [ecx+424]
	test	edx, edx
	je	SHORT $L19749
; Line 1539
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	BYTE PTR [eax+424], 0
; Line 1541
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [ecx+552], 1
; Line 1543
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3ReaderPower
	add	esp, 4
	mov	DWORD PTR _status$[ebp], eax
; Line 1545
	jmp	$L19729
$L19749:
; Line 1550
	mov	DWORD PTR _status$[ebp], -1073741434	; c0000186H
; Line 1551
	mov	DWORD PTR _bLoopcontinue$[ebp], 0
; Line 1552
	jmp	$L19729
$L19730:
; Line 1556
	cmp	DWORD PTR _bLoopcontinue$[ebp], 0
	je	$L19751
; Line 1563
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+396]
	and	ecx, 2
	test	ecx, ecx
	je	SHORT $L19752
; Line 1567
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+416]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+148], eax
; Line 1570
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [eax+412]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+140], eax
; Line 1573
	jmp	SHORT $L19754
$L19752:
; Line 1574
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+396]
	and	ecx, 1
	test	ecx, ecx
	je	SHORT $L19754
; Line 1579
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+404]
	xor	edx, edx
	mov	ecx, 1000				; 000003e8H
	div	ecx
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	DWORD PTR [edx+140], eax
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	ecx, DWORD PTR _readerExtension$[ebp]
	mov	edx, DWORD PTR [ecx+140]
	mov	DWORD PTR [eax+148], edx
$L19754:
; Line 1583
	mov	DWORD PTR _minWaitTime$[ebp], 50	; 00000032H
; Line 1585
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	ecx, DWORD PTR [eax+148]
	cmp	ecx, DWORD PTR _minWaitTime$[ebp]
	jae	SHORT $L19755
; Line 1587
	mov	edx, DWORD PTR _readerExtension$[ebp]
	mov	eax, DWORD PTR _minWaitTime$[ebp]
	mov	DWORD PTR [edx+148], eax
$L19755:
; Line 1590
	mov	ecx, DWORD PTR _readerExtension$[ebp]
	mov	edx, DWORD PTR [ecx+140]
	cmp	edx, DWORD PTR _minWaitTime$[ebp]
	jae	SHORT $L19756
; Line 1592
	mov	eax, DWORD PTR _readerExtension$[ebp]
	mov	ecx, DWORD PTR _minWaitTime$[ebp]
	mov	DWORD PTR [eax+140], ecx
$L19756:
; Line 1597
	mov	edx, DWORD PTR _serialConfigData$[ebp]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+432]
	mov	DWORD PTR [edx+4], ecx
; Line 1599
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	push	edx
	call	_TLP3ConfigureLigthSerialPort
	add	esp, 4
	cmp	eax, 1
	jne	SHORT $L19757
; Line 1601
	mov	DWORD PTR _status$[ebp], 0
; Line 1603
	jmp	SHORT $L19759
$L19757:
; Line 1605
	mov	DWORD PTR _status$[ebp], -1073741823	; c0000001H
$L19759:
; Line 1612
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+576], 6
; Line 1616
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+540]
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	ecx, DWORD PTR [eax+396]
	mov	DWORD PTR [edx], ecx
; Line 1619
	mov	edx, DWORD PTR _SmartcardExtension$[ebp]
	mov	eax, DWORD PTR [edx+528]
	mov	DWORD PTR [eax], 4
$L19751:
; Line 1623
	cmp	DWORD PTR _status$[ebp], 258		; 00000102H
	jne	SHORT $L19763
; Line 1626
	mov	DWORD PTR _status$[ebp], -1073741643	; c00000b5H
; Line 1628
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+528]
	mov	DWORD PTR [edx], 0
; Line 1631
	jmp	SHORT $L19767
$L19763:
	cmp	DWORD PTR _status$[ebp], 0
	je	SHORT $L19767
; Line 1634
	mov	eax, DWORD PTR _SmartcardExtension$[ebp]
	mov	DWORD PTR [eax+396], 0
; Line 1636
	mov	ecx, DWORD PTR _SmartcardExtension$[ebp]
	mov	edx, DWORD PTR [ecx+528]
	mov	DWORD PTR [edx], 0
$L19767:
; Line 1647
	mov	eax, DWORD PTR _status$[ebp]
; Line 1648
	mov	esp, ebp
	pop	ebp
	ret	0
_TLP3SetProtocol ENDP
_LTEXT	ENDS
END
