PiDevCfgMigrateRootDevice
NTSTATUS __stdcall PiDevCfgMigrateRootDevice(
_DEVICE_NODE *DeviceNode,
PI_DEVCFG_DEVICE_CONTEXT *DeviceContext,
UINT64 *ConfigFlags){
WCHAR *v5;
int v7;
int v8;
unsigned int *v9;
_UNICODE_STRING v11;
VOID *a3;
_KEY_VALUE_FULL_INFORMATION *Information;
a3 = 0i64;
Information = 0i64;
v5 = (WCHAR *)*((_QWORD *)DeviceContext + 1);
v11 = 0i64;
LOBYTE(v7) = 0;
v8 = PiDevCfgOpenDeviceMigrationKey(v5, (VOID **)DeviceContext, &a3);
if( v8 >= 0 )
{
if( IopGetRegistryValue(a3, (PWCHAR)L"ConfigFlags", 0i64, &Information) >= 0 )
{
if( PnpValidateRegistryDword((__int64)Information) )
v7 = *(unsigned int *)((char *)v9 + v9[2]);
ExFreePoolWithTag(v9, 0);
}
if( (v7 & 1) == 0
|| (v11.Buffer = L"DriverInfName", *(_DWORD *)&v11.Length = 1835034, PnpRegistryValueExists(a3, &v11)) )
{
v8 = -1073741823;
}
else
{
v8 = PiDevCfgMigrateDevice(DeviceNode, DeviceContext, 0i64, 0i64, ConfigFlags, 0i64);
}
}
if( a3 )
ZwClose((_HANDLE)a3);
return v8;
}Referenced by:
PiDevCfgProcessDevice