IopRegistryInitializeCallbacks

INT64 __stdcall IopRegistryInitializeCallbacks(){
  WCHAR v0; 
  unsigned int v1; 
  wchar_t **v2; 
  wchar_t *v3; 
  wchar_t *v4; 
  BOOL WatchTree; 
  BOOL Asynchronous; 
  struct _UNICODE_STRING DestinationString; 
  UINT8 FoundFullPath; 
  v1 = 0;
  DestinationString = 0i64;
  v2 = &IopRegistryRegisteredCallbacks;
  FoundFullPath = 0;
  if( off_140C030B0 )
  {
    v3 = 0i64;
    do
    {
      v4 = v2[6];
      if( v4 )
        LODWORD(v4) = ((__int64(__fastcall *)(wchar_t **))v4)(v2);
      if( (int)v4 < 0 )
      {
        *((_DWORD *)v2 + 2) = 0;
      }
      else
      {
        RtlInitUnicodeString(&DestinationString, *v2, v0);
        v2[8] = 0i64;
        v2[10] = (wchar_t *)IopRegistryCallback;
        v2[11] = v3;
        if( (int)IopRegistryOpenDeepestPath(&DestinationString, (PVOID *)v2 + 4, &FoundFullPath) >= 0 )
        {
          LOBYTE(Asynchronous) = 1;
          LOBYTE(WatchTree) = 1;
          ZwNotifyChangeKey(
            v2[4],
            0i64,
            (PIO_APC_ROUTINE)(v2 + 8),
            (PVOID)1,
            (PIO_STATUS_BLOCK)v2 + 6,
            *((_DWORD *)v2 + 2),
            WatchTree,
            0i64,
            0,
            Asynchronous);
          if( FoundFullPath )
            *((_DWORD *)v2 + 10) |= 1u;
        }
      }
      v3 = (wchar_t *)++v1;
      v2 = &(&IopRegistryRegisteredCallbacks)[14 * v1];
    }
    while( v2[2] );
  }
  return 0i64;
}

Referenced by:

IoInitSystem