📄 waitmask.cod
字号:
; 238 :
; 239 : IoAcquireCancelSpinLock(&OldIrql);
007fe 8d 45 f4 lea eax, DWORD PTR _OldIrql$14955[ebp]
00801 50 push eax
00802 ff 15 00 00 00
00 call DWORD PTR __imp__IoAcquireCancelSpinLock@4
; 240 :
; 241 : if (Extension->CurrentMaskIrp->Cancel) {
00808 8b 07 mov eax, DWORD PTR [edi]
0080a 80 78 24 00 cmp BYTE PTR [eax+36], 0
0080e 74 7d je SHORT $L15000
; 242 :
; 243 : SerialDump(
; 244 : SERDIAG4,
; 245 : ("SERIAL: %x irp was already marked as cancelled\n",
; 246 : Extension->CurrentMaskIrp)
; 247 : );
00810 f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
00817 74 0d je SHORT $L14958
00819 50 push eax
0081a 68 00 00 00 00 push OFFSET FLAT:$SG14963
0081f e8 00 00 00 00 call _DbgPrint
00824 59 pop ecx
00825 59 pop ecx
$L14958:
; 248 : IoReleaseCancelSpinLock(OldIrql);
00826 ff 75 f4 push DWORD PTR _OldIrql$14955[ebp]
00829 ff 15 00 00 00
00 call DWORD PTR __imp__IoReleaseCancelSpinLock@4
; 249 : Extension->CurrentMaskIrp->IoStatus.Status = STATUS_CANCELLED;
0082f 8b 07 mov eax, DWORD PTR [edi]
; 250 :
; 251 : if (!SetFirstStatus) {
00831 80 7d ff 00 cmp BYTE PTR _SetFirstStatus$[ebp], 0
00835 be 20 01 00 c0 mov esi, -1073741536 ; c0000120H
0083a 89 70 18 mov DWORD PTR [eax+24], esi
0083d 75 1e jne SHORT $L14971
; 252 :
; 253 : SerialDump(
; 254 : SERDIAG4,
; 255 : ("SERIAL: %x was the first irp processed by this\n"
; 256 : "------- invocation of startmask\n",Extension->CurrentMaskIrp)
; 257 : );
0083f f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
00846 74 0e je SHORT $L14973
00848 ff 37 push DWORD PTR [edi]
0084a 68 00 00 00 00 push OFFSET FLAT:$SG14978
0084f e8 00 00 00 00 call _DbgPrint
00854 59 pop ecx
00855 59 pop ecx
$L14973:
; 258 : FirstStatus = STATUS_CANCELLED;
00856 89 75 08 mov DWORD PTR _FirstStatus$[ebp], esi
; 259 : SetFirstStatus = TRUE;
00859 c6 45 ff 01 mov BYTE PTR _SetFirstStatus$[ebp], 1
$L14971:
; 260 :
; 261 : }
; 262 :
; 263 : SerialGetNextIrp(
; 264 : &Extension->CurrentMaskIrp,
; 265 : &Extension->MaskQueue,
; 266 : &NewIrp,
; 267 : TRUE,
; 268 : Extension
; 269 : );
0085d 53 push ebx
0085e 8d 45 f8 lea eax, DWORD PTR _NewIrp$[ebp]
00861 6a 01 push 1
00863 50 push eax
00864 8d 83 b4 00 00
00 lea eax, DWORD PTR [ebx+180]
0086a 50 push eax
0086b 57 push edi
0086c e8 00 00 00 00 call _SerialGetNextIrp@20
; 270 : SerialDump(
; 271 : SERDIAG4,
; 272 : ("SERIAL: Perhaps another mask irp was found in the queue\n"
; 273 : "------- %x/%x <- values should be the same\n",
; 274 : Extension->CurrentMaskIrp,NewIrp)
; 275 : );
00871 f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
00878 0f 84 9e 01 00
00 je $L15062
0087e ff 75 f8 push DWORD PTR _NewIrp$[ebp]
00881 ff 37 push DWORD PTR [edi]
00883 68 00 00 00 00 push OFFSET FLAT:$SG14992
; 276 :
; 277 : } else {
00888 e9 87 01 00 00 jmp $L15406
$L15000:
; 278 :
; 279 : SerialDump(
; 280 : SERDIAG4,
; 281 : ("SERIAL: %x will become the current wait irp\n",
; 282 : Extension->CurrentMaskIrp)
; 283 : );
0088d f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
00894 74 0d je SHORT $L15001
00896 50 push eax
00897 68 00 00 00 00 push OFFSET FLAT:$SG15006
0089c e8 00 00 00 00 call _DbgPrint
008a1 59 pop ecx
008a2 59 pop ecx
$L15001:
; 284 : if (!SetFirstStatus) {
008a3 80 7d ff 00 cmp BYTE PTR _SetFirstStatus$[ebp], 0
008a7 75 2b jne SHORT $L15013
; 285 :
; 286 : SerialDump(
; 287 : SERDIAG4,
; 288 : ("SERIAL: %x was the first irp processed by this\n"
; 289 : "------- invocation of startmask\n",Extension->CurrentMaskIrp)
; 290 : );
008a9 f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
008b0 74 0e je SHORT $L15015
008b2 ff 37 push DWORD PTR [edi]
008b4 68 00 00 00 00 push OFFSET FLAT:$SG15020
008b9 e8 00 00 00 00 call _DbgPrint
008be 59 pop ecx
008bf 59 pop ecx
$L15015:
; 291 : FirstStatus = STATUS_PENDING;
; 292 : SetFirstStatus = TRUE;
; 293 :
; 294 : //
; 295 : // If we haven't already set a first status
; 296 : // then there is a chance that this packet
; 297 : // was never on the queue. We should mark
; 298 : // it as pending.
; 299 : //
; 300 :
; 301 : IoMarkIrpPending(Extension->CurrentMaskIrp);
008c0 8b 07 mov eax, DWORD PTR [edi]
008c2 c7 45 08 03 01
00 00 mov DWORD PTR _FirstStatus$[ebp], 259 ; 00000103H
008c9 c6 45 ff 01 mov BYTE PTR _SetFirstStatus$[ebp], 1
008cd 8b 40 60 mov eax, DWORD PTR [eax+96]
008d0 80 48 03 01 or BYTE PTR [eax+3], 1
$L15013:
; 302 :
; 303 : }
; 304 :
; 305 : //
; 306 : // There should never be a mask location when
; 307 : // there isn't a current wait irp. At this point
; 308 : // there shouldn't be a current wait irp also.
; 309 : //
; 310 :
; 311 : ASSERT(!Extension->IrpMaskLocation);
008d4 39 b3 18 01 00
00 cmp DWORD PTR [ebx+280], esi
008da 74 16 je SHORT $L15028
008dc 56 push esi
008dd 68 37 01 00 00 push 311 ; 00000137H
008e2 68 00 00 00 00 push OFFSET FLAT:$SG15030
008e7 68 00 00 00 00 push OFFSET FLAT:$SG15031
008ec ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L15028:
; 312 : ASSERT(!Extension->CurrentWaitIrp);
008f2 39 b3 d4 00 00
00 cmp DWORD PTR [ebx+212], esi
008f8 74 16 je SHORT $L15032
008fa 56 push esi
008fb 68 38 01 00 00 push 312 ; 00000138H
00900 68 00 00 00 00 push OFFSET FLAT:$SG15034
00905 68 00 00 00 00 push OFFSET FLAT:$SG15035
0090a ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L15032:
; 313 :
; 314 : Extension->CurrentWaitIrp = Extension->CurrentMaskIrp;
00910 8b 07 mov eax, DWORD PTR [edi]
; 315 : SERIAL_INIT_REFERENCE(Extension->CurrentWaitIrp);
; 316 : IoSetCancelRoutine(
; 317 : Extension->CurrentWaitIrp,
; 318 : SerialCancelWait
; 319 : );
00912 ba 00 00 00 00 mov edx, OFFSET FLAT:_SerialCancelWait@8
00917 89 83 d4 00 00
00 mov DWORD PTR [ebx+212], eax
0091d 8b 40 60 mov eax, DWORD PTR [eax+96]
00920 89 70 10 mov DWORD PTR [eax+16], esi
00923 8b 8b d4 00 00
00 mov ecx, DWORD PTR [ebx+212]
00929 83 c1 38 add ecx, 56 ; 00000038H
0092c ff 15 00 00 00
00 call DWORD PTR __imp_@InterlockedExchange@8
; 320 :
; 321 : //
; 322 : // Since the cancel routine has a reference to
; 323 : // the irp we need to update the reference
; 324 : // count.
; 325 : //
; 326 :
; 327 : SERIAL_SET_REFERENCE(
; 328 : Extension->CurrentWaitIrp,
; 329 : SERIAL_REF_CANCEL
; 330 : );
00932 8b 83 d4 00 00
00 mov eax, DWORD PTR [ebx+212]
00938 8b 70 60 mov esi, DWORD PTR [eax+96]
0093b 83 c6 10 add esi, 16 ; 00000010H
0093e f6 06 02 test BYTE PTR [esi], 2
00941 74 17 je SHORT $L15055
00943 6a 00 push 0
00945 68 4a 01 00 00 push 330 ; 0000014aH
0094a 68 00 00 00 00 push OFFSET FLAT:$SG15057
0094f 68 00 00 00 00 push OFFSET FLAT:$SG15058
00954 ff 15 00 00 00
00 call DWORD PTR __imp__RtlAssert@16
$L15055:
0095a 83 0e 02 or DWORD PTR [esi], 2
; 331 :
; 332 : KeSynchronizeExecution(
; 333 : Extension->Interrupt,
; 334 : SerialGiveWaitToIsr,
; 335 : Extension
; 336 : );
0095d 53 push ebx
0095e 68 00 00 00 00 push OFFSET FLAT:_SerialGiveWaitToIsr@4
00963 ff b3 a0 00 00
00 push DWORD PTR [ebx+160]
00969 ff 15 00 00 00
00 call DWORD PTR __imp__KeSynchronizeExecution@12
; 337 :
; 338 : //
; 339 : // Since it isn't really the mask irp anymore,
; 340 : // null out that pointer.
; 341 : //
; 342 :
; 343 : Extension->CurrentMaskIrp = NULL;
; 344 :
; 345 : //
; 346 : // This will release the cancel spinlock for us
; 347 : //
; 348 :
; 349 : SerialGetNextIrpLocked(
; 350 : &Extension->CurrentMaskIrp,
; 351 : &Extension->MaskQueue,
; 352 : &NewIrp,
; 353 : FALSE,
; 354 : Extension,
; 355 : OldIrql
; 356 : );
0096f ff 75 f4 push DWORD PTR _OldIrql$14955[ebp]
00972 83 27 00 and DWORD PTR [edi], 0
00975 8d 45 f8 lea eax, DWORD PTR _NewIrp$[ebp]
00978 53 push ebx
00979 6a 00 push 0
0097b 50 push eax
0097c 8d 83 b4 00 00
00 lea eax, DWORD PTR [ebx+180]
00982 50 push eax
00983 57 push edi
00984 e8 00 00 00 00 call _SerialGetNextIrpLocked@24
; 357 : SerialDump(
; 358 : SERDIAG4,
; 359 : ("SERIAL: Perhaps another mask irp was found in the queue\n"
; 360 : "------- %x/%x <- values should be the same\n",
; 361 : Extension->CurrentMaskIrp,NewIrp)
; 362 : );
00989 f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
00990 0f 84 86 00 00
00 je $L15062
00996 ff 75 f8 push DWORD PTR _NewIrp$[ebp]
00999 ff 37 push DWORD PTR [edi]
0099b 68 00 00 00 00 push OFFSET FLAT:$SG15066
009a0 eb 72 jmp SHORT $L15406
$L14912:
; 185 :
; 186 : SerialDump(
; 187 : SERDIAG4,
; 188 : ("SERIAL: WaitIrp is invalid\n"
; 189 : "------- IsrWaitMask: %x\n"
; 190 : "------- CurrentWaitIrp: %x\n",
; 191 : Extension->IsrWaitMask,
; 192 : Extension->CurrentWaitIrp)
; 193 : );
009a2 f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
009a9 74 14 je SHORT $L14913
009ab ff b3 d4 00 00
00 push DWORD PTR [ebx+212]
009b1 50 push eax
009b2 68 00 00 00 00 push OFFSET FLAT:$SG14918
009b7 e8 00 00 00 00 call _DbgPrint
009bc 83 c4 0c add esp, 12 ; 0000000cH
$L14913:
; 194 :
; 195 : Extension->CurrentMaskIrp->IoStatus.Status = STATUS_INVALID_PARAMETER;
009bf 8b 07 mov eax, DWORD PTR [edi]
; 196 :
; 197 : if (!SetFirstStatus) {
009c1 80 7d ff 00 cmp BYTE PTR _SetFirstStatus$[ebp], 0
009c5 be 0d 00 00 c0 mov esi, -1073741811 ; c000000dH
009ca 89 70 18 mov DWORD PTR [eax+24], esi
009cd 75 1e jne SHORT $L14926
; 198 :
; 199 : SerialDump(
; 200 : SERDIAG4,
; 201 : ("SERIAL: %x was the first irp processed by this\n"
; 202 : "------- invocation of startmask\n",Extension->CurrentMaskIrp)
; 203 : );
009cf f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
009d6 74 0e je SHORT $L14928
009d8 ff 37 push DWORD PTR [edi]
009da 68 00 00 00 00 push OFFSET FLAT:$SG14933
009df e8 00 00 00 00 call _DbgPrint
009e4 59 pop ecx
009e5 59 pop ecx
$L14928:
; 204 : FirstStatus = STATUS_INVALID_PARAMETER;
009e6 89 75 08 mov DWORD PTR _FirstStatus$[ebp], esi
; 205 : SetFirstStatus = TRUE;
009e9 c6 45 ff 01 mov BYTE PTR _SetFirstStatus$[ebp], 1
$L14926:
; 206 :
; 207 : }
; 208 :
; 209 : SerialGetNextIrp(
; 210 : &Extension->CurrentMaskIrp,
; 211 : &Extension->MaskQueue,
; 212 : &NewIrp,
; 213 : TRUE,
; 214 : Extension
; 215 : );
009ed 53 push ebx
009ee 8d 45 f8 lea eax, DWORD PTR _NewIrp$[ebp]
009f1 6a 01 push 1
009f3 50 push eax
009f4 8d 83 b4 00 00
00 lea eax, DWORD PTR [ebx+180]
009fa 50 push eax
009fb 57 push edi
009fc e8 00 00 00 00 call _SerialGetNextIrp@20
; 216 : SerialDump(
; 217 : SERDIAG4,
; 218 : ("SERIAL: Perhaps another mask irp was found in the queue\n"
; 219 : "------- %x/%x <- values should be the same\n",
; 220 : Extension->CurrentMaskIrp,NewIrp)
; 221 : );
00a01 f6 05 00 00 00
00 08 test BYTE PTR _SerialDebugLevel, 8
00a08 74 12 je SHORT $L15062
00a0a ff 75 f8 push DWORD PTR _NewIrp$[ebp]
00a0d ff 37 push DWORD PTR [edi]
00a0f 68 00 00 00 00 push OFFSET FLAT:$SG14947
$L15406:
00a14 e8 00 00 00 00 call _DbgPrint
00a19 83 c4 0c add esp, 12 ; 0000000cH
$L15062:
; 363 :
; 364 : }
; 365 :
; 366 : }
; 367 :
; 368 : }
; 369 :
; 370 : } while (NewIrp);
00a1c 83 7d f8 00 cmp DWORD PTR _NewIrp$[ebp], 0
00a20 0f 85 cc fc ff
ff jne $L14842
; 371 :
; 372 : return FirstStatus;
00a26 8b 45 08 mov eax, DWORD PTR _FirstStatus$[ebp]
00a29 5f pop edi
00a2a 5e pop esi
00a2b 5b pop ebx
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -