RtlpCheckFunctionPatchAppliedInOriginalImage

NTSTATUS __stdcall RtlpCheckFunctionPatchAppliedInOriginalImage(_BYTE *a1, _BYTE *a2){
  char v2; 

  v2 = a1[1];
  if( *a1 == 0xEB && v2 < 0 )
  {
    if( v2 == -8 && *(a1 - 6) == 0xFF && *(a1 - 5) == 37 )
      return(_DWORD)a1 + *((_DWORD *)a1 - 1);
    return -1;
  }
  if( a2 && (*a1 != *a2 || v2 != a2[1]) )
    return -1;
  return 0;
}

Referenced by:

RtlApplyHotPatch
RtlCountRequiredHotPatchAddressTableEntries
RtlHotPatchSynchronizationRequired
RtlpCheckFunctionPatchApplied