ExInitializeLeapSecondData

NTSTATUS __stdcall ExInitializeLeapSecondData(){
  int v0; 
  VOID *v1; 
  UINT64 v2; 
  UINT64 v3; 
  _MDL *PoolWithTag; 
  _MDL *v5; 
  __int16 v6; 
  VOID *v7; 
  PVOID *Object; 
  PVOID *Objecta; 
  POBJECT_HANDLE_INFORMATION HandleInformation; 
  POBJECT_HANDLE_INFORMATION HandleInformationa; 
  _LARGE_INTEGER v13[7]; 
  VOID *MappedBase; 
  VOID *Handle; 
  PVOID Section; 
  UINT64 ViewSize; 

  Handle = 0i64;
  v13[0].QuadPart = 4096i64;
  LODWORD(HandleInformation) = 0x8000000;
  LODWORD(Object) = 4;
  v0 = ZwCreateSection((UINT64)&Handle, 6ui64, 0i64, (INT64 *)v13, (INT64)Object, (INT64)HandleInformation, 0i64);
  if( v0 >= 0 )
  {
    Section = 0i64;
    v0 = ObReferenceObjectByHandle(Handle, 6ui64, MmSectionObjectType, 0, &Section, 0i64);
    if( v0 >= 0 )
    {
      MappedBase = 0i64;
      ViewSize = 0i64;
      v1 = Section;
      v0 = MmMapViewInSystemSpace(Section, &MappedBase, &ViewSize);
      if( v0 >= 0 )
      {
        v2 = ViewSize;
        LODWORD(v3) = MmSizeOfMdl(MappedBase, ViewSize);
        PoolWithTag = (_MDL *)ExAllocatePoolWithTag(0x200ui64, v3, 1683189836i64);
        v5 = PoolWithTag;
        if( !PoolWithTag )
          goto LABEL_11;
        PoolWithTag->Next = 0i64;
        v6 = (__int16)MappedBase;
        PoolWithTag->Size = 8 * (((((unsigned __int16)MappedBase & 0xFFF) + v2 + 4095) >> 12) + 6);
        PoolWithTag->MdlFlags = 0;
        PoolWithTag->StartVa = (void *)((unsigned __int64)MappedBase & 0xFFFFFFFFFFFFF000ui64);
        PoolWithTag->ByteOffset = v6 & 0xFFF;
        PoolWithTag->ByteCount = v2;
        MmProbeAndLockPages(PoolWithTag, 0, IoWriteAccess);
        LODWORD(HandleInformationa) = 1073741840;
        LODWORD(Objecta) = 0;
        v7 = MmMapLockedPagesSpecifyCache(v5, 0, MmCached, 0i64, (UINT64)Objecta, (UINT64)HandleInformationa);
        if( v7 )
        {
          v0 = MmUnmapViewInSystemSpace(MappedBase);
          if( v0 >= 0 )
          {
            ExpLeapSecondDataLock._bf_0 = 0i64;
            ExLeapSecondDataSectionPointer = v1;
            memset(v7, 0i64, v2);
            ExpReadLeapSecondData((BOOL *)v7, 0);
            *(&ExBootDevicesRemovedEvent + 103) = v7;
          }
        }
        else
        {
LABEL_11:
          v0 = -1073741801;
        }
      }
    }
  }
  if( Handle )
    ZwClose((_HANDLE)Handle);
  return v0;
}

Referenced by:

No references.