📄 ioctl.cod
字号:
0008f 68 f4 00 00 00 push 244 ; 000000f4H
00094 68 00 00 00 00 push OFFSET FLAT:$SG14892
00099 68 00 00 00 00 push OFFSET FLAT:$SG14893
0009e ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L14894:
; 245 :
; 246 : WRITE_LINE_CONTROL(
; 247 : Extension->Controller,
; 248 : Extension->LineControl
; 249 : );
000a4 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
000a7 8a 88 9c 01 00
00 mov cl, BYTE PTR [eax+412]
000ad 8b 80 98 00 00
00 mov eax, DWORD PTR [eax+152]
000b3 83 c0 03 add eax, 3
000b6 51 push ecx
000b7 50 push eax
000b8 ff 15 00 00 00
00 call DWORD PTR __imp__WRITE_PORT_UCHAR@8
; 250 :
; 251 : return FALSE;
000be 32 c0 xor al, al
000c0 5e pop esi
; 252 :
; 253 : }
000c1 5d pop ebp
000c2 c2 04 00 ret 4
_SerialSetLineControl@4 ENDP
PAGESER ENDS
PUBLIC _SerialGetModemUpdate@4
EXTRN _SerialHandleModemUpdate@8:NEAR
; COMDAT _SerialGetModemUpdate@4
PAGESER SEGMENT
$SG14907 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG14910 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14911 DB 'FALSE', 00H
; Function compile flags: /Ogs
_Context$ = 8
_Extension$ = 8
_SerialGetModemUpdate@4 PROC NEAR ; COMDAT
; 278 : {
00062 55 push ebp
00063 8b ec mov ebp, esp
; 279 :
; 280 : PSERIAL_DEVICE_EXTENSION Extension = ((PSERIAL_IOCTL_SYNC)Context)->Extension;
00065 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
00068 56 push esi
; 281 : ULONG *Result = (ULONG *)(((PSERIAL_IOCTL_SYNC)Context)->Data);
; 282 :
; 283 : SERIAL_LOCKED_PAGED_CODE();
00069 8b 35 00 00 00
00 mov esi, DWORD PTR __imp__KeGetCurrentIrql@0
0006f 57 push edi
00070 8b 08 mov ecx, DWORD PTR [eax]
00072 8b 78 04 mov edi, DWORD PTR [eax+4]
00075 89 4d 08 mov DWORD PTR _Extension$[ebp], ecx
00078 ff d6 call esi
0007a 3c 01 cmp al, 1
0007c 76 32 jbe SHORT $L14908
0007e 83 3d 14 00 00
00 00 cmp DWORD PTR _SerialGlobals+20, 0
00085 75 29 jne SHORT $L14908
00087 ff d6 call esi
00089 0f b6 c0 movzx eax, al
0008c 50 push eax
0008d 68 00 00 00 00 push OFFSET FLAT:$SG14907
00092 e8 00 00 00 00 call _DbgPrint
00097 59 pop ecx
00098 59 pop ecx
00099 6a 00 push 0
0009b 68 1b 01 00 00 push 283 ; 0000011bH
000a0 68 00 00 00 00 push OFFSET FLAT:$SG14910
000a5 68 00 00 00 00 push OFFSET FLAT:$SG14911
000aa ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L14908:
; 284 :
; 285 :
; 286 : *Result = SerialHandleModemUpdate(
; 287 : Extension,
; 288 : FALSE
; 289 : );
000b0 6a 00 push 0
000b2 ff 75 08 push DWORD PTR _Extension$[ebp]
000b5 e8 00 00 00 00 call _SerialHandleModemUpdate@8
000ba 89 07 mov DWORD PTR [edi], eax
000bc 5f pop edi
; 290 :
; 291 : return FALSE;
000bd 32 c0 xor al, al
000bf 5e pop esi
; 292 :
; 293 : }
000c0 5d pop ebp
000c1 c2 04 00 ret 4
_SerialGetModemUpdate@4 ENDP
PAGESER ENDS
PUBLIC _SerialSetMCRContents@4
; COMDAT _SerialSetMCRContents@4
PAGESER SEGMENT
$SG14921 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG14924 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14925 DB 'FALSE', 00H
; Function compile flags: /Ogs
_Context$ = 8
_Result$ = 8
_SerialSetMCRContents@4 PROC NEAR ; COMDAT
; 314 : {
00062 55 push ebp
00063 8b ec mov ebp, esp
; 315 : PSERIAL_DEVICE_EXTENSION Extension = ((PSERIAL_IOCTL_SYNC)Context)->Extension;
00065 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
00068 56 push esi
; 316 : ULONG *Result = (ULONG *)(((PSERIAL_IOCTL_SYNC)Context)->Data);
; 317 :
; 318 : SERIAL_LOCKED_PAGED_CODE();
00069 8b 35 00 00 00
00 mov esi, DWORD PTR __imp__KeGetCurrentIrql@0
0006f 57 push edi
00070 8b 38 mov edi, DWORD PTR [eax]
00072 8b 40 04 mov eax, DWORD PTR [eax+4]
00075 89 45 08 mov DWORD PTR _Result$[ebp], eax
00078 ff d6 call esi
0007a 3c 01 cmp al, 1
0007c 76 32 jbe SHORT $L14926
0007e 83 3d 14 00 00
00 00 cmp DWORD PTR _SerialGlobals+20, 0
00085 75 29 jne SHORT $L14926
00087 ff d6 call esi
00089 0f b6 c0 movzx eax, al
0008c 50 push eax
0008d 68 00 00 00 00 push OFFSET FLAT:$SG14921
00092 e8 00 00 00 00 call _DbgPrint
00097 59 pop ecx
00098 59 pop ecx
00099 6a 00 push 0
0009b 68 3e 01 00 00 push 318 ; 0000013eH
000a0 68 00 00 00 00 push OFFSET FLAT:$SG14924
000a5 68 00 00 00 00 push OFFSET FLAT:$SG14925
000aa ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L14926:
; 319 :
; 320 : //
; 321 : // This is severe casting abuse!!!
; 322 : //
; 323 :
; 324 : WRITE_MODEM_CONTROL(Extension->Controller, (UCHAR)PtrToUlong(Result));
000b0 8b 87 98 00 00
00 mov eax, DWORD PTR [edi+152]
000b6 ff 75 08 push DWORD PTR _Result$[ebp]
000b9 83 c0 04 add eax, 4
000bc 50 push eax
000bd ff 15 00 00 00
00 call DWORD PTR __imp__WRITE_PORT_UCHAR@8
000c3 5f pop edi
; 325 : return FALSE;
000c4 32 c0 xor al, al
000c6 5e pop esi
; 326 : }
000c7 5d pop ebp
000c8 c2 04 00 ret 4
_SerialSetMCRContents@4 ENDP
PAGESER ENDS
PUBLIC _SerialGetMCRContents@4
; COMDAT _SerialGetMCRContents@4
PAGESER SEGMENT
$SG14942 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG14945 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14946 DB 'FALSE', 00H
; Function compile flags: /Ogs
_Context$ = 8
_Result$ = 8
_SerialGetMCRContents@4 PROC NEAR ; COMDAT
; 350 : {
00062 55 push ebp
00063 8b ec mov ebp, esp
; 351 :
; 352 : PSERIAL_DEVICE_EXTENSION Extension = ((PSERIAL_IOCTL_SYNC)Context)->Extension;
00065 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
00068 56 push esi
; 353 : ULONG *Result = (ULONG *)(((PSERIAL_IOCTL_SYNC)Context)->Data);
; 354 :
; 355 : SERIAL_LOCKED_PAGED_CODE();
00069 8b 35 00 00 00
00 mov esi, DWORD PTR __imp__KeGetCurrentIrql@0
0006f 57 push edi
00070 8b 38 mov edi, DWORD PTR [eax]
00072 8b 40 04 mov eax, DWORD PTR [eax+4]
00075 89 45 08 mov DWORD PTR _Result$[ebp], eax
00078 ff d6 call esi
0007a 3c 01 cmp al, 1
0007c 76 32 jbe SHORT $L14943
0007e 83 3d 14 00 00
00 00 cmp DWORD PTR _SerialGlobals+20, 0
00085 75 29 jne SHORT $L14943
00087 ff d6 call esi
00089 0f b6 c0 movzx eax, al
0008c 50 push eax
0008d 68 00 00 00 00 push OFFSET FLAT:$SG14942
00092 e8 00 00 00 00 call _DbgPrint
00097 59 pop ecx
00098 59 pop ecx
00099 6a 00 push 0
0009b 68 63 01 00 00 push 355 ; 00000163H
000a0 68 00 00 00 00 push OFFSET FLAT:$SG14945
000a5 68 00 00 00 00 push OFFSET FLAT:$SG14946
000aa ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L14943:
; 356 :
; 357 : *Result = READ_MODEM_CONTROL(Extension->Controller);
000b0 8b 87 98 00 00
00 mov eax, DWORD PTR [edi+152]
000b6 83 c0 04 add eax, 4
000b9 50 push eax
000ba ff 15 00 00 00
00 call DWORD PTR __imp__READ_PORT_UCHAR@4
000c0 8b 4d 08 mov ecx, DWORD PTR _Result$[ebp]
000c3 5f pop edi
000c4 0f b6 c0 movzx eax, al
000c7 89 01 mov DWORD PTR [ecx], eax
; 358 : return FALSE;
000c9 32 c0 xor al, al
000cb 5e pop esi
; 359 :
; 360 : }
000cc 5d pop ebp
000cd c2 04 00 ret 4
_SerialGetMCRContents@4 ENDP
PAGESER ENDS
PUBLIC _SerialSetFCRContents@4
; COMDAT _SerialSetFCRContents@4
PAGESER SEGMENT
$SG14957 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG14960 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14961 DB 'FALSE', 00H
; Function compile flags: /Ogs
_Context$ = 8
_Result$ = 8
_SerialSetFCRContents@4 PROC NEAR ; COMDAT
; 382 : {
00062 55 push ebp
00063 8b ec mov ebp, esp
; 383 : PSERIAL_DEVICE_EXTENSION Extension = ((PSERIAL_IOCTL_SYNC)Context)->Extension;
00065 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
00068 56 push esi
; 384 : ULONG *Result = (ULONG *)(((PSERIAL_IOCTL_SYNC)Context)->Data);
; 385 :
; 386 : SERIAL_LOCKED_PAGED_CODE();
00069 8b 35 00 00 00
00 mov esi, DWORD PTR __imp__KeGetCurrentIrql@0
0006f 57 push edi
00070 8b 38 mov edi, DWORD PTR [eax]
00072 8b 40 04 mov eax, DWORD PTR [eax+4]
00075 89 45 08 mov DWORD PTR _Result$[ebp], eax
00078 ff d6 call esi
0007a 3c 01 cmp al, 1
0007c 76 32 jbe SHORT $L14962
0007e 83 3d 14 00 00
00 00 cmp DWORD PTR _SerialGlobals+20, 0
00085 75 29 jne SHORT $L14962
00087 ff d6 call esi
00089 0f b6 c0 movzx eax, al
0008c 50 push eax
0008d 68 00 00 00 00 push OFFSET FLAT:$SG14957
00092 e8 00 00 00 00 call _DbgPrint
00097 59 pop ecx
00098 59 pop ecx
00099 6a 00 push 0
0009b 68 82 01 00 00 push 386 ; 00000182H
000a0 68 00 00 00 00 push OFFSET FLAT:$SG14960
000a5 68 00 00 00 00 push OFFSET FLAT:$SG14961
000aa ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L14962:
; 387 :
; 388 : //
; 389 : // This is severe casting abuse!!!
; 390 : //
; 391 :
; 392 : WRITE_FIFO_CONTROL(Extension->Controller, (UCHAR)*Result);
000b0 8b 45 08 mov eax, DWORD PTR _Result$[ebp]
000b3 8a 00 mov al, BYTE PTR [eax]
000b5 50 push eax
000b6 8b 87 98 00 00
00 mov eax, DWORD PTR [edi+152]
000bc 40 inc eax
000bd 40 inc eax
000be 50 push eax
000bf ff 15 00 00 00
00 call DWORD PTR __imp__WRITE_PORT_UCHAR@8
000c5 5f pop edi
; 393 : return FALSE;
000c6 32 c0 xor al, al
000c8 5e pop esi
; 394 : }
000c9 5d pop ebp
000ca c2 04 00 ret 4
_SerialSetFCRContents@4 ENDP
PAGESER ENDS
PUBLIC _SerialGetCommStatus@4
; COMDAT _SerialGetCommStatus@4
PAGESER SEGMENT
$SG14975 DB 'SERIAL: Pageable code called at IRQL %d without lock ', 0aH
DB 00H
ORG $+1
$SG14978 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14979 DB 'FALSE', 00H
ORG $+2
$SG14983 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14984 DB 'Extension->CurrentWriteIrp', 00H
ORG $+1
$SG14987 DB 'f:\w2ddk\src\kernel\serial\ioctl.c', 00H
ORG $+1
$SG14988 DB 'Stat->AmountInOutQueue >= Extension->WriteLength', 00H
; Function compile flags: /Ogs
_Context$ = 8
_SerialGetCommStatus@4 PROC NEAR ; COMDAT
; 420 : {
000f9 55 push ebp
000fa 8b ec mov ebp, esp
; 421 :
; 422 : PSERIAL_DEVICE_EXTENSION Extension = ((PSERIAL_IOCTL_SYNC)Context)->Extension;
000fc 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
000ff 53 push ebx
00100 56 push esi
00101 57 push edi
00102 8b 38 mov edi, DWORD PTR [eax]
; 423 : PSERIAL_STATUS Stat = ((PSERIAL_IOCTL_SYNC)Context)->Data;
00104 8b 70 04 mov esi, DWORD PTR [eax+4]
; 424 :
; 425 : SERIAL_LOCKED_PAGED_CODE();
00107 ff 15 00 00 00
00 call DWORD PTR __imp__KeGetCurrentIrql@0
0010d 33 db xor ebx, ebx
0010f 3c 01 cmp al, 1
00111 76 34 jbe SHORT $L14976
00113 39 1d 14 00 00
00 cmp DWORD PTR _SerialGlobals+20, ebx
00119 75 2c jne SHORT $L14976
0011b ff 15 00 00 00
00 call DWORD PTR __imp__KeGetCurrentIrql@0
00121 0f b6 c0 movzx eax, al
00124 50 push eax
00125 68 00 00 00 00 push OFFSET FLAT:$SG14975
0012a e8 00 00 00 00 call _DbgPrint
0012f 59 pop ecx
00130 59 pop ecx
00131 53 push ebx
00132 68 a9 01 00 00 push 425 ; 000001a9H
00137 68 00 00 00 00 push OFFSET FLAT:$SG14978
0013c 68 00 00 00 00 push OFFSET FLAT:$SG14979
00141 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L14976:
; 426 :
; 427 :
; 428 : Stat->Errors = Extension->ErrorWord;
00147 8d 87 24 01 00
00 lea eax, DWORD PTR [edi+292]
0014d 8b 08 mov ecx, DWORD PTR [eax]
0014f 89 0e mov DWORD PTR [esi], ecx
; 429 : Extension->ErrorWord = 0;
00151 89 18 mov DWORD PTR [eax], ebx
; 430 :
; 431 : //
; 432 : // BUG BUG We need to do something about eof (binary mode).
; 433 : //
; 434 : Stat->EofReceived = FALSE;
00153 88 5e 10 mov BYTE PTR [esi+16], bl
; 435 :
; 436 : Stat->AmountInInQueue = Extension->CharsInInterruptBuffer;
00156 8b 87 f0 00 00
00 mov eax, DWORD PTR [edi+240]
0015c 89 46 08 mov DWORD PTR [esi+8], eax
; 437 :
; 438 : Stat->AmountInOutQueue = Extension->TotalCharsQueued;
0015f 8b 87 28 01 00
00 mov eax, DWORD PTR [edi+296]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -