PiDrvDbRegisterNodeCallback

BOOL __stdcall PiDrvDbRegisterNodeCallback(WCHAR *Name, INT64 *a2){
  NTSTATUS v4; 
  __int64 v6; 
  UINT64 v7; 
  VOID **PoolWithTag; 
  INT64 v9; 

  if( wcsicmp(Name, L"SYSTEM") )
  {
    v6 = -1i64;
    do
      ++v6;
    while( Name[v6] );
    v7 = (unsigned int)(2 * v6 + 76);
    PoolWithTag = ExAllocatePoolWithTag(1ui64, v7, 1650749520i64);
    if( PoolWithTag )
    {
      v4 = RtlStringCchPrintfW((WCHAR *)PoolWithTag, v7 >> 1, (WCHAR *)L"%ws\\%ws%ws%ws");
      if( v4 >= 0 )
      {
        v4 = PiDrvDbRegisterNode(Name, 0xAui64, v9, (INT64)PoolWithTag);
        if( v4 == 0x40000000 )
          v4 = 0;
      }
      ExFreePoolWithTag(PoolWithTag, 0);
    }
    else
    {
      v4 = -1073741670;
    }
  }
  else
  {
    v4 = 0;
  }
  *(_DWORD *)a2 = v4;
  return v4 >= 0;
}

Referenced by:

No references.