PopReadUlongPowerKey

INT64 __fastcall PopReadUlongPowerKey(WCHAR *a1, VOID *a2){
  INT64 result; 
  unsigned int v4; 
  result = PopReadRegKeyValue(
             (WCHAR *)L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Power",
             a1,
             4ui64,
             4i64,
             a2);
  if( (int)result < 0 )
  {
    *(_DWORD *)a2 = 1;
    return result;
  }
  v4 = *(_DWORD *)a2;
  if( *(_DWORD *)a2 != 100 )
  {
    if( !v4 )
    {
      *(_DWORD *)a2 = 1;
      return 3221226034i64;
    }
    if( v4 > 0xA )
    {
      *(_DWORD *)a2 = 10;
      return 3221226034i64;
    }
  }
  return result;
}

Referenced by:

PopBatteryInitPhaseTwo