热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

OpenStore是值得看一下的

OpenStore是值得看一下的在CreateNewOfflineStore和OpenExistingOfflineStore中调用。调用`anonymou

OpenStore是值得看一下的

 

CreateNewOfflineStore 和 OpenExistingOfflineStore 中调用。

调用

  `anonymous namespace'::CNtStoreCreationParameters::CNtStoreCreationParameters((int)&v20);
  v9 =((int (__stdcall*)(int))`anonymous namespace'::CNtStoreCreationParameters::Initialize)(a2);
  v10 =&v20;
  v19 =0;
  v21 =a1 & 1;
  v11 =(int *)GetRerootedSIL((int)&v20,(int *)&v19);
  if ((signed int)v11 <0
    ||(v11 =`anonymous namespace'::SetupOfflineStoreEnvironment((int)&v20,v19), (signed int)v11 <0)
    ||(v11 =(int *)`anonymous namespace'::OpenStore((_DWORD **)&v20, v19,a3, (int)a4), (signed int)v11 <0) )

 

`anonymousnamespace'::OpenStore(

classA0x4bc90b42::CNtStoreCreationParameters const *,

structWindows::Rtl::IRtlSystemIsolationLayer *,

struct_GUID const &,

structIUnknown * *)

 

//----- (10120AB0)--------------------------------------------------------
int __fastcall `anonymous namespace'::OpenStore(

_DWORD **a1,

int *a2,

int a3,

int a4)
{
  struct
IStore2 *v46; //ST10_4@47
  int (__stdcall*v47)(structIStore2 *, int, int); // esi@47
  structWindows::Rtl::IRtlSystemIsolationLayer *v51;// [sp+0h] [bp-88h]@0
  struct ICSIStore **v53; // [sp+0h][bp-88h]@35
  struct Windows::Rtl::IRtlKey *v54; // [sp+4h][bp-84h]@0
  const struct _GUID *v55; // [sp+4h][bp-84h]@8
  struct ICSIStore **v56; // [sp+4h][bp-84h]@35
  struct IStore2 *v69; // [sp+3Ch][bp-4Ch]@35
  struct Windows::ComponentStore::Rtl::IRtlComponentStore*v71; //[sp+44h] [bp-44h]@1

  v77 =a1;
  v59 =a2;
 Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame::CSimpleHResultCarryingFrame((Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame*)&v76);
  v5 =*(_DWORD*)(v4+ 36);
  v78[0] = *(_DWORD *)(v4 + 28);
  v71 =(structWindows::ComponentStore::Rtl::IRtlComponentStore *)1;
  v79 =*(_DWORD*)(v4+ 32);
  v6 =*(_WORD*)(v5+ 2 * ((unsignedint)v78[0] >> 1) - 2) == 92;
  v7 =2;
  v80 =*(_DWORD*)(v4+ 36);
  if (v6 )
  {
    v8 =(signed int)v71;
  }
  else
  {

    v8 =2;
    v81 =g_LUNICODE_STRING__bslash_;
    v82 =*((_DWORD*)&g_LUNICODE_STRING__bslash_ + 1);
    v83 =*((_DWORD*)&g_LUNICODE_STRING__bslash_ + 2);
  }
  v9 =&v78[3 * v8];
  *v9= g_LUNICODE_STRING_WinSxS[0];
  v9[1] =g_LUNICODE_STRING_WinSxS[1];
  v9[2] = g_LUNICODE_STRING_WinSxS[2];
  v66 =0;
  v67 =0;
  v68 =0;
  v10 =RtlConcatenateLUnicodeStrings(0, v8 + 1, v78, (int)&v66);
  if (v10 < 0)
  {
   Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
      &v76,
      v10);
LABEL_56:
    Windows::Auto<_LUTF8_STRING>::~Auto<_LUTF8_STRING>(&v66);
   Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CVoidRaiseFrame>::ReportErrorPropagation(
      &v76,
      v48);
    return v76;
  }
  v75 =0;
  v11 =*v59;
//  OpenRegistryKey

  v12 = (*(int(__thiscall **)(int *,_DWORD, signed int, int *,int *, _DWORD))(v11 + 20))(
          v59,
          0,
          131097,
         g_LUNICODE_STRING__bslash_Registry_bslash_Machine_bslash_COMPONENTS_bslash_,
          &v75,
          0);
  if (v12 < 0
    ||(v12 =Windows::COM::VerifyStoreVersionNumber(v75,v59, (Windows::COM *)*((_WORD *)v77 + 92), v51, v54, v57),
        v12 <0) )
  {
   Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
      &v76,
      v12);
LABEL_55:
    Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v75);
    goto LABEL_56;
  }
  v13 =*v59;
  v74 =0;
//  OpenRegistryKey

  v14 = (*(int(__thiscall **)(int *,_DWORD, signed int, int *,int *, _DWORD))(v13 + 20))(
          v59,
          0,
          131097,
         g_LUNICODE_STRING__bslash_Registry_bslash_Machine_bslash_SOFTWARE_bslash_Microsoft_bslash_Windows_bslash_CurrentVersion_bslash_SideBySide_bslash_,
          &v74,
          0);
  if (v14 < 0)
  {
    Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
      &v76,
      v14);
LABEL_54:
    Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v74);
    goto LABEL_55;
  }
  v15 =*v59;
  v73 =0;
//  OpenFileSystemDirectory

  v16 = (*(int(__thiscall **)(int *,_DWORD, signed int, int *,signed int, signed int, int *, _DWORD))(v15+ 8))(
          v59,
          0,
          1179785,
          (int*)&v66,
          7,
          33,
          &v73,
          0);
  if (v16 < 0)
  {
   Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
      &v76,
      v16);
LABEL_53:
    Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v73);
    goto LABEL_54;
  }
  v17 =v77;
  v72 =0;
  if (v77[43] )
  {
    v18 =*v59;
//  OpenRegistryKey

    v19 = (*(int(__thiscall **)(int *,_DWORD, signed int, int *,int *, _DWORD))(v18 + 20))(
            v59,
            0,
            131097,
            dword_10012014, // \Registry\Machine\ExtStorage
            (int *)&v72,
            0);
    if (v19 < 0)
    {
     Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
        &v76,
        v19);
LABEL_52:
      Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v72);
      goto LABEL_53;
    }
    v17 =v77;
  }
  v20 =*((_WORD*)v17+ 92);
  if ((_WORD)v20 )
  {
    if
(v20 == 6)
    {
      v50 =4;
    }
    else
    {
      if
(v20 == 9)
        goto LABEL_27;
      if (v20 == 12)
      {
        v50 =16;
      }
      else
      {
        if
( v20 != 5 )
        {
         Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetInvalidParameter(&v76);
          Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v72);
          Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v73);
          Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v74);
          Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v75);
          Windows::Auto<_LUTF8_STRING>::~Auto<_LUTF8_STRING>(&v66);
          v65 ="base\\wcp\\dll\\offline.cpp";
          v66 ="`anonymous-namespace'::OpenStore";
          v67 =478;
          v68 ="false";
         Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::ReportErrorOrigination(
            (int*)&v76,
            (int)&v65);
          return v76;
        }
        v50 =8;
      }
    }

    v7 =v50;
    goto LABEL_27;
  }
  v7 =1;
