VOID __stdcall MiUnmapImageForEnclaveUse(VOID *BaseAddress){
_KAPC_STATE ApcState;
memset(&ApcState, 0, sizeof(ApcState));
KiStackAttachProcess(PsSecureSystemProcess, 0i64, &ApcState);
MiUnmapViewOfSection((_EPROCESS *)PsSecureSystemProcess, BaseAddress, 0i64);
KiUnstackDetachProcess(&ApcState, 0i64);
}