IoWMIOpenBlock
NTSTATUS __stdcall IoWMIOpenBlock(_GUID *Guid, UINT64 DesiredAccess, PVOID *DataBlockObject){
DWORD v4;
__int64 v5;
WCHAR *v6;
WCHAR v7;
WCHAR *v8;
WCHAR v9;
int v10;
NTSTATUS result;
PADAPTER_OBJECT v12;
struct _UNICODE_STRING DestinationString;
__int128 v14;
struct _UNICODE_STRING *p_DestinationString;
__int64 v16;
__int128 v17;
WCHAR SourceString[9];
__int16 pszDest[39];
v12 = 0i64;
v4 = DesiredAccess;
v5 = 46i64;
DestinationString = 0i64;
v6 = SourceString;
do
{
if( v5 == -2147483600 )
break;
v7 = *(WCHAR *)((char *)v6 + (char *)L"\\WmiGuid\\" - (char *)SourceString);
if( !v7 )
break;
*v6++ = v7;
--v5;
}
while( v5 );
v8 = v6 - 1;
if( v5 )
v8 = v6;
*v8 = 0;
RtlStringCchPrintfW((WCHAR *)pszDest, 0x25ui64, (WCHAR *)L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x");
RtlInitUnicodeString(&DestinationString, SourceString, v9);
p_DestinationString = &DestinationString;
v16 = 512i64;
v14 = 0i64;
LODWORD(v14) = 48;
v17 = 0i64;
if( (v4 & 4) != 0 )
v10 = 2244928;
else
v10 = (v4 & 0x40000) != 0 ? 2244872 : 2244924;
result = WmipOpenBlock(v10, 0i64, (__int64)&v14, v4, &v12);
if( result >= 0 )
{
*DataBlockObject = v12;
return 0;
}
return result;
}Referenced by:
No references.