.if dwSomewhereInKernel >= eax
mov esi, dwSomewhereInKernel
and esi, not (PAGE_SIZE-1) ; start down-search from here
mov ebx, esi
sub ebx, eax ; - MmSystemRangeStart
shr ebx, PAGE_SHIFT ; Number of pages to search
.while ebx
invoke MmIsAddressValid, esi
.break .if al == FALSE ; bad
mov eax, [esi]
.if eax == 00905A4Dh ; MZ signature
mov edi, esi
.break
.endif
sub esi, PAGE_SIZE ; next page down
dec ebx ; next page
.endw