HalpStopLegacyUsbInterruptsInternal

VOID __fastcall HalpStopLegacyUsbInterruptsInternal(INT64 a1){
  int v1; 
  __int64 *v2; 
  __int64 *v3; 
  char v4; 
  _WORD result[32]; 
  v1 = a1;
  memset((INT64)result, 0i64);
  if( v1 < 5 )
  {
    v2 = (__int64 *)HalpUsbControllerList;
    while( v2 != &HalpUsbControllerList )
    {
      v3 = v2;
      v2 = (__int64 *)*v2;
      if( !*((_BYTE *)v3 + 24)
        && *((_BYTE *)v3 + 26) < 0x20u
        && (unsigned int)((__int64(__fastcall *)(_QWORD, _QWORD, _WORD *, _QWORD, int))qword_140C00630)(
                           *((unsigned int *)v3 + 4),
                           *((unsigned int *)v3 + 5),
                           result,
                           0i64,
                           2)
        && (unsigned __int16)(result[0] - 1) <= 0xFFFDu )
      {
        v4 = *((_BYTE *)v3 + 26);
        if( v4 )
        {
          if( v4 == 16 )
            HalpUsbLegacyStopOhciInterrupt(65533i64, *((unsigned int *)v3 + 4), *((unsigned int *)v3 + 5));
          else
            *((_BYTE *)v3 + 24) = 1;
        }
        else
        {
          HalpUsbLegacyStopUhciInterrupt(
            65533i64,
            *((unsigned int *)v3 + 4),
            *((unsigned int *)v3 + 5),
            *((_BYTE *)v3 + 25));
        }
      }
    }
  }
}

Referenced by:

HalpStopLegacyUsbInterrupts