PopPolicyDeviceTargetChange

NTSTATUS __stdcall PopPolicyDeviceTargetChange(VOID *NotificationStructure, VOID *Context){
  char v4; 
  __int64 v5; 
  __int64 v6; 
  __int64 v7; 

  v4 = 0;
  PopAcquireRwLockExclusive((_POP_RW_LOCK *)&PopPolicyDeviceLock);
  v5 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_QUERY_REMOVE.Data1;
  if( !v5 )
    v5 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_QUERY_REMOVE.Data4;
  if( !v5 )
  {
    PopPolicyDeviceRemove((_POP_POLICY_DEVICE *)Context);
    goto LABEL_14;
  }
  v6 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_REMOVE_COMPLETE.Data1;
  if( !v6 )
    v6 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_REMOVE_COMPLETE.Data4;
  if( !v6 )
  {
    PopPolicyDeviceRemove((_POP_POLICY_DEVICE *)Context);
LABEL_13:
    v4 = 1;
    goto LABEL_14;
  }
  v7 = *(_QWORD *)((char *)NotificationStructure + 4) - *(_QWORD *)&GUID_TARGET_DEVICE_REMOVE_CANCELLED.Data1;
  if( !v7 )
    v7 = *(_QWORD *)((char *)NotificationStructure + 12) - *(_QWORD *)GUID_TARGET_DEVICE_REMOVE_CANCELLED.Data4;
  if( !v7 )
  {
    PopConnectToPolicyDevice(*((unsigned int *)Context + 4), (char *)Context + 32);
    goto LABEL_13;
  }
LABEL_14:
  PopReleaseRwLock((_POP_RW_LOCK *)&PopPolicyDeviceLock);
  if( v4 )
  {
    PnpUnregisterPlugPlayNotification(*((PVOID *)Context + 3), 1);
    ExFreePoolWithTag(Context, *((_DWORD *)&unk_140C03264 + 8 * *((int *)Context + 4)));
  }
  return 0;
}

Referenced by:

No references.