SMKM_STORE_MGR::SmCompressCtxCreateThread
__int64 __fastcall SMKM_STORE_MGR::SmCompressCtxCreateThread(__int64 a1, __int64 a2, int a3){
_QWORD *ThreadParams;
void *StartContext;
void(__fastcall *StartRoutine)(PVOID);
NTSTATUS v8;
__int16 Object;
char v11;
int v12;
__int64 v13[3];
void *ThreadHandle;
ThreadHandle = 0i64;
ThreadParams = SMKM_STORE_MGR::SmCompressCtxCreateThreadParams(a1, a3);
StartContext = ThreadParams;
if( ThreadParams )
{
ThreadParams[1] = a2;
if( a3 )
{
Object = 0;
v12 = 0;
v13[1] = (__int64)v13;
v13[0] = (__int64)v13;
v11 = 6;
ThreadParams[2] = &Object;
StartRoutine = SMKM_STORE_MGR::SmCompressCtxWorkerThread;
}
else
{
StartRoutine = SMKM_STORE_MGR::SmCompressCtxBalancerThread;
}
v8 = PsCreateSystemThread(
&ThreadHandle,
0x1FFFFFu,
0i64,
*(HANDLE *)(a2 + 1856),
0i64,
(PKSTART_ROUTINE)StartRoutine,
StartContext);
if( v8 >= 0 )
{
if( a3 )
KeWaitForSingleObject(&Object, WrKernel, 0, 0, 0i64);
StartContext = 0i64;
v8 = 0;
}
if( StartContext )
SMKM_STORE_MGR::SmCompressContextDeleteThreadParams(StartContext);
}
else
{
v8 = -1073741670;
}
if( ThreadHandle )
ObCloseHandle(ThreadHandle, 0);
return(unsigned int)v8;
}
Referenced by:
No references.