CompareEventEntry

NTSTATUS __fastcall CompareEventEntry(UINT8 a1, INT64 a2, INT64 a3){
  __int64 v3; 
  unsigned int v6; 
  NTSTATUS result; 
  unsigned int i; 
  __int64 v9; 
  v3 = *(_QWORD *)(a3 + 16);
  v6 = a1;
  result = memcmp((PVOID)(a2 + 16), (PVOID)(v3 + 16), 8ui64);
  if( !result )
  {
    for( i = *(unsigned __int8 *)(a3 + 45) + 2; i < v6; ++i )
    {
      v9 = 16i64 * i;
      result = *(_DWORD *)(v9 + a2 + 8) - *(_DWORD *)(v9 + v3 + 8);
      if( result )
        return result;
      result = memcmp(*(PVOID *)(v9 + a2), *(PVOID *)(v9 + v3), *(unsigned int *)(v9 + a2 + 8));
      if( result )
        return result;
    }
    return 0;
  }
  return result;
}

Referenced by:

InsertEventEntryInLookUpTable