RtlCompareMemory
_SIZE_T *__stdcall RtlCompareMemory(const VOID *Source1, const VOID *Source2, _SIZE_T Length){
_BYTE *v3;
_BYTE *v4;
__int64 v5;
bool v6;
unsigned __int64 v7;
bool v8;
bool v9;
unsigned __int64 v10;
unsigned __int64 v11;
bool v13;
__int64 v14;
v3 = Source1;
v4 = Source2;
if( (((unsigned __int8)Source1 ^ (unsigned __int8)Source2) & 7) != 0 || *(_QWORD *)&Length < 8ui64 )
{
v13 = *(_QWORD *)&Length == 0i64;
if( *(_QWORD *)&Length )
{
v14 = *(_QWORD *)&Length;
do
{
if( !v14 )
break;
v13 = *v3++ == *v4++;
--v14;
}
while( v13 );
if( !v13 )
*(_QWORD *)&Length -= v14 + 1;
}
return *(_SIZE_T **)&Length;
}
else
{
v5 = -(int)Source1 & 7;
if( (_DWORD)v5 )
{
*(_QWORD *)&Length -= (unsigned int)v5;
v6 = *(_QWORD *)&Length == 0i64;
do
{
if( !v5 )
break;
v6 = *v3++ == *v4++;
--v5;
}
while( v6 );
if( !v6 )
goto LABEL_19;
}
v7 = *(_QWORD *)&Length & 0xFFFFFFFFFFFFFFF8ui64;
if( (*(_QWORD *)&Length & 0xFFFFFFFFFFFFFFF8ui64) != 0 )
{
*(_QWORD *)&Length -= v7;
v7 >>= 3;
v8 = v7 == 0;
do
{
if( !v7 )
break;
v8 = *(_QWORD *)v3 == *(_QWORD *)v4;
v3 += 8;
v4 += 8;
--v7;
}
while( v8 );
if( !v8 )
{
v3 -= 8;
v4 -= 8;
v7 = 8 * (v7 + 1);
}
}
v9 = v7 + *(_QWORD *)&Length == 0;
v10 = v7 + *(_QWORD *)&Length;
if( v10 )
{
v11 = v10;
do
{
if( !v11 )
break;
v9 = *v3++ == *v4++;
--v11;
}
while( v9 );
if( !v9 )
LABEL_19:
--v4;
}
return(_SIZE_T *)(v4 - (_BYTE *)Source2);
}
}Referenced by:
AlpcpExposeWorkOnBehalfAttribute
BiUpdateBcdObject
CmpCompareNewValueDataAgainstKCBCache
CmpFilterAcpiDockingState
CmpTransUowIsEqual
CompareNamesCaseSensitive
EtwpCalculateUpdateNotification
EtwpClearSessionAndUnreferenceEntry
EtwpTraceStackKey
EtwpTrackBinaryForSession
ExCovReadjustUnloadedModuleEntry
ExpCovIsModulePresent
HalpAuditSlicTables
HalpGenericErrorSourceRecovery
IoReportTargetDeviceChange
IoReportTargetDeviceChangeAsynchronous
IopPnPDispatch
MiCompareUserSidHotPatchNodes
NtAlpcOpenSenderProcess
NtAlpcOpenSenderThread
ObpCompareEntryLevel2
ObpGetTraceIndex
PipGenerateContainerID
PipMigratePnpState
PnpBusTypeGuidGetIndex
PnpCompareInterruptInformation
PnpDeviceRaisePropertyChangeEventWorker
PnpIsNullGuid
PnpNotifyDeviceClassChange
PnpNotifyHwProfileChange
PnpNotifyTargetDeviceChange
PnpRequestHwProfileChangeNotification
PopArePowerSettingsEqual
PopInitSIdle
PpmCompareAndApplyPolicySettings
PpmPerfCalculateQosClassPolicies
RtlGetAppContainerSidType
RtlIsCapabilitySid
RtlIsPackageSid
RtlNormalizeSecurityDescriptor
RtlpHpSizeHeap
RtlpStdLogCapturedStackTrace
SLUpdateLicenseDataInternal
SPCallServerHandleFileIntegrityQuery
SeSecurityDescriptorChangedAuditAlarm
SepCheckCapabilities
SepIsAclEqual
SepIsCapabilitySid
SepIsPackageSid
SepNormalAccessCheck
VfUtilEqualUnicodeString
VhdiInitializeBootDisk
ViCheckTag
ViCopyBackModifiedBuffer
ViDdiDispatchWmiQueryAllData
WbInitializeEncryptionSegment
WheaGetErrPacketFromErrRecord
WmipParseSysIdTable