PiCMCaptureObjectInputData
INT64 __fastcall PiCMCaptureObjectInputData(UINT64 a1, UINT64 a2, INT64 a3, INT64 a4){
int v5;
INT8 CallerMode;
int UserModeCallersCopy;
UINT64 v8;
_QWORD *v9;
VOID *v10;
UINT64 v12;
UINT64 v13;
UINT64 AllocateDestination;
v5 = 0;
CallerMode = *((_BYTE *)KeGetCurrentThread() + 562);
UserModeCallersCopy = 0;
if( !a1 || !(_DWORD)a2 )
{
UserModeCallersCopy = -1073741811;
goto LABEL_16;
}
if( (_DWORD)a3 )
{
if( (a1 & 3) != 0 )
ExRaiseDatatypeMisalignment();
v8 = a1 + (unsigned int)a2;
if( v8 > 0x7FFFFFFF0000i64 || v8 < a1 )
MEMORY[0x7FFFFFFF0000] = 0;
if( (unsigned int)a2 >= 0x1C && *(_DWORD *)a1 == 28 )
{
*(_DWORD *)a4 = 40;
*(_DWORD *)(a4 + 4) = *(_DWORD *)(a1 + 4);
*(_DWORD *)(a4 + 8) = *(_DWORD *)(a1 + 8);
*(_QWORD *)(a4 + 16) = *(unsigned int *)(a1 + 12);
*(_DWORD *)(a4 + 24) = *(_DWORD *)(a1 + 16);
*(_DWORD *)(a4 + 28) = *(_DWORD *)(a1 + 20);
*(_DWORD *)(a4 + 32) = *(_DWORD *)(a1 + 24);
}
else
{
UserModeCallersCopy = -1073741811;
}
}
else
{
if( (a1 & 7) != 0 )
ExRaiseDatatypeMisalignment();
v12 = a1 + (unsigned int)a2;
if( v12 > 0x7FFFFFFF0000i64 || v12 < a1 )
MEMORY[0x7FFFFFFF0000] = 0;
if( (unsigned int)a2 < 0x28 )
{
UserModeCallersCopy = -1073741811;
}
else
{
*(_OWORD *)a4 = *(_OWORD *)a1;
*(_OWORD *)(a4 + 16) = *(_OWORD *)(a1 + 16);
*(_QWORD *)(a4 + 32) = *(_QWORD *)(a1 + 32);
if( *(_DWORD *)a4 != 40 )
UserModeCallersCopy = -1073741811;
}
}
if( UserModeCallersCopy < 0 )
goto LABEL_33;
v9 = (_QWORD *)(a4 + 16);
v10 = *(VOID **)(a4 + 16);
*(_QWORD *)(a4 + 16) = 0i64;
if( !v10 )
{
if( !*(_DWORD *)(a4 + 24) )
goto LABEL_16;
goto LABEL_32;
}
v13 = *(unsigned int *)(a4 + 24);
if( (unsigned int)v13 >= 2 )
{
LODWORD(AllocateDestination) = 1;
UserModeCallersCopy = PiControlMakeUserModeCallersCopy(
(VOID **)(a4 + 16),
v10,
v13,
2ui64,
CallerMode,
AllocateDestination);
if( UserModeCallersCopy < 0 )
{
*v9 = 0i64;
*(_DWORD *)(a4 + 24) = 0;
}
else
{
v5 = 1;
*(_WORD *)(*v9 + 2 * ((unsigned __int64)*(unsigned int *)(a4 + 24) >> 1) - 2) = 0;
}
LABEL_16:
if( UserModeCallersCopy >= 0 )
return(unsigned int)UserModeCallersCopy;
goto LABEL_33;
}
LABEL_32:
UserModeCallersCopy = -1073741811;
LABEL_33:
if( v5 )
PiControlFreeUserModeCallersBuffer(CallerMode, *(PVOID *)(a4 + 16));
*(_OWORD *)a4 = 0i64;
*(_OWORD *)(a4 + 16) = 0i64;
*(_QWORD *)(a4 + 32) = 0i64;
return(unsigned int)UserModeCallersCopy;
}Referenced by:
PiCMCreateObject
PiCMDeleteClassKey
PiCMDeleteDevice
PiCMDeleteDeviceInterfaceKey
PiCMDeleteDeviceKey
PiCMDeleteObject
PiCMDeviceAction
PiCMGetDeviceDepth
PiCMGetDeviceStatus
PiCMGetObjectList
PiCMGetObjectPropertyKeys
PiCMGetRelatedDeviceInstance
PiCMQueryRemove
PiCMUnregisterDeviceInterface
PiCMValidateDeviceInstance