解读 CreateMutexWin32A

解读 CreateMutexWin32A



//----- (10029390) --------------------------------------------------------
void *__stdcall CreateMutexWin32A(const unsigned __int16 *a1, int a2)
{
  struct _SECURITY_ATTRIBUTES *v2; // ebx@1
  char *v3; // eax@1
  const CHAR *v4; // esi@1
  ACL *v5; // edi@3
  HANDLE v6; // esi@5
  char v8; // [sp+Ch] [bp-38h]@3
  int v9; // [sp+20h] [bp-24h]@4
  char *v10; // [sp+24h] [bp-20h]@4
  int v11; // [sp+28h] [bp-1Ch]@4
  int v12; // [sp+2Ch] [bp-18h]@1
  int v13; // [sp+30h] [bp-14h]@1
  unsigned int v14; // [sp+34h] [bp-10h]@1
  int v15; // [sp+40h] [bp-4h]@1
  v2 = 0;
  v12 = 0;
  v13 = 0;
  v14 = 0;
  v15 = 0;
  v3 = (char *)CBuffer::Allocate((CBuffer *)&v12, wcslen(a1) + 2);
  v4 = v3;
  if ( !v3 || StringCbPrintfA(v3, v14, "%S", a1) < 0 )
    goto LABEL_12;
  v5 = BuildCustomizedSD(&v8);
  if ( v5 )
  {
    v11 = 0;
    v9 = 12;
    v2 = (struct _SECURITY_ATTRIBUTES *)&v9;
    v10 = &v8;
  }
  v6 = CreateMutexA(v2, 0, v4);
  FreeAdministratorSD(v5);
  if ( v6 )
  {
    if ( a2 )
      WaitForSingleObject(v6, 0xFFFFFFFF);
  }
  else
  {
LABEL_12:
    v6 = 0;
  }
  CBuffer::~CBuffer((CBuffer *)&v12);
  return v6;
}

你可能感兴趣的:(WCP,操作系统相关,编程语言,系统维护)