HalpStopLegacyUsbInterruptsInternal

VOID __stdcall HalpStopLegacyUsbInterruptsInternal(INT64 a1){
  int v1; 
  void **v2; 
  void **v3; 
  char v4; 
  __int16 v5[32]; 

  v1 = a1;
  memset(v5, 0i64, sizeof(v5));
  if( v1 < 5 )
  {
    v2 = (void **)*(&CmpDummyThreadEvent + 532);
    while( v2 != (void **)((char *)&CmpDummyThreadEvent + 4256) )
    {
      v3 = v2;
      v2 = (void **)*v2;
      if( !*((_BYTE *)v3 + 24)
        && *((_BYTE *)v3 + 26) < 0x20u
        && (unsigned int)((__int64(__fastcall *)(_QWORD, _QWORD, __int16 *, _QWORD, int))qword_140C00630)(
                           *((unsigned int *)v3 + 4),
                           *((unsigned int *)v3 + 5),
                           v5,
                           0i64,
                           2)
        && (unsigned __int16)(v5[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