HANDLE __stdcall sub_102C0(PCSZ SourceString,int nFrom)
{
KIRQL curIrql= KeGetCurrentIrql();
if(curIrql == 0)
return;
if(!SourceString)
return;
ANSI_STRING ansi_str;
RtlInitAnsiString(&ansi_str,SourceString);
PVOID p;
p = ExAllocatePoolWithTag(NonPagedPool,0x400,"Ddk ");
UNICODE_STRING uni_str;
NTSTATUS status = RtlAnsiStringToUnicodeString(&uni_str, &ansi_str, 0);
if(status == 0)
{
ExFreePool(p);
return;
}
int nTemp = nFrom;
OBJECT_ATTRIBUTES Object_attribute;
InitializeObjectAttributes(
&Object_attribute,
&uni_str,
OBJ_CASE_INSENSITIVE,
0,
0);
HANDLE hkey;
int nDesiredAccess;
_asm{
mov eax,nFrom
neg eax
sbb eax,eax
and eax,0xD0026
add eax,0x20019
mov nDesiredAccess,eax
}
ZwCreateKey(
&hkey,
nDesiredAccess,
&Object_attribute,
NULL,
NULL,//class
NULL,//CreateOptions
NULL//Disposition
);
}