CmpDoReDoCreateKey
__int64 __fastcall CmpDoReDoCreateKey(__int64 a1, __int64 a2){
__int64 v2;
__int64 v3;
__int16 v4;
__int16 v5;
__int64 result;
HANDLE v7;
int v8;
NTSTATUS v9;
UINT64 CreateOptions;
__int128 v11;
__int128 v12;
struct _OBJECT_ATTRIBUTES ObjectAttributes;
UINT64 Disposition;
HANDLE Handle;
void *KeyHandle;
v2 = *(_QWORD *)(a2 + 40);
v3 = a2;
Handle = 0i64;
*(&ObjectAttributes.Length + 1) = 0;
*(&ObjectAttributes.Attributes + 1) = 0;
v4 = *(_WORD *)(a2 + 34);
KeyHandle = 0i64;
DWORD1(v11) = 0;
v5 = *(_WORD *)(a2 + 32);
LODWORD(Disposition) = 0;
LOWORD(a2) = v5;
WORD1(v11) = v4;
v12 = 0i64;
*((_QWORD *)&v11 + 1) = v2;
do
{
a2 = (unsigned __int16)(a2 - 2);
LOWORD(v11) = a2;
}
while( *(_WORD *)(v2 + 2 * ((unsigned __int64)(unsigned int)a2 >> 1)) != 92 );
*((_QWORD *)&v12 + 1) = a2 + v2 + 2;
LOWORD(v12) = v5 - a2 - 2;
WORD1(v12) = v12;
result = CmpDoReOpenTransKey(a1, &v11, 0x20006u, &Handle);
if( (int)result >= 0 )
{
ObjectAttributes.SecurityQualityOfService = 0i64;
v7 = Handle;
ObjectAttributes.ObjectName = (_UNICODE_STRING *)&v12;
ObjectAttributes.SecurityDescriptor = *(void **)(v3 + 56);
v8 = *(_DWORD *)(v3 + 48) - 1;
ObjectAttributes.Length = 48;
ObjectAttributes.RootDirectory = Handle;
ObjectAttributes.Attributes = 4928;
LODWORD(CreateOptions) = 9 - (v8 != 0);
v9 = ZwCreateKey(&KeyHandle, 0xF003Fui64, &ObjectAttributes, 0i64, 0i64, CreateOptions, &Disposition);
ZwClose(v7);
if( v9 >= 0 )
ZwClose(KeyHandle);
return(unsigned int)v9;
}
return result;
}Referenced by:
CmpDoReDoRecord