PipIommuRetrieveSecondaryDeviceId
__int64 __fastcall PipIommuRetrieveSecondaryDeviceId(_QWORD *a1, _QWORD *a2){
_DWORD *Pool2;
unsigned int(__fastcall *v3)(_QWORD, _QWORD, _QWORD, UINT64 *);
int v6;
__int64 result;
UINT64 v8;
v8 = 0i64;
Pool2 = 0i64;
v3 = (unsigned int(__fastcall *)(_QWORD, _QWORD, _QWORD, UINT64 *))a1[9];
if( !v3 )
{
v6 = -1073741637;
goto LABEL_15;
}
if( v3(a1[1], 0i64, 0i64, &v8) != -1073741789 || !v8 )
{
v6 = -1073741823;
LABEL_12:
if( v6 >= 0 )
goto LABEL_15;
goto LABEL_13;
}
Pool2 = ExAllocatePool2(256i64, v8, 0x64706E50ui64);
if( !Pool2 )
{
v6 = -1073741670;
goto LABEL_15;
}
v6 = ((__int64(__fastcall *)(_QWORD, UINT64, _DWORD *, _QWORD))a1[9])(a1[1], v8, Pool2, 0i64);
if( v6 < 0 )
goto LABEL_13;
if( *Pool2 == 1 )
{
PipIommuValidateDeviceId(a1, (INT64)Pool2, v8);
goto LABEL_12;
}
v6 = -1073741637;
LABEL_13:
if( Pool2 )
{
ExFreePoolWithTag(Pool2, 0x64706E50u);
Pool2 = 0i64;
}
LABEL_15:
result = (unsigned int)v6;
*a2 = Pool2;
return result;
}Referenced by:
PiIommuAllocateExtension