热门标签 | 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;
}


推荐阅读
  • 入门指南:使用FastRPC技术连接Qualcomm Hexagon DSP
    本文旨在为初学者提供关于如何使用FastRPC技术连接Qualcomm Hexagon DSP的基础知识。FastRPC技术允许开发者在本地客户端实现远程调用,从而简化Hexagon DSP的开发和调试过程。 ... [详细]
  • linux网络子系统分析(二)—— 协议栈分层框架的建立
    目录一、综述二、INET的初始化2.1INET接口注册2.2抽象实体的建立2.3代码细节分析2.3.1socket参数三、其他协议3.1PF_PACKET3.2P ... [详细]
  • 编译原理中的语法分析方法探讨
    本文探讨了在编译原理课程中遇到的复杂文法问题,特别是当使用SLR(1)文法时遇到的多重规约与移进冲突。文章讨论了可能的解决策略,包括递归下降解析、运算符优先级解析等,并提供了相关示例。 ... [详细]
  • UVa 1579 - 套娃问题
    本题主要涉及动态规划(DP)的应用,通过计算将前i个套娃合并成多个套娃组所需的最小操作次数来解决问题。具体来说,f(i) 表示前i个套娃合并成多个套娃组所需的操作次数,其计算公式为 f(i) = min(f(j) + dp(j+1, i))。 ... [详细]
  • 问题描述现在,不管开发一个多大的系统(至少我现在的部门是这样的),都会带一个日志功能;在实际开发过程中 ... [详细]
  • 高级缩放示例.就像谷歌地图一样.它仅缩放图块,但不缩放整个图像.因此,缩放的瓷砖占据了恒定的记忆,并且不会为大型缩放图像调整大小的图像.对于简化的缩放示例lookhere.在Win ... [详细]
  • 小编给大家分享一下Vue3中如何提高开发效率,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获, ... [详细]
  • 本文详细探讨了 Java 中 org.apache.gobblin.metrics.GobblinMetrics 类下的 getName() 方法的使用场景及其代码实现,提供了多个实际应用示例以加深理解。 ... [详细]
  • 在Qt框架中,信号与槽机制是一种独特的组件间通信方式。本文探讨了这一机制相较于传统的C风格回调函数所具有的优势,并分析了其潜在的不足之处。 ... [详细]
  • 本文详细介绍了Windows网络编程中常用的几个关键结构体,包括sockaddr_in、in_addr和hostent,解释了它们的定义和用途,并提供了实际应用中的示例。 ... [详细]
  • 本文档介绍了如何使用ESP32开发板在STA模式下实现与TCP服务器的通信,包括环境搭建、代码解析及实验步骤。 ... [详细]
  • 线段树详解与实现
    本文详细介绍了线段树的基本概念及其在编程竞赛中的应用,并提供了一个具体的线段树实现代码示例。 ... [详细]
  • 本文介绍了如何利用X_CORBA实现远程对象调用,并通过多个示例程序展示了其功能与应用,包括基础的Hello World示例、文件传输工具以及一个完整的聊天系统。 ... [详细]
  • 本文将深入探讨 Unreal Engine 4 (UE4) 中的距离场技术,包括其原理、实现细节以及在渲染中的应用。距离场技术在现代游戏引擎中用于提高光照和阴影的效果,尤其是在处理复杂几何形状时。文章将结合具体代码示例,帮助读者更好地理解和应用这一技术。 ... [详细]
  • 本文探讨了如何通过状态压缩动态规划(状压DP)和矩阵快速幂技术来解决公交线路问题。特别地,我们利用连续K个站点的状态来进行状态压缩,并通过矩阵快速幂加速计算过程。 ... [详细]
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社区 版权所有