LABEL_27:
  if (*((_BYTE*)v17+ 186) )
    v7 |=0x20u;
  v60 =20;
  v61 =g_LUNICODE_STRING_Winners;
  v62 =64;
  v63 =0;
  v64 =0;
  v70 =0;
  v21 =v74;
  v22 =*(_DWORD*)v74;
// IRtlKey SideBySide, OpenExistingKey

  v23 = (*(int(__thiscall **)(int, _DWORD, signed int, int*, int *, _DWORD))(v22+ 40))(v21, 0, 131097, &v60,&v70, 0);
  if (v23 < 0)
  {
   Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
      &v76,
      v23);
LABEL_51:
    Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v70);
    goto LABEL_52;
  }
  v24 =(unsigned int *)v77;
  v71 =0;
  v25 =Windows::Rtl::AutoString<_LUNICODE_STRING,Windows::Auto<_LUNICODE_STRING>>::IsEmpty((int)(v77 + 40));
  v77 =0;
  if (!v25 )
    v77 =v26;
  v27 =`anonymous namespace'::CreateRtlStore(
          v7,
          (int)v59,
          v75,
          v74,
          v70,
          (int*)&v66,
          (volatilesigned __int32 *)&v71,
          (int)v77,
          v72);
  if (v27 < 0)
  {
   Windows::ErrorHandling::COM::CBaseFrame<Windows::ErrorHandling::COM::CSimpleHResultCarryingFrame>::SetNtStatus(
      &v76,
      v27);
LABEL_50:
    Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v71);
    goto LABEL_51;
  }
  v6 =(*v24& 4) == 0;
  v28 =*v24;
  v29 =v28 & 0x10;
  v30 =!v6 ?0 : 1;
  v69 =0;
  v59 =(int *)&v69;
  v31 =BUCL::Com::CFunkyOperatorAmpersandReturnType<BUCL::Com::CSmartRef<IStorePendingTransaction>>::operatorIStorePendingTransaction * *(&v59);
  v34 =Windows::COM::CopyOut(
          v30,
          v71,
          v32,
          (structWindows::ComponentStore::Rtl::IRtlComponentStore *)*((_WORD *)v24 + 92),
          v29,
          v33,
          v31,
          v52,
          v55,
          v58);
  if (v34 < 0)
    goto LABEL_61;
  if (!(unsigned__int8)operator==(a3, (int)&_GUID_a5c62f6d_5e3e_4cd9_b345_6b281d7a1d1e)
    &&!(unsigned__int8)operator==(v35, (int)&_GUID_a817521b_2b43_489f_8b84_67aceeab24a8) )
  {
    v77 =0;
    v38 =(volatile signed __int32*)Windows::ServicingAPI::Initialize(v37, v36);
    if ((signed int)v38 <0
      ||(v38 =Windows::ServicingAPI::CCSIStore::CreateOrGet(v69,v30 == 0,0, (structIStore2 *)&v77, v53, v56),
          (signedint)v38 <0) )
    {
      v39 =v77;
    }
    else
    {

      v42 =v77;
      v43 =(int (__stdcall*)(_DWORD**, int, int))**v77;
      __guard_check_icall_fptr(**v77);
      v38 =(volatile signed __int32*)v43(v42, a3, a4);
      v39 =v77;
      if ((signed int)v38 >=0 )
      {
        if
( v77 )
        {
          v77 =0;
          v44 =v39;
          v45 =(void (__stdcall*)(_DWORD))(*v39)[2];
          __guard_check_icall_fptr((*v39)[2]);
          v45(v44);
        }
        goto
LABEL_46;
      }
    }

    v76 =(__int32)v38;
    if (v39 )
    {
      v77 =0;
      v40 =v39;
      v41 =(void (__stdcall*)(_DWORD))(*v39)[2];
      __guard_check_icall_fptr((*v39)[2]);
      v41(v40);
    }
LABEL_49:
    BUCL::Com::CSmartRef<IStore2>::~CSmartRef<IStore2>(&v69);
    goto LABEL_50;
  }
  v46 =v69;
  v47 =**(int(__stdcall ***)(struct IStore2 *,int, int))v69;
  __guard_check_icall_fptr(**(_DWORD **)v69);
  v34 =v47(v46, a3, a4);
  if (v34 < 0)
  {
LABEL_61:
    v76 =v34;
    goto LABEL_49;
  }
LABEL_46:
  Windows::ErrorHandling::Rtl::CBaseFrame<Windows::ErrorHandling::Rtl::CVoidRaiseFrame>::SetCanonicalSuccess(&v76);
  BUCL::Com::CSmartRef<IStore2>::~CSmartRef<IStore2>(&v69);
  Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v71);
  Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v70);
  Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v72);
  Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v73);
  Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v74);
  Windows::Auto<Windows::Rtl::IRtlSystemIsolationLayer *>::~Auto<Windows::Rtl::IRtlSystemIsolationLayer *>(&v75);
  Windows::Auto<_LUTF8_STRING>::~Auto<_LUTF8_STRING>(&v66);
  return v76;
}


推荐阅读
  • 题目描述:给定n个半开区间[a, b),要求使用两个互不重叠的记录器,求最多可以记录多少个区间。解决方案采用贪心算法,通过排序和遍历实现最优解。 ... [详细]
  • 题目Link题目学习link1题目学习link2题目学习link3%%%受益匪浅!-----&# ... [详细]
  • 本次考试于2016年10月25日上午7:50至11:15举行,主要涉及数学专题,特别是斐波那契数列的性质及其在编程中的应用。本文将详细解析考试中的题目,并提供解题思路和代码实现。 ... [详细]
  • 本文介绍了一种解决二元可满足性(2-SAT)问题的方法。通过具体实例,详细解释了如何构建模型、应用算法,并提供了编程实现的细节和优化建议。 ... [详细]
  • UNP 第9章:主机名与地址转换
    本章探讨了用于在主机名和数值地址之间进行转换的函数,如gethostbyname和gethostbyaddr。此外,还介绍了getservbyname和getservbyport函数,用于在服务器名和端口号之间进行转换。 ... [详细]
  • 扫描线三巨头 hdu1928hdu 1255  hdu 1542 [POJ 1151]
    学习链接:http:blog.csdn.netlwt36articledetails48908031学习扫描线主要学习的是一种扫描的思想,后期可以求解很 ... [详细]
  • 本文探讨了 Objective-C 中的一些重要语法特性,包括 goto 语句、块(block)的使用、访问修饰符以及属性管理等。通过实例代码和详细解释,帮助开发者更好地理解和应用这些特性。 ... [详细]
  • 本文详细探讨了VxWorks操作系统中双向链表和环形缓冲区的实现原理及使用方法,通过具体示例代码加深理解。 ... [详细]
  • 本题涉及一棵由N个节点组成的树(共有N-1条边),初始时所有节点均为白色。题目要求处理两种操作:一是改变某个节点的颜色(从白变黑或从黑变白);二是查询从根节点到指定节点路径上的第一个黑色节点,若无则输出-1。 ... [详细]
  • Linux设备驱动程序:异步时间操作与调度机制
    本文介绍了Linux内核中的几种异步延迟操作方法,包括内核定时器、tasklet机制和工作队列。这些机制允许在未来的某个时间点执行任务,而无需阻塞当前线程,从而提高系统的响应性和效率。 ... [详细]
  • Codeforces Round #566 (Div. 2) A~F个人题解
    Dashboard-CodeforcesRound#566(Div.2)-CodeforcesA.FillingShapes题意:给你一个的表格,你 ... [详细]
  • 在多线程编程环境中,线程之间共享全局变量可能导致数据竞争和不一致性。为了解决这一问题,Linux提供了线程局部存储(TLS),使每个线程可以拥有独立的变量副本,确保线程间的数据隔离与安全。 ... [详细]
  • 实体映射最强工具类:MapStruct真香 ... [详细]
  • 作者:守望者1028链接:https:www.nowcoder.comdiscuss55353来源:牛客网面试高频题:校招过程中参考过牛客诸位大佬的面经,但是具体哪一块是参考谁的我 ... [详细]
  • 深入理解Redis的数据结构与对象系统
    本文详细探讨了Redis中的数据结构和对象系统的实现,包括字符串、列表、集合、哈希表和有序集合等五种核心对象类型,以及它们所使用的底层数据结构。通过分析源码和相关文献,帮助读者更好地理解Redis的设计原理。 ... [详细]
author-avatar
八戒走你
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有