📄 protocol.cod
字号:
; 545 :
; 546 : DBGPRINT(("CloseAdapterComplete: Adapt %p, Status %x\n", pAdapt, Status));
00041 68 00 00 00 00 push OFFSET FLAT:$SG16181
00046 e8 00 00 00 00 call _DbgPrint
0004b 83 c4 04 add esp, 4
0004e 8b 4d 0c mov ecx, DWORD PTR _Status$[ebp]
00051 51 push ecx
00052 8b 55 fc mov edx, DWORD PTR _pAdapt$[ebp]
00055 52 push edx
00056 68 00 00 00 00 push OFFSET FLAT:$SG16182
0005b e8 00 00 00 00 call _DbgPrint
00060 83 c4 0c add esp, 12 ; 0000000cH
; 547 : pAdapt->Status = Status;
00063 8b 45 fc mov eax, DWORD PTR _pAdapt$[ebp]
00066 8b 4d 0c mov ecx, DWORD PTR _Status$[ebp]
00069 89 48 14 mov DWORD PTR [eax+20], ecx
; 548 : NdisSetEvent(&pAdapt->Event);
0006c 8b 55 fc mov edx, DWORD PTR _pAdapt$[ebp]
0006f 83 c2 18 add edx, 24 ; 00000018H
00072 52 push edx
00073 ff 15 00 00 00
00 call DWORD PTR __imp__NdisSetEvent@4
; 549 : }
00079 8b e5 mov esp, ebp
0007b 5d pop ebp
0007c c2 08 00 ret 8
_PtCloseAdapterComplete@8 ENDP
_TEXT ENDS
PUBLIC _PtResetComplete@8
; COMDAT _PtResetComplete@8
_TEXT SEGMENT
$SG16189 DB 'g:\pcadev\ndisim\passthruex\part2\james\james\sys\protoc'
DB 'ol.c', 00H
ORG $+3
$SG16190 DB '0', 00H
; Function compile flags: /Odt
_ProtocolBindingContext$ = 8
_Status$ = 12
_PtResetComplete@8 PROC NEAR ; COMDAT
; 573 : {
00042 55 push ebp
00043 8b ec mov ebp, esp
; 574 :
; 575 : UNREFERENCED_PARAMETER(ProtocolBindingContext);
; 576 : UNREFERENCED_PARAMETER(Status);
; 577 : //
; 578 : // We never issue a reset, so we should not be here.
; 579 : //
; 580 : ASSERT(0);
00045 6a 00 push 0
00047 68 44 02 00 00 push 580 ; 00000244H
0004c 68 00 00 00 00 push OFFSET FLAT:$SG16189
00051 68 00 00 00 00 push OFFSET FLAT:$SG16190
00056 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
; 581 : }
0005c 5d pop ebp
0005d c2 08 00 ret 8
_PtResetComplete@8 ENDP
_TEXT ENDS
EXTRN _MPQueryPNPCapabilities@8:NEAR
; COMDAT _PtRequestComplete@12
_TEXT SEGMENT
$SG16202 DB 'g:\pcadev\ndisim\passthruex\part2\james\james\sys\protoc'
DB 'ol.c', 00H
ORG $+3
$SG16203 DB 'pAdapt->OutstandingRequests == TRUE', 00H
$SG16210 DB 'g:\pcadev\ndisim\passthruex\part2\james\james\sys\protoc'
DB 'ol.c', 00H
ORG $+3
$SG16211 DB 'Oid != OID_PNP_QUERY_POWER', 00H
ORG $+1
$SG16222 DB 'g:\pcadev\ndisim\passthruex\part2\james\james\sys\protoc'
DB 'ol.c', 00H
ORG $+3
$SG16223 DB 'Oid != OID_PNP_SET_POWER', 00H
ORG $+3
$SG16227 DB 'g:\pcadev\ndisim\passthruex\part2\james\james\sys\protoc'
DB 'ol.c', 00H
ORG $+3
$SG16228 DB '0', 00H
; Function compile flags: /Odt
tv141 = -24
tv81 = -20
tv75 = -16
tv72 = -12
_Oid$ = -8
_pAdapt$ = -4
_ProtocolBindingContext$ = 8
_NdisRequest$ = 12
_Status$ = 16
_PtRequestComplete@12 PROC NEAR ; COMDAT
; 610 : {
0015e 55 push ebp
0015f 8b ec mov ebp, esp
00161 83 ec 18 sub esp, 24 ; 00000018H
; 611 : PADAPT pAdapt = (PADAPT)ProtocolBindingContext;
00164 8b 45 08 mov eax, DWORD PTR _ProtocolBindingContext$[ebp]
00167 89 45 fc mov DWORD PTR _pAdapt$[ebp], eax
; 612 : NDIS_OID Oid = pAdapt->Request.DATA.SET_INFORMATION.Oid ;
0016a 8b 4d fc mov ecx, DWORD PTR _pAdapt$[ebp]
0016d 8b 51 40 mov edx, DWORD PTR [ecx+64]
00170 89 55 f8 mov DWORD PTR _Oid$[ebp], edx
; 613 :
; 614 : //
; 615 : // Since our request is not outstanding anymore
; 616 : //
; 617 : ASSERT(pAdapt->OutstandingRequests == TRUE);
00173 8b 45 fc mov eax, DWORD PTR _pAdapt$[ebp]
00176 0f b6 88 91 00
00 00 movzx ecx, BYTE PTR [eax+145]
0017d 83 f9 01 cmp ecx, 1
00180 74 20 je SHORT $L16626
00182 6a 00 push 0
00184 68 69 02 00 00 push 617 ; 00000269H
00189 68 00 00 00 00 push OFFSET FLAT:$SG16202
0018e 68 00 00 00 00 push OFFSET FLAT:$SG16203
00193 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
00199 c7 45 f4 00 00
00 00 mov DWORD PTR tv72[ebp], 0
001a0 eb 07 jmp SHORT $L16627
$L16626:
001a2 c7 45 f4 01 00
00 00 mov DWORD PTR tv72[ebp], 1
$L16627:
; 618 :
; 619 : pAdapt->OutstandingRequests = FALSE;
001a9 8b 55 fc mov edx, DWORD PTR _pAdapt$[ebp]
001ac c6 82 91 00 00
00 00 mov BYTE PTR [edx+145], 0
; 620 :
; 621 : //
; 622 : // Complete the Set or Query, and fill in the buffer for OID_PNP_CAPABILITIES, if need be.
; 623 : //
; 624 : switch (NdisRequest->RequestType)
; 625 : {
001b3 8b 45 0c mov eax, DWORD PTR _NdisRequest$[ebp]
001b6 8b 48 10 mov ecx, DWORD PTR [eax+16]
001b9 89 4d f0 mov DWORD PTR tv75[ebp], ecx
001bc 83 7d f0 00 cmp DWORD PTR tv75[ebp], 0
001c0 74 0f je SHORT $L16208
001c2 83 7d f0 01 cmp DWORD PTR tv75[ebp], 1
001c6 0f 84 b1 00 00
00 je $L16220
001cc e9 17 01 00 00 jmp $L16225
$L16208:
; 626 : case NdisRequestQueryInformation:
; 627 :
; 628 : //
; 629 : // We never pass OID_PNP_QUERY_POWER down.
; 630 : //
; 631 : ASSERT(Oid != OID_PNP_QUERY_POWER);
001d1 81 7d f8 02 01
01 fd cmp DWORD PTR _Oid$[ebp], -50265854 ; fd010102H
001d8 75 20 jne SHORT $L16628
001da 6a 00 push 0
001dc 68 77 02 00 00 push 631 ; 00000277H
001e1 68 00 00 00 00 push OFFSET FLAT:$SG16210
001e6 68 00 00 00 00 push OFFSET FLAT:$SG16211
001eb ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
001f1 c7 45 ec 00 00
00 00 mov DWORD PTR tv81[ebp], 0
001f8 eb 07 jmp SHORT $L16629
$L16628:
001fa c7 45 ec 01 00
00 00 mov DWORD PTR tv81[ebp], 1
$L16629:
; 632 :
; 633 : if ((Oid == OID_PNP_CAPABILITIES) && (Status == NDIS_STATUS_SUCCESS))
00201 81 7d f8 00 01
01 fd cmp DWORD PTR _Oid$[ebp], -50265856 ; fd010100H
00208 75 13 jne SHORT $L16214
0020a 83 7d 10 00 cmp DWORD PTR _Status$[ebp], 0
0020e 75 0d jne SHORT $L16214
; 634 : {
; 635 : MPQueryPNPCapabilities(pAdapt, &Status);
00210 8d 55 10 lea edx, DWORD PTR _Status$[ebp]
00213 52 push edx
00214 8b 45 fc mov eax, DWORD PTR _pAdapt$[ebp]
00217 50 push eax
00218 e8 00 00 00 00 call _MPQueryPNPCapabilities@8
$L16214:
; 636 : }
; 637 : *pAdapt->BytesReadOrWritten = NdisRequest->DATA.QUERY_INFORMATION.BytesWritten;
0021d 8b 4d fc mov ecx, DWORD PTR _pAdapt$[ebp]
00220 8b 91 8c 00 00
00 mov edx, DWORD PTR [ecx+140]
00226 8b 45 0c mov eax, DWORD PTR _NdisRequest$[ebp]
00229 8b 48 20 mov ecx, DWORD PTR [eax+32]
0022c 89 0a mov DWORD PTR [edx], ecx
; 638 : *pAdapt->BytesNeeded = NdisRequest->DATA.QUERY_INFORMATION.BytesNeeded;
0022e 8b 55 fc mov edx, DWORD PTR _pAdapt$[ebp]
00231 8b 82 88 00 00
00 mov eax, DWORD PTR [edx+136]
00237 8b 4d 0c mov ecx, DWORD PTR _NdisRequest$[ebp]
0023a 8b 51 24 mov edx, DWORD PTR [ecx+36]
0023d 89 10 mov DWORD PTR [eax], edx
; 639 :
; 640 : if ((Oid == OID_GEN_MAC_OPTIONS) && (Status == NDIS_STATUS_SUCCESS))
0023f 81 7d f8 13 01
01 00 cmp DWORD PTR _Oid$[ebp], 65811 ; 00010113H
00246 75 19 jne SHORT $L16217
00248 83 7d 10 00 cmp DWORD PTR _Status$[ebp], 0
0024c 75 13 jne SHORT $L16217
; 641 : {
; 642 : //
; 643 : // Remove the no-loopback bit from mac-options. In essence we are
; 644 : // telling NDIS that we can handle loopback. We don't, but the
; 645 : // interface below us does. If we do not do this, then loopback
; 646 : // processing happens both below us and above us. This is wasteful
; 647 : // at best and if Netmon is running, it will see multiple copies
; 648 : // of loopback packets when sniffing above us.
; 649 : //
; 650 : // Only the lowest miniport is a stack of layered miniports should
; 651 : // ever report this bit set to NDIS.
; 652 : //
; 653 : *(PULONG)NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer &= ~NDIS_MAC_OPTION_NO_LOOPBACK;
0024e 8b 45 0c mov eax, DWORD PTR _NdisRequest$[ebp]
00251 8b 48 18 mov ecx, DWORD PTR [eax+24]
00254 8b 11 mov edx, DWORD PTR [ecx]
00256 83 e2 f7 and edx, -9 ; fffffff7H
00259 8b 45 0c mov eax, DWORD PTR _NdisRequest$[ebp]
0025c 8b 48 18 mov ecx, DWORD PTR [eax+24]
0025f 89 11 mov DWORD PTR [ecx], edx
$L16217:
; 654 : }
; 655 :
; 656 : NdisMQueryInformationComplete(pAdapt->MiniportHandle,
; 657 : Status);
00261 8b 55 10 mov edx, DWORD PTR _Status$[ebp]
00264 52 push edx
00265 8b 45 fc mov eax, DWORD PTR _pAdapt$[ebp]
00268 8b 48 08 mov ecx, DWORD PTR [eax+8]
0026b 51 push ecx
0026c 8b 55 fc mov edx, DWORD PTR _pAdapt$[ebp]
0026f 8b 42 08 mov eax, DWORD PTR [edx+8]
00272 ff 90 88 01 00
00 call DWORD PTR [eax+392]
; 658 : break;
00278 e9 82 00 00 00 jmp $L16197
$L16220:
; 659 :
; 660 : case NdisRequestSetInformation:
; 661 :
; 662 : ASSERT( Oid != OID_PNP_SET_POWER);
0027d 81 7d f8 01 01
01 fd cmp DWORD PTR _Oid$[ebp], -50265855 ; fd010101H
00284 75 20 jne SHORT $L16630
00286 6a 00 push 0
00288 68 96 02 00 00 push 662 ; 00000296H
0028d 68 00 00 00 00 push OFFSET FLAT:$SG16222
00292 68 00 00 00 00 push OFFSET FLAT:$SG16223
00297 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
0029d c7 45 e8 00 00
00 00 mov DWORD PTR tv141[ebp], 0
002a4 eb 07 jmp SHORT $L16631
$L16630:
002a6 c7 45 e8 01 00
00 00 mov DWORD PTR tv141[ebp], 1
$L16631:
; 663 :
; 664 : *pAdapt->BytesReadOrWritten = NdisRequest->DATA.SET_INFORMATION.BytesRead;
002ad 8b 4d fc mov ecx, DWORD PTR _pAdapt$[ebp]
002b0 8b 91 8c 00 00
00 mov edx, DWORD PTR [ecx+140]
002b6 8b 45 0c mov eax, DWORD PTR _NdisRequest$[ebp]
002b9 8b 48 20 mov ecx, DWORD PTR [eax+32]
002bc 89 0a mov DWORD PTR [edx], ecx
; 665 : *pAdapt->BytesNeeded = NdisRequest->DATA.SET_INFORMATION.BytesNeeded;
002be 8b 55 fc mov edx, DWORD PTR _pAdapt$[ebp]
002c1 8b 82 88 00 00
00 mov eax, DWORD PTR [edx+136]
002c7 8b 4d 0c mov ecx, DWORD PTR _NdisRequest$[ebp]
002ca 8b 51 24 mov edx, DWORD PTR [ecx+36]
002cd 89 10 mov DWORD PTR [eax], edx
; 666 : NdisMSetInformationComplete(pAdapt->MiniportHandle,
; 667 : Status);
002cf 8b 45 10 mov eax, DWORD PTR _Status$[ebp]
002d2 50 push eax
002d3 8b 4d fc mov ecx, DWORD PTR _pAdapt$[ebp]
002d6 8b 51 08 mov edx, DWORD PTR [ecx+8]
002d9 52 push edx
002da 8b 45 fc mov eax, DWORD PTR _pAdapt$[ebp]
002dd 8b 48 08 mov ecx, DWORD PTR [eax+8]
002e0 ff 91 8c 01 00
00 call DWORD PTR [ecx+396]
; 668 : break;
002e6 eb 17 jmp SHORT $L16197
$L16225:
; 669 :
; 670 : default:
; 671 : ASSERT(0);
002e8 6a 00 push 0
002ea 68 9f 02 00 00 push 671 ; 0000029fH
002ef 68 00 00 00 00 push OFFSET FLAT:$SG16227
002f4 68 00 00 00 00 push OFFSET FLAT:$SG16228
002f9 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L16197:
; 672 : break;
; 673 : }
; 674 :
; 675 : }
002ff 8b e5 mov esp, ebp
00301 5d pop ebp
00302 c2 0c 00 ret 12 ; 0000000cH
_PtRequestComplete@12 ENDP
_TEXT ENDS
PUBLIC _PtStatus@16
; Function compile flags: /Odt
; COMDAT _PtStatus@16
_TEXT SEGMENT
_pAdapt$ = -4
_ProtocolBindingContext$ = 8
_GeneralStatus$ = 12
_StatusBuffer$ = 16
_StatusBufferSize$ = 20
_PtStatus@16 PROC NEAR ; COMDAT
; 703 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 51 push ecx
; 704 : PADAPT pAdapt = (PADAPT)ProtocolBindingContext;
00004 8b 45 08 mov eax, DWORD PTR _ProtocolBindingContext$[ebp]
00007 89 45 fc mov DWORD PTR _pAdapt$[ebp], eax
; 705 :
; 706 : //
; 707 : // Pass up this indication only if the upper edge miniport is initialized
; 708 : // and powered on. Also ignore indications that might be sent by the lower
; 709 : // miniport when it isn't at D0.
; 710 : //
; 711 : if ((pAdapt->MiniportHandle != NULL) &&
; 712 : (pAdapt->MPDeviceState == NdisDeviceStateD0) &&
; 713 : (pAdapt->PTDeviceState == NdisDeviceStateD0))
0000a 8b 4d fc mov ecx, DWORD PTR _pAdapt$[ebp]
0000d 83 79 08 00 cmp DWORD PTR [ecx+8], 0
00011 74 57 je SHORT $L16241
00013 8b 55 fc mov edx,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